mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix recording keyboard macros when input method is active
* lisp/international/quail.el (quail-start-translation) (quail-start-conversion): Bind inhibit--record-char to t for the first character of a translated sequence. * src/keyboard.c (record_char): Don't record events from macros to dribble file, per documentation. (Fopen_dribble_file): Doc fix. (syms_of_keyboard) <inhibit--record-char>: New variable. (record_char): Don't record input event if inhibit--record-char is non-nil. (Bug#32108)
This commit is contained in:
parent
1780502da6
commit
03e3440dbb
2 changed files with 33 additions and 6 deletions
|
|
@ -1394,12 +1394,13 @@ Return the input string."
|
|||
(generated-events nil) ;FIXME: What is this?
|
||||
(input-method-function nil)
|
||||
(modified-p (buffer-modified-p))
|
||||
last-command-event last-command this-command)
|
||||
last-command-event last-command this-command inhibit-record)
|
||||
(setq quail-current-key ""
|
||||
quail-current-str ""
|
||||
quail-translating t)
|
||||
(if key
|
||||
(setq unread-command-events (cons key unread-command-events)))
|
||||
(setq unread-command-events (cons key unread-command-events)
|
||||
inhibit-record t))
|
||||
(while quail-translating
|
||||
(set-buffer-modified-p modified-p)
|
||||
(quail-show-guidance)
|
||||
|
|
@ -1408,8 +1409,13 @@ Return the input string."
|
|||
(or input-method-previous-message "")
|
||||
quail-current-str
|
||||
quail-guidance-str)))
|
||||
;; We inhibit record_char only for the first key,
|
||||
;; because it was already recorded before read_char
|
||||
;; called quail-input-method.
|
||||
(inhibit--record-char inhibit-record)
|
||||
(keyseq (read-key-sequence prompt nil nil t))
|
||||
(cmd (lookup-key (quail-translation-keymap) keyseq)))
|
||||
(setq inhibit-record nil)
|
||||
(if (if key
|
||||
(and (commandp cmd) (not (eq cmd 'quail-other-command)))
|
||||
(eq cmd 'quail-self-insert-command))
|
||||
|
|
@ -1453,14 +1459,15 @@ Return the input string."
|
|||
(generated-events nil) ;FIXME: What is this?
|
||||
(input-method-function nil)
|
||||
(modified-p (buffer-modified-p))
|
||||
last-command-event last-command this-command)
|
||||
last-command-event last-command this-command inhibit-record)
|
||||
(setq quail-current-key ""
|
||||
quail-current-str ""
|
||||
quail-translating t
|
||||
quail-converting t
|
||||
quail-conversion-str "")
|
||||
(if key
|
||||
(setq unread-command-events (cons key unread-command-events)))
|
||||
(setq unread-command-events (cons key unread-command-events)
|
||||
inhibit-record t))
|
||||
(while quail-converting
|
||||
(set-buffer-modified-p modified-p)
|
||||
(or quail-translating
|
||||
|
|
@ -1476,8 +1483,13 @@ Return the input string."
|
|||
quail-conversion-str
|
||||
quail-current-str
|
||||
quail-guidance-str)))
|
||||
;; We inhibit record_char only for the first key,
|
||||
;; because it was already recorded before read_char
|
||||
;; called quail-input-method.
|
||||
(inhibit--record-char inhibit-record)
|
||||
(keyseq (read-key-sequence prompt nil nil t))
|
||||
(cmd (lookup-key (quail-conversion-keymap) keyseq)))
|
||||
(setq inhibit-record nil)
|
||||
(if (if key (commandp cmd) (eq cmd 'quail-self-insert-command))
|
||||
(progn
|
||||
(setq last-command-event (aref keyseq (1- (length keyseq)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue