]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-help.el
* lib/ignore-value.h: New file.
[gnu-emacs] / lisp / calc / calc-help.el
index f484d9b0769f97d6dbb7dbf783e2e511063edb78..c34c114dacfdce81ab63563e310e35485792de14 100644 (file)
@@ -1,7 +1,6 @@
 ;;; calc-help.el --- help display functions for Calc,
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
@@ -110,8 +109,7 @@ C-w  Describe how there is no warranty for Calc."
 (defun calc-describe-bindings ()
   (interactive)
   (describe-bindings)
-  (save-excursion
-    (set-buffer "*Help*")
+  (with-current-buffer "*Help*"
     (let ((inhibit-read-only t))
       (goto-char (point-min))
       (when (search-forward "Major Mode Bindings:" nil t)
@@ -129,7 +127,7 @@ C-w  Describe how there is no warranty for Calc."
               (dig2 (char-after (match-beginning 3))))
           (delete-region (match-end 1) (match-end 0))
           (goto-char (match-beginning 1))
-          (delete-backward-char 1)
+          (delete-char -1)
           (delete-char 5)
           (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2)))))
       (goto-char (point-min)))))
@@ -178,8 +176,7 @@ C-w  Describe how there is no warranty for Calc."
       (if (string-match "\\(DEL\\|\\LFD\\|RET\\|SPC\\|TAB\\)" desc)
           (setq desc (replace-match "<\\&>" nil nil desc)))
       (if briefly
-         (let ((msg (save-excursion
-                      (set-buffer (get-buffer-create "*Calc Summary*"))
+         (let ((msg (with-current-buffer (get-buffer-create "*Calc Summary*")
                       (if (= (buffer-size) 0)
                           (progn
                             (message "Reading Calc summary from manual...")
@@ -283,7 +280,7 @@ C-w  Describe how there is no warranty for Calc."
                                (beginning-of-line)
                                (princ (buffer-substring pt (point))))
                              (setq notes (cdr notes)))
-                           (print-help-return-message)))
+                           (help-print-return-message)))
                      (calc-unread-command (cdr key)))))
              (if (or (null defn) (integerp defn))
                  (message "%s is undefined" desc)
@@ -448,6 +445,7 @@ C-w  Describe how there is no warranty for Calc."
            '(calc-inverse-prefix-help
              calc-hyperbolic-prefix-help
              calc-inv-hyp-prefix-help
+              calc-option-prefix-help
              calc-a-prefix-help
              calc-b-prefix-help
              calc-c-prefix-help
@@ -466,7 +464,7 @@ C-w  Describe how there is no warranty for Calc."
              calc-shift-Y-prefix-help
              calc-shift-Z-prefix-help
              calc-z-prefix-help)))
-    (print-help-return-message)))
+    (help-print-return-message)))
 
 (defun calc-h-prefix-help ()
   (interactive)
@@ -514,6 +512,11 @@ C-w  Describe how there is no warranty for Calc."
      "I H + a S (general invert func); v h (rtail)")
    "inverse-hyperbolic" nil))
 
+(defun calc-option-prefix-help ()
+  (interactive)
+  (calc-do-prefix-help
+   '("")
+   "option" nil))
 
 (defun calc-f-prefix-help ()
   (interactive)
@@ -659,12 +662,19 @@ C-w  Describe how there is no warranty for Calc."
   (calc-do-prefix-help
    '("Simplify, Convert, Temperature-convert, Base-units"
      "Autorange; Remove, eXtract; Explain; View-table; 0-9"
-     "Define, Undefine, Get-defn, Permanent"
+     "Define, Undefine, Get-defn, Permanent, Logarithmic"
      "SHIFT + View-table-other-window"
      "SHIFT + stat: Mean, G-mean, Std-dev, Covar, maX, miN"
      "SHIFT + stat: + (sum), - (asum), * (prod), # (count)")
    "units/stat" ?u))
 
+(defun calc-ul-prefix-help ()
+  (interactive)
+  (if (eq this-command last-command)
+      (message "ul-")
+    (message "logarithmic-units: + (logarithmic), - (logarithmic), Level: ul-"))
+  (push ?l unread-command-events)
+  (push ?u unread-command-events))
 
 (defun calc-v-prefix-help ()
   (interactive)
@@ -684,5 +694,4 @@ C-w  Describe how there is no warranty for Calc."
 
 (provide 'calc-help)
 
-;; arch-tag: 2d347593-7591-449e-a64a-93dab5f2f686
 ;;; calc-help.el ends here