emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] emacs-25 6d11f6e: Allow to invoke original M-TAB bindi


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-25 6d11f6e: Allow to invoke original M-TAB binding in 'flyspell-prog-mode'
Date: Thu, 31 Dec 2015 13:28:44 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> >     * lisp/textmodes/flyspell.el (flyspell-prog-mode): Record the
>> >     original M-TAB binding in a buffer-local variable.
>> >     (flyspell-auto-correct-word): Invoke the original binding of M-TAB
>> >     if that is recorded, when point is in a place where flyspell
>> >     should not be active (e.g., because the user turned on
>> >     'flyspell-prog-mode').  (Bug#18533)
>> Why not compute this fallback binding dynamically?
> Sorry, I don't understand what you mean.
> Is anything wrong with how I did it?

The M-TAB binding that you record in a global var may not be the same as
the binding that would be used (if it weren't for flyspell) when the
user hits M-TAB.

The "usual" way to deal with "semi-transparent" minor-mode bindings like
this is to do something like

   (let* ((flyspell-mode nil)) ;; Temporarily hide flyspell's binding.
     (call-interactively (key-binding (this-single-command-keys))))


-- Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]