# HG changeset patch # User Richard M. Stallman # Date 1093701638 0 # Node ID dcd7b1b4690dd22dee421f0082a2a1f4f1411052 # Parent 35774f24f0ab6d139a75305b87e3a4e40cabb292 (prin1-char): Put `shift' modifier into the basic character, if it has an uppercase form. diff -r 35774f24f0ab -r dcd7b1b4690d lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Sat Aug 28 07:45:42 2004 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Sat Aug 28 14:00:38 2004 +0000 @@ -459,14 +459,20 @@ If CHAR is not a character, return nil." (and (integerp char) (eventp char) - (let ((c (event-basic-type char))) + (let ((c (event-basic-type char)) + (mods (event-modifiers char))) + ;; Prevent ?A from turning into ?\S-a. + (if (and (memq 'shift mods) + (not (let ((case-fold-search nil)) + (char-equal c (upcase c))))) + (setq c (upcase c) mods nil)) (concat "?" (mapconcat (lambda (modif) (cond ((eq modif 'super) "\\s-") (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-)))) - (event-modifiers char) "") + mods "") (cond ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c)) ((eq c 127) "\\C-?")