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

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

Re: turning line mode on/off with defun not working


From: Emanuel Berg
Subject: Re: turning line mode on/off with defun not working
Date: Fri, 06 Dec 2013 23:35:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> No, that seems not to be local (?). Well, the way I did
> it with `lines' above, that works, so use that if you
> want it the way I describe it.

This was a bit confusing:

(line-number-mode 1)
(line-number-mode 0)
(set-variable 'line-number-mode t t)
(set-variable 'line-number-mode nil t)

It would seem like the first two lines work on the
global scope, only, once you have run either of lines
three and four, the first two lines seem to work on the
local instance instead. Well, lines three and four work
on the *variable*, which they locally set to the given
value. In lines one and two, I just pass an argument 1
or 0 to the *function*. I guess the correct place to
examine this would be that function (so there is a
mode, a function, *and* a variable with the same name)
and see if it somehow changes behaviour based on the
existence of a local instance, *or* if this is deeper
in the Emacs architecture: it wouldn't be a chock if
local instances take precedence. Well, perhaps someone
could tell us (me) straight off?

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


reply via email to

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