all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pair-mode: remove "(" from pair-mode-chars when in python-mode.
@ 2008-12-16 14:10 Livin Stephen Sharma
  2008-12-18  4:05 ` Kevin Rodgers
  2008-12-18 10:00 ` Livin Stephen Sharma
  0 siblings, 2 replies; 3+ messages in thread
From: Livin Stephen Sharma @ 2008-12-16 14:10 UTC (permalink / raw)
  To: emacs help - gnu

[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 6977 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pair-mode: remove "(" from pair-mode-chars when in python-mode.
  2008-12-16 14:10 pair-mode: remove "(" from pair-mode-chars when in python-mode Livin Stephen Sharma
@ 2008-12-18  4:05 ` Kevin Rodgers
  2008-12-18 10:00 ` Livin Stephen Sharma
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2008-12-18  4:05 UTC (permalink / raw)
  To: help-gnu-emacs

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

What is pair-mode?  It is not distributed with Emacs 22.3.

-- 
Kevin Rodgers
Denver, Colorado, USA





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pair-mode: remove "(" from pair-mode-chars when in python-mode.
  2008-12-16 14:10 pair-mode: remove "(" from pair-mode-chars when in python-mode Livin Stephen Sharma
  2008-12-18  4:05 ` Kevin Rodgers
@ 2008-12-18 10:00 ` Livin Stephen Sharma
  1 sibling, 0 replies; 3+ messages in thread
From: Livin Stephen Sharma @ 2008-12-18 10:00 UTC (permalink / raw)
  To: emacs help - gnu

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

==============================================================================
>
TOPIC: pair-mode: remove "(" from pair-mode-chars when in python-mode.
>
http://groups.google.com/group/gnu.emacs.help/t/951e81b16c0890af?hl=en
> <http://groups.google.com/group/gnu.emacs.help/t/951e81b16c0890af?hl=en>

==============================<http://groups.google.com/group/gnu.emacs.help/t/951e81b16c0890af?hl=en>
> ================================================
> <http://groups.google.com/group/gnu.emacs.help/t/951e81b16c0890af?hl=en>


> == 1 of 1 ==
>
Date: Wed, Dec 17 2008 8:05 pm
>
From: Kevin Rodgers
>

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

> What is pair-mode?  It is not distributed with Emacs 22.3.
>

> --
>
Kevin Rodgers
>
Denver, Colorado, USA
>


Thanks for the response - I was losing hope :)

With an example:
 If I type in an opening-parenthesis,
 pair-mode will insert a matching closing-parenthesis immediately after my
input.

It works similarly for other characters like {,[,",',<, etc.
By providing a }.],",',>, etc character as the case may be.

 - makes for some minor (and very convenient) key-stroke savings. I'd just
like to turn it off for "("  when in python-mode.

I think this is where I got it:
http://www.loveshack.ukfsn.org/emacs/pair-mode.el

;;; pair-mode.el --- insertion of paired characters

--livin.stephen

[-- Attachment #2: Type: text/html, Size: 8181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-18 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 14:10 pair-mode: remove "(" from pair-mode-chars when in python-mode Livin Stephen Sharma
2008-12-18  4:05 ` Kevin Rodgers
2008-12-18 10:00 ` Livin Stephen Sharma

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.