fireblade wrote:
> Is it possible to change ( - ) with [ - ] on Windows XP ?
If you are using emacs, then add the following to your dot emacs file
--
(keyboard-translate ?\( ?\[)
(keyboard-translate ?\[ ?\()
(keyboard-translate ?\) ?\])
(keyboard-translate ?\] ?\))
If you want to do this at the OS level, there is a minor catch, you
cant swap just ( with [, but you swap the (,9 key with the {,[ -- so
you arent swapping a character, but the physical key. This can be
accomplished by some keyboard remapping freewares, but I am not sure if
this is what you want.
On 2005-08-12, remixer <········@gmail.com> wrote:
> If you are using emacs, then add the following to your dot emacs file
> --
> (keyboard-translate ?\( ?\[)
> (keyboard-translate ?\[ ?\()
> (keyboard-translate ?\) ?\])
> (keyboard-translate ?\] ?\))
That works but causes problems when you paste items from the X clipboard
under X windows. I prefer to limit the rebinding to lisp mode:
(define-key slime-mode-map (kbd "[") 'insert-parentheses)
(define-key slime-mode-map (kbd "]") 'move-past-close-and-reindent)
(define-key slime-mode-map (kbd "(") (lambda () (interactive) (insert "[")))
(define-key slime-mode-map (kbd ")") (lambda () (interactive) (insert "]")))
(define-key slime-mode-map (kbd "\e\[") (lambda () (interactive) (insert "(")))
(define-key slime-mode-map (kbd "\e\]") (lambda () (interactive) (insert ")")))
John wrote:
> On 2005-08-12, remixer <········@gmail.com> wrote:
>
>> If you are using emacs, then add the following to your dot emacs file
>> --
>> (keyboard-translate ?\( ?\[)
>> (keyboard-translate ?\[ ?\()
>> (keyboard-translate ?\) ?\])
>> (keyboard-translate ?\] ?\))
>
>
> That works but causes problems when you paste items from the X clipboard
> under X windows. I prefer to limit the rebinding to lisp mode:
What type of problems? I evaluated the above code and was able to paste
the string "()[]{}" from other applications (using both
mouse-yank-at-point and yank) just fine.
-- MJF
Ingvar <······@hexapodia.net> writes:
> > >> (keyboard-translate ?\( ?\[)
> > >> (keyboard-translate ?\[ ?\()
> > >> (keyboard-translate ?\) ?\])
> > >> (keyboard-translate ?\] ?\))
>
> Try starting emacs non-windowed in a terminal window (not entirely
> normal, though) and try again?
Yes, it messes up a lot, but the solution is simple.
Make a file parenswitch.el, en when in X11-mode load the file.
How often does one starts emacs per day, huh ? ;-)
That prevents that nasty behaviour if you have your terminal set to
TERM=linux.
Or set the terminal at TERM=vt100 in CLI-mode and the parenswitch in
.emacs works again as advertised.
Cor
--
To really make a mess of things one should use a computer
Ingvar <······@hexapodia.net> writes:
> > How often does one starts emacs per day, huh ? ;-)
> I seem to be starting emacs about 0.03 times a day, on average, it
> seems (that *is* estimated, but it's certainly more than 0.002 and
> less than 0.1).
For any arbitrary value of 'day-lenght, I presume ? ;-)
Cor
--
To really make a mess of things one should use a computer
Ingvar <······@hexapodia.net> writes:
> ((lambda (x y l) (format nil "~{~a~}" (loop for a in x for b in y with c = t
> if a collect (funcall (if c #'char-upcase #'char-downcase) (elt (elt l a) b))
> else collect #\space if c do (setq c ())))) '(76 1 0 0 nil 0 nil 0 3 0 5 nil 0
> 0 12 0 0 0) '(2 2 16 8 nil 1 nil 2 4 16 2 nil 9 1 1 13 10 11) (sort (loop for
> foo being the external-symbols in :cl collect (string-upcase foo)) #'string<))
This lisp hacker is missing a: )
--
__Pascal Bourguignon__ http://www.informatimago.com/
The mighty hunter
Returns with gifts of plump birds,
Your foot just squashed one.