unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23648: [PATCH] `defun-declarations-alist' can be unintentionally modified
@ 2016-05-29 14:11 Paul Pogonyshev
  2016-07-18  3:00 ` npostavs
  0 siblings, 1 reply; 17+ messages in thread
From: Paul Pogonyshev @ 2016-05-29 14:11 UTC (permalink / raw)
  To: 23648

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

I quite often get the following messages:

Warning: Unknown defun property ‘compiler-macro’ in ...

As far as I could trace it, the problem is indirectly caused by
`define-inline'. While definition of `defun-declarations-alist' does
contain `compiler-macro' in its init form, it can be removed later.
E.g. when I evaluated the variable, it was not there anymore, only
`gv-setter' was there.

It seems this is done unintentionally by `elisp-completion-at-point':

                       (`declare
                        (list t (mapcar (lambda (x) (symbol-name (car x)))
                                        (delete-dups
                                         ;; FIXME: We should include some
                                         ;; docstring with each entry.
                                         (append
                                          macro-declarations-alist
                                          defun-declarations-alist)))))

Here `delete-dups' destructively modifies a list that includes
`defun-declarations-alist' as its tail verbatim, not as a copy.
Attached patch should fix that.

Paul

* elisp-mode.el (elisp-completion-at-point): Fix to not alter
`defun-declarations-alist' by side effect.

[-- Attachment #2: xxx.diff --]
[-- Type: text/plain, Size: 1028 bytes --]

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 2ad22dd..d8f3162 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -533,9 +533,9 @@ It can be quoted, or be inside a quoted form."
                                         (delete-dups
                                          ;; FIXME: We should include some
                                          ;; docstring with each entry.
-                                         (append
-                                          macro-declarations-alist
-                                          defun-declarations-alist)))))
+                                         (append macro-declarations-alist
+                                                 defun-declarations-alist
+                                                 nil)))))
                        ((and (or `condition-case `condition-case-unless-debug)
                              (guard (save-excursion
                                       (ignore-errors

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-07-24 17:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-29 14:11 bug#23648: [PATCH] `defun-declarations-alist' can be unintentionally modified Paul Pogonyshev
2016-07-18  3:00 ` npostavs
2016-07-18 14:33   ` Eli Zaretskii
2016-07-18 15:53     ` Noam Postavsky
2016-07-18 18:16       ` Eli Zaretskii
2016-07-18 18:58         ` Noam Postavsky
2016-07-18 19:08           ` Eli Zaretskii
2016-07-18 21:28             ` Michael Heerdegen
2016-07-19  2:40               ` Eli Zaretskii
2016-07-21  1:09                 ` npostavs
2016-07-21 14:22                   ` Eli Zaretskii
2016-07-21 21:27                     ` Noam Postavsky
2016-07-23  8:54                       ` Eli Zaretskii
2016-07-23 14:18                         ` npostavs
2016-07-24 17:07                           ` Paul Pogonyshev
2016-07-24 17:31                             ` Eli Zaretskii
2016-07-18 19:17   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).