[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16342: 24.3.50; RET during search inserts newline in PostScript mode
From: |
Juri Linkov |
Subject: |
bug#16342: 24.3.50; RET during search inserts newline in PostScript mode |
Date: |
Mon, 06 Jan 2014 11:38:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
> With "test.ps" which only contains the string "test", when I do:
>
> $ emacs -Q test.ps
>
> and then search for 'e' with:
>
> C-s e
>
> and then press RET to stop the search, it unexpectedly inserts a
> newline. This does not happen for example in fundamental-mode.
This is because ps-mode.el binds [return] in addition to "\r":
(define-key ps-mode-map "\r" 'ps-mode-newline)
(define-key ps-mode-map [return] 'ps-mode-newline)
whereas isearch.el binds only "\r":
(define-key isearch-mode-map "\r" 'isearch-exit)
We could remove the [return] keybinding from ps-mode.el,
but there are many other places that bind [return] and [backspace]
in the Emacs source tree, external packages as well as in
countless user init files, so maybe better would be to add [return]
and [backspace] keybindings to isearch-mode-map in isearch.el.