Mercurial > emacs
changeset 13621:57b72553e78d
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 21 Nov 1995 21:12:08 +0000 |
parents | e5b36a1526dd |
children | 67c2ba47a729 |
files | lisp/apropos.el |
diffstat | 1 files changed, 7 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/apropos.el Tue Nov 21 21:11:16 1995 +0000 +++ b/lisp/apropos.el Tue Nov 21 21:12:08 1995 +0000 @@ -462,7 +462,7 @@ "(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 @@ (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))