[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105462: Fix previous change.
From: |
Richard Stallman |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105462: Fix previous change. |
Date: |
Mon, 15 Aug 2011 22:05:01 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105462
committer: Richard Stallman <address@hidden>
branch nick: trunk
timestamp: Mon 2011-08-15 22:05:01 -0400
message:
Fix previous change.
modified:
lisp/ChangeLog
lisp/epa.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-16 01:40:26 +0000
+++ b/lisp/ChangeLog 2011-08-16 02:05:01 +0000
@@ -1,6 +1,7 @@
2011-08-16 Richard Stallman <address@hidden>
- * epa.el (epa-decrypt-region): New arg COPY-FUNCTION.
+ * epa.el (epa-decrypt-region): New arg MAKE-BUFFER-FUNCTION.
+ Don't bind buffer-read-only, just inhibit-read-only.
(epa--find-coding-system-for-mime-charset): Fix the non-xemacs case.
(epa-decrypt-armor-in-region): Make error message clearer.
=== modified file 'lisp/epa.el'
--- a/lisp/epa.el 2011-08-16 01:40:26 +0000
+++ b/lisp/epa.el 2011-08-16 02:05:01 +0000
@@ -803,10 +803,13 @@
(file-name-nondirectory cipher))))
;;;###autoload
-(defun epa-decrypt-region (start end &optional copy-function)
+(defun epa-decrypt-region (start end &optional make-buffer-function)
"Decrypt the current region between START and END.
-If COPY-FUNCTION is non-nil, call it to copy the current buffer
-into some other buffer for the output; it should return that buffer.
+
+If MAKE-BUFFER-FUNCTION is non-nil, call it to prepare an output buffer.
+It should return that buffer. If it copies the input, it should
+delete the text now being decrypted. It should leave point at the
+proper place to insert the plaintext.
Be careful about using this command in Lisp programs!
Since this function operates on regions, it does some tricks such
@@ -841,17 +844,13 @@
(get-text-property start 'epa-coding-system-used)
'undecided)))
(if (y-or-n-p "Replace the original text? ")
- (let ((inhibit-read-only t)
- buffer-read-only)
+ (let ((inhibit-read-only t))
(delete-region start end)
(goto-char start)
(insert plain))
(if copy-function
- (with-current-buffer (funcall copy-function)
- (let ((inhibit-read-only t)
- buffer-read-only)
- (delete-region start end)
- (goto-char start)
+ (with-current-buffer (funcall make-buffer-function)
+ (let ((inhibit-read-only t))
(insert plain)))
(with-output-to-temp-buffer "*Temp*"
(set-buffer standard-output)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105462: Fix previous change.,
Richard Stallman <=