From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: turning line mode on/off with defun not working Date: Fri, 06 Dec 2013 23:35:45 +0100 Organization: Aioe.org NNTP Server Message-ID: <8738m5sj39.fsf@nl106-137-194.student.uu.se> References: <87iov1vnd2.fsf@nl106-137-194.student.uu.se> <87ppp93bnv.fsf@nl106-137-194.student.uu.se> <87lhzxodu5.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1386369615 22531 80.91.229.3 (6 Dec 2013 22:40:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2013 22:40:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 06 23:40:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vp44K-0005RP-FP for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 23:40:20 +0100 Original-Received: from localhost ([::1]:33763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vp44J-0007Ma-R9 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Dec 2013 17:40:19 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: VVbyYd/iFZoeWNmD9i++cQ.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:n1IVcqzV7k5m/wSiwyW3bBpJp3M= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:202592 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94861 Archived-At: Emanuel Berg 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