Mercurial > emacs
changeset 34057:98bd49d8cf7d
(message-auto-save-directory): Use
file-name-as-directory.
(message-set-auto-save-file-name): Create
message-auto-save-directory if necessary.
(message-replace-chars-in-string): Removed -- unused.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 30 Nov 2000 16:46:52 +0000 |
parents | 43d1deabd9bf |
children | 9f5e2364ef2b |
files | lisp/gnus/message.el |
diffstat | 1 files changed, 4 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/message.el Thu Nov 30 16:22:12 2000 +0000 +++ b/lisp/gnus/message.el Thu Nov 30 16:46:52 2000 +0000 @@ -655,7 +655,7 @@ mail aliases off.") (defcustom message-auto-save-directory - (nnheader-concat message-directory "drafts/") + (file-name-as-directory (nnheader-concat message-directory "drafts")) "*Directory where Message auto-saves buffers if Gnus isn't running. If nil, Message won't auto-save." :group 'message-buffers @@ -3620,6 +3620,9 @@ (defun message-set-auto-save-file-name () "Associate the message buffer with a file in the drafts directory." (when message-auto-save-directory + (unless (file-directory-p + (directory-file-name message-auto-save-directory)) + (make-directory message-auto-save-directory)) (if (gnus-alive-p) (setq message-draft-article (nndraft-request-associate-buffer "drafts")) @@ -4477,24 +4480,6 @@ (cdr local))))) locals))) -;;; Miscellaneous functions - -;; stolen (and renamed) from nnheader.el -(if (fboundp 'subst-char-in-string) - (defsubst message-replace-chars-in-string (string from to) - (subst-char-in-string from to string)) - (defun message-replace-chars-in-string (string from to) - "Replace characters in STRING from FROM to TO." - (let ((string (substring string 0)) ;Copy string. - (len (length string)) - (idx 0)) - ;; Replace all occurrences of FROM with TO. - (while (< idx len) - (when (= (aref string idx) from) - (aset string idx to)) - (setq idx (1+ idx))) - string))) - ;;; ;;; MIME functions ;;;