From: Gerd Moellmann Date: Tue, 17 Aug 1999 22:44:35 +0000 (+0000) Subject: (mode-line-modified): Look up key binding for C-x X-Git-Tag: emacs-pretest-21.0.90~7129 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8e5fb70fabb280f5694adc5accd6c3c2185808d;p=emacs.git (mode-line-modified): Look up key binding for C-x C-q. If it's bound call that binding, otherwise call toggle-read-only. --- diff --git a/lisp/bindings.el b/lisp/bindings.el index ca992861dbd..17e512df64e 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -88,7 +88,10 @@ Normally nil in most modes, since there is no process to display.") (interactive "e") (save-selected-window (select-window (posn-window (event-start event))) - (toggle-read-only)))) + (let ((binding (key-binding "\C-x\C-q"))) + (if binding + (funcall binding) + (toggle-read-only)))))) (set-text-properties 0 (length s) (list 'help-echo "Read-only status: mouse-2 toggles it"