[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cannot disable paren matching
From: |
Konstantin Shakhnov |
Subject: |
Re: cannot disable paren matching |
Date: |
Wed, 28 Dec 2016 01:42:04 +0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Dec 27, 2016 at 01:29:47PM -0700, Don Woods wrote:
> I am having a problem where paren matching is not working as desired,
> and I am unable either to turn it off or to make it work correctly.
>
> The specific case where I'm having trouble is in PostScript mode,
> when also in Overwrite mode. When I type a character that acts as a
> close paren -- such as > or } -- the character is inserted instead of
> overwriting the current char. Emacs briefly highlights the matching
> open paren, or reports a mismatch, as the case may be, but does NOT
> remove the char I was intending to overwrite.
>
> Since I don't especially need the paren highlighting in my current
> editing, most of my attempts to work around this bug have involved
> trying to disable the paren-matching behavior. I have tried such
> things as
>
Similar at GNU Emacs 24.5.1.
Are you sure that the culprit is the (show-paren-mode) ?
M-x describe-mode ps-mode said
...
> ps-mode-r-gt
] ps-mode-r-angle
} ps-mode-r-brace
...
(defun ps-mode-r-brace ()
"Insert `}' and perform balance."
(interactive)
(insert "}")
(ps-mode-r-balance "}"))
So it seems like you need overwrite or disable or make something other
with ps-mode-r-brace. For instance (add to .emacs):
(defun my-ps-mode-r-brace ()
(interactive)
(self-insert-command 1))
(add-hook 'ps-mode-hook
(lambda () (local-set-key (kbd "}") 'my-ps-mode-r-brace)))