summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-05 02:35:44 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-05 02:35:44 +0000
commit48461f7cdec26eca9e5d71eb904699376a2296f6 (patch)
treec65611c4af4e4e5d62d7fb5e2526c1c75baf1a00 /lisp/emacs-lisp
parent830047fdb65770704faf43fec7ecac3f3d916cf0 (diff)
downloademacs-48461f7cdec26eca9e5d71eb904699376a2296f6.tar.gz
emacs-48461f7cdec26eca9e5d71eb904699376a2296f6.tar.bz2
emacs-48461f7cdec26eca9e5d71eb904699376a2296f6.zip
(last-sexp-toggle-display): Cope if previous-single-property-change or
next-single-char-property-change returns nil.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index ed25088a93d..34321783b81 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -406,8 +406,8 @@ alternative printed representations that can be displayed."
(interactive)
(let ((value (get-text-property (point) 'printed-value)))
(when value
- (let ((beg (previous-single-property-change (point) 'printed-value))
- (end (next-single-char-property-change (point) 'printed-value))
+ (let ((beg (or (previous-single-property-change (point) 'printed-value) (point)))
+ (end (or (next-single-char-property-change (point) 'printed-value) (point)))
(standard-output (current-buffer))
(point (point)))
(delete-region beg end)