Simplify mode-indexed tables in packages

Now that we use extra-parents to group alternative major modes,
some tables can be simplified to mention only the group's leader.

* lisp/align.el (align-c++-modes, align-rules-list):
Don't bother listing TS alternatives.
(align-perl-modes): Don't bother listing CPerl alternative.

* lisp/info-look.el (perl-mode): Simplify.

* lisp/cedet/semantic/symref/grep.el (semantic-symref-filepattern-alist):
Don't bother listing TS alternatives.

* lisp/emulation/viper.el (viper-vi-state-mode-list): Don't bother
listing CPerl alternative.

* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions-if-enabled):
Take into account the modes hierarchy.
(gud-tooltip-modes): Don't bother listing TS alternatives.

* .dir-locals.el (c-ts-mode): Simplify.
feature/positioned-lambdas
Stefan Monnier 2024-03-08 12:50:33 -05:00
parent c79a509384
commit 41de53d4a1
8 changed files with 15 additions and 24 deletions

View File

@ -32,9 +32,7 @@
(electric-quote-comment . nil)
(electric-quote-string . nil)
(mode . bug-reference-prog)))
(c-ts-mode . ((c-ts-mode-indent-style . gnu)
(indent-tabs-mode . t)
(mode . bug-reference-prog)))
(c-ts-mode . ((c-ts-mode-indent-style . gnu))) ;Inherits `c-mode' settings.
(log-edit-mode . ((log-edit-font-lock-gnu-style . t)
(log-edit-setup-add-author . t)
(vc-git-log-edit-summary-target-len . 50)

View File

@ -181,13 +181,12 @@ If nil, then no messages will ever be printed to the minibuffer."
:type '(choice (const :tag "Align a large region silently" nil) integer)
:group 'align)
(defcustom align-c++-modes '( c++-mode c-mode java-mode
c-ts-mode c++-ts-mode)
(defcustom align-c++-modes '( c++-mode c-mode java-mode)
"A list of modes whose syntax resembles C/C++."
:type '(repeat symbol)
:group 'align)
(defcustom align-perl-modes '(perl-mode cperl-mode)
(defcustom align-perl-modes '(perl-mode)
"A list of modes where Perl syntax is to be seen."
:type '(repeat symbol)
:group 'align)
@ -576,13 +575,13 @@ The possible settings for `align-region-separate' are:
"="
(group (zero-or-more (syntax whitespace)))))
(group . (1 2))
(modes . '(conf-toml-mode toml-ts-mode lua-mode lua-ts-mode)))
(modes . '(conf-toml-mode lua-mode)))
(double-dash-comment
(regexp . ,(rx (group (zero-or-more (syntax whitespace)))
"--"
(zero-or-more nonl)))
(modes . '(lua-mode lua-ts-mode))
(modes . '(lua-mode))
(column . comment-column)
(valid . ,(lambda ()
(save-excursion

View File

@ -44,9 +44,7 @@ those hits returned.")
(defvar semantic-symref-filepattern-alist
'((c-mode "*.[ch]")
(c-ts-mode "*.[ch]")
(c++-mode "*.[chCH]" "*.[ch]pp" "*.cc" "*.hh")
(c++-ts-mode "*.[chCH]" "*.[ch]pp" "*.cc" "*.hh")
(html-mode "*.html" "*.shtml" "*.php")
(mhtml-mode "*.html" "*.shtml" "*.php") ; FIXME: remove
; duplication of
@ -55,12 +53,8 @@ those hits returned.")
; major mode definition?
(ruby-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
"Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
(ruby-ts-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
"Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
(python-mode "*.py" "*.pyi" "*.pyw")
(python-ts-mode "*.py" "*.pyi" "*.pyw")
(perl-mode "*.pl" "*.PL")
(cperl-mode "*.pl" "*.PL")
(lisp-interaction-mode "*.el" "*.ede" ".emacs" "_emacs")
)
"List of major modes and file extension pattern.

View File

@ -388,7 +388,6 @@ widget."
idl-mode
perl-mode
cperl-mode
javascript-mode
tcl-mode
python-mode

View File

@ -586,6 +586,7 @@ If a window system is unavailable, calls `hfy-fallback-color-values'."
(defvar hfy-cperl-mode-kludged-p nil)
(defun hfy-kludge-cperl-mode ()
;; FIXME: Still?
"CPerl mode does its damnedest not to do some of its fontification when not
in a windowing system - try to trick it..."
(declare (obsolete nil "28.1"))

View File

@ -985,9 +985,8 @@ Return nil if there is nothing appropriate in the buffer near point."
finally return "(python)Index")))))
(info-lookup-maybe-add-help
:mode 'cperl-mode
:regexp "[$@%][^a-zA-Z]\\|\\$\\^[A-Z]\\|[$@%]?[a-zA-Z][_a-zA-Z0-9]*"
:other-modes '(perl-mode))
:mode 'perl-mode
:regexp "[$@%][^a-zA-Z]\\|\\$\\^[A-Z]\\|[$@%]?[a-zA-Z][_a-zA-Z0-9]*")
(info-lookup-maybe-add-help
:mode 'latex-mode

View File

@ -3671,8 +3671,7 @@ Treats actions as defuns."
(remove-hook 'after-save-hook #'gdb-create-define-alist t))))
(defcustom gud-tooltip-modes '( gud-mode c-mode c++-mode fortran-mode
python-mode c-ts-mode c++-ts-mode
python-ts-mode)
python-mode)
"List of modes for which to enable GUD tooltips."
:type '(repeat (symbol :tag "Major mode"))
:group 'tooltip)
@ -3708,10 +3707,9 @@ only tooltips in the buffer containing the overlay arrow."
#'gud-tooltip-activate-mouse-motions-if-enabled)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(if (and gud-tooltip-mode
(memq major-mode gud-tooltip-modes))
(gud-tooltip-activate-mouse-motions t)
(gud-tooltip-activate-mouse-motions nil)))))
(gud-tooltip-activate-mouse-motions
(and gud-tooltip-mode
(derived-mode-p gud-tooltip-modes))))))
(defvar gud-tooltip-mouse-motions-active nil
"Locally t in a buffer if tooltip processing of mouse motion is enabled.")

View File

@ -254,6 +254,9 @@ This has effect only if `search-invisible' is set to `open'."
;;;###autoload
(defvar hs-special-modes-alist
;; FIXME: Currently the check is made via
;; (assoc major-mode hs-special-modes-alist) so it doesn't pay attention
;; to the mode hierarchy.
(mapcar #'purecopy
'((c-mode "{" "}" "/[*/]" nil nil)
(c-ts-mode "{" "}" "/[*/]" nil nil)