]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-help.el
* lisp/progmodes/elisp-mode.el: Require cl-lib for cl-defstruct.
[gnu-emacs] / lisp / calc / calc-help.el
index dfd29230fe5b616e8cfd7897ed6d2a7ed891dcb9..b2e7df1b7183614ed5faae1c4f9a5dde02984213 100644 (file)
@@ -1,6 +1,6 @@
 ;;; calc-help.el --- help display functions for Calc,
 
-;; Copyright (C) 1990-1993, 2001-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
@@ -364,23 +364,21 @@ C-w  Describe how there is no warranty for Calc."
          (error "Can't find `%s' in %s" thing where)))
     (let (Info-history)
       (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 (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)))
-             (search-forward (format "`%s'" (or target thing)) nil t)
-             (search-forward (or target thing) nil t)))
-       (let ((case-fold-search t))
-         (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (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))))
+    (let* ((string-target (or target thing))
+           (quoted (format "['`‘]%s['’]" (regexp-quote string-target)))
+           (bracketed (format "\\[%s\\]\\|(%s)\\|\\<The[ \n]%s"
+                              quoted quoted quoted)))
+      (or (let ((case-fold-search nil))
+            (or (re-search-forward bracketed nil t)
+                (and not-quoted
+                     (let ((case-fold-search t))
+                       (search-forward string-target nil t)))
+                (re-search-forward quoted nil t)
+                (search-forward string-target nil t)))
+          (let ((case-fold-search t))
+            (or (re-search-forward bracketed nil t)
+                (re-search-forward quoted nil t)
+                (search-forward string-target nil t)))))
     (beginning-of-line)
     (message "Found `%s' in %s" thing where)))
 
@@ -647,7 +645,7 @@ C-w  Describe how there is no warranty for Calc."
 (defun calc-u-prefix-help ()
   (interactive)
   (calc-do-prefix-help
-   '("Simplify, Convert, Temperature-convert, Base-units"
+   '("Simplify, Convert, coNvert exact, Temperature-convert, Base-units"
      "Autorange; Remove, eXtract; Explain; View-table; 0-9"
      "Define, Undefine, Get-defn, Permanent"
      "SHIFT + View-table-other-window"