help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: About how misspelled word are displayed


From: Emanuel Berg
Subject: Re: About how misspelled word are displayed
Date: Sat, 13 May 2017 17:07:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Emanuel Berg wrote:

> `set-variable' is interactive so you can use
> it with M-x and TAB if you don't
> know/remember the exact option name.

Oh, `set-variable' can also be used to set
local options, as in the below Elisp.
(Actually, it is the only `set-variable' I have
in all my Elisp. I have 238 grep hits for
"setq".)

    (defun toggle-local-var (var)
      (set-variable var (not (symbol-value var)) t) )

    (defun toggle-char-mode ()
      (interactive)
      (toggle-local-var 'column-number-mode) )

    (defun toggle-line-mode ()
      (interactive)
      (toggle-local-var 'line-number-mode) )

    ;; ...

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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