From 4364a769b489c044c4e9eeac6cfbabcc844ab332 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 19 Apr 2017 23:01:43 -0400 Subject: [PATCH] Don't register "def" as an autoload prefix (Bug#26412) * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't accept "def" as a prefix. --- lisp/emacs-lisp/autoload.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 90e6aec4e75..ca46f317677 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -547,7 +547,9 @@ Don't try to split prefixes that are already longer than that.") ;; "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! + (if (or (and (> (length s) 2) ; Long enough! + ;; But don't use "def" from deffoo-pkg-thing. + (not (string= "def" s))) (string-match ".[[:punct:]]\\'" s) ;A real (tho short) prefix? (radix-tree-lookup (cdr pair) "")) ;Nothing to expand! (push pair prefixes) ;Keep it as is. -- 2.39.5