aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2003-04-02 21:24:56 +0000
committerJuanma Barranquero2003-04-02 21:24:56 +0000
commita5393da851536d7894f35821f2cb9a68ba80bbf6 (patch)
tree53c8d17158be7eb8ff10fc1698b76694bc2f0132
parent4edd9faf12f8f0392b2be94555d10b6328468c6a (diff)
downloademacs-a5393da851536d7894f35821f2cb9a68ba80bbf6.tar.gz
emacs-a5393da851536d7894f35821f2cb9a68ba80bbf6.zip
(woman-xref): Removed.
(woman-mode): Use `Man-highlight-references' instead of `WoMan-highlight-references'. (WoMan-highlight-references): Removed.
-rw-r--r--lisp/ChangeLog24
-rw-r--r--lisp/woman.el24
2 files changed, 25 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3837bb7aebf..9f52e873dd6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,27 @@
12003-04-02 Masatake YAMATO <jet@gyve.org>
2
3 * woman.el (woman-xref): Removed.
4 (woman-mode): Use `Man-highlight-references' instead of
5 `WoMan-highlight-references'.
6 (WoMan-highlight-references): Removed.
7
8 * man.el (toplevel): Require button.
9 (Man-header-file-path): New option.
10 (Man-synopsis-regexp, Man-files-regexp, Man-include-regexp)
11 (Man-file-name-regexp, Man-normal-file-prefix-regexp)
12 (Man-header-regexp, Man-normal-file-regexp): New variables.
13 (Man-mode-map): Inherited from `button-buffer-map'. Don't define
14 "\r" and mouse-2 directly. These key are defined in
15 `button-buffer-map'.
16 (Man-xref-man-page, Man-xref-header-file, Man-xref-normal-file): New
17 buttons. `Man-xref-man-page' comes from woman.el.
18 (man-follow-mouse): Removed.
19 (Man-fontify-manpage): Use `Man-highlight-references' instead of
20 calling `add-text-properties' directly.
21 (Man-highlight-references, Man-highlight-references0): New
22 functions.
23 (Man-view-header-file): New function.
24
12003-04-02 Stefan Monnier <monnier@cs.yale.edu> 252003-04-02 Stefan Monnier <monnier@cs.yale.edu>
2 26
3 * progmodes/asm-mode.el (asm-calculate-indentation, asm-indent-line): 27 * progmodes/asm-mode.el (asm-calculate-indentation, asm-indent-line):
diff --git a/lisp/woman.el b/lisp/woman.el
index c3becb5186e..06eeb6c56e6 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1059,13 +1059,6 @@ Should include ?e, ?o (page even/odd) and either ?n (nroff) or ?t (troff).
1059Default is '(?n ?e ?o). Set via `woman-emulation'.") 1059Default is '(?n ?e ?o). Set via `woman-emulation'.")
1060 1060
1061 1061
1062;;; Button types:
1063
1064(define-button-type 'woman-xref
1065 'action (lambda (button) (woman (button-label button)))
1066 'help-echo "RET, mouse-2: display this man page")
1067
1068
1069;;; Specialized utility functions: 1062;;; Specialized utility functions:
1070 1063
1071;;; Fast deletion without saving on the kill ring (cf. simple.el): 1064;;; Fast deletion without saving on the kill ring (cf. simple.el):
@@ -1869,7 +1862,7 @@ See `Man-mode' for additional details."
1869 (setq woman-imenu-done nil) 1862 (setq woman-imenu-done nil)
1870 (if woman-imenu (woman-imenu)) 1863 (if woman-imenu (woman-imenu))
1871 (setq buffer-read-only nil) 1864 (setq buffer-read-only nil)
1872 (WoMan-highlight-references) 1865 (Man-highlight-references)
1873 (setq buffer-read-only t) 1866 (setq buffer-read-only t)
1874 (set-buffer-modified-p nil))) 1867 (set-buffer-modified-p nil)))
1875 1868
@@ -1964,21 +1957,6 @@ Otherwise use Man and record start of formatting time."
1964 (- (cadr time) (cadr WoMan-Man-start-time))))) 1957 (- (cadr time) (cadr WoMan-Man-start-time)))))
1965 (message "Man formatting done in %d seconds" time))) 1958 (message "Man formatting done in %d seconds" time)))
1966 1959
1967(defun WoMan-highlight-references ()
1968 "Highlight the references (in the SEE ALSO section) on mouse-over."
1969 ;; Based on `Man-build-references-alist' in `man'.
1970 (when (Man-find-section Man-see-also-regexp)
1971 (forward-line 1)
1972 (let ((end (save-excursion
1973 (Man-next-section 1)
1974 (point))))
1975 (back-to-indentation)
1976 (while (re-search-forward Man-reference-regexp end t)
1977 ;; Highlight reference when mouse is over it.
1978 ;; (NB: WoMan does not hyphenate!)
1979 (make-text-button (match-beginning 1) (match-end 1)
1980 'type 'woman-xref)))))
1981
1982 1960
1983;;; Buffer handling: 1961;;; Buffer handling:
1984 1962