415 |
;; buttons |
;; buttons |
416 |
(define-button-type 'Man-xref-man-page |
(define-button-type 'Man-xref-man-page |
417 |
'action (lambda (button) (man-follow (button-label button))) |
'action (lambda (button) (man-follow (button-label button))) |
418 |
'help-echo "RET, mouse-2: display this man page") |
'follow-link t |
419 |
|
'help-echo "mouse-2, RET: display this man page") |
420 |
|
|
421 |
(define-button-type 'Man-xref-header-file |
(define-button-type 'Man-xref-header-file |
422 |
'action (lambda (button) |
'action (lambda (button) |
423 |
(let ((w (button-get button 'Man-target-string))) |
(let ((w (button-get button 'Man-target-string))) |
424 |
(unless (Man-view-header-file w) |
(unless (Man-view-header-file w) |
425 |
(error "Cannot find header file: %s" w)))) |
(error "Cannot find header file: %s" w)))) |
426 |
|
'follow-link t |
427 |
'help-echo "mouse-2: display this header file") |
'help-echo "mouse-2: display this header file") |
428 |
|
|
429 |
(define-button-type 'Man-xref-normal-file |
(define-button-type 'Man-xref-normal-file |
435 |
(view-file f) |
(view-file f) |
436 |
(error "Cannot read a file: %s" f)) |
(error "Cannot read a file: %s" f)) |
437 |
(error "Cannot find a file: %s" f)))) |
(error "Cannot find a file: %s" f)))) |
438 |
|
'follow-link t |
439 |
'help-echo "mouse-2: display this file") |
'help-echo "mouse-2: display this file") |
440 |
|
|
441 |
|
|