[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x TAB indent-rigidly default set to 4 columns, not to 1
From: |
nospam55 |
Subject: |
Re: C-x TAB indent-rigidly default set to 4 columns, not to 1 |
Date: |
Mon, 17 May 2004 14:53:41 +0200 |
User-agent: |
KNode/0.7.1 |
I answer (partially ) to myself: raw 'P' prefix arg management , the
;; we refer to "Prefix Command Arguments" ,
;; fsf emacs lisp reference manual
(defun irFrequent (arg b c) (interactive "P\nr")
(if (listp arg)
(setq arg (pop arg)) ; pop : new in emacs version 21
(if (and (stringp arg) (string= arg "-")) (setq arg -1))
; (if (stringp arg) ( if (string= arg "-") (setq arg -1) ) )
)
(if (not arg) (setq arg 4) ) ; we want 4, not 1
(indent-rigidly b c arg)
)
works quite well , unfortunately it still doesn't convert the classical ' C-u -
'
hyphen prefix to -1 : the
(if (and (stringp arg) (string= arg "-")) (setq arg -1))
seems not to intercept a '-' string or char passed as arg :-(
nospam55