If nil, meaning not yet initialized, Info uses the environment
variable INFOPATH to initialize it, or `Info-default-directory-list'
if there is no INFOPATH variable in the environment, or the
-concatenation of the two if INFOPATH ends with a colon.
+concatenation of the two if INFOPATH ends with a `path-separator'.
When `Info-directory-list' is initialized from the value of
`Info-default-directory-list', and Emacs is installed in one of the
where NODENAME is a regexp that matches a class of virtual Info node names.
It should be carefully chosen to not cause node name clashes with
existing node names. OPERATION is one of the following operation
-symbols `find-node' that define what HANDLER
-function to call instead of calling the default corresponding function
-to override it.")
+symbols `find-node' that define what HANDLER function to call instead
+of calling the default corresponding function to override it.")
(defvar Info-current-node-virtual nil
"Non-nil if the current Info node is virtual.")
;; The MS-DOS list should work both when long file names are
;; supported (Windows 9X), and when only 8+3 file names are available.
(if (eq system-type 'ms-dos)
- '( (".gz" . "gunzip")
- (".z" . "gunzip")
- (".bz2" . ("bzip2" "-dc"))
- (".inz" . "gunzip")
- (".igz" . "gunzip")
- (".info.Z" . "gunzip")
- (".info.gz" . "gunzip")
- ("-info.Z" . "gunzip")
- ("-info.gz" . "gunzip")
- ("/index.gz". "gunzip")
- ("/index.z" . "gunzip")
- (".inf" . nil)
- (".info" . nil)
- ("-info" . nil)
- ("/index" . nil)
- ("" . nil))
- '( (".info.Z". "uncompress")
- (".info.Y". "unyabba")
- (".info.gz". "gunzip")
- (".info.z". "gunzip")
- (".info.bz2" . ("bzip2" "-dc"))
- (".info.xz". "unxz")
- (".info". nil)
- ("-info.Z". "uncompress")
- ("-info.Y". "unyabba")
- ("-info.gz". "gunzip")
- ("-info.bz2" . ("bzip2" "-dc"))
- ("-info.z". "gunzip")
- ("-info.xz". "unxz")
- ("-info". nil)
- ("/index.Z". "uncompress")
- ("/index.Y". "unyabba")
- ("/index.gz". "gunzip")
- ("/index.z". "gunzip")
- ("/index.bz2". ("bzip2" "-dc"))
- ("/index.xz". "unxz")
- ("/index". nil)
- (".Z". "uncompress")
- (".Y". "unyabba")
- (".gz". "gunzip")
- (".z". "gunzip")
- (".bz2" . ("bzip2" "-dc"))
- (".xz". "unxz")
- ("". nil)))
+ '( (".gz" . "gunzip")
+ (".z" . "gunzip")
+ (".bz2" . ("bzip2" "-dc"))
+ (".inz" . "gunzip")
+ (".igz" . "gunzip")
+ (".info.Z" . "gunzip")
+ (".info.gz" . "gunzip")
+ ("-info.Z" . "gunzip")
+ ("-info.gz" . "gunzip")
+ ("/index.gz" . "gunzip")
+ ("/index.z" . "gunzip")
+ (".inf" . nil)
+ (".info" . nil)
+ ("-info" . nil)
+ ("/index" . nil)
+ ("" . nil))
+ '( (".info.Z" . "uncompress")
+ (".info.Y" . "unyabba")
+ (".info.gz" . "gunzip")
+ (".info.z" . "gunzip")
+ (".info.bz2" . ("bzip2" "-dc"))
+ (".info.xz" . "unxz")
+ (".info" . nil)
+ ("-info.Z" . "uncompress")
+ ("-info.Y" . "unyabba")
+ ("-info.gz" . "gunzip")
+ ("-info.bz2" . ("bzip2" "-dc"))
+ ("-info.z" . "gunzip")
+ ("-info.xz" . "unxz")
+ ("-info" . nil)
+ ("/index.Z" . "uncompress")
+ ("/index.Y" . "unyabba")
+ ("/index.gz" . "gunzip")
+ ("/index.z" . "gunzip")
+ ("/index.bz2" . ("bzip2" "-dc"))
+ ("/index.xz" . "unxz")
+ ("/index" . nil)
+ (".Z" . "uncompress")
+ (".Y" . "unyabba")
+ (".gz" . "gunzip")
+ (".z" . "gunzip")
+ (".bz2" . ("bzip2" "-dc"))
+ (".xz" . "unxz")
+ ("" . nil)))
"List of file name suffixes and associated decoding commands.
Each entry should be (SUFFIX . STRING); the file is given to
the command as standard input.
(re-search-backward regexp beg t))))
(defun Info-find-file (filename &optional noerror)
- "Return expanded FILENAME, or t, if FILENAME is \"dir\".
+ "Return expanded FILENAME, or t if FILENAME is \"dir\".
Optional second argument NOERROR, if t, means if file is not found
just return nil (no error)."
;; Convert filename to lower case if not found as specified.
(if new-history
(setq Info-history (cons new-history Info-history))))))
-(defun Info-revert-buffer-function (ignore-auto noconfirm)
+(defun Info-revert-buffer-function (_ignore-auto noconfirm)
(when (or noconfirm (y-or-n-p "Revert info buffer? "))
(Info-revert-find-node Info-current-file Info-current-node)
(message "Reverted %s" Info-current-file)))
;; \0\h[image param=value ...\h\0]
;; into the Info file for handling images.
(defun Info-split-parameter-string (parameter-string)
- "Return alist of (\"KEY\" . \"VALUE\") from PARAMETER-STRING; a
-whitespace separated list of KEY=VALUE pairs. If VALUE contains
-whitespace or double quotes, it must be quoted in double quotes and
-any double quotes or backslashes must be escaped (\\\",\\\\)."
+ "Return alist of (\"KEY\" . \"VALUE\") from PARAMETER-STRING.
+PARAMETER-STRING is a whitespace separated list of KEY=VALUE pairs.
+If VALUE contains whitespace or double quotes, it must be quoted
+in double quotes and any double quotes or backslashes must be
+escaped (\\\",\\\\)."
(let ((start 0)
(parameter-alist))
(while (string-match
(defvar Info-read-node-completion-table)
(defun Info-read-node-name-2 (dirs suffixes string pred action)
- "Virtual completion table for file names input in Info node names.
-PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
+ "Virtual completion table for file names input in Info node names."
(setq suffixes (remove "" suffixes))
(when (file-name-absolute-p string)
(setq dirs (list (file-name-directory string))))
(defvar Info-search-case-fold nil
"The value of `case-fold-search' from previous `Info-search' command.")
-(defun Info-search (regexp &optional bound noerror count direction)
+(defun Info-search (regexp &optional bound _noerror _count direction)
"Search for REGEXP, starting from point, and select node it's found in.
If DIRECTION is `backward', search in the reverse direction."
(interactive (list (read-string
`(lambda (cmd)
(Info-isearch-pop-state cmd ',Info-current-file ',Info-current-node)))
-(defun Info-isearch-pop-state (cmd file node)
+(defun Info-isearch-pop-state (_cmd file node)
(or (and (equal Info-current-file file)
(equal Info-current-node node))
(progn (Info-find-node file node) (sit-for 0))))
))
(defun Info-directory-toc-nodes (filename)
- "Directory-specific implementation of Info-directory-toc-nodes."
+ "Directory-specific implementation of `Info-directory-toc-nodes'."
`(,filename
("Top" nil nil nil)))
-(defun Info-directory-find-file (filename &optional noerror)
- "Directory-specific implementation of Info-find-file."
+(defun Info-directory-find-file (filename &optional _noerror)
+ "Directory-specific implementation of `Info-find-file'."
filename)
-(defun Info-directory-find-node (filename nodename &optional no-going-back)
- "Directory-specific implementation of Info-find-node-2."
+(defun Info-directory-find-node (_filename _nodename &optional _no-going-back)
+ "Directory-specific implementation of `Info-find-node-2'."
(Info-insert-dir))
;;;###autoload
))
(defun Info-history-toc-nodes (filename)
- "History-specific implementation of Info-history-toc-nodes."
+ "History-specific implementation of `Info-history-toc-nodes'."
`(,filename
("Top" nil nil nil)))
-(defun Info-history-find-file (filename &optional noerror)
- "History-specific implementation of Info-find-file."
+(defun Info-history-find-file (filename &optional _noerror)
+ "History-specific implementation of `Info-find-file'."
filename)
-(defun Info-history-find-node (filename nodename &optional no-going-back)
- "History-specific implementation of Info-find-node-2."
+(defun Info-history-find-node (filename nodename &optional _no-going-back)
+ "History-specific implementation of `Info-find-node-2'."
(insert (format "\n\^_\nFile: %s, Node: %s, Up: (dir)\n\n"
(or filename Info-current-file) nodename))
(insert "Recently Visited Nodes\n")
(find-node . Info-toc-find-node)
))
-(defun Info-toc-find-node (filename nodename &optional no-going-back)
- "Toc-specific implementation of Info-find-node-2."
+(defun Info-toc-find-node (filename nodename &optional _no-going-back)
+ "Toc-specific implementation of `Info-find-node-2'."
(let* ((curr-file (substring-no-properties (or filename Info-current-file)))
(curr-node (substring-no-properties (or nodename Info-current-node)))
(node-list (Info-toc-nodes curr-file)))
TOPIC is the search string given as an argument to `Info-virtual-index',
MATCHES is a list of index matches found by `Info-index'.")
-(defun Info-virtual-index-find-node (filename nodename &optional no-going-back)
- "Index-specific implementation of Info-find-node-2."
+(defun Info-virtual-index-find-node (filename nodename &optional _no-going-back)
+ "Index-specific implementation of `Info-find-node-2'."
;; Generate Index-like menu of matches
(if (string-match "^\\*Index for `\\(.+\\)'\\*$" nodename)
;; Generate Index-like menu of matches
(Info-find-node Info-current-file "*Index*")
(unless (assoc (cons Info-current-file topic) Info-virtual-index-nodes)
(let ((orignode Info-current-node)
- (ohist-list Info-history-list)
- nodename)
+ (ohist-list Info-history-list))
;; Reuse `Info-index' to set `Info-index-alternatives'.
(Info-index topic)
(push (cons (cons Info-current-file topic) Info-index-alternatives)
MATCHES is a list of index matches found by `Info-apropos-matches'.")
(defun Info-apropos-toc-nodes (filename)
- "Apropos-specific implementation of Info-apropos-toc-nodes."
+ "Apropos-specific implementation of `Info-apropos-toc-nodes'."
(let ((nodes (mapcar 'car (reverse Info-apropos-nodes))))
`(,filename
("Top" nil nil ,nodes)
,@(mapcar (lambda (node) `(,node "Top" nil nil)) nodes))))
-(defun Info-apropos-find-file (filename &optional noerror)
- "Apropos-specific implementation of Info-find-file."
+(defun Info-apropos-find-file (filename &optional _noerror)
+ "Apropos-specific implementation of `Info-find-file'."
filename)
-(defun Info-apropos-find-node (filename nodename &optional no-going-back)
- "Apropos-specific implementation of Info-find-node-2."
+(defun Info-apropos-find-node (_filename nodename &optional _no-going-back)
+ "Apropos-specific implementation of `Info-find-node-2'."
(if (equal nodename "Top")
;; Generate Top menu
(let ((nodes (reverse Info-apropos-nodes)))
(defvar Info-finder-file "*Finder*"
"Info file name of the virtual Info keyword finder manual.")
-(defun Info-finder-find-file (filename &optional noerror)
- "Finder-specific implementation of Info-find-file."
+(defun Info-finder-find-file (filename &optional _noerror)
+ "Finder-specific implementation of `Info-find-file'."
filename)
(defvar finder-known-keywords)
(defvar finder-keywords-hash)
(defvar package-alist) ; finder requires package
-(defun Info-finder-find-node (filename nodename &optional no-going-back)
- "Finder-specific implementation of Info-find-node-2."
+(defun Info-finder-find-node (_filename nodename &optional _no-going-back)
+ "Finder-specific implementation of `Info-find-node-2'."
(require 'finder)
(cond
((equal nodename "Top")
"Display descriptions of the keywords in the Finder virtual manual.
In interactive use, a prefix argument directs this command to read
a list of keywords separated by comma. After that, it displays a node
-with a list packages that contain all specified keywords."
+with a list of packages that contain all specified keywords."
(interactive
(when current-prefix-arg
(require 'finder)
\f
(defun Info-get-token (pos start all &optional errorstring)
"Return the token around POS.
-POS must be somewhere inside the token
+POS must be somewhere inside the token.
START is a regular expression which will match the
- beginning of the tokens delimited string
+ 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
enclosed in braces around POS.
-ERRORSTRING optional fourth argument, controls action on no match
+ERRORSTRING optional fourth argument, controls action on no match:
nil: return nil
t: beep
a string: signal an error, using that string."
If COMMAND has no property, the variable `Info-file-list-for-emacs'
defines heuristics for which Info manual to try.
The locations are of the format used in `Info-history', i.e.
-\(FILENAME NODENAME BUFFERPOS\), where BUFFERPOS is the line number
+\(FILENAME NODENAME BUFFERPOS), where BUFFERPOS is the line number
in the first element of the returned list (which is treated specially in
`Info-goto-emacs-command-node'), and 0 for the rest elements of a list."
(let ((where '()) line-number
(eval-when-compile (require 'speedbar))
(defvar Info-speedbar-key-map nil
- "Keymap used when in the info display mode.")
+ "Keymap used when in the Info display mode.")
(defun Info-install-speedbar-variables ()
"Install those variables used by speedbar to enhance Info."
(speedbar-change-initial-expansion-list "Info")
)
-(defun Info-speedbar-hierarchy-buttons (directory depth &optional node)
+(defun Info-speedbar-hierarchy-buttons (_directory depth &optional node)
"Display an Info directory hierarchy in speedbar.
DIRECTORY is the current directory in the attached frame.
DEPTH is the current indentation depth.
t)
nil))))
-(defun Info-speedbar-goto-node (text node indent)
+(defun Info-speedbar-goto-node (_text node _indent)
"When user clicks on TEXT, go to an info NODE.
The INDENT level is ignored."
(speedbar-select-attached-frame)
;;; Info mode node listing
;; This is called by `speedbar-add-localized-speedbar-support'
-(defun Info-speedbar-buttons (buffer)
+(defun Info-speedbar-buttons (_buffer)
"Create a speedbar display to help navigation in an Info file.
BUFFER is the buffer speedbar is requesting buttons for."
(if (save-excursion (goto-char (point-min))
;;;; Desktop support
-(defun Info-desktop-buffer-misc-data (desktop-dirname)
+(defun Info-desktop-buffer-misc-data (_desktop-dirname)
"Auxiliary information to be saved in desktop file."
(list Info-current-file
Info-current-node
'slow Info-current-file Info-current-node)
(cons 'slow t))))))
-(defun Info-restore-desktop-buffer (desktop-buffer-file-name
+(defun Info-restore-desktop-buffer (_desktop-buffer-file-name
desktop-buffer-name
desktop-buffer-misc)
"Restore an Info buffer specified in a desktop file."