[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108504: * lisp/calendar/calendar.el
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108504: * lisp/calendar/calendar.el (calendar-in-read-only-buffer): |
Date: |
Wed, 06 Jun 2012 11:19:39 -0400 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108504: * lisp/calendar/calendar.el (calendar-in-read-only-buffer):,
Sam Steingold <=