diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-11-21 21:12:08 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-11-21 21:12:08 +0000 |
commit | 8d073426c36d4c0dfc25194da981a8496c037cb6 (patch) | |
tree | 53511e69e974cb467893daeecdee71cfc7cd3dec /lisp/apropos.el | |
parent | d4c70b394a5b61147934cdaba41f41ff0118f4d1 (diff) | |
download | emacs-8d073426c36d4c0dfc25194da981a8496c037cb6.tar.gz |
(apropos-print): Put the item property
on the whole printed symbol.
(apropos-follow): Look for the item property only adjacent to point.
Signal an error if there is none.
Diffstat (limited to 'lisp/apropos.el')
-rw-r--r-- | lisp/apropos.el | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el index 9adf987d941..e220b928926 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -462,7 +462,7 @@ found." "(not bound to any keys)"))) (terpri) ;; only now so we don't propagate text attributes all over - (put-text-property point1 (1+ point1) 'item + (put-text-property point1 point2 'item (if (eval `(or ,@(cdr apropos-item))) (car apropos-item) apropos-item)) @@ -524,20 +524,14 @@ found." (defun apropos-follow (&optional other) (interactive) (let ((point (point)) - (item (get-text-property (point) 'item)) + (item + (or (and (not (eobp)) (get-text-property (point) 'item)) + (and (not (bobp)) (get-text-property (1- (point)) 'item)))) action action-point) - (or item - (setq item (if (bobp) - () - (previous-single-property-change (point) 'item)) - item (get-text-property - (1- (goto-char - (if item - item - (1+ (next-single-property-change (point) 'item))))) - 'item))) + (if (null item) + (error "There is nothing to follow here")) (if (consp item) - (error "%s is just a lonely symbol" (car item))) + (error "There is nothing to follow in `%s'" (car item))) (while (if (setq action-point (next-single-property-change (point) 'action)) (<= action-point point)) |