[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: turning line mode on/off with defun not working
From: |
Wes James |
Subject: |
Re: turning line mode on/off with defun not working |
Date: |
Fri, 6 Dec 2013 12:21:26 -0700 |
On Fri, Dec 6, 2013 at 11:35 AM, Emanuel Berg <embe8573@student.uu.se>wrote:
> Wes James <comptekki@me.com> writes:
>
> > I have these lines in my .emacs, but they don't
> > work. Why?
>
> (interactive), for starters. But you probably won't to
> enable this buffer-local. Also, check out the below
> Elisp for two simple "toggle" defuns - you don't need
> one to turn it off, and one to turn it on - think of it
> as a binary state machine (i.e., with two states). It
> only requires one operation, "do whatever I don't do
> know".
>
> ;;; show point position
> ;; column
> (defun char-mode ()
> "Mode bar: Show the index of the character at point (first = 0)."
> (interactive)
> (set-variable 'column-number-mode
> (not column-number-mode)
> t) ) ; local
> (defalias 'cols 'char-mode)
> ;; line
> (defun line-mode ()
> "Mode bar: Show the line number at point (first = 1)."
> (interactive)
> (set-variable 'line-number-mode
> (not line-number-mode)
> t) ) ; local
> (defalias 'lines 'line-mode)
>
> --
> Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
> underground experts united: http://user.it.uu.se/~embe8573
>
Thank you. I appreciate this.
-wes
- turning line mode on/off with defun not working, Wes James, 2013/12/05
- turning line mode on/off with defun not working, Wes James, 2013/12/05
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/06
- Re: turning line mode on/off with defun not working,
Wes James <=
- Message not available
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/06
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/06
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/06
- Re: turning line mode on/off with defun not working, Wes James, 2013/12/06
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/06
- Re: turning line mode on/off with defun not working, PJ Weisberg, 2013/12/07
- Message not available
- Re: turning line mode on/off with defun not working, Emanuel Berg, 2013/12/07