unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15200: isearch-other-meta-char and shift
@ 2013-08-27 16:28 Juri Linkov
  2013-08-27 16:45 ` Juri Linkov
  0 siblings, 1 reply; 17+ messages in thread
From: Juri Linkov @ 2013-08-27 16:28 UTC (permalink / raw)
  To: 15200

There is a problem in `isearch-other-meta-char' with shifted characters.
Typing <S-kp-0> exits Isearch instead of adding 0 to the search string.

A possible fix is to handle shifted kp-numbers like
shifted control characters are handled in the second
`cond' branch of `isearch-other-meta-char':

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2013-07-05 20:15:32 +0000
+++ lisp/isearch.el	2013-08-27 16:27:45 +0000
@@ -2550,6 +2606,16 @@ (defun isearch-other-meta-char (&optiona
 		    (lookup-key local-function-key-map key)))
 	     (while keylist
 	       (setq key (car keylist))
+	       ;; Handle an undefined shifted printing character
+	       ;; by downshifting it if that makes it printing.
+	       ;; (As read-key-sequence would normally do,
+	       ;; if we didn't have a default definition.)
+	       (if (and (integerp key)
+			(memq 'shift (event-modifiers key))
+			(>= key (+ ?\s (- ?\S-a ?a)))
+			(/= key (+ 127 (- ?\S-a ?a)))
+			(<  key (+ 256 (- ?\S-a ?a))))
+		   (setq key (- key (- ?\S-a ?a))))
 	       ;; If KEY is a printing char, we handle it here
 	       ;; directly to avoid the input method and keyboard
 	       ;; coding system translating it.






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

end of thread, other threads:[~2013-10-09  2:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 16:28 bug#15200: isearch-other-meta-char and shift Juri Linkov
2013-08-27 16:45 ` Juri Linkov
2013-08-28  0:27   ` Stefan Monnier
2013-08-28 16:42     ` Juri Linkov
2013-08-28 18:33       ` Stefan Monnier
2013-08-29  6:49         ` Juri Linkov
2013-08-29 12:30           ` Stefan Monnier
2013-09-01 18:45             ` Juri Linkov
2013-09-03  2:12               ` Stefan Monnier
2013-09-03  2:22                 ` Drew Adams
2013-09-16 22:09                 ` Juri Linkov
2013-09-17  1:21                   ` Stefan Monnier
2013-09-17  2:19                   ` Stefan Monnier
2013-10-07 23:35                     ` Juri Linkov
2013-10-08  3:07                       ` Stefan Monnier
2013-10-08 23:29                         ` Juri Linkov
2013-10-09  2:43                           ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).