;;; 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>
(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)))
(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"