bug-gnu-emacs
[Top][All Lists]
Advanced

[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


From: Eli Zaretskii
Subject: bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff
Date: Tue, 11 Apr 2017 18:36:25 +0300

> From: npostavs@users.sourceforge.net
> Cc: 26412@debbugs.gnu.org
> Date: Tue, 11 Apr 2017 10:13:34 -0400
> 
> Eli Zaretskii <eliz@gnu.org> 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) 
> prefix?
> -                (radix-tree-lookup (cdr pair) "")) ;Nothing to expand!
> +        (if (and (not (string= "def" s)) ; Don't use "def" in 
> deffoo-pkg-thing.
> +                 (or (> (length s) 2)    ;Long enough!
> +                     (string-match ".[[:punct:]]\\'" s) ;A real (tho short) 
> prefix?
> +                     (radix-tree-lookup (cdr pair) ""))) ;Nothing to expand!
>              (push pair prefixes) ;Keep it as is.
>            (radix-tree-iter-subtrees
>             (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.

Thanks.





reply via email to

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