emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108504: * lisp/calendar/calendar.


From: Sam Steingold
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108504: * lisp/calendar/calendar.el (calendar-in-read-only-buffer):
Date: Fri, 02 Nov 2012 02:29:10 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108504
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Wed 2012-06-06 11:19:39 -0400
message:
  * lisp/calendar/calendar.el (calendar-in-read-only-buffer):
  Call `special-mode' to enable the standard read-only keybindings.
modified:
  lisp/ChangeLog
  lisp/calendar/calendar.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-06 13:32:36 +0000
+++ b/lisp/ChangeLog    2012-06-06 15:19:39 +0000
@@ -1,3 +1,8 @@
+2012-06-06  Sam Steingold  <address@hidden>
+
+       * calendar/calendar.el (calendar-in-read-only-buffer):
+       Call `special-mode' to enable the standard read-only keybindings.
+
 2012-06-06  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/macroexp.el (macroexpand-all-1): Don't spam the output

=== modified file 'lisp/calendar/calendar.el'
--- a/lisp/calendar/calendar.el 2012-06-05 17:33:10 +0000
+++ b/lisp/calendar/calendar.el 2012-06-06 15:19:39 +0000
@@ -1105,9 +1105,8 @@
             ,index (1+ ,index)))
     sum))
 
-;; FIXME bind q to bury-buffer?
 (defmacro calendar-in-read-only-buffer (buffer &rest body)
-  "Switch to BUFFER and executes the forms in BODY.
+  "Switch to BUFFER and execute the forms in BODY.
 First creates or erases BUFFER as needed.  Leaves BUFFER read-only,
 with disabled undo.  Leaves point at point-min, displays BUFFER."
   (declare (indent 1) (debug t))
@@ -1120,6 +1119,7 @@
      (goto-char (point-min))
      (set-buffer-modified-p nil)
      (setq buffer-read-only t)
+     (special-mode)
      (display-buffer ,buffer)))
 
 ;; The following are in-line for speed; they can be called thousands of times


reply via email to

[Prev in Thread] Current Thread [Next in Thread]