[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-30 32d0c8f6af5: etags-regen-file-extensions: Enable for more exten
From: |
Dmitry Gutov |
Subject: |
emacs-30 32d0c8f6af5: etags-regen-file-extensions: Enable for more extensions |
Date: |
Mon, 23 Sep 2024 14:35:35 -0400 (EDT) |
branch: emacs-30
commit 32d0c8f6af52cd8db363456d817c3d214eea4c00
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
etags-regen-file-extensions: Enable for more extensions
* lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
Add more extensions, but remove "a". From the ones recognized by
etags, also omit "t", "ml", "l", "def" and "inc", see
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00735.html.
(etags-regen--all-files): Use 'string-match-p' for performance.
Bind 'case-fold-search' to t to match extensions in any case.
---
lisp/progmodes/etags-regen.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
index a8e67197070..11073c76ac6 100644
--- a/lisp/progmodes/etags-regen.el
+++ b/lisp/progmodes/etags-regen.el
@@ -118,9 +118,13 @@ We currently support only Emacs's etags program with this
option."
;; when it cannot determine the type of the file.
;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
(defcustom etags-regen-file-extensions
- '("rb" "js" "py" "pl" "pm" "el" "c" "cpp" "cc" "h" "hh" "hpp"
- "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
- "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
+ '("ads" "adb" "ada" "asm" "ins" "s" "sa" "S" "src"
+ "c" "h" "c++" "cc" "cpp" "cxx" "h++" "hh" "hpp" "hxx" "m" "pdb"
+ "cs" "hs" "erl" "hrl" "fth" "tok" "f" "f90" "for" "go"
+ "java" "cl" "clisp" "el" "lisp" "lsp" "lua" "lm" "p" "pas"
+ "pl" "pm" "php" "php3" "php4" "pc" "prolog" "py" "rb" "ru" "rbw"
+ "rs" "oak" "rkt" "sch" "scheme" "scm" "sm" "ss"
+ "y" "y++" "ym" "yxx" "yy")
"Code file extensions for `etags-regen-mode'.
File extensions to generate the tags for."
@@ -242,11 +246,12 @@ File extensions to generate the tags for."
(ir-start (1- (length root)))
(ignores-regexps
(mapcar #'etags-regen--ignore-regexp
- etags-regen-ignores)))
+ etags-regen-ignores))
+ (case-fold-search t))
(cl-delete-if
(lambda (f) (or (not (string-match-p match-re f))
(string-match-p "/\\.#" f) ;Backup files.
- (cl-some (lambda (ignore) (string-match ignore f ir-start))
+ (cl-some (lambda (ignore) (string-match-p ignore f ir-start))
ignores-regexps)))
files)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-30 32d0c8f6af5: etags-regen-file-extensions: Enable for more extensions,
Dmitry Gutov <=