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

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

Re: rebinding `!'


From: Chuck Siska
Subject: Re: rebinding `!'
Date: Thu, 18 Apr 2002 09:34:25 -0700

chandan --

try the following:

(defun cs-temp-bang ()
  "Command to insert a ' !'."

  (interactive)
  (insert " !"))

(define-key text-mode-map "!" #'cs-temp-bang)

good luck.

-- chuck

Chandan Singh Dalawat wrote:
> 
> In text-mode, I want to rebind `!' to ` !' with a nobreak-space
> (obtained via C-x 8 SPC) just before the `!'.  My simple-minded
> solution was to say
> 
>    (define-key text-mode-map "!" " !")
> 
> in my .emacs file.  But this doesn't work ; it leads to infinite
> recursion and I deservedly get the error message
> 
>    After 0 kbd macro iterations: Variable binding depth exceeds
>    max-specpdl-size.
> 
> How do I overcome this problem ?

-- 
                                           |\_/\_.-'""``:-._       
What is life without looking for           . . `; -._      )-;-,_`)
the next cute little bug to play with?     v_,-    _  ),(,.\  ``-' 
                                          _.- _.,-_/ /  ((.'       
-- chuck.siska@conexant.com  `<}:..     ((,.-'   ((,/



reply via email to

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