Mercurial > emacs
comparison lisp/info.el @ 47794:c460856d1bfd
(Info-next-menu-item, Info-last-menu-item)
(info-emacs-manual): Add docstrings.
(Info-index): Use `string-to-number' instead of `string-to-int'.
author | John Paul Wallington <jpw@pobox.com> |
---|---|
date | Tue, 08 Oct 2002 04:57:27 +0000 |
parents | 05b10b9cd8bb |
children | 7d7f2b855580 |
comparison
equal
deleted
inserted
replaced
47793:33354de1129c | 47794:c460856d1bfd |
---|---|
405 (pop-to-buffer "*info*") | 405 (pop-to-buffer "*info*") |
406 (Info-directory)))) | 406 (Info-directory)))) |
407 | 407 |
408 ;;;###autoload | 408 ;;;###autoload |
409 (defun info-emacs-manual () | 409 (defun info-emacs-manual () |
410 "Display the Emacs manual in Info mode." | |
410 (interactive) | 411 (interactive) |
411 (info "emacs")) | 412 (info "emacs")) |
412 | 413 |
413 ;;;###autoload | 414 ;;;###autoload |
414 (defun info-standalone () | 415 (defun info-standalone () |
1661 (if Info-standalone | 1662 (if Info-standalone |
1662 (save-buffers-kill-emacs) | 1663 (save-buffers-kill-emacs) |
1663 (quit-window))) | 1664 (quit-window))) |
1664 | 1665 |
1665 (defun Info-next-menu-item () | 1666 (defun Info-next-menu-item () |
1667 "Go to the node of the next menu item." | |
1666 (interactive) | 1668 (interactive) |
1667 ;; Bind this in case the user sets it to nil. | 1669 ;; Bind this in case the user sets it to nil. |
1668 (let* ((case-fold-search t) | 1670 (let* ((case-fold-search t) |
1669 (node | 1671 (node |
1670 (save-excursion | 1672 (save-excursion |
1674 (Info-extract-menu-node-name))))) | 1676 (Info-extract-menu-node-name))))) |
1675 (if node (Info-goto-node node) | 1677 (if node (Info-goto-node node) |
1676 (error "No more items in menu")))) | 1678 (error "No more items in menu")))) |
1677 | 1679 |
1678 (defun Info-last-menu-item () | 1680 (defun Info-last-menu-item () |
1681 "Go to the node of the previous menu item." | |
1679 (interactive) | 1682 (interactive) |
1680 (save-excursion | 1683 (save-excursion |
1681 (forward-line 1) | 1684 (forward-line 1) |
1682 ;; Bind this in case the user sets it to nil. | 1685 ;; Bind this in case the user sets it to nil. |
1683 (let* ((case-fold-search t) | 1686 (let* ((case-fold-search t) |
1793 (setq current-point (point)) | 1796 (setq current-point (point)) |
1794 (goto-char (point-min)) | 1797 (goto-char (point-min)) |
1795 (search-forward "\n* Menu:" | 1798 (search-forward "\n* Menu:" |
1796 current-point | 1799 current-point |
1797 t))))) | 1800 t))))) |
1798 (if (or virtual-end | 1801 (if (or virtual-end |
1799 (pos-visible-in-window-p (point-min) nil t)) | 1802 (pos-visible-in-window-p (point-min) nil t)) |
1800 (Info-last-preorder) | 1803 (Info-last-preorder) |
1801 (scroll-down)))) | 1804 (scroll-down)))) |
1802 | 1805 |
1803 (defun Info-next-reference (&optional recur) | 1806 (defun Info-next-reference (&optional recur) |
1893 (goto-char (point-min)) | 1896 (goto-char (point-min)) |
1894 (while (re-search-forward pattern nil t) | 1897 (while (re-search-forward pattern nil t) |
1895 (push (list (match-string-no-properties 1) | 1898 (push (list (match-string-no-properties 1) |
1896 (match-string-no-properties 2) | 1899 (match-string-no-properties 2) |
1897 Info-current-node | 1900 Info-current-node |
1898 (string-to-int (concat "0" | 1901 (string-to-number (concat "0" |
1899 (match-string 3)))) | 1902 (match-string 3)))) |
1900 matches)) | 1903 matches)) |
1901 (and (setq node (Info-extract-pointer "next" t)) | 1904 (and (setq node (Info-extract-pointer "next" t)) |
1902 (string-match "\\<Index\\>" node))) | 1905 (string-match "\\<Index\\>" node))) |
1903 (Info-goto-node node)) | 1906 (Info-goto-node node)) |
1904 (or matches | 1907 (or matches |