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

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

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

revision 1.2 by eliz, Mon Nov 12 11:39:45 2001 UTC revision 1.3 by walters, Wed Nov 14 09:04:49 2001 UTC
# Line 127  Line 127 
127    (interactive)    (interactive)
128    (if calc-standalone-flag    (if calc-standalone-flag
129        (save-buffers-kill-emacs nil)        (save-buffers-kill-emacs nil)
130      (calc-keypad))      (calc-keypad)))
 )  
131    
132  (defun calc-keypad-redraw ()  (defun calc-keypad-redraw ()
133    (set-buffer calc-keypad-buffer)    (set-buffer calc-keypad-buffer)
# Line 176  Line 175 
175                row (cdr row)))))                row (cdr row)))))
176    (setq calc-keypad-prev-input t)    (setq calc-keypad-prev-input t)
177    (calc-keypad-show-input)    (calc-keypad-show-input)
178    (goto-char (point-min))    (goto-char (point-min)))
 )  
179    
180  (defun calc-keypad-show-input ()  (defun calc-keypad-show-input ()
181    (or (equal calc-keypad-input calc-keypad-prev-input)    (or (equal calc-keypad-input calc-keypad-prev-input)
# Line 191  Line 189 
189              (insert "----+-----Calc " calc-version "-----+----"              (insert "----+-----Calc " calc-version "-----+----"
190                      (int-to-string (1+ calc-keypad-menu))                      (int-to-string (1+ calc-keypad-menu))
191                      "\n")))))                      "\n")))))
192    (setq calc-keypad-prev-input calc-keypad-input)    (setq calc-keypad-prev-input calc-keypad-input))
 )  
193    
194  (defun calc-keypad-press ()  (defun calc-keypad-press ()
195    (interactive)    (interactive)
# Line 343  Line 340 
340                             (command-execute (car cmd))))                             (command-execute (car cmd))))
341                       (command-execute cmd)))))                       (command-execute cmd)))))
342        (set-buffer calc-keypad-buffer)        (set-buffer calc-keypad-buffer)
343        (calc-keypad-show-input)))        (calc-keypad-show-input))))
 )  
344    
345  (defun calc-keypad-left-click (event)  (defun calc-keypad-left-click (event)
346    "Handle a left-button mouse click in Calc Keypad window."    "Handle a left-button mouse click in Calc Keypad window."
# Line 372  Line 368 
368    (while (progn (setq calc-keypad-menu (% (1+ calc-keypad-menu)    (while (progn (setq calc-keypad-menu (% (1+ calc-keypad-menu)
369                                            (length calc-keypad-menus)))                                            (length calc-keypad-menus)))
370                  (not (symbol-value (nth calc-keypad-menu calc-keypad-menus)))))                  (not (symbol-value (nth calc-keypad-menu calc-keypad-menus)))))
371    (calc-keypad-redraw)    (calc-keypad-redraw))
 )  
372    
373  (defun calc-keypad-menu-back ()  (defun calc-keypad-menu-back ()
374    (interactive)    (interactive)
# Line 383  Line 378 
378                                                   (length calc-keypad-menus)))                                                   (length calc-keypad-menus)))
379                                            (length calc-keypad-menus)))                                            (length calc-keypad-menus)))
380                  (not (symbol-value (nth calc-keypad-menu calc-keypad-menus)))))                  (not (symbol-value (nth calc-keypad-menu calc-keypad-menus)))))
381    (calc-keypad-redraw)    (calc-keypad-redraw))
 )  
382    
383  (defun calc-keypad-store ()  (defun calc-keypad-store ()
384    (interactive)    (interactive)
385    (setq calc-keypad-input "STO")    (setq calc-keypad-input "STO"))
 )  
386    
387  (defun calc-keypad-recall ()  (defun calc-keypad-recall ()
388    (interactive)    (interactive)
389    (setq calc-keypad-input "RCL")    (setq calc-keypad-input "RCL"))
 )  
390    
391  (defun calc-pack-interval (mode)  (defun calc-pack-interval (mode)
392    (interactive "p")    (interactive "p")
393    (if (or (< mode 0) (> mode 3))    (if (or (< mode 0) (> mode 3))
394        (error "Open/close code should be in the range from 0 to 3."))        (error "Open/close code should be in the range from 0 to 3."))
395    (calc-pack (- -6 mode))    (calc-pack (- -6 mode)))
 )  
396    
397  (defun calc-keypad-execute ()  (defun calc-keypad-execute ()
398    (interactive)    (interactive)
# Line 430  Line 421 
421      (message "")      (message "")
422      (if (commandp cmd)      (if (commandp cmd)
423          (command-execute cmd)          (command-execute cmd)
424        (error "Not a Calc command: %s" (key-description keys))))        (error "Not a Calc command: %s" (key-description keys)))))
 )  
425    
426    
427  ;;; |----+----+----+----+----+----|  ;;; |----+----+----+----+----+----|
# Line 474  Line 464 
464         ( "0"     ("0") calc-imaginary )         ( "0"     ("0") calc-imaginary )
465         ( "."     (".") calc-precision )         ( "."     (".") calc-precision )
466         ( "PI"    calc-pi )         ( "PI"    calc-pi )
467         ( "+"     calc-plus calc-sqrt ) ) )         ( "+"     calc-plus calc-sqrt ) ) ))
 )  
468    
469  (defvar calc-keypad-menus '( calc-keypad-math-menu  (defvar calc-keypad-menus '( calc-keypad-math-menu
470                               calc-keypad-funcs-menu                               calc-keypad-funcs-menu
# Line 509  Line 498 
498         ( "TAN"   calc-tan )         ( "TAN"   calc-tan )
499         ( "SQRT"  calc-sqrt )         ( "SQRT"  calc-sqrt )
500         ( "y^x"   calc-power )         ( "y^x"   calc-power )
501         ( "1/x"   calc-inv ) ) )         ( "1/x"   calc-inv ) ) ))
 )  
502    
503  ;;; |----+----+----+----+----+----|  ;;; |----+----+----+----+----+----|
504  ;;; |IGAM|BETA|IBET|ERF |BESJ|BESY|  ;;; |IGAM|BETA|IBET|ERF |BESJ|BESY|
# Line 537  Line 525 
525         ( "DFCT"  calc-double-factorial )         ( "DFCT"  calc-double-factorial )
526         ( "BNOM"  calc-choose )         ( "BNOM"  calc-choose )
527         ( "PERM"  calc-perm )         ( "PERM"  calc-perm )
528         ( "NXTP"  calc-next-prime calc-prev-prime ) ) )         ( "NXTP"  calc-next-prime calc-prev-prime ) ) ))
 )  
529    
530  ;;; |----+----+----+----+----+----|  ;;; |----+----+----+----+----+----|
531  ;;; |AND | OR |XOR |NOT |LSH |RSH |  ;;; |AND | OR |XOR |NOT |LSH |RSH |
# Line 565  Line 552 
552         ( "C"     ("C") )         ( "C"     ("C") )
553         ( "D"     ("D") )         ( "D"     ("D") )
554         ( "E"     ("E") )         ( "E"     ("E") )
555         ( "F"     ("F") ) ) )         ( "F"     ("F") ) ) ))
 )  
556    
557  ;;; |----+----+----+----+----+----|  ;;; |----+----+----+----+----+----|
558  ;;; |SUM |PROD|MAX |MAP*|MAP^|MAP$|  ;;; |SUM |PROD|MAX |MAP*|MAP^|MAP$|
# Line 598  Line 584 
584         ( "INDX"  (progn calc-num-prefix calc-index) "\C-u\excalc-index\r" )         ( "INDX"  (progn calc-num-prefix calc-index) "\C-u\excalc-index\r" )
585         ( "BLD"   (progn calc-num-prefix calc-build-vector) )         ( "BLD"   (progn calc-num-prefix calc-build-vector) )
586         ( "LEN"   calc-vlength )         ( "LEN"   calc-vlength )
587         ( "..."   calc-full-vectors ) ) )         ( "..."   calc-full-vectors ) ) ))
 )  
588    
589  ;;; |----+----+----+----+----+----|  ;;; |----+----+----+----+----+----|
590  ;;; |FLT |FIX |SCI |ENG |GRP |    |  ;;; |FLT |FIX |SCI |ENG |GRP |    |
# Line 630  Line 615 
615         ( "RLL4"  (progn 4 calc-roll-up) (progn 4 calc-roll-down) )         ( "RLL4"  (progn 4 calc-roll-up) (progn 4 calc-roll-down) )
616         ( "OVER"  calc-over )         ( "OVER"  calc-over )
617         ( "STO"   calc-keypad-store )         ( "STO"   calc-keypad-store )
618         ( "RCL"   calc-keypad-recall ) ) )         ( "RCL"   calc-keypad-recall ) ) ))
 )  
619    
620    ;;; calc-keypd.el ends here

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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