aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSean Whitton2024-10-04 08:28:21 +0800
committerSean Whitton2024-10-04 08:28:21 +0800
commitc3e989ca9d786e001a9801fdd95fcbcb0d73fddc (patch)
tree1520066de3f41cbe9710c89830d2681838c5b0c6 /lisp
parentc9e30e8c77d903a117e9319b264c7b66af499713 (diff)
downloademacs-c3e989ca9d786e001a9801fdd95fcbcb0d73fddc.tar.gz
emacs-c3e989ca9d786e001a9801fdd95fcbcb0d73fddc.zip
New minor mode find-function-mode replaces find-function-setup-keys
* lisp/emacs-lisp/find-func.el (find-function-mode-map): (find-function-mode): New minor mode. (find-function-setup-keys): Replace with stub function that just enables the new minor mode. Mark as obsolete. * etc/NEWS: Announce the change.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/find-func.el41
1 files changed, 27 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index c1835feff18..c031ee427d4 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -26,7 +26,7 @@
26;; The funniest thing about this is that I can't imagine why a package 26;; The funniest thing about this is that I can't imagine why a package
27;; so obviously useful as this hasn't been written before!! 27;; so obviously useful as this hasn't been written before!!
28;; ;;; find-func 28;; ;;; find-func
29;; (find-function-setup-keys) 29;; (find-function-mode 1)
30;; 30;;
31;; or just: 31;; or just:
32;; 32;;
@@ -805,21 +805,34 @@ See `find-function-on-key'."
805 (when (and symb (not (equal symb 0))) 805 (when (and symb (not (equal symb 0)))
806 (find-variable-other-window symb)))) 806 (find-variable-other-window symb))))
807 807
808(defvar-keymap find-function-mode-map
809 "C-x F" #'find-function
810 "C-x 4 F" #'find-function-other-window
811 "C-x 5 F" #'find-function-other-frame
812
813 "C-x K" #'find-function-on-key
814 "C-x 4 K" #'find-function-on-key-other-window
815 "C-x 5 K" #'find-function-on-key-other-frame
816
817 "C-x V" #'find-variable
818 "C-x 4 V" #'find-variable-other-window
819 "C-x 5 V" #'find-variable-other-frame
820
821 "C-x L" #'find-library
822 "C-x 4 L" #'find-library-other-window
823 "C-x 5 L" #'find-library-other-frame)
824
825;;;###autoload
826(define-minor-mode find-function-mode
827 "Enable some key bindings for the `find-function' family of functions."
828 :global t :lighter nil ; compat. with old `find-function-setup-keys'
829 :group 'find-function :version "31.1")
830
808;;;###autoload 831;;;###autoload
809(defun find-function-setup-keys () 832(defun find-function-setup-keys ()
810 "Define some key bindings for the `find-function' family of functions." 833 "Turn on `find-function-mode', which see."
811 (define-key ctl-x-map "F" 'find-function) 834 (find-function-mode 1))
812 (define-key ctl-x-4-map "F" 'find-function-other-window) 835(make-obsolete 'find-function-setup-keys 'find-function-mode "31.1")
813 (define-key ctl-x-5-map "F" 'find-function-other-frame)
814 (define-key ctl-x-map "K" 'find-function-on-key)
815 (define-key ctl-x-4-map "K" 'find-function-on-key-other-window)
816 (define-key ctl-x-5-map "K" 'find-function-on-key-other-frame)
817 (define-key ctl-x-map "V" 'find-variable)
818 (define-key ctl-x-4-map "V" 'find-variable-other-window)
819 (define-key ctl-x-5-map "V" 'find-variable-other-frame)
820 (define-key ctl-x-map "L" 'find-library)
821 (define-key ctl-x-4-map "L" 'find-library-other-window)
822 (define-key ctl-x-5-map "L" 'find-library-other-frame))
823 836
824(provide 'find-func) 837(provide 'find-func)
825 838