X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3e0e2339cd379eeba8d9bc758f2e8e574144e252..c430f7e23fc2c22f251ace4254e37dea1452dfc3:/lisp/info.el diff --git a/lisp/info.el b/lisp/info.el index 2c92df4ec1..bb259bd59e 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1,6 +1,6 @@ ;; 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 @@ -81,28 +81,24 @@ The Lisp code is executed when the node is selected.") (t :height 1.2 :inherit info-title-2)) "Face for info titles at level 1." :group 'info) -(define-obsolete-face-alias 'Info-title-1-face 'info-title-1 "22.1") (defface info-title-2 '((((type tty pc) (class color)) :foreground "lightblue" :weight bold) (t :height 1.2 :inherit info-title-3)) "Face for info titles at level 2." :group 'info) -(define-obsolete-face-alias 'Info-title-2-face 'info-title-2 "22.1") (defface info-title-3 '((((type tty pc) (class color)) :weight bold) (t :height 1.2 :inherit info-title-4)) "Face for info titles at level 3." :group 'info) -(define-obsolete-face-alias 'Info-title-3-face 'info-title-3 "22.1") (defface info-title-4 '((((type tty pc) (class color)) :weight bold) (t :weight bold :inherit variable-pitch)) "Face for info titles at level 4." :group 'info) -(define-obsolete-face-alias 'Info-title-4-face 'info-title-4 "22.1") (defface info-menu-header '((((type tty pc)) @@ -119,7 +115,6 @@ The Lisp code is executed when the node is selected.") (t :underline t)) "Face for every third `*' in an Info menu." :group 'info) -(define-obsolete-face-alias 'info-menu-5 'info-menu-star "22.1") (defface info-xref '((t :inherit link)) @@ -189,15 +184,11 @@ A header-line does not scroll with the rest of the buffer." configure-info-directory))) (prefixes ;; Directory trees in which to look for info subdirectories - (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) + (prune-directory-list '("/usr/local/" "/usr/" "/opt/"))) (suffixes ;; Subdirectories in each directory tree that may contain info - ;; directories. Most of these are rather outdated. - ;; It ought to be fine to stop checking the "emacs" ones now, - ;; since this is Emacs and we have not installed info files - ;; into such directories for a looong time... - '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" - "emacs/" "lib/" "lib/emacs/")) + ;; directories. + '("share/" "")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) @@ -2114,14 +2105,14 @@ If DIRECTION is `backward', search in the reverse direction." 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))) @@ -3460,7 +3451,7 @@ MATCHES is a list of index matches found by `Info-index'.") (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) @@ -3496,7 +3487,7 @@ search results." (Info-goto-node orignode) (message ""))) (Info-find-node Info-current-file - (format-message "*Index for ‘%s’*" topic)))) + (format "*Index for ‘%s’*" topic)))) (add-to-list 'Info-virtual-files '("\\`\\*Apropos\\*\\'" @@ -3635,7 +3626,7 @@ Build a menu of the possible matches." (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))))) @@ -3838,7 +3829,7 @@ START is a regular expression which will match the 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 @@ -4236,7 +4227,7 @@ With a zero prefix arg, put the name inside a function call to `info'." "Syntax table used in `Info-mode'.") (defface Info-quoted - '((t :family "courier")) + '((t :inherit fixed-pitch-serif)) "Face used for quoted elements.") (defvar Info-mode-font-lock-keywords @@ -4720,28 +4711,28 @@ first line or header line, and for breadcrumb links.") ;; 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))