Make epa-mail-encrypt cope with read-only text.
authorRichard M. Stallman <rms@gnu.org>
Sat, 10 Mar 2012 08:43:27 +0000 (03:43 -0500)
committerRichard M. Stallman <rms@gnu.org>
Sat, 10 Mar 2012 08:43:27 +0000 (03:43 -0500)
lisp/ChangeLog
lisp/epa-mail.el

index 17dc843..e1ece83 100644 (file)
@@ -1,3 +1,7 @@
+2012-03-10  Richard Stallman  <rms@gnu.org>
+
+       * epa-mail.el (epa-mail-encrypt): Bind inhibit-read-only.
+
 2012-03-10  Chong Yidong  <cyd@gnu.org>
 
        * emulation/cua-rect.el (cua--init-rectangles):
index 22bfe03..be5b849 100644 (file)
@@ -192,7 +192,9 @@ If no one is selected, symmetric encryption will be performed.  "
             (if sign
                 (epa-select-keys context
                                  "Select keys for signing.  "))))))
-  (epa-encrypt-region start end recipients sign signers))
+  ;; Don't let some read-only text stop us from encrypting.
+  (let ((inhibit-read-only t))
+    (epa-encrypt-region start end recipients sign signers)))
 
 ;;;###autoload
 (defun epa-mail-import-keys ()