Mercurial > emacs
view lisp/gnus/gnus-vm.el @ 20907:9a55a557cb5a
(bibtex-autokey-names): Change number tag to integer.
(bibtex-include-OPTkey): Add non-nil default :value
for function, so that it can be selected.
(bibtex-entry-format): Replace repeat with set.
(bibtex-mode-hook): Change :type to 'hook.
(bibtex-clean-entry-hook): Ditto.
(bibtex-add-entry-hook): Ditto.
(bibtex-autokey-before-presentation-hook): Change name to ->
`bibtex-autokey-before-presentation-function' as it is not hook.
(bibtex-autokey-get-namefield): Remove newlines unconditionally.
(bibtex-autokey): Fixed prefix.
(bibtex-user-optional-fields): Better `:type'.
(bibtex-autokey-names): Better `:type' and doc-fix.
(bibtex-mark-active): New function, taking care of Emacs variants.
(bibtex-run-with-idle-timer): Ditto.
(bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'.
(bibtex-autokey-get-yearfield): Changed to accept year when year
field has field-delimiters. This is quick fix, there might
be better solution.
(bibtex-mode): Don't call idle timer with 0 seconds.
(bibtex-mode): Call easy-menu-add.
(bibtex-autokey-get-yearfield): Fixed problem with
parsing the year field.
(bibtex-comment-start): Font locking for comments added.
(autokey-name-case-convert, autokey-titleword-case-convert): Replace
autokey-preserve-case, adding flexibility to case conversion of author
names and titlewords.
(bibtex-autokey-get-titles): Non capitalized title words
are used for key generation as well.
(bibtex-member-of-regexp): Case is honoured for matches now.
(bibtex-autokey-titleword-ignore): Added entries provide compatibility
to former behaviour.
(bibtex-autokey-titleword-ignore): Title words found in
this list are always ignored (previously only at the beginning of the
title). Replaces bibtex-autokey-titleword-first-ignore.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 16 Feb 1998 05:42:08 +0000 |
parents | e6935c08cf0b |
children | 15fc6acbae7a |
line wrap: on
line source
;;; gnus-vm.el --- vm interface for Gnus ;; Copyright (C) 1994,95,96,97 Free Software Foundation, Inc. ;; Author: Per Persson <pp@gnu.ai.mit.edu> ;; Keywords: news, mail ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; Major contributors: ;; Christian Limpach <Christian.Limpach@nice.ch> ;; Some code stolen from: ;; Rick Sladkey <jrs@world.std.com> ;;; Code: (require 'sendmail) (require 'message) (require 'gnus) (require 'gnus-msg) (eval-when-compile (autoload 'vm-mode "vm") (autoload 'vm-save-message "vm") (autoload 'vm-forward-message "vm") (autoload 'vm-reply "vm") (autoload 'vm-mail "vm")) (defvar gnus-vm-inhibit-window-system nil "Inhibit loading `win-vm' if using a window-system. Has to be set before gnus-vm is loaded.") (or gnus-vm-inhibit-window-system (condition-case nil (when window-system (require 'win-vm)) (error nil))) (when (not (featurep 'vm)) (load "vm")) (defun gnus-vm-make-folder (&optional buffer) (let ((article (or buffer (current-buffer))) (tmp-folder (generate-new-buffer " *tmp-folder*")) (start (point-min)) (end (point-max))) (set-buffer tmp-folder) (insert-buffer-substring article start end) (goto-char (point-min)) (if (looking-at "^\\(From [^ ]+ \\).*$") (replace-match (concat "\\1" (current-time-string))) (insert "From " gnus-newsgroup-name " " (current-time-string) "\n")) (while (re-search-forward "\n\nFrom " nil t) (replace-match "\n\n>From ")) ;; insert a newline, otherwise the last line gets lost (goto-char (point-max)) (insert "\n") (vm-mode) tmp-folder)) (defun gnus-summary-save-article-vm (&optional arg) "Append the current article to a vm folder. If N is a positive number, save the N next articles. If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") (let ((gnus-default-article-saver 'gnus-summary-save-in-vm)) (gnus-summary-save-article arg))) (defun gnus-summary-save-in-vm (&optional folder) (interactive) (setq folder (cond ((eq folder 'default) default-name) (folder folder) (t (gnus-read-save-file-name "Save %s in VM folder:" folder gnus-mail-save-name gnus-newsgroup-name gnus-current-headers 'gnus-newsgroup-last-mail)))) (gnus-eval-in-buffer-window gnus-original-article-buffer (save-excursion (save-restriction (widen) (let ((vm-folder (gnus-vm-make-folder))) (vm-save-message folder) (kill-buffer vm-folder)))))) (provide 'gnus-vm) ;;; gnus-vm.el ends here.