emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mode.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mode.el
Date: Mon, 30 Aug 2004 12:10:20 -0400

Index: emacs/lisp/emacs-lisp/lisp-mode.el
diff -c emacs/lisp/emacs-lisp/lisp-mode.el:1.163 
emacs/lisp/emacs-lisp/lisp-mode.el:1.164
*** emacs/lisp/emacs-lisp/lisp-mode.el:1.163    Sat Aug 28 15:31:38 2004
--- emacs/lisp/emacs-lisp/lisp-mode.el  Mon Aug 30 16:05:38 2004
***************
*** 460,485 ****
    (and (integerp char)
         (eventp 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)) ?-))))
!          mods "")
!         (cond
!          ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c))
!          ((eq c 127) "\\C-?")
!          (t
!           (condition-case nil
!               (string c)
!             (error nil))))))))
  
  (defun eval-last-sexp-1 (eval-last-sexp-arg-internal)
    "Evaluate sexp before point; print value in minibuffer.
--- 460,495 ----
    (and (integerp char)
         (eventp char)
         (let ((c (event-basic-type 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))
!        ;; 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]