From: Richard M. Stallman Date: Mon, 5 Nov 2001 02:35:44 +0000 (+0000) Subject: (last-sexp-toggle-display): Cope if previous-single-property-change or X-Git-Tag: ttn-vms-21-2-B4~18817 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=48461f7cdec26eca9e5d71eb904699376a2296f6;p=emacs.git (last-sexp-toggle-display): Cope if previous-single-property-change or next-single-char-property-change returns nil. --- 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)