[Mew-dist 926] external command interface patch

SAKAI Kiyotaka ksakai at example.com
1997年 4月 23日 (水) 16:26:31 JST


Image/Gif 等で外部プログラムを起動する際にも 1.70 の External-body と
同じインターフェースを提供するためのパッチです。
-- 
酒井 清隆 (E-mail: ksakai at example.com)

-------------- next part --------------
===================================================================
RCS file: RCS/mew-summary.el,v
retrieving revision 1.2
diff -c -r1.2 mew-summary.el
*** mew-summary.el	1997/04/23 04:09:21	1.2
--- mew-summary.el	1997/04/23 07:21:46
***************
*** 881,906 ****
  		   (funcall program begin end params execute))
  		  (t
  		   (funcall program begin end params))))
!       (save-excursion
! 	(set-buffer (mew-current-get 'cache))
! 	(if (not (mew-which program exec-path))
! 	    (message "Program %s is not found" program)
! 	  (if (not (or mew-icon-p
! 		       ;; gee, the following has a bug that multipart
! 		       ;; icons disappear from toolbar...
! 		       ;;(and mew-icon-p (button-event-p last-command-event))
! 		       (mew-y-or-n-p (format "Start %s? " program))))
! 	      ()
  	    (if (not (file-exists-p mew-temp-dir))
  		(mew-make-directory mew-temp-dir)) ;; just in case
  	    (setq file (make-temp-name mew-temp-file))
  	    ;; NEVER use call-process-region for privary reasons
  	    (mew-flet
  	     (write-region begin end file))
  	    (if async
  		(mew-mime-start-process program options file)
  	      (mew-mime-call-process program options file))
! 	    ))))
      (mew-current-set 'part num) ;; should be after funcall
      (if non-erase
  	()
--- 881,921 ----
  		   (funcall program begin end params execute))
  		  (t
  		   (funcall program begin end params))))
!       (if (not (mew-which program exec-path))
! 	  (message "Program %s is not found" program)
! 	(save-excursion
! 	  (set-buffer (mew-buffer-message))
! 	  (let ((buffer-read-only nil))
! 	    (insert " #####   #####    ####    ####   #####     ##    #    #\n"
! 		    " #    #  #    #  #    #  #    #  #    #   #  #   ##  ##\n"
! 		    " #    #  #    #  #    #  #       #    #  #    #  # ## #\n"
! 		    " #####   #####   #    #  #  ###  #####   ######  #    #\n"
! 		    " #       #   #   #    #  #    #  #   #   #    #  #    #\n"
! 		    " #       #    #   ####    ####   #    #  #    #  #    #\n"
! 		    "\n\n")
! 	    (insert (format "Content-Type:\t%s\n" ct))
! 	    (insert (format "Size:\t\t%dbytes\n" (- end begin)))
! 	    (insert (format "Program:\t%s\n" program))
! 	    (if (not (and execute
! 			  (or mew-icon-p
! 			      ;; gee, the following has a bug that multipart
! 			      ;; icons disappear from toolbar...
! 			      ;;(and mew-icon-p (button-event-p last-command-event))
! 			      (mew-y-or-n-p (format "Start %s? " program)))))
! 		(insert "\nTo execute this external command, type "
! 			(substitute-command-keys
! 			 "\\<mew-summary-mode-map>\\[mew-summary-execute-external]."))
  	    (if (not (file-exists-p mew-temp-dir))
  		(mew-make-directory mew-temp-dir)) ;; just in case
  	    (setq file (make-temp-name mew-temp-file))
+ 	    (set-buffer (mew-current-get 'cache))
  	    ;; NEVER use call-process-region for privary reasons
  	    (mew-flet
  	     (write-region begin end file))
  	    (if async
  		(mew-mime-start-process program options file)
  	      (mew-mime-call-process program options file))
! 	    )))))
      (mew-current-set 'part num) ;; should be after funcall
      (if non-erase
  	()


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