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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57000: Wrong entry "c-mode" in definition prefix for semantic


From: Stefan Kangas
Subject: bug#57000: Wrong entry "c-mode" in definition prefix for semantic
Date: Fri, 5 Aug 2022 12:51:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas <stefan@marxist.se> writes:

> I see in loaddefs.el:
>
>     (register-definition-prefixes "semantic/bovine/c" '("c-mode" "semantic"))
>
> I think "c-mode" shouldn't be there, but I can't seem to figure out why
> it is.

This is caused by

    defcustom-mode-local-semantic-dependency-system-include-path

One possible fix below, but I'm not sure we want to do this generally:

diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index afba9f8fbc..8aa17be765 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -68,6 +68,7 @@ autoload-ignored-definitions
     "define-short-documentation-group"
     "def-edebug-elem-spec"
     "defvar-mode-local"
+    "defcustom-mode-local-semantic-dependency-system-include-path"
     "define-ibuffer-column"
     "define-ibuffer-sorter")
   "List of strings naming definitions to ignore for prefixes.
@@ -456,7 +457,7 @@ loaddefs-generate--compute-prefixes
   (let ((prefs nil))
     ;; Avoid (defvar <foo>) by requiring a trailing space.
     (while (re-search-forward
-            "^(\\(def[^ \t]+\\)[ \t]+['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
+            "^(\\(def[^ \t\n]+\\)[ \t\n]+['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
       (unless (member (match-string 1) autoload-ignored-definitions)
         (let ((name (match-string-no-properties 2)))
           (when (save-excursion





reply via email to

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