unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: spwhitton@spwhitton.name, emacs-devel@gnu.org
Subject: Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
Date: Mon, 23 Sep 2024 19:57:09 +0300	[thread overview]
Message-ID: <781dac6e-5504-4b7d-903d-71fc5d09da0f@gutov.dev> (raw)
In-Reply-To: <86cykw2rkl.fsf@gnu.org>

On 22/09/2024 08:19, Eli Zaretskii wrote:
>> Date: Sun, 22 Sep 2024 04:09:22 +0300
>> Cc: spwhitton@spwhitton.name, emacs-devel@gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> On 21/09/2024 18:14, Eli Zaretskii wrote:
>>
>>> If you have reservations about some of the extensions, let's exclude
>>> them for now.  I believe there are just a few of them, while the vast
>>> majority should present no problem, right?  I'm okay with leaving out
>>> HTML and Texinfo.  Are there more of those?  TeX, perhaps?
>>
>> TeX yes. I'm also not sure about PostScript - but really because I still
>> don't know how a function definition in that language looks, even after
>> skimming through a manual.
>>
>> Speaking of other extensions, isn't ".a" usually a compiled library
>> rather than ASM source code? Also curious about ".t" for Scheme and
>> ".ml" for Lisp.
> 
> Fine, let's exclude all of these.  It still leaves quite a lot.

Great! Here's the combined diff I plan to install:

- More extensions.
- case-fold-search bound to t, so extension matching is not case-sensitive.
- string-match-p for etags-regen-ignores entries, minor speed bump.
- *.a removed from the list, though it previously was in it (like 
discussed in this thread).
- *.def and *.inc also not added because I see .def being used for 
"module definition files", and .inc files sometimes have C-like 
contents, and sometimes SGML (with ASM in just a few examples). In the 
mozilla/gecko-dev checkout I tested, that is, to see how the change 
would affect indexing.

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 @@ etags-regen-regexp-alist
  ;; 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 @@ etags-regen--all-files
           (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)))


WDYT?



  reply	other threads:[~2024-09-23 16:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20  9:15 Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30? Sean Whitton
2024-09-20 10:34 ` Eli Zaretskii
2024-09-20 13:39   ` Sean Whitton
2024-09-20 13:41     ` Eli Zaretskii
2024-09-20 18:20       ` Dmitry Gutov
2024-09-20 19:11         ` Eli Zaretskii
2024-09-20 19:35           ` Dmitry Gutov
2024-09-20 19:59             ` Dmitry Gutov
2024-09-21  7:03               ` Eli Zaretskii
2024-09-21 13:48                 ` Dmitry Gutov
2024-09-21 15:14                   ` Eli Zaretskii
2024-09-22  1:09                     ` Dmitry Gutov
2024-09-22  5:19                       ` Eli Zaretskii
2024-09-23 16:57                         ` Dmitry Gutov [this message]
2024-09-23 18:14                           ` Eli Zaretskii
2024-09-23 18:24                             ` Dmitry Gutov
2024-09-23 18:35                               ` Dmitry Gutov
2024-09-23 17:07                       ` Corwin Brust
2024-09-23 18:19                         ` Eli Zaretskii
2024-09-23 18:28                           ` Dmitry Gutov
2024-09-23 18:38                             ` Eli Zaretskii
2024-09-23 18:39                             ` Corwin Brust

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=781dac6e-5504-4b7d-903d-71fc5d09da0f@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spwhitton@spwhitton.name \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).