[Mew-dist 05490] read only text at attachment region

SAKAI Kiyotaka ksakai at example.com
1998年 7月 13日 (月) 17:38:44 JST


以前に書いた、attachment region を read only 化するパッチを作ってみま
した。

これで attachement region では FEP のキー入力が優先して処理されたとし
ても、そちらの入力が有効にはならないかと思います。
-- 
酒井 清隆 (E-mail: ksakai at example.com)

-------------- next part --------------
Index: mew-syntax.el
===================================================================
RCS file: /home/cvsroot/mew-1.93b46/mew-syntax.el,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mew-syntax.el
--- mew-syntax.el	1998/07/11 10:30:12	1.1.1.1
+++ mew-syntax.el	1998/07/13 08:23:40
@@ -411,7 +411,8 @@
 (defun mew-encode-syntax-print (syntax)
   (interactive)
   (let ((end nil)
-	(nums (mew-attach-nums)))
+	(nums (mew-attach-nums))
+	(inhibit-read-only t))
     (cond
      ((mew-attach-p)
       (goto-char (point-max))
@@ -654,6 +655,7 @@
 	    (if asterisk
 		(setq file (concat (mew-substring file lfc*) AR cnt))
 	      (setq file (concat (mew-substring file lfc) cnt)))))
+    (let ((inhibit-read-only t))
     (insert-and-inherit ;; inherit keymap in attachments.
      (concat
       marks
@@ -664,7 +666,7 @@
       cd-or-dec
       space space
       file
-      "\n"))
+      "\n")))
     ))
 
 (defun mew-decode-syntax-delete ()
@@ -863,15 +865,17 @@
        (insert mew-draft-attach-boundary-end)
        (insert "\n")
        (beginning-of-line)
-       (mew-draft-attach-keymap))))
+       (mew-draft-attach-keymap)
+       (put-text-property (mew-attach-begin) (point-max) 'read-only t))))
 
 (defmacro mew-attach-clear ()
   (` (if (mew-attach-p)
 	 (save-excursion
+	   (let ((inhibit-read-only t))
 	   (delete-region (mew-attach-begin) (point-max))
 	   (set-marker mew-marker-attach-begin nil)
 	   (if mew-use-overlay-keymap
-	       (mew-overlay-disable mew-overlay-attach-keymap))))))
+	       (mew-overlay-disable mew-overlay-attach-keymap)))))))
 
 (defmacro mew-header-prepared ()
   (` (progn


Mew-dist メーリングリストの案内