From 48461f7cdec26eca9e5d71eb904699376a2296f6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 5 Nov 2001 02:35:44 +0000 Subject: [PATCH] (last-sexp-toggle-display): Cope if previous-single-property-change or next-single-char-property-change returns nil. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/lisp-mode.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce8c9aba4bd..60640ca163b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2001-11-04 Richard M. Stallman + * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): Cope if + previous-single-property-change or next-single-char-property-change + returns nil. + * international/mule-cmds.el (set-locale-environment): Make it interactive; make arg optional. 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) -- 2.39.5