aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/emacs-lisp/find-func.el41
2 files changed, 30 insertions, 14 deletions
diff --git a/etc/NEWS b/etc/NEWS
index e4c1ef4eae0..a2d61d5c561 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -50,6 +50,9 @@ The 'find-function', 'find-library', 'find-face-definition', and
50'find-variable' commands now allow retrieving previous input using the 50'find-variable' commands now allow retrieving previous input using the
51usual minibuffer history commands. Each command has a separate history. 51usual minibuffer history commands. Each command has a separate history.
52 52
53---
54** New minor mode find-function-mode replaces the old find-function-setup-keys.
55
53** Minibuffer and Completions 56** Minibuffer and Completions
54 57
55+++ 58+++
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