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: Eli Zaretskii
Subject: Re: [Emacs-diffs] emacs-25 6d11f6e: Allow to invoke original M-TAB binding in 'flyspell-prog-mode'
Date: Thu, 31 Dec 2015 20:59:19 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Thu, 31 Dec 2015 13:28:44 -0500
> 
> >> >     * 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.

Could be, though unlikely.

> 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))))

Thanks, feel free to install such a change.



reply via email to

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