Mercurial > emacs
comparison lisp/bindings.el @ 25312:4d817651d5b4
(mode-line-modified): Look up key binding for C-x
C-q. If it's bound call that binding, otherwise call
toggle-read-only.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 17 Aug 1999 22:44:35 +0000 |
parents | e09cfa43a165 |
children | f329ed7625ee |
comparison
equal
deleted
inserted
replaced
25311:745ff7cc2786 | 25312:4d817651d5b4 |
---|---|
86 (define-key map [mode-line mouse-2] | 86 (define-key map [mode-line mouse-2] |
87 (lambda (event) | 87 (lambda (event) |
88 (interactive "e") | 88 (interactive "e") |
89 (save-selected-window | 89 (save-selected-window |
90 (select-window (posn-window (event-start event))) | 90 (select-window (posn-window (event-start event))) |
91 (toggle-read-only)))) | 91 (let ((binding (key-binding "\C-x\C-q"))) |
92 (if binding | |
93 (funcall binding) | |
94 (toggle-read-only)))))) | |
92 (set-text-properties 0 (length s) | 95 (set-text-properties 0 (length s) |
93 (list 'help-echo | 96 (list 'help-echo |
94 "Read-only status: mouse-2 toggles it" | 97 "Read-only status: mouse-2 toggles it" |
95 'local-map map) | 98 'local-map map) |
96 s) | 99 s) |