* time.el (display-time-world-display): Wrap delete-char inside inhibit-read-only.
authorChong Yidong <cyd@gnu.org>
Wed, 24 Oct 2012 18:26:22 +0000 (02:26 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 24 Oct 2012 18:26:22 +0000 (02:26 +0800)
lisp/ChangeLog
lisp/time.el

index 1ca082a..a911832 100644 (file)
@@ -3,6 +3,8 @@
        * time.el (display-time-world-mode): Derive from special-mode.
        (display-time-world): Use display-buffer (Bug#12708).
        (display-time-world-mode-map): Variable deleted.
+       (display-time-world-display): Wrap the final delete-char inside
+       inhibit-read-only.
 
 2012-10-24  Chong Yidong  <cyd@gnu.org>
 
index c08fadd..7473994 100644 (file)
@@ -543,8 +543,8 @@ See `display-time-world'."
       (setenv "TZ" old-tz))
     (setq fmt (concat "%-" (int-to-string max-width) "s %s\n"))
     (dolist (timedata (nreverse result))
-      (insert (format fmt (car timedata) (cdr timedata)))))
-  (delete-char -1))
+      (insert (format fmt (car timedata) (cdr timedata))))
+    (delete-char -1)))
 
 ;;;###autoload
 (defun display-time-world ()