diff options
| author | Stefan Monnier | 2007-09-07 02:45:28 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-09-07 02:45:28 +0000 |
| commit | 86970dbd22802fe48a8483a1b0db12092d5fa5fa (patch) | |
| tree | 33734e05869e1235d54e01073fb69d5316ec08aa | |
| parent | f10d0e80a7494cdc5f964ada52f6db4f6a327ec7 (diff) | |
| download | emacs-86970dbd22802fe48a8483a1b0db12092d5fa5fa.tar.gz emacs-86970dbd22802fe48a8483a1b0db12092d5fa5fa.zip | |
Remove spurious * in docstrings.
(woman-mini-help, woman-non-underline-faces, woman0-rename)
(woman-topic-all-completions-merge, woman-file-name-all-completions)
(woman-select-symbol-fonts, woman-expand-directory-path): Use dolist.
(woman-write-directory-cache, woman-display-extended-fonts)
(WoMan-log-begin, WoMan-log-1): Use with-current-buffer.
(woman-really-find-file): Use pop-to-buffer if switch-to-buffer fails.
(woman-mode): Use inhibit-read-only.
(woman-negative-vertical-space): Use dotimes.
(woman2-tagged-paragraph, woman-tab-to-tab-stop): Use insert-char.
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/woman.el | 157 |
2 files changed, 89 insertions, 97 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 433a45e5d9a..e7a2a0e90b7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * woman.el: Remove spurious * in docstrings. | ||
| 4 | (woman-mini-help, woman-non-underline-faces, woman0-rename) | ||
| 5 | (woman-topic-all-completions-merge, woman-file-name-all-completions) | ||
| 6 | (woman-select-symbol-fonts, woman-expand-directory-path): Use dolist. | ||
| 7 | (woman-write-directory-cache, woman-display-extended-fonts) | ||
| 8 | (WoMan-log-begin, WoMan-log-1): Use with-current-buffer. | ||
| 9 | (woman-really-find-file): Use pop-to-buffer if switch-to-buffer fails. | ||
| 10 | (woman-mode): Use inhibit-read-only. | ||
| 11 | (woman-negative-vertical-space): Use dotimes. | ||
| 12 | (woman2-tagged-paragraph, woman-tab-to-tab-stop): Use insert-char. | ||
| 13 | |||
| 1 | 2007-09-06 Romain Francoise <romain@orebokech.com> | 14 | 2007-09-06 Romain Francoise <romain@orebokech.com> |
| 2 | 15 | ||
| 3 | * vc-bzr.el (vc-bzr-admin-lastrev): New defconst. | 16 | * vc-bzr.el (vc-bzr-admin-lastrev): New defconst. |
| @@ -25,7 +38,7 @@ | |||
| 25 | 38 | ||
| 26 | 2007-09-05 Richard Stallman <rms@gnu.org> | 39 | 2007-09-05 Richard Stallman <rms@gnu.org> |
| 27 | 40 | ||
| 28 | * startup.el (fancy-startup-text): Renamed from fancy-splash-text. | 41 | * startup.el (fancy-startup-text): Rename from fancy-splash-text. |
| 29 | Several items removed, simplified, or put on one line. | 42 | Several items removed, simplified, or put on one line. |
| 30 | (fancy-about-text): Add substantial contents, part of startup text. | 43 | (fancy-about-text): Add substantial contents, part of startup text. |
| 31 | (fancy-splash-head): Make "GNU" or "GNU/Linux" a link. | 44 | (fancy-splash-head): Make "GNU" or "GNU/Linux" a link. |
| @@ -47,12 +60,11 @@ | |||
| 47 | 2007-09-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> | 60 | 2007-09-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> |
| 48 | 61 | ||
| 49 | * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note | 62 | * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note |
| 50 | in doc string. | 63 | in doc string. |
| 51 | 64 | ||
| 52 | 2007-09-04 Dan Nicolaescu <dann@ics.uci.edu> | 65 | 2007-09-04 Dan Nicolaescu <dann@ics.uci.edu> |
| 53 | 66 | ||
| 54 | * server.el (server-start, server-unload-hook): Undo previous | 67 | * server.el (server-start, server-unload-hook): Undo previous change. |
| 55 | change. | ||
| 56 | 68 | ||
| 57 | * xt-mouse.el: Undo previous change. | 69 | * xt-mouse.el: Undo previous change. |
| 58 | 70 | ||
| @@ -106,17 +118,16 @@ | |||
| 106 | 118 | ||
| 107 | 2007-09-02 Dan Nicolaescu <dann@ics.uci.edu> | 119 | 2007-09-02 Dan Nicolaescu <dann@ics.uci.edu> |
| 108 | 120 | ||
| 109 | * term/xterm.el (xterm-modify-other-keys-terminal-list): New | 121 | * term/xterm.el (xterm-modify-other-keys-terminal-list): New variable. |
| 110 | variable. | ||
| 111 | (xterm-turn-on-modify-other-keys): Only turn on modify-other-keys | 122 | (xterm-turn-on-modify-other-keys): Only turn on modify-other-keys |
| 112 | if the selected frames is in | 123 | if the selected frames is in |
| 113 | xterm-modify-other-keys-terminal-list. | 124 | xterm-modify-other-keys-terminal-list. |
| 114 | (xterm-turn-off-modify-other-keys): Add an optional frame | 125 | (xterm-turn-off-modify-other-keys): Add an optional frame |
| 115 | parameter. Only turn off modify-other-keys if FRAME is in | 126 | parameter. Only turn off modify-other-keys if FRAME is in |
| 116 | xterm-modify-other-keys-terminal-list. | 127 | xterm-modify-other-keys-terminal-list. |
| 117 | (xterm-remove-modify-other-keys): New function. | 128 | (xterm-remove-modify-other-keys): New function. |
| 118 | (terminal-init-xterm): Use it. Deal with delete-frame hook. Add | 129 | (terminal-init-xterm): Use it. Deal with delete-frame hook. |
| 119 | the selected frame to xterm-modify-other-keys-terminal-list. | 130 | Add the selected frame to xterm-modify-other-keys-terminal-list. |
| 120 | 131 | ||
| 121 | 2007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 132 | 2007-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 122 | 133 | ||
diff --git a/lisp/woman.el b/lisp/woman.el index 4d50b5d3f2e..b5fd22f5913 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -520,19 +520,19 @@ As a special case, if PATHS is nil then replace it by calling | |||
| 520 | :group 'help) | 520 | :group 'help) |
| 521 | 521 | ||
| 522 | (defcustom woman-show-log nil | 522 | (defcustom woman-show-log nil |
| 523 | "*If non-nil then show the *WoMan-Log* buffer if appropriate. | 523 | "If non-nil then show the *WoMan-Log* buffer if appropriate. |
| 524 | I.e. if any warning messages are written to it. Default is nil." | 524 | I.e. if any warning messages are written to it. Default is nil." |
| 525 | :type 'boolean | 525 | :type 'boolean |
| 526 | :group 'woman) | 526 | :group 'woman) |
| 527 | 527 | ||
| 528 | (defcustom woman-pre-format-hook nil | 528 | (defcustom woman-pre-format-hook nil |
| 529 | "*Hook run by WoMan immediately before formatting a buffer. | 529 | "Hook run by WoMan immediately before formatting a buffer. |
| 530 | Change only via `Customization' or the function `add-hook'." | 530 | Change only via `Customization' or the function `add-hook'." |
| 531 | :type 'hook | 531 | :type 'hook |
| 532 | :group 'woman) | 532 | :group 'woman) |
| 533 | 533 | ||
| 534 | (defcustom woman-post-format-hook nil | 534 | (defcustom woman-post-format-hook nil |
| 535 | "*Hook run by WoMan immediately after formatting a buffer. | 535 | "Hook run by WoMan immediately after formatting a buffer. |
| 536 | Change only via `Customization' or the function `add-hook'." | 536 | Change only via `Customization' or the function `add-hook'." |
| 537 | :type 'hook | 537 | :type 'hook |
| 538 | :group 'woman) | 538 | :group 'woman) |
| @@ -550,7 +550,7 @@ Change only via `Customization' or the function `add-hook'." | |||
| 550 | (if (eq system-type 'windows-nt) | 550 | (if (eq system-type 'windows-nt) |
| 551 | (mapcar 'woman-Cyg-to-Win path) | 551 | (mapcar 'woman-Cyg-to-Win path) |
| 552 | path)) | 552 | path)) |
| 553 | "*List of dirs to search and/or files to try for man config file. | 553 | "List of dirs to search and/or files to try for man config file. |
| 554 | A trailing separator (`/' for UNIX etc.) on directories is | 554 | A trailing separator (`/' for UNIX etc.) on directories is |
| 555 | optional, and the filename is used if a directory specified is | 555 | optional, and the filename is used if a directory specified is |
| 556 | the first to start with \"man\" and has an extension starting | 556 | the first to start with \"man\" and has an extension starting |
| @@ -606,7 +606,7 @@ MANPATH_MAP[ \t]+\\(\\S-+\\)[ \t]+\\(\\S-+\\)\\)" nil t) | |||
| 606 | (defcustom woman-manpath | 606 | (defcustom woman-manpath |
| 607 | (or (woman-parse-colon-path (getenv "MANPATH")) | 607 | (or (woman-parse-colon-path (getenv "MANPATH")) |
| 608 | '("/usr/man" "/usr/share/man" "/usr/local/man")) | 608 | '("/usr/man" "/usr/share/man" "/usr/local/man")) |
| 609 | "*List of DIRECTORY TREES to search for UN*X manual files. | 609 | "List of DIRECTORY TREES to search for UN*X manual files. |
| 610 | Each element should be the name of a directory that contains | 610 | Each element should be the name of a directory that contains |
| 611 | subdirectories of the form `man?', or more precisely subdirectories | 611 | subdirectories of the form `man?', or more precisely subdirectories |
| 612 | selected by the value of `woman-manpath-man-regexp'. Non-directory | 612 | selected by the value of `woman-manpath-man-regexp'. Non-directory |
| @@ -649,7 +649,7 @@ Microsoft platforms. Its purpose is to avoid `cat?', `.', `..', etc." | |||
| 649 | 649 | ||
| 650 | (defcustom woman-path | 650 | (defcustom woman-path |
| 651 | (if (eq system-type 'ms-dos) '("$DJDIR/info" "$DJDIR/man/cat[1-9onlp]")) | 651 | (if (eq system-type 'ms-dos) '("$DJDIR/info" "$DJDIR/man/cat[1-9onlp]")) |
| 652 | "*List of SPECIFIC DIRECTORIES to search for UN*X manual files. | 652 | "List of SPECIFIC DIRECTORIES to search for UN*X manual files. |
| 653 | For example | 653 | For example |
| 654 | 654 | ||
| 655 | (\"/emacs/etc\"). | 655 | (\"/emacs/etc\"). |
| @@ -676,7 +676,7 @@ drive letters explicitly." | |||
| 676 | :group 'woman-interface) | 676 | :group 'woman-interface) |
| 677 | 677 | ||
| 678 | (defcustom woman-cache-level 2 | 678 | (defcustom woman-cache-level 2 |
| 679 | "*The level of topic caching. | 679 | "The level of topic caching. |
| 680 | 1 - cache only the topic and directory lists | 680 | 1 - cache only the topic and directory lists |
| 681 | (the only level before version 0.34 - only for compatibility); | 681 | (the only level before version 0.34 - only for compatibility); |
| 682 | 2 - cache also the directories for each topic | 682 | 2 - cache also the directories for each topic |
| @@ -695,7 +695,7 @@ file `woman-cache-filename' for a change to take effect. | |||
| 695 | :group 'woman-interface) | 695 | :group 'woman-interface) |
| 696 | 696 | ||
| 697 | (defcustom woman-cache-filename nil | 697 | (defcustom woman-cache-filename nil |
| 698 | "*The full pathname of the WoMan directory and topic cache file. | 698 | "The full pathname of the WoMan directory and topic cache file. |
| 699 | It is used to save and restore the cache between sessions. This is | 699 | It is used to save and restore the cache between sessions. This is |
| 700 | especially useful with remote-mounted man page files! The default | 700 | especially useful with remote-mounted man page files! The default |
| 701 | value of nil suppresses this action. The `standard' non-nil | 701 | value of nil suppresses this action. The `standard' non-nil |
| @@ -707,7 +707,7 @@ the `woman' command to update and re-write the cache." | |||
| 707 | :group 'woman-interface) | 707 | :group 'woman-interface) |
| 708 | 708 | ||
| 709 | (defcustom woman-dired-keys t | 709 | (defcustom woman-dired-keys t |
| 710 | "*List of `dired' mode keys to define to run WoMan on current file. | 710 | "List of `dired' mode keys to define to run WoMan on current file. |
| 711 | E.g. '(\"w\" \"W\"), or any non-null atom to automatically define | 711 | E.g. '(\"w\" \"W\"), or any non-null atom to automatically define |
| 712 | \"w\" and \"W\" if they are unbound, or nil to do nothing. | 712 | \"w\" and \"W\" if they are unbound, or nil to do nothing. |
| 713 | Default is t." | 713 | Default is t." |
| @@ -719,20 +719,20 @@ Default is t." | |||
| 719 | (defcustom woman-imenu-generic-expression | 719 | (defcustom woman-imenu-generic-expression |
| 720 | '((nil "\n\\([A-Z].*\\)" 1) ; SECTION, but not TITLE | 720 | '((nil "\n\\([A-Z].*\\)" 1) ; SECTION, but not TITLE |
| 721 | ("*Subsections*" "^ \\([A-Z].*\\)" 1)) | 721 | ("*Subsections*" "^ \\([A-Z].*\\)" 1)) |
| 722 | "*Imenu support for Sections and Subsections. | 722 | "Imenu support for Sections and Subsections. |
| 723 | An alist with elements of the form (MENU-TITLE REGEXP INDEX) -- | 723 | An alist with elements of the form (MENU-TITLE REGEXP INDEX) -- |
| 724 | see the documentation for `imenu-generic-expression'." | 724 | see the documentation for `imenu-generic-expression'." |
| 725 | :type 'sexp | 725 | :type 'sexp |
| 726 | :group 'woman-interface) | 726 | :group 'woman-interface) |
| 727 | 727 | ||
| 728 | (defcustom woman-imenu nil | 728 | (defcustom woman-imenu nil |
| 729 | "*If non-nil then WoMan adds a Contents menu to the menubar. | 729 | "If non-nil then WoMan adds a Contents menu to the menubar. |
| 730 | It does this by calling `imenu-add-to-menubar'. Default is nil." | 730 | It does this by calling `imenu-add-to-menubar'. Default is nil." |
| 731 | :type 'boolean | 731 | :type 'boolean |
| 732 | :group 'woman-interface) | 732 | :group 'woman-interface) |
| 733 | 733 | ||
| 734 | (defcustom woman-imenu-title "CONTENTS" | 734 | (defcustom woman-imenu-title "CONTENTS" |
| 735 | "*The title to use if WoMan adds a Contents menu to the menubar. | 735 | "The title to use if WoMan adds a Contents menu to the menubar. |
| 736 | Default is \"CONTENTS\"." | 736 | Default is \"CONTENTS\"." |
| 737 | :type 'string | 737 | :type 'string |
| 738 | :group 'woman-interface) | 738 | :group 'woman-interface) |
| @@ -741,13 +741,13 @@ Default is \"CONTENTS\"." | |||
| 741 | ;; `woman-use-topic-at-point' may be let-bound when woman is loaded, | 741 | ;; `woman-use-topic-at-point' may be let-bound when woman is loaded, |
| 742 | ;; in which case its global value does not get defined. | 742 | ;; in which case its global value does not get defined. |
| 743 | ;; `woman-file-name' sets it to this value if it is unbound. | 743 | ;; `woman-file-name' sets it to this value if it is unbound. |
| 744 | "*Default value for `woman-use-topic-at-point'." | 744 | "Default value for `woman-use-topic-at-point'." |
| 745 | :type '(choice (const :tag "Yes" t) | 745 | :type '(choice (const :tag "Yes" t) |
| 746 | (const :tag "No" nil)) | 746 | (const :tag "No" nil)) |
| 747 | :group 'woman-interface) | 747 | :group 'woman-interface) |
| 748 | 748 | ||
| 749 | (defcustom woman-use-topic-at-point woman-use-topic-at-point-default | 749 | (defcustom woman-use-topic-at-point woman-use-topic-at-point-default |
| 750 | "*Control use of the word at point as the default topic. | 750 | "Control use of the word at point as the default topic. |
| 751 | If non-nil the `woman' command uses the word at point automatically, | 751 | If non-nil the `woman' command uses the word at point automatically, |
| 752 | without interactive confirmation, if it exists as a topic." | 752 | without interactive confirmation, if it exists as a topic." |
| 753 | :type '(choice (const :tag "Yes" t) | 753 | :type '(choice (const :tag "Yes" t) |
| @@ -778,7 +778,7 @@ Used as :set cookie by Customize when customizing the user options | |||
| 778 | 778 | ||
| 779 | (defcustom woman-uncompressed-file-regexp | 779 | (defcustom woman-uncompressed-file-regexp |
| 780 | "\\.\\([0-9lmnt]\\w*\\)" ; disallow no extension | 780 | "\\.\\([0-9lmnt]\\w*\\)" ; disallow no extension |
| 781 | "*Do not change this unless you are sure you know what you are doing! | 781 | "Do not change this unless you are sure you know what you are doing! |
| 782 | Regexp used to select man source files (ignoring any compression extension). | 782 | Regexp used to select man source files (ignoring any compression extension). |
| 783 | 783 | ||
| 784 | The SysV standard man pages use two character suffixes, and this is | 784 | The SysV standard man pages use two character suffixes, and this is |
| @@ -793,7 +793,7 @@ MUST NOT end with any kind of string terminator such as $ or \\'." | |||
| 793 | 793 | ||
| 794 | (defcustom woman-file-compression-regexp | 794 | (defcustom woman-file-compression-regexp |
| 795 | "\\.\\(g?z\\|bz2\\)\\'" | 795 | "\\.\\(g?z\\|bz2\\)\\'" |
| 796 | "*Do not change this unless you are sure you know what you are doing! | 796 | "Do not change this unless you are sure you know what you are doing! |
| 797 | Regexp used to match compressed man file extensions for which | 797 | Regexp used to match compressed man file extensions for which |
| 798 | decompressors are available and handled by auto-compression mode, | 798 | decompressors are available and handled by auto-compression mode, |
| 799 | e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\)\\\\'\" for `gzip' or `bzip2'. | 799 | e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\)\\\\'\" for `gzip' or `bzip2'. |
| @@ -809,7 +809,7 @@ Should begin with \\. and end with \\' and MUST NOT be optional." | |||
| 809 | (defcustom woman-use-own-frame ; window-system | 809 | (defcustom woman-use-own-frame ; window-system |
| 810 | (or (and (fboundp 'display-graphic-p) (display-graphic-p)) ; Emacs 21 | 810 | (or (and (fboundp 'display-graphic-p) (display-graphic-p)) ; Emacs 21 |
| 811 | (memq window-system '(x w32))) ; Emacs 20 | 811 | (memq window-system '(x w32))) ; Emacs 20 |
| 812 | "*If non-nil then use a dedicated frame for displaying WoMan windows. | 812 | "If non-nil then use a dedicated frame for displaying WoMan windows. |
| 813 | Only useful when run on a graphic display such as X or MS-Windows." | 813 | Only useful when run on a graphic display such as X or MS-Windows." |
| 814 | :type 'boolean | 814 | :type 'boolean |
| 815 | :group 'woman-interface) | 815 | :group 'woman-interface) |
| @@ -823,37 +823,37 @@ Only useful when run on a graphic display such as X or MS-Windows." | |||
| 823 | :group 'woman) | 823 | :group 'woman) |
| 824 | 824 | ||
| 825 | (defcustom woman-fill-column 65 | 825 | (defcustom woman-fill-column 65 |
| 826 | "*Right margin for formatted text -- default is 65." | 826 | "Right margin for formatted text -- default is 65." |
| 827 | :type 'integer | 827 | :type 'integer |
| 828 | :group 'woman-formatting) | 828 | :group 'woman-formatting) |
| 829 | 829 | ||
| 830 | (defcustom woman-fill-frame nil | 830 | (defcustom woman-fill-frame nil |
| 831 | ;; Based loosely on a suggestion by Theodore Jump: | 831 | ;; Based loosely on a suggestion by Theodore Jump: |
| 832 | "*If non-nil then most of the window width is used." | 832 | "If non-nil then most of the window width is used." |
| 833 | :type 'boolean | 833 | :type 'boolean |
| 834 | :group 'woman-formatting) | 834 | :group 'woman-formatting) |
| 835 | 835 | ||
| 836 | (defcustom woman-default-indent 5 | 836 | (defcustom woman-default-indent 5 |
| 837 | "*Default prevailing indent set by -man macros -- default is 5. | 837 | "Default prevailing indent set by -man macros -- default is 5. |
| 838 | Set this variable to 7 to emulate GNU man formatting." | 838 | Set this variable to 7 to emulate GNU man formatting." |
| 839 | :type 'integer | 839 | :type 'integer |
| 840 | :group 'woman-formatting) | 840 | :group 'woman-formatting) |
| 841 | 841 | ||
| 842 | (defcustom woman-bold-headings t | 842 | (defcustom woman-bold-headings t |
| 843 | "*If non-nil then embolden section and subsection headings. Default is t. | 843 | "If non-nil then embolden section and subsection headings. Default is t. |
| 844 | Heading emboldening is NOT standard `man' behavior." | 844 | Heading emboldening is NOT standard `man' behavior." |
| 845 | :type 'boolean | 845 | :type 'boolean |
| 846 | :group 'woman-formatting) | 846 | :group 'woman-formatting) |
| 847 | 847 | ||
| 848 | (defcustom woman-ignore t | 848 | (defcustom woman-ignore t |
| 849 | "*If non-nil then unrecognized requests etc. are ignored. Default is t. | 849 | "If non-nil then unrecognized requests etc.. are ignored. Default is t. |
| 850 | This gives the standard ?roff behavior. If nil then they are left in | 850 | This gives the standard ?roff behavior. If nil then they are left in |
| 851 | the buffer, which may aid debugging." | 851 | the buffer, which may aid debugging." |
| 852 | :type 'boolean | 852 | :type 'boolean |
| 853 | :group 'woman-formatting) | 853 | :group 'woman-formatting) |
| 854 | 854 | ||
| 855 | (defcustom woman-preserve-ascii t | 855 | (defcustom woman-preserve-ascii t |
| 856 | "*If non-nil, preserve ASCII characters in the WoMan buffer. | 856 | "If non-nil, preserve ASCII characters in the WoMan buffer. |
| 857 | Otherwise, to save time, some backslashes and spaces may be | 857 | Otherwise, to save time, some backslashes and spaces may be |
| 858 | represented differently (as the values of the variables | 858 | represented differently (as the values of the variables |
| 859 | `woman-escaped-escape-char' and `woman-unpadded-space-char' | 859 | `woman-escaped-escape-char' and `woman-unpadded-space-char' |
| @@ -865,7 +865,7 @@ buffer text is searched, copied or saved to a file." | |||
| 865 | :group 'woman-formatting) | 865 | :group 'woman-formatting) |
| 866 | 866 | ||
| 867 | (defcustom woman-emulation 'nroff | 867 | (defcustom woman-emulation 'nroff |
| 868 | "*WoMan emulation, currently either nroff or troff. Default is nroff. | 868 | "WoMan emulation, currently either nroff or troff. Default is nroff. |
| 869 | Troff emulation is experimental and largely untested. | 869 | Troff emulation is experimental and largely untested. |
| 870 | \(Add groff later?)" | 870 | \(Add groff later?)" |
| 871 | :type '(choice (const nroff) (const troff)) | 871 | :type '(choice (const nroff) (const troff)) |
| @@ -884,7 +884,7 @@ Troff emulation is experimental and largely untested. | |||
| 884 | (or (and (fboundp 'display-color-p) (display-color-p)) | 884 | (or (and (fboundp 'display-color-p) (display-color-p)) |
| 885 | (and (fboundp 'display-graphic-p) (display-graphic-p)) | 885 | (and (fboundp 'display-graphic-p) (display-graphic-p)) |
| 886 | (x-display-color-p)) | 886 | (x-display-color-p)) |
| 887 | "*If non-nil then WoMan assumes that face support is available. | 887 | "If non-nil then WoMan assumes that face support is available. |
| 888 | It defaults to a non-nil value if the display supports either colors | 888 | It defaults to a non-nil value if the display supports either colors |
| 889 | or different fonts." | 889 | or different fonts." |
| 890 | :type 'boolean | 890 | :type 'boolean |
| @@ -955,11 +955,10 @@ This is usually either black or white." | |||
| 955 | (let (symbol-fonts) | 955 | (let (symbol-fonts) |
| 956 | ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does | 956 | ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does |
| 957 | ;; not seem to work and fonts may be repeated, so ... | 957 | ;; not seem to work and fonts may be repeated, so ... |
| 958 | (while fonts | 958 | (dolist (font fonts) |
| 959 | (and (string-match "-Symbol-" (car fonts)) | 959 | (and (string-match "-Symbol-" font) |
| 960 | (not (member (car fonts) symbol-fonts)) | 960 | (not (member font symbol-fonts)) |
| 961 | (setq symbol-fonts (cons (car fonts) symbol-fonts))) | 961 | (setq symbol-fonts (cons font symbol-fonts)))) |
| 962 | (setq fonts (cdr fonts))) | ||
| 963 | symbol-fonts)) | 962 | symbol-fonts)) |
| 964 | 963 | ||
| 965 | (when woman-font-support | 964 | (when woman-font-support |
| @@ -969,12 +968,12 @@ This is usually either black or white." | |||
| 969 | ;; avoid unnecessarily upsetting the line spacing in NTEmacs 20.5! | 968 | ;; avoid unnecessarily upsetting the line spacing in NTEmacs 20.5! |
| 970 | 969 | ||
| 971 | (defcustom woman-use-extended-font t | 970 | (defcustom woman-use-extended-font t |
| 972 | "*If non-nil then may use non-ASCII characters from the default font." | 971 | "If non-nil then may use non-ASCII characters from the default font." |
| 973 | :type 'boolean | 972 | :type 'boolean |
| 974 | :group 'woman-faces) | 973 | :group 'woman-faces) |
| 975 | 974 | ||
| 976 | (defcustom woman-use-symbol-font nil | 975 | (defcustom woman-use-symbol-font nil |
| 977 | "*If non-nil then may use the symbol font. | 976 | "If non-nil then may use the symbol font. |
| 978 | It is off by default, mainly because it may change the line spacing | 977 | It is off by default, mainly because it may change the line spacing |
| 979 | \(in NTEmacs 20.5)." | 978 | \(in NTEmacs 20.5)." |
| 980 | :type 'boolean | 979 | :type 'boolean |
| @@ -986,7 +985,7 @@ It is off by default, mainly because it may change the line spacing | |||
| 986 | "Symbol font(s), preferably same size as default when WoMan was loaded.") | 985 | "Symbol font(s), preferably same size as default when WoMan was loaded.") |
| 987 | 986 | ||
| 988 | (defcustom woman-symbol-font (car woman-symbol-font-list) | 987 | (defcustom woman-symbol-font (car woman-symbol-font-list) |
| 989 | "*A string describing the symbol font to use for special characters. | 988 | "A string describing the symbol font to use for special characters. |
| 990 | It should be compatible with, and the same size as, the default text font. | 989 | It should be compatible with, and the same size as, the default text font. |
| 991 | Under MS-Windows, the default is | 990 | Under MS-Windows, the default is |
| 992 | \"-*-Symbol-normal-r-*-*-*-*-96-96-p-*-ms-symbol\"." | 991 | \"-*-Symbol-normal-r-*-*-*-*-96-96-p-*-ms-symbol\"." |
| @@ -1199,10 +1198,9 @@ Return t if the file exists, nil otherwise." | |||
| 1199 | "Save the directory and topic cache. | 1198 | "Save the directory and topic cache. |
| 1200 | It is saved to the file named by the variable `woman-cache-filename'." | 1199 | It is saved to the file named by the variable `woman-cache-filename'." |
| 1201 | (if woman-cache-filename | 1200 | (if woman-cache-filename |
| 1202 | (save-excursion ; to restore current buffer | 1201 | (with-current-buffer (generate-new-buffer "WoMan tmp buffer") |
| 1203 | ;; Make a temporary buffer; name starting with space "hides" it. | 1202 | ;; Make a temporary buffer; name starting with space "hides" it. |
| 1204 | (let ((standard-output | 1203 | (let ((standard-output (current-buffer)) |
| 1205 | (set-buffer (generate-new-buffer "WoMan tmp buffer"))) | ||
| 1206 | (backup-inhibited t)) | 1204 | (backup-inhibited t)) |
| 1207 | ;; (switch-to-buffer standard-output t) ; only for debugging | 1205 | ;; (switch-to-buffer standard-output t) ; only for debugging |
| 1208 | (buffer-disable-undo standard-output) | 1206 | (buffer-disable-undo standard-output) |
| @@ -1344,10 +1342,8 @@ Ignore any paths that are unreadable or not directories." | |||
| 1344 | ;; Allow each path to be a single string or a list of strings: | 1342 | ;; Allow each path to be a single string or a list of strings: |
| 1345 | (if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath))) | 1343 | (if (not (listp woman-manpath)) (setq woman-manpath (list woman-manpath))) |
| 1346 | (if (not (listp woman-path)) (setq woman-path (list woman-path))) | 1344 | (if (not (listp woman-path)) (setq woman-path (list woman-path))) |
| 1347 | (let (dir head dirs path) | 1345 | (let (head dirs path) |
| 1348 | (while woman-manpath | 1346 | (dolist (dir woman-manpath) |
| 1349 | (setq dir (car woman-manpath) | ||
| 1350 | woman-manpath (cdr woman-manpath)) | ||
| 1351 | (when (consp dir) | 1347 | (when (consp dir) |
| 1352 | (unless path | 1348 | (unless path |
| 1353 | (setq path (split-string (getenv "PATH") path-separator t))) | 1349 | (setq path (split-string (getenv "PATH") path-separator t))) |
| @@ -1361,9 +1357,7 @@ Ignore any paths that are unreadable or not directories." | |||
| 1361 | (setq dir (woman-canonicalize-dir dir) | 1357 | (setq dir (woman-canonicalize-dir dir) |
| 1362 | dirs (nconc dirs (directory-files | 1358 | dirs (nconc dirs (directory-files |
| 1363 | dir t woman-manpath-man-regexp))))) | 1359 | dir t woman-manpath-man-regexp))))) |
| 1364 | (while woman-path | 1360 | (dolist (dir woman-path) |
| 1365 | (setq dir (car woman-path) | ||
| 1366 | woman-path (cdr woman-path)) | ||
| 1367 | (if (or (null dir) | 1361 | (if (or (null dir) |
| 1368 | (null (setq dir (woman-canonicalize-dir dir) | 1362 | (null (setq dir (woman-canonicalize-dir dir) |
| 1369 | head (file-name-directory dir))) | 1363 | head (file-name-directory dir))) |
| @@ -1402,7 +1396,7 @@ The cdr of each alist element is the path-index / filename." | |||
| 1402 | ;; will be a list of the first `woman-cache-level' elements of the | 1396 | ;; will be a list of the first `woman-cache-level' elements of the |
| 1403 | ;; following list: (topic path-index filename). This alist `files' | 1397 | ;; following list: (topic path-index filename). This alist `files' |
| 1404 | ;; is re-processed by `woman-topic-all-completions-merge'. | 1398 | ;; is re-processed by `woman-topic-all-completions-merge'. |
| 1405 | (let (dir files (path-index 0)) ; indexing starts at zero | 1399 | (let (files (path-index 0)) ; indexing starts at zero |
| 1406 | (while path | 1400 | (while path |
| 1407 | (setq dir (pop path)) | 1401 | (setq dir (pop path)) |
| 1408 | (if (woman-not-member dir path) ; use each directory only once! | 1402 | (if (woman-not-member dir path) ; use each directory only once! |
| @@ -1455,22 +1449,20 @@ Also make each path-info component into a list. | |||
| 1455 | \(Note that this function changes the value of ALIST.)" | 1449 | \(Note that this function changes the value of ALIST.)" |
| 1456 | ;; Replaces unreadably "optimized" O(n^2) implementation. | 1450 | ;; Replaces unreadably "optimized" O(n^2) implementation. |
| 1457 | ;; Instead we use sorting to merge stuff efficiently. -- dak | 1451 | ;; Instead we use sorting to merge stuff efficiently. -- dak |
| 1458 | (let (elt newalist) | 1452 | (let (newalist) |
| 1459 | ;; Sort list into reverse order | 1453 | ;; Sort list into reverse order |
| 1460 | (setq alist (sort alist (lambda(x y) (string< (car y) (car x))))) | 1454 | (setq alist (sort alist (lambda(x y) (string< (car y) (car x))))) |
| 1461 | ;; merge duplicate keys. | 1455 | ;; merge duplicate keys. |
| 1462 | (if (> woman-cache-level 1) | 1456 | (if (> woman-cache-level 1) |
| 1463 | (while alist | 1457 | (dolist (elt alist) |
| 1464 | (setq elt (pop alist)) | ||
| 1465 | (if (equal (car elt) (caar newalist)) | 1458 | (if (equal (car elt) (caar newalist)) |
| 1466 | (unless (member (cdr elt) (cdar newalist)) | 1459 | (unless (member (cdr elt) (cdar newalist)) |
| 1467 | (setcdr (car newalist) (cons (cdr elt) | 1460 | (setcdr (car newalist) (cons (cdr elt) |
| 1468 | (cdar newalist)))) | 1461 | (cdar newalist)))) |
| 1469 | (setcdr elt (list (cdr elt))) | 1462 | (setcdr elt (list (cdr elt))) |
| 1470 | (push elt newalist))) | 1463 | (push elt newalist))) |
| 1471 | ;; woman-cache-level = 1 => elements are single-element lists ... | 1464 | ;; woman-cache-level = 1 => elements are single-element lists ... |
| 1472 | (while alist | 1465 | (dolist (elt alist) |
| 1473 | (setq elt (pop alist)) | ||
| 1474 | (unless (equal (car elt) (caar newalist)) | 1466 | (unless (equal (car elt) (caar newalist)) |
| 1475 | (push elt newalist)))) | 1467 | (push elt newalist)))) |
| 1476 | newalist)) | 1468 | newalist)) |
| @@ -1496,10 +1488,9 @@ Also make each path-info component into a list. | |||
| 1496 | ;; Use cached path-info to locate files for each topic: | 1488 | ;; Use cached path-info to locate files for each topic: |
| 1497 | (let ((path-info (cdr (assoc topic topics))) | 1489 | (let ((path-info (cdr (assoc topic topics))) |
| 1498 | filename) | 1490 | filename) |
| 1499 | (while path-info | 1491 | (dolist (elt path-info) |
| 1500 | (setq dir (nth (car (car path-info)) path) | 1492 | (setq dir (nth (car elt) path) |
| 1501 | filename (car (cdr (car path-info))) | 1493 | filename (car (cdr elt)) |
| 1502 | path-info (cdr path-info) | ||
| 1503 | files (nconc files | 1494 | files (nconc files |
| 1504 | ;; Find the actual file name: | 1495 | ;; Find the actual file name: |
| 1505 | (if filename | 1496 | (if filename |
| @@ -1648,7 +1639,10 @@ Do not call directly!" | |||
| 1648 | (select-frame | 1639 | (select-frame |
| 1649 | (or (and (frame-live-p woman-frame) woman-frame) | 1640 | (or (and (frame-live-p woman-frame) woman-frame) |
| 1650 | (setq woman-frame (make-frame))))) | 1641 | (setq woman-frame (make-frame))))) |
| 1651 | (switch-to-buffer (get-buffer-create bufname)) | 1642 | (set-buffer (get-buffer-create bufname)) |
| 1643 | (condition-case nil | ||
| 1644 | (switch-to-buffer (current-buffer)) | ||
| 1645 | (error (pop-to-buffer (current-buffer)))) | ||
| 1652 | (buffer-disable-undo) | 1646 | (buffer-disable-undo) |
| 1653 | (setq buffer-read-only nil) | 1647 | (setq buffer-read-only nil) |
| 1654 | (erase-buffer) ; NEEDED for reformat | 1648 | (erase-buffer) ; NEEDED for reformat |
| @@ -1916,7 +1910,7 @@ See `Man-mode' for additional details." | |||
| 1916 | ;; necessary to avoid re-installing the same imenu: | 1910 | ;; necessary to avoid re-installing the same imenu: |
| 1917 | (setq woman-imenu-done nil) | 1911 | (setq woman-imenu-done nil) |
| 1918 | (if woman-imenu (woman-imenu)) | 1912 | (if woman-imenu (woman-imenu)) |
| 1919 | (let (buffer-read-only) | 1913 | (let ((inhibit-read-only t)) |
| 1920 | (Man-highlight-references 'WoMan-xref-man-page)) | 1914 | (Man-highlight-references 'WoMan-xref-man-page)) |
| 1921 | (set-buffer-modified-p nil) | 1915 | (set-buffer-modified-p nil) |
| 1922 | (run-mode-hooks 'woman-mode-hook)) | 1916 | (run-mode-hooks 'woman-mode-hook)) |
| @@ -1956,11 +1950,9 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." | |||
| 1956 | (or (commandp symbol) | 1950 | (or (commandp symbol) |
| 1957 | (user-variable-p symbol))))) | 1951 | (user-variable-p symbol))))) |
| 1958 | ;; Filter out any inhibited symbols: | 1952 | ;; Filter out any inhibited symbols: |
| 1959 | (let ((tem apropos-accumulator)) | 1953 | (dolist (sym apropos-accumulator) |
| 1960 | (while tem | 1954 | (if (get sym 'apropos-inhibit) |
| 1961 | (if (get (car tem) 'apropos-inhibit) | 1955 | (setq apropos-accumulator (delq sym apropos-accumulator)))) |
| 1962 | (setq apropos-accumulator (delq (car tem) apropos-accumulator))) | ||
| 1963 | (setq tem (cdr tem)))) | ||
| 1964 | ;; Find documentation strings: | 1956 | ;; Find documentation strings: |
| 1965 | (let ((p apropos-accumulator) | 1957 | (let ((p apropos-accumulator) |
| 1966 | doc symbol) | 1958 | doc symbol) |
| @@ -2190,15 +2182,13 @@ To be called on original buffer and any .so insertions." | |||
| 2190 | (defun woman-non-underline-faces () | 2182 | (defun woman-non-underline-faces () |
| 2191 | "Prepare non-underlined versions of underlined faces." | 2183 | "Prepare non-underlined versions of underlined faces." |
| 2192 | (let ((face-list (face-list))) | 2184 | (let ((face-list (face-list))) |
| 2193 | (while face-list | 2185 | (dolist (face face-list) |
| 2194 | (let* ((face (car face-list)) | 2186 | (let ((face-name (symbol-name face))) |
| 2195 | (face-name (symbol-name face))) | ||
| 2196 | (if (and (string-match "\\`woman-" face-name) | 2187 | (if (and (string-match "\\`woman-" face-name) |
| 2197 | (face-underline-p face)) | 2188 | (face-underline-p face)) |
| 2198 | (let ((face-no-ul (intern (concat face-name "-no-ul")))) | 2189 | (let ((face-no-ul (intern (concat face-name "-no-ul")))) |
| 2199 | (copy-face face face-no-ul) | 2190 | (copy-face face face-no-ul) |
| 2200 | (set-face-underline-p face-no-ul nil)))) | 2191 | (set-face-underline-p face-no-ul nil))))))) |
| 2201 | (setq face-list (cdr face-list))))) | ||
| 2202 | 2192 | ||
| 2203 | ;; Preprocessors | 2193 | ;; Preprocessors |
| 2204 | ;; ============= | 2194 | ;; ============= |
| @@ -2731,11 +2721,9 @@ If DELETE is non-nil then delete from point." | |||
| 2731 | (defun woman0-rename () | 2721 | (defun woman0-rename () |
| 2732 | "Effect renaming required by .rn requests." | 2722 | "Effect renaming required by .rn requests." |
| 2733 | ;; For now, do this backwards AFTER all macro expansion. | 2723 | ;; For now, do this backwards AFTER all macro expansion. |
| 2734 | (while woman0-rename-alist | 2724 | (dolist ((new woman0-rename-alist)) |
| 2735 | (let* ((new (car woman0-rename-alist)) | 2725 | (let ((old (cdr new)) |
| 2736 | (old (cdr new)) | 2726 | (new (car new))) |
| 2737 | (new (car new))) | ||
| 2738 | (setq woman0-rename-alist (cdr woman0-rename-alist)) | ||
| 2739 | (goto-char (point-min)) | 2727 | (goto-char (point-min)) |
| 2740 | (setq new (concat "^[.'][ \t]*" (regexp-quote new))) | 2728 | (setq new (concat "^[.'][ \t]*" (regexp-quote new))) |
| 2741 | (setq old (concat "." old)) | 2729 | (setq old (concat "." old)) |
| @@ -3016,8 +3004,7 @@ together with the corresponding glyphs from the default and symbol fonts. | |||
| 3016 | Useful for constructing the alist variable `woman-special-characters'." | 3004 | Useful for constructing the alist variable `woman-special-characters'." |
| 3017 | (interactive) | 3005 | (interactive) |
| 3018 | (with-output-to-temp-buffer "*WoMan Extended Font Map*" | 3006 | (with-output-to-temp-buffer "*WoMan Extended Font Map*" |
| 3019 | (save-excursion | 3007 | (with-current-buffer standard-output |
| 3020 | (set-buffer standard-output) | ||
| 3021 | (let ((i 32)) | 3008 | (let ((i 32)) |
| 3022 | (while (< i 256) | 3009 | (while (< i 256) |
| 3023 | (insert (format "\\%03o " i) (string i) " " (string i)) | 3010 | (insert (format "\\%03o " i) (string i) " " (string i)) |
| @@ -3920,12 +3907,10 @@ Leave 1 blank line. Format paragraphs upto TO." | |||
| 3920 | ((eq c ?\t) ; skip | 3907 | ((eq c ?\t) ; skip |
| 3921 | (if (eq (following-char) ?\t) | 3908 | (if (eq (following-char) ?\t) |
| 3922 | (forward-char) ; both tabs, just skip | 3909 | (forward-char) ; both tabs, just skip |
| 3923 | (let ((i woman-tab-width)) | 3910 | (dotimes (i woman-tab-width) |
| 3924 | (while (> i 0) | 3911 | (if (eolp) |
| 3925 | (if (eolp) | 3912 | (insert ?\ ) ; extend line |
| 3926 | (insert ?\ ) ; extend line | 3913 | (forward-char)) ; skip |
| 3927 | (forward-char)) ; skip | ||
| 3928 | (setq i (1- i))) | ||
| 3929 | ))) | 3914 | ))) |
| 3930 | (t | 3915 | (t |
| 3931 | (if (or (eq (following-char) ?\ ) ; overwrite OK | 3916 | (if (or (eq (following-char) ?\ ) ; overwrite OK |
| @@ -4312,7 +4297,7 @@ Format paragraphs upto TO. Set prevailing indent to I." | |||
| 4312 | ;; Necessary to avoid spaces inheriting underlines. | 4297 | ;; Necessary to avoid spaces inheriting underlines. |
| 4313 | ;; Cannot simply delete (current-column) whitespace | 4298 | ;; Cannot simply delete (current-column) whitespace |
| 4314 | ;; characters because some may be tabs! | 4299 | ;; characters because some may be tabs! |
| 4315 | (while (> i 0) (insert ? ) (setq i (1- i))))) | 4300 | (insert-char ?\s i))) |
| 4316 | (goto-char to) ; necessary ??? | 4301 | (goto-char to) ; necessary ??? |
| 4317 | )) | 4302 | )) |
| 4318 | )) | 4303 | )) |
| @@ -4468,9 +4453,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." | |||
| 4468 | n (- (if n (1- n) eol) (point)) | 4453 | n (- (if n (1- n) eol) (point)) |
| 4469 | tab (- tab (if (eq type ?C) (/ n 2) n))) ) | 4454 | tab (- tab (if (eq type ?C) (/ n 2) n))) ) |
| 4470 | (setq n (- tab (current-column))) | 4455 | (setq n (- tab (current-column))) |
| 4471 | (while (> n 0) | 4456 | (insert-char ?\s n)) |
| 4472 | (insert ?\ ) | ||
| 4473 | (setq n (1- n)))) | ||
| 4474 | (insert ?\ )))) | 4457 | (insert ?\ )))) |
| 4475 | 4458 | ||
| 4476 | (defun woman2-DT (to) | 4459 | (defun woman2-DT (to) |
| @@ -4571,8 +4554,7 @@ Format paragraphs upto TO." | |||
| 4571 | (defun WoMan-log-begin () | 4554 | (defun WoMan-log-begin () |
| 4572 | "Log the beginning of formatting in *WoMan-Log*." | 4555 | "Log the beginning of formatting in *WoMan-Log*." |
| 4573 | (let ((WoMan-current-buffer (buffer-name))) | 4556 | (let ((WoMan-current-buffer (buffer-name))) |
| 4574 | (save-excursion | 4557 | (with-current-buffer (get-buffer-create "*WoMan-Log*") |
| 4575 | (set-buffer (get-buffer-create "*WoMan-Log*")) | ||
| 4576 | (or (eq major-mode 'view-mode) (view-mode 1)) | 4558 | (or (eq major-mode 'view-mode) (view-mode 1)) |
| 4577 | (setq buffer-read-only nil) | 4559 | (setq buffer-read-only nil) |
| 4578 | (goto-char (point-max)) | 4560 | (goto-char (point-max)) |
| @@ -4615,8 +4597,7 @@ with the message." | |||
| 4615 | "Log a message STRING in *WoMan-Log*. | 4597 | "Log a message STRING in *WoMan-Log*. |
| 4616 | If optional argument END is non-nil then make buffer read-only after | 4598 | If optional argument END is non-nil then make buffer read-only after |
| 4617 | logging the message." | 4599 | logging the message." |
| 4618 | (save-excursion | 4600 | (with-current-buffer (get-buffer-create "*WoMan-Log*") |
| 4619 | (set-buffer (get-buffer-create "*WoMan-Log*")) | ||
| 4620 | (setq buffer-read-only nil) | 4601 | (setq buffer-read-only nil) |
| 4621 | (goto-char (point-max)) | 4602 | (goto-char (point-max)) |
| 4622 | (or end (insert " ")) (insert string "\n") | 4603 | (or end (insert " ")) (insert string "\n") |
| @@ -4635,5 +4616,5 @@ logging the message." | |||
| 4635 | 4616 | ||
| 4636 | (provide 'woman) | 4617 | (provide 'woman) |
| 4637 | 4618 | ||
| 4638 | ;;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 | 4619 | ;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 |
| 4639 | ;;; woman.el ends here | 4620 | ;;; woman.el ends here |