all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26412@debbugs.gnu.org
Subject: bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff
Date: Tue, 11 Apr 2017 10:13:34 -0400	[thread overview]
Message-ID: <87bms3t4kx.fsf@users.sourceforge.net> (raw)
In-Reply-To: <838tn8l74p.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Apr 2017 16:33:26 +0300")

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:

--- loaddefs.el    2017-04-10 13:26:10.404737000 -0400
+++ loaddefs-nodef.el    2017-04-10 13:24:32.000000000 -0400
@@ -4732,7 +4732,7 @@
 ;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (0 0 0 0))
 ;;; Generated autoloads from emacs-lisp/cl.el
 
-(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cl" '("cl-" "def" "lexical-let" "labels" "flet")))
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "cl" '("cl-" "defsetf" "define-" "lexical-let" "labels" "flet")))
 
 ;;;***
 
@@ -20261,7 +20261,7 @@
 ;;;### (autoloads nil "mh-acros" "mh-e/mh-acros.el" (0 0 0 0))
 ;;; Generated autoloads from mh-e/mh-acros.el
 
-(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mh-acros" '("mh-" "with-mh-folder-updating" "def")))
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mh-acros" '("mh-" "with-mh-folder-updating" "defun-mh" "defmacro-mh")))
 
 ;;;***
 
@@ -20393,7 +20393,7 @@
 
 \(fn)" t nil)
 
-(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mh-e" '("mh-" "def")))
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "mh-e" '("mh-" "defgroup-mh" "defcustom-mh" "defface-mh")))
 
 ;;;***
 
@@ -22035,7 +22035,7 @@
 ;;;### (autoloads nil "nnoo" "gnus/nnoo.el" (0 0 0 0))
 ;;; Generated autoloads from gnus/nnoo.el
 
-(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "nnoo" '("nnoo-" "def")))
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "nnoo" '("nnoo-" "defvoo" "deffoo")))
 
 ;;;***





  reply	other threads:[~2017-04-11 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09  9:33 bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff Eli Zaretskii
2017-04-09 11:56 ` npostavs
2017-04-09 12:37   ` Eli Zaretskii
2017-04-10 13:24   ` npostavs
2017-04-10 13:33     ` Eli Zaretskii
2017-04-11 14:13       ` npostavs [this message]
2017-04-11 15:36         ` Eli Zaretskii
2017-04-20  3:13           ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bms3t4kx.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=26412@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.