emacs-devel
[Top][All Lists]
Advanced

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

Re: master 5065698: Move the ‘declare’ form before the interactive spec


From: Juri Linkov
Subject: Re: master 5065698: Move the ‘declare’ form before the interactive spec in 10 functions.
Date: Fri, 22 Jan 2021 00:32:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> It seems the right fix is to change the format of the
>>> "Unknown defun property" warning to the same format
>>> whose highlighting is already supported, i.e. with
>>>
>>>   filename:line-number:column-number: Warning: Unknown defun property
>>
>> But the problem is that filename is unknown here.
>
> Traditionally, you can work around this by using "<unknown>" or
> "<stdin>" or some such pseudo-filename.

Then maybe to use a function name as a file name?

diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 0f8dd5a284..619bcf9278 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -301,8 +301,9 @@ defun
                                 (cdr body)
                               body)))
                     nil)
-                   (t (message "Warning: Unknown defun property `%S' in %S"
-                               (car x) name)))))
+                   (t (message "%S:%d:Warning: Unknown defun property `%S'"
+                               name (count-lines (point-min) (point))
+                               (car x))))))
                    decls))
           (def (list 'defalias
                      (list 'quote name)



reply via email to

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