From f8e5fb70fabb280f5694adc5accd6c3c2185808d Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 17 Aug 1999 22:44:35 +0000 Subject: [PATCH] (mode-line-modified): Look up key binding for C-x C-q. If it's bound call that binding, otherwise call toggle-read-only. --- lisp/bindings.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" -- 2.39.5