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

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

pair-mode: remove "(" from pair-mode-chars when in python-mode.


From: Livin Stephen Sharma
Subject: pair-mode: remove "(" from pair-mode-chars when in python-mode.
Date: Tue, 16 Dec 2008 19:40:46 +0530

Hi.
 How can I turn OFF the pair-mode char being inserted ONLY for "("
 ( but NOT for the other quote/braces/etc chars ) .


Details...

 [[[ I don't know lisp. ]]]

... I'm trying to have pair-mode ON in python-mode, BUT not have ")" auto-inserted when I type "(".

 For other characters like
[
{
<
'
"
etc, I DO want pair-mode to provide the matching pair.


I'd been at it (trial-and-error) for some time with no progress, so I tried this to try to see ANY change in behaviour:

  (make-variable-buffer-local 'pair-mode-chars)
  (make-variable-buffer-local 'pair-mode-map)

  (set 'pair-mode-chars '(91))
  (set 'pair-mode-map '(keymap (91 . skeleton-pair-insert-maybe)))

C-h v pair-mode-chars _does_ show this:

.. Its value is (91)                                                                                                                                     
                                                                                                                                                      
Local in buffer HelloBrian.py; global value is                                                                                                        
(40 91 123 60 2219 96 34 39) ...                                                                                                                         


But even so, the matching character being inserted for ALL of these:
<{("'`

I expected pair-mode be working only for "[" ?

I'd appreciate help on this.




reply via email to

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