;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1992-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-2016 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help
search-whitespace-regexp)))
(Info-search
(cond
- (isearch-word
+ (isearch-regexp-function
;; Lax version of word search
(let ((lax (not (or isearch-nonincremental
(eq (length string)
(length (isearch--state-string
(car isearch-cmds))))))))
- (if (functionp isearch-word)
- (funcall isearch-word string lax)
+ (if (functionp isearch-regexp-function)
+ (funcall isearch-regexp-function string lax)
(word-search-regexp string lax))))
(isearch-regexp string)
(t (regexp-quote string)))
(car (car Info-index-alternatives))
(nth 2 (car Info-index-alternatives))
(if (cdr Info-index-alternatives)
- (format "(%s total; use `%s' for next)"
- (length Info-index-alternatives)
- (key-description (where-is-internal
- 'Info-index-next overriding-local-map
- t)))
+ (format-message
+ "(%s total; use `%s' for next)"
+ (length Info-index-alternatives)
+ (key-description (where-is-internal
+ 'Info-index-next overriding-local-map t)))
"(Only match)")))
(defun Info-find-index-name (name)
(when (equal (car (nth 0 nodeinfo)) (or filename Info-current-file))
(insert
(format "* %-20s %s.\n"
- (format-message "*Index for ‘%s’*::" (cdr (nth 0 nodeinfo)))
+ (format "*Index for ‘%s’*::" (cdr (nth 0 nodeinfo)))
(cdr (nth 0 nodeinfo)))))))))
(defun Info-virtual-index (topic)
(Info-goto-node orignode)
(message "")))
(Info-find-node Info-current-file
- (format-message "*Index for ‘%s’*" topic))))
+ (format "*Index for ‘%s’*" topic))))
\f
(add-to-list 'Info-virtual-files
'("\\`\\*Apropos\\*\\'"
(setq nodes (cdr nodes)))
(if nodes
(Info-find-node Info-apropos-file (car (car nodes)))
- (setq nodename (format-message "Index for ‘%s’" string))
+ (setq nodename (format "Index for ‘%s’" string))
(push (list nodename string (Info-apropos-matches string))
Info-apropos-nodes)
(Info-find-node Info-apropos-file nodename)))))
;; I think nxml is the only exception - maybe it should be just be renamed.
(let ((str (ignore-errors (lm-commentary (find-library-name nodename)))))
(if (null str)
- (insert "Can't find package description.\n\n")
+ (insert "Can’t find package description.\n\n")
(insert
(with-temp-buffer
(insert str)
beginning of the tokens delimited string.
ALL is a regular expression with a single
parenthesized subpattern which is the token to be
- returned. E.g. `{\(.*\)}' would return any string
+ returned. E.g. `{(.*)}' would return any string
enclosed in braces around POS.
ERRORSTRING optional fourth argument, controls action on no match:
nil: return nil
;; Fontify titles
(goto-char (point-min))
(when (and font-lock-mode not-fontified-p)
- (while (and (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
- nil t)
- ;; Only consider it as an underlined title if the ASCII
- ;; underline has the same size as the text. A typical
- ;; counter example is when a continuation "..." is alone
- ;; on a line.
- (= (string-width (match-string 1))
- (string-width (match-string 2))))
- (let* ((c (preceding-char))
- (face
- (cond ((= c ?*) 'info-title-1)
- ((= c ?=) 'info-title-2)
- ((= c ?-) 'info-title-3)
- (t 'info-title-4))))
- (put-text-property (match-beginning 1) (match-end 1)
- 'font-lock-face face))
- ;; This is a serious problem for trying to handle multiple
- ;; frame types at once. We want this text to be invisible
- ;; on frames that can display the font above.
- (when (memq (framep (selected-frame)) '(x pc w32 ns))
- (add-text-properties (1- (match-beginning 2)) (match-end 2)
- '(invisible t front-sticky nil rear-nonsticky t)))))
+ (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
+ nil t)
+ ;; Only consider it as an underlined title if the ASCII
+ ;; underline has the same size as the text. A typical
+ ;; counter example is when a continuation "..." is alone
+ ;; on a line.
+ (when (= (string-width (match-string 1))
+ (string-width (match-string 2)))
+ (let* ((c (preceding-char))
+ (face
+ (cond ((= c ?*) 'info-title-1)
+ ((= c ?=) 'info-title-2)
+ ((= c ?-) 'info-title-3)
+ (t 'info-title-4))))
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'font-lock-face face))
+ ;; This is a serious problem for trying to handle multiple
+ ;; frame types at once. We want this text to be invisible
+ ;; on frames that can display the font above.
+ (when (memq (framep (selected-frame)) '(x pc w32 ns))
+ (add-text-properties (1- (match-beginning 2)) (match-end 2)
+ '(invisible t front-sticky nil rear-nonsticky t))))))
;; Fontify cross references
(goto-char (point-min))