next-single-char-property-change returns nil.
2001-11-04 Richard M. Stallman <rms@gnu.org>
+ * 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.
(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)