[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated s
bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff
Tue, 11 Apr 2017 18:36:25 +0300
> From: address@hidden
> Cc: address@hidden
> Date: Tue, 11 Apr 2017 10:13:34 -0400
> Eli Zaretskii <address@hidden> writes:
> >> Which comes from these macros in lisp/mh/mh-acros.el:
> >> (defmacro defun-mh (name function arg-list &rest body)
> >> (defmacro defmacro-mh (name macro arg-list &rest body)
> > Can we modify autoloads such that "def" is not collected here? It
> > could collect defun-mh and defmacro-mh instead, couldn't it?
> This seems to work.
> --- i/lisp/emacs-lisp/autoload.el
> +++ w/lisp/emacs-lisp/autoload.el
> @@ -546,9 +546,10 @@ autoload--make-defs-autoload
> ;; "cc-helper" and "c-mode", you'll get "c" in the root prefixes.
> (dolist (pair (prog1 prefixes (setq prefixes nil)))
> (let ((s (car pair)))
> - (if (or (> (length s) 2) ;Long enough!
> - (string-match ".[[:punct:]]\\'" s) ;A real (tho short)
> - (radix-tree-lookup (cdr pair) "")) ;Nothing to expand!
> + (if (and (not (string= "def" s)) ; Don't use "def" in
> + (or (> (length s) 2) ;Long enough!
> + (string-match ".[[:punct:]]\\'" s) ;A real (tho short)
> + (radix-tree-lookup (cdr pair) ""))) ;Nothing to expand!
> (push pair prefixes) ;Keep it as is.
> (cdr pair) (lambda (prefix subtree)
> Here is the resulting diff for loaddefs:
LGTM, let's wait for a few days for comments, and please push if
nothing comes up.