415 |
(define-key Man-mode-map "?" 'describe-mode)) |
(define-key Man-mode-map "?" 'describe-mode)) |
416 |
|
|
417 |
;; buttons |
;; buttons |
418 |
(define-button-type 'Man-xref-man-page |
(define-button-type 'Man-abstract-xref-man-page |
|
'action (lambda (button) (man-follow (button-label button))) |
|
419 |
'follow-link t |
'follow-link t |
420 |
'help-echo "mouse-2, RET: display this man page") |
'help-echo "mouse-2, RET: display this man page" |
421 |
|
'func nil |
422 |
|
'action (lambda (button) (funcall |
423 |
|
(button-get button 'func) |
424 |
|
(button-label button)))) |
425 |
|
|
426 |
|
(define-button-type 'Man-xref-man-page |
427 |
|
:supertype 'Man-abstract-xref-man-page |
428 |
|
'func 'man-follow) |
429 |
|
|
430 |
|
|
431 |
(define-button-type 'Man-xref-header-file |
(define-button-type 'Man-xref-header-file |
432 |
'action (lambda (button) |
'action (lambda (button) |
911 |
'face Man-overstrike-face))) |
'face Man-overstrike-face))) |
912 |
(message "%s man page formatted" Man-arguments)) |
(message "%s man page formatted" Man-arguments)) |
913 |
|
|
914 |
(defun Man-highlight-references () |
(defun Man-highlight-references (&optional xref-man-type) |
915 |
"Highlight the references on mouse-over. |
"Highlight the references on mouse-over. |
916 |
References include items in the SEE ALSO section, |
References include items in the SEE ALSO section, |
917 |
header file (#include <foo.h>) and files in FILES." |
header file (#include <foo.h>) and files in FILES. |
918 |
|
If XREF-MAN-TYPE is used as the button type for items |
919 |
|
in SEE ALSO section. If it is nil, default type, |
920 |
|
`Man-xref-man-page' is used." |
921 |
(let ((dummy 0)) |
(let ((dummy 0)) |
922 |
(Man-highlight-references0 |
(Man-highlight-references0 |
923 |
Man-see-also-regexp Man-reference-regexp 1 dummy |
Man-see-also-regexp Man-reference-regexp 1 dummy |
924 |
'Man-xref-man-page) |
(or xref-man-type 'Man-xref-man-page)) |
925 |
(Man-highlight-references0 |
(Man-highlight-references0 |
926 |
Man-synopsis-regexp Man-header-regexp 0 2 |
Man-synopsis-regexp Man-header-regexp 0 2 |
927 |
'Man-xref-header-file) |
'Man-xref-header-file) |