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.
This commit is contained in:
parent
c9e30e8c77
commit
c3e989ca9d
2 changed files with 30 additions and 14 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -50,6 +50,9 @@ The 'find-function', 'find-library', 'find-face-definition', and
|
||||||
'find-variable' commands now allow retrieving previous input using the
|
'find-variable' commands now allow retrieving previous input using the
|
||||||
usual minibuffer history commands. Each command has a separate history.
|
usual minibuffer history commands. Each command has a separate history.
|
||||||
|
|
||||||
|
---
|
||||||
|
** New minor mode find-function-mode replaces the old find-function-setup-keys.
|
||||||
|
|
||||||
** Minibuffer and Completions
|
** Minibuffer and Completions
|
||||||
|
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
;; The funniest thing about this is that I can't imagine why a package
|
;; The funniest thing about this is that I can't imagine why a package
|
||||||
;; so obviously useful as this hasn't been written before!!
|
;; so obviously useful as this hasn't been written before!!
|
||||||
;; ;;; find-func
|
;; ;;; find-func
|
||||||
;; (find-function-setup-keys)
|
;; (find-function-mode 1)
|
||||||
;;
|
;;
|
||||||
;; or just:
|
;; or just:
|
||||||
;;
|
;;
|
||||||
|
@ -805,21 +805,34 @@ See `find-function-on-key'."
|
||||||
(when (and symb (not (equal symb 0)))
|
(when (and symb (not (equal symb 0)))
|
||||||
(find-variable-other-window symb))))
|
(find-variable-other-window symb))))
|
||||||
|
|
||||||
|
(defvar-keymap find-function-mode-map
|
||||||
|
"C-x F" #'find-function
|
||||||
|
"C-x 4 F" #'find-function-other-window
|
||||||
|
"C-x 5 F" #'find-function-other-frame
|
||||||
|
|
||||||
|
"C-x K" #'find-function-on-key
|
||||||
|
"C-x 4 K" #'find-function-on-key-other-window
|
||||||
|
"C-x 5 K" #'find-function-on-key-other-frame
|
||||||
|
|
||||||
|
"C-x V" #'find-variable
|
||||||
|
"C-x 4 V" #'find-variable-other-window
|
||||||
|
"C-x 5 V" #'find-variable-other-frame
|
||||||
|
|
||||||
|
"C-x L" #'find-library
|
||||||
|
"C-x 4 L" #'find-library-other-window
|
||||||
|
"C-x 5 L" #'find-library-other-frame)
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(define-minor-mode find-function-mode
|
||||||
|
"Enable some key bindings for the `find-function' family of functions."
|
||||||
|
:global t :lighter nil ; compat. with old `find-function-setup-keys'
|
||||||
|
:group 'find-function :version "31.1")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun find-function-setup-keys ()
|
(defun find-function-setup-keys ()
|
||||||
"Define some key bindings for the `find-function' family of functions."
|
"Turn on `find-function-mode', which see."
|
||||||
(define-key ctl-x-map "F" 'find-function)
|
(find-function-mode 1))
|
||||||
(define-key ctl-x-4-map "F" 'find-function-other-window)
|
(make-obsolete 'find-function-setup-keys 'find-function-mode "31.1")
|
||||||
(define-key ctl-x-5-map "F" 'find-function-other-frame)
|
|
||||||
(define-key ctl-x-map "K" 'find-function-on-key)
|
|
||||||
(define-key ctl-x-4-map "K" 'find-function-on-key-other-window)
|
|
||||||
(define-key ctl-x-5-map "K" 'find-function-on-key-other-frame)
|
|
||||||
(define-key ctl-x-map "V" 'find-variable)
|
|
||||||
(define-key ctl-x-4-map "V" 'find-variable-other-window)
|
|
||||||
(define-key ctl-x-5-map "V" 'find-variable-other-frame)
|
|
||||||
(define-key ctl-x-map "L" 'find-library)
|
|
||||||
(define-key ctl-x-4-map "L" 'find-library-other-window)
|
|
||||||
(define-key ctl-x-5-map "L" 'find-library-other-frame))
|
|
||||||
|
|
||||||
(provide 'find-func)
|
(provide 'find-func)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue