]> git.eshelyaron.com Git - emacs.git/commitdiff
calc/calc-help.el (calc-describe-thing): Quote strings which could
authorH. Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Thu, 2 Oct 2014 01:41:10 +0000 (20:41 -0500)
committerJay Belanger <jay.p.belanger@gmail.com>
Thu, 2 Oct 2014 01:41:10 +0000 (20:41 -0500)
look like regexps.

lisp/ChangeLog
lisp/calc/calc-help.el

index 1ea03b7630cf157c9eff1b410e9a37d2500d8302..d05add5ab6b0152d1767c2604def8166291671d2 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-02  
+
+       * calc/calc-help.el (calc-describe-thing): Quote strings
+       which could look like regexps.
+
 2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Consolidate x-select-text.
index be04e5a12c0f7b8f57e653ae7d359ae6255f7f97..dfd29230fe5b616e8cfd7897ed6d2a7ed891dcb9 100644 (file)
@@ -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)