]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-help.el
Revert previous accidental commit
[gnu-emacs] / lisp / calc / calc-help.el
index 8ef917fb5f4fc8bda90b4b7b8727ae88ec350674..dfd29230fe5b616e8cfd7897ed6d2a7ed891dcb9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; calc-help.el --- help display functions for Calc,
 
-;; Copyright (C) 1990-1993, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
@@ -30,7 +30,7 @@
 (require 'calc-macs)
 
 ;; Declare functions which are defined elsewhere.
-(declare-function Info-goto-node "info" (nodename &optional fork))
+(declare-function Info-goto-node "info" (nodename &optional fork strict-case))
 (declare-function Info-last "info" ())
 
 
@@ -366,9 +366,9 @@ C-w  Describe how there is no warranty for Calc."
       (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
     (or (let ((case-fold-search nil))
          (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target thing)
-                                         (or target thing)
-                                         (or target thing)) nil t)
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))) nil t)
              (and not-quoted
                   (let ((case-fold-search t))
                     (search-forward (or target thing) nil t)))
@@ -376,9 +376,9 @@ C-w  Describe how there is no warranty for Calc."
              (search-forward (or target thing) nil t)))
        (let ((case-fold-search t))
          (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target thing)
-                                         (or target thing)
-                                         (or target thing)) nil t)
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))) nil t)
              (search-forward (format "`%s'" (or target thing)) nil t)
              (search-forward (or target thing) nil t))))
     (beginning-of-line)
@@ -386,23 +386,9 @@ C-w  Describe how there is no warranty for Calc."
 
 (defun calc-view-news ()
   (interactive)
-  (let ((path load-path))
-    (while (and path
-               (not (file-exists-p (expand-file-name "calc.el" (car path)))))
-      (setq path (cdr path)))
-    (or (and path
-            (file-exists-p (expand-file-name "README" (car path))))
-       (error "Can't locate Calc sources"))
-    (calc-quit)
-    (switch-to-buffer "*Help*")
-    (let ((inhibit-read-only t))
-      (erase-buffer)
-      (insert-file-contents (expand-file-name "README" (car path)))
-      (search-forward "Summary of changes")
-      (forward-line -1)
-      (delete-region (point-min) (point))
-      (goto-char (point-min)))
-    (help-mode)))
+  (calc-quit)
+  (view-emacs-news)
+  (re-search-forward "^\*+ .*\\<Calc\\>" nil t))
 
 (defvar calc-help-long-names '((?b . "binary/business")
                               (?g . "graphics")
@@ -642,7 +628,7 @@ C-w  Describe how there is no warranty for Calc."
    '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat"
      "Working; Xtensions; Mode-save; preserve Embedded modes"
      "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute"
-     "SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units")
+     "SHIFT + simplify: Off, Num, basIc, Algebraic, Bin, Ext, Units")
    "mode" ?m))