Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4f4ce597
Commit
4f4ce597
authored
Aug 30, 2004
by
Richard M. Stallman
Browse files
(prin1-char): Don't turn S-a into A.
Don't return a string that would read as the wrong character code.
parent
85d392cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
15 deletions
+30
-15
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/emacs-lisp/lisp-mode.el
lisp/emacs-lisp/lisp-mode.el
+25
-15
No files found.
lisp/ChangeLog
View file @
4f4ce597
2004-08-30 Richard M. Stallman <rms@gnu.org>
* emacs-lisp/lisp-mode.el (prin1-char): Don't turn S-a into A.
Don't return a string that would read as the wrong character code.
2004-08-29 Kim F. Storm <storm@cua.dk>
* emulation/cua-base.el (cua-auto-expand-rectangles): Remove
...
...
lisp/emacs-lisp/lisp-mode.el
View file @
4f4ce597
...
...
@@ -460,26 +460,36 @@ If CHAR is not a character, return nil."
(
and
(
integerp
char
)
(
eventp
char
)
(
let
((
c
(
event-basic-type
char
))
(
mods
(
event-modifiers
char
)))
(
mods
(
event-modifiers
char
))
string
)
;; Prevent ?A from turning into ?\S-a.
(
if
(
and
(
memq
'shift
mods
)
(
zerop
(
logand
char
?\S-\^@
))
(
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
))
?-
))))
mods
""
)
(
cond
((
memq
c
'
(
?\;
?\(
?\)
?\{
?\}
?\[
?\]
?\"
?\'
?\\
))
(
string
?\\
c
))
((
eq
c
127
)
"\\C-?"
)
(
t
(
condition-case
nil
(
string
c
)
(
error
nil
))))))))
;; What string are we considering using?
(
condition-case
nil
(
setq
string
(
concat
"?"
(
mapconcat
(
lambda
(
modif
)
(
cond
((
eq
modif
'super
)
"\\s-"
)
(
t
(
string
?\\
(
upcase
(
aref
(
symbol-name
modif
)
0
))
?-
))))
mods
""
)
(
cond
((
memq
c
'
(
?\;
?\(
?\)
?\{
?\}
?\[
?\]
?\"
?\'
?\\
))
(
string
?\\
c
))
((
eq
c
127
)
"\\C-?"
)
(
t
(
string
c
)))))
(
error
nil
))
;; Verify the string reads a CHAR, not to some other character.
;; If it doesn't, return nil instead.
(
and
string
(
=
(
car
(
read-from-string
string
))
char
)
string
))))
(
defun
eval-last-sexp-1
(
eval-last-sexp-arg-internal
)
"Evaluate sexp before point; print value in minibuffer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment