emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master f515d658e5 1/2: Don't quote numbers in byte-run--set-*


From: Stefan Monnier
Subject: Re: master f515d658e5 1/2: Don't quote numbers in byte-run--set-*
Date: Fri, 17 Jun 2022 13:58:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>  (defalias 'byte-run--set-doc-string
>    #'(lambda (f _args pos)
>        (list 'function-put (list 'quote f)
> -            ''doc-string-elt (list 'quote pos))))
> +            ''doc-string-elt (if (numberp pos)
> +                                 pos
> +                               (list 'quote pos)))))

Should we push this one a step further, as below?

>  (defalias 'byte-run--set-indent
>    #'(lambda (f _args val)
>        (list 'function-put (list 'quote f)
> -            ''lisp-indent-function (list 'quote val))))
> +            ''lisp-indent-function (if (numberp val)
> +                                       val
> +                                     (list 'quote val)))))

Doing the same here would sadly break too much existing code.


        Stefan


diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index dd90bcf4d82..140a1d765d5 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -217,9 +217,7 @@ 'byte-run--set-doc-string
 (defalias 'byte-run--set-indent
   #'(lambda (f _args val)
       (list 'function-put (list 'quote f)
-            ''lisp-indent-function (if (numberp val)
-                                       val
-                                     (list 'quote val)))))
+            ''lisp-indent-function val))))
 
 (defalias 'byte-run--set-speed
   #'(lambda (f _args val)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 200af057cd7..b1579a61fe5 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -545,7 +545,7 @@ cl-defmethod
 \(and can be extended) by the various methods of `cl-generic-generalizers'.
 
 \(fn NAME [EXTRA] [QUALIFIER] ARGS &rest [DOCSTRING] BODY)"
-  (declare (doc-string cl--defmethod-doc-pos) (indent defun)
+  (declare (doc-string #'cl--defmethod-doc-pos) (indent defun)
            (debug
             (&define                    ; this means we are defining something
              [&name [sexp   ;Allow (setf ...) additionally to symbols.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]