• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/gnus/

Lines Matching +defs:gnus +defs:article +defs:buffer

6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
37 (autoload 'gnus-setup-posting-charset "gnus-msg")
38 (autoload 'gnus-add-minor-mode "gnus-ems")
39 (autoload 'gnus-make-local-hook "gnus-util")
46 (defvar gnus-article-mime-handles)
47 (defvar gnus-mouse-2)
48 (defvar gnus-newsrc-hashtb)
145 to \"message/rfc822\" when encoding an article to be forwarded as a MIME
148 (defvar mml-buffer-list nil)
150 (defun mml-generate-new-buffer (name)
151 (let ((buf (generate-new-buffer name)))
152 (push buf mml-buffer-list)
156 (let (kill-buffer-hook)
157 (mapcar 'kill-buffer mml-buffer-list)
158 (setq mml-buffer-list nil)))
161 "Parse the current buffer as an MML document."
172 "Parse the current buffer as an MML document."
305 (buffer-substring-no-properties
328 (buffer-substring-no-properties
338 (setq name (buffer-substring-no-properties
342 (setq elem (buffer-substring-no-properties
345 (setq val (buffer-substring-no-properties
358 (defun mml-buffer-substring-no-properties-except-hard-newlines (start end)
359 (let ((str (buffer-substring-no-properties start end))
368 "Return the buffer up till the next part, multipart or closing part or multipart.
369 If MML is non-nil, return the buffer up till the correspondent mml tag."
380 (mml-buffer-substring-no-properties-except-hard-newlines
387 (mml-buffer-substring-no-properties-except-hard-newlines
394 (mml-buffer-substring-no-properties-except-hard-newlines
407 (with-temp-buffer
413 (buffer-string)))))
434 (with-temp-buffer
440 ((cdr (assq 'buffer cont))
441 (insert-buffer-substring (cdr (assq 'buffer cont))))
465 ;; when encoding an article to be forwarded.
497 (setq coded (buffer-string)))
501 (mm-with-unibyte-buffer
503 ((cdr (assq 'buffer cont))
505 (with-current-buffer (cdr (assq 'buffer cont))
506 (buffer-string)))))
521 (setq encoding (mm-encode-buffer type)
522 coded (mm-string-as-multibyte (buffer-string))))
525 (mm-with-unibyte-current-buffer
636 (with-temp-buffer
638 ((cdr (assq 'buffer cont))
639 (insert-buffer-substring (cdr (assq 'buffer cont))))
743 (defun mml-insert-buffer (buffer)
747 (insert-buffer-substring buffer)
756 "Translate the current buffer (which should be a message) into MML.
757 If HANDLES is non-nil, use it instead reparsing the buffer."
764 (setq handles (mm-dissect-buffer t)))
781 "Translate the current buffer from MML to MIME."
789 (mail-encode-encoded-word-buffer))))
792 (let (textp buffer mmlp)
797 (set-buffer (setq buffer (mml-generate-new-buffer " *mml*")))
806 (mml-insert-mml-markup handle buffer textp)))
809 (insert-buffer-substring buffer)
819 (if (eq charset 'gnus-decoded)
827 (defun mml-insert-mml-markup (handle &optional buffer nofile mmlp)
847 (when buffer
848 (insert " buffer=\"" (buffer-name buffer) "\""))
902 (define-key map "b" 'mml-attach-buffer)
925 ["Attach Buffer..." mml-attach-buffer
927 '(:help "Attach a buffer to the outgoing MIME message"))]
1005 ;;; inserting stuff to the buffer.
1177 (defun mml-attach-buffer (buffer &optional type description)
1178 "Attach a buffer to the outgoing MIME message.
1181 (let* ((buffer (read-buffer "Attach buffer: "))
1182 (type (mml-minibuffer-read-type buffer "text/plain"))
1184 (list buffer type description)))
1187 (mml-insert-empty-tag 'part 'type type 'buffer buffer
1192 "Attach an external file into the buffer.
1222 "Insert a Mail-Followup-To header before previewing an article.
1232 "Display current buffer with Gnus, in a new buffer.
1236 (let* ((buf (current-buffer))
1240 (message-posting-charset (or (gnus-setup-posting-charset
1246 (pop-to-buffer (generate-new-buffer
1248 "*MIME preview of ") (buffer-name))))
1249 (when (boundp 'gnus-buffers)
1250 (push (current-buffer) gnus-buffers))
1251 (erase-buffer)
1252 (insert-buffer-substring buf)
1267 (when (fboundp 'set-buffer-multibyte)
1268 (let ((s (buffer-string)))
1269 ;; Insert the content into unibyte buffer.
1270 (erase-buffer)
1273 (let ((gnus-newsgroup-charset (car message-posting-charset))
1274 gnus-article-prepare-hook gnus-original-article-buffer)
1275 (run-hooks 'gnus-article-decode-hook)
1276 (let ((gnus-newsgroup-name "dummy")
1277 (gnus-newsrc-hashtb (or gnus-newsrc-hashtb
1278 (gnus-make-hashtable 5))))
1279 (gnus-article-prepare-display))))
1280 ;; Disable article-mode-map.
1282 (gnus-make-local-hook 'kill-buffer-hook)
1283 (add-hook 'kill-buffer-hook
1285 (mm-destroy-parts gnus-article-mime-handles)) nil t)
1286 (setq buffer-read-only t)
1287 (local-set-key "q" (lambda () (interactive) (kill-buffer nil)))
1293 (local-set-key gnus-mouse-2
1335 (not (cdr (assq 'buffer cont)))