]> git.eshelyaron.com Git - emacs.git/commitdiff
Add 'major-mode-name' symbol property
authorEshel Yaron <me@eshelyaron.com>
Sat, 18 Jan 2025 10:18:30 +0000 (11:18 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 Jan 2025 10:18:30 +0000 (11:18 +0100)
lisp/arc-mode.el
lisp/calc/calc.el
lisp/dired.el
lisp/emacs-lisp/derived.el
lisp/image-mode.el
lisp/org/org-agenda.el
lisp/progmodes/compile.el
lisp/simple.el
lisp/wdired.el

index 696684e914c619e7a9605af8e15d85ba5358e582..18dd0f42f8efce42b5288162560fb5972980c8f0 100644 (file)
@@ -780,6 +780,8 @@ archive.
         (rename-buffer (concat " " (buffer-name)))
         (archive-extract)))))
 
+(put 'archive-mode 'major-mode-name t)
+
 ;; Archive mode is suitable only for specially formatted data.
 (put 'archive-mode 'mode-class 'special)
 
index 80559c1657ccb4d45544b6b4e76b4e80b4a2485c..c1aee89685154db0dfc079c119ebbf376a05ff62 100644 (file)
@@ -1366,6 +1366,8 @@ Notations:  3.14e6     3.14 * 10^6
   ;; be displayed in order to accept user input.
   (setq-local touch-screen-display-keyboard t))
 
+(put 'calc-mode 'major-mode-name t)
+
 (defvar calc-check-defines 'calc-check-defines)  ; Suitable for run-hooks.
 (defun calc-check-defines ()
   (if (symbol-plist 'calc-define)
index beab1b9cd2033a733c5931da62c366c4ad9b5ef8..6fcf31c166a493970ef245e7ee2259ffb76e493c 100644 (file)
@@ -2832,6 +2832,8 @@ Keybindings:
   (add-hook 'context-menu-functions 'dired-context-menu 5 t)
   (run-mode-hooks 'dired-mode-hook))
 
+(put 'dired-mode 'major-mode-name t)
+
 \f
 ;;; Idiosyncratic dired commands that don't deal with marks
 
index 6b10150d04d4f65b79ddc34da2dd63c71e870880..18fe4f7b411cfc8de0318568d032467fd5bdde10 100644 (file)
@@ -243,6 +243,7 @@ No problems result if this variable is not bound.
        (if (fboundp 'derived-mode-set-parent) ;; Emacsā‰„30.1
            (derived-mode-set-parent ',child ',parent)
          (put ',child 'derived-mode-parent ',parent))
+       (put ',child 'major-mode-name t)
        ,(if group `(put ',child 'custom-mode-group ,group))
 
        (defun ,child ()
index 653a78331627a2eb5f5099542c1f94002ca8e80c..dfd3d5504f6d1e89820324b18c503f8677bb50f0 100644 (file)
@@ -679,6 +679,8 @@ Key bindings:
       (require 'image-converter)
       (image-converter-initialize))))
 
+(put 'image-mode 'major-mode-name t)
+
 (defun image-mode--display ()
   (if (not (image-get-display-property))
       (progn
index b36c20cd7cfd0a05a49aa71bd9e06f010b087f8e..a2cf3c77be7701fb42d1d25d39ba5f2dd47392a2 100644 (file)
@@ -2400,6 +2400,8 @@ The following commands are available:
   (org-agenda-set-mode-name)
   (run-mode-hooks 'org-agenda-mode-hook))
 
+(put 'org-agenda-mode 'major-mode-name t)
+
 (substitute-key-definition #'undo #'org-agenda-undo
                           org-agenda-mode-map global-map)
 (org-defkey org-agenda-mode-map "\C-i" #'org-agenda-goto)
index f3a89860240e131085f486ae8b6b50f99264b77d..4111ae920886afc492fbb9d7a265c69e0e89b275 100644 (file)
@@ -2440,6 +2440,8 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see).
   (setq buffer-read-only t)
   (run-mode-hooks 'compilation-mode-hook))
 
+(put 'compilation-mode 'major-mode-name t)
+
 ;;;###autoload
 (put 'define-compilation-mode 'doc-string-elt 3)
 
index 164f5c089bfa897991313f92b90ffcdf2187458d..83a3e71b380cbcaae99d2cad7f8deed9dbb00cad 100644 (file)
@@ -561,6 +561,8 @@ Other major modes are defined by comparison with this one."
   (kill-all-local-variables)
   (run-mode-hooks))
 
+(put 'fundamental-mode 'major-mode-name t)
+
 (define-derived-mode clean-mode fundamental-mode "Clean"
   "A mode that removes all overlays and text properties."
   (kill-all-local-variables t)
index c7409446b198d768ae6c94374bf99ba6f657080b..7bae26e92591682ab5df4820068ffdbfbfe2821a 100644 (file)
@@ -215,6 +215,7 @@ symbolic link targets, and filenames permission."
   (interactive)
   (error "This mode can be enabled only by `wdired-change-to-wdired-mode'"))
 (put 'wdired-mode 'mode-class 'special)
+(put 'wdired-mode 'major-mode-name 't)
 
 (declare-function dired-isearch-search-filenames "dired-aux")