/[emacs]/emacs/lisp/calc/calc.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21.4.4 by miles, Thu Oct 14 08:50:09 2004 UTC revision 1.21.4.5 by miles, Fri Oct 22 10:13:34 2004 UTC
# Line 656  If nil, selections displayed but ignored Line 656  If nil, selections displayed but ignored
656    
657    
658  ;; Verify that Calc is running on the right kind of system.  ;; Verify that Calc is running on the right kind of system.
 (defconst calc-emacs-type-epoch (and (fboundp 'epoch::version) epoch::version))  
 (defvar calc-emacs-type-19 (not (or calc-emacs-type-epoch  
                                     (string-lessp emacs-version "19"))))  
659  (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))  (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))
 (defvar calc-emacs-type-gnu19 (and calc-emacs-type-19  
                                    (not calc-emacs-type-lucid)))  
660    
661  ;; Set up the standard keystroke (M-#) to run the Calculator, if that key  ;; Set up the standard keystroke (M-#) to run the Calculator, if that key
662  ;; has not yet been bound to anything.  For best results, the user should  ;; has not yet been bound to anything.  For best results, the user should
# Line 827  If nil, selections displayed but ignored Line 822  If nil, selections displayed but ignored
822                           (if (eq bind 'undefined)                           (if (eq bind 'undefined)
823                               'undefined 'calcDigit-nondigit))))                               'undefined 'calcDigit-nondigit))))
824                      calc-mode-map)                      calc-mode-map)
825        (let ((cmap (if calc-emacs-type-19 (nth 1 calc-mode-map) calc-mode-map))        (let ((cmap (nth 1 calc-mode-map))
826              (dmap (if calc-emacs-type-19 (nth 1 map) map))              (dmap (nth 1 map))
827              (i 0))              (i 0))
828          (while (< i 128)          (while (< i 128)
829            (aset dmap i            (aset dmap i
# Line 998  If nil, selections displayed but ignored Line 993  If nil, selections displayed but ignored
993              (use-global-map map)              (use-global-map map)
994              (use-local-map nil)              (use-local-map nil)
995              (read-key-sequence              (read-key-sequence
996               (if (commandp (key-binding (if calc-emacs-type-19               (if (commandp (key-binding (vector (cdr key))))
                                             (vector (cdr key))  
                                           (char-to-string (cdr key)))))  
997                   "" prompt2)))                   "" prompt2)))
998          (use-global-map glob)          (use-global-map glob)
999          (use-local-map loc)))))          (use-local-map loc)))))
# Line 3425  Also looks for the equivalent TeX words, Line 3418  Also looks for the equivalent TeX words,
3418             (let ((key (event-to-character event t t)))             (let ((key (event-to-character event t t)))
3419               (or key optkey (error "Expected a plain keystroke"))               (or key optkey (error "Expected a plain keystroke"))
3420               (cons key event))))               (cons key event))))
         (calc-emacs-type-gnu19  
          (let ((key (read-event)))  
            (cons key key)))  
3421          (t          (t
3422           (let ((key (read-char)))           (let ((key (read-event)))
3423             (cons key key)))))             (cons key key)))))
3424    
3425  (defun calc-unread-command (&optional input)  (defun calc-unread-command (&optional input)

Legend:
Removed from v.1.21.4.4  
changed lines
  Added in v.1.21.4.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26