From: Glenn Morris Date: Tue, 24 Feb 2009 04:44:19 +0000 (+0000) Subject: (flyspell-use-meta-tab): Add a custom :set function. (Bug#2429) X-Git-Tag: emacs-pretest-23.0.91~37 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb92c1504455a432e4045d26f407e40256d84a4c;p=emacs.git (flyspell-use-meta-tab): Add a custom :set function. (Bug#2429) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99b3bd7f293..fad9ebecc17 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-02-24 Glenn Morris + * textmodes/flyspell.el (flyspell-use-meta-tab): Add a custom + :set function. (Bug#2429) + * eshell/esh-util.el (eshell-parse-ange-ls): Define `name' before potential use. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 70fd05aaf37..4b9121de94a 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -262,10 +262,17 @@ If `flyspell-large-region' is nil, all regions are treated as small." :group 'flyspell :type '(choice string (const nil))) +(defvar flyspell-mode-map) + (defcustom flyspell-use-meta-tab t "Non-nil means that flyspell uses M-TAB to correct word." :group 'flyspell - :type 'boolean) + :type 'boolean + :initialize 'custom-initialize-default + :set (lambda (sym val) + (define-key flyspell-mode-map "\M-\t" + (if (set sym val) + 'flyspell-auto-correct-word)))) (defcustom flyspell-auto-correct-binding [(control ?\;)]