]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-maildir-fcc: elisp syntax fixes
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Mon, 26 Apr 2010 08:23:17 +0000 (10:23 +0200)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Apr 2010 18:58:43 +0000 (11:58 -0700)
1)use insert-buffer-substring

Rather than the insert-buffer. Emacs complains that it is for interactive use
and not for use within elisp. So use insert-buffer-substring which does the
same thing when not handed any 'begin' 'end' parameters.

2)replace caddr with (car (cdr (cdr)))

The former requires 'cl to be loaded and during make install emacs complained
about not knowing it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
emacs/notmuch-maildir-fcc.el

index 2117f54aeb504a98adcf3106c45b471140cd532d..84f4187aa334c932e237d53c6aba204dce2ce222 100644 (file)
@@ -52,7 +52,7 @@
 (defun notmuch-maildir-fcc-make-uniq-maildir-id ()
    (let* ((ct (current-time))
          (timeid (+ (* (car ct) 65536) (cadr ct)))
-         (microseconds (caddr ct))
+         (microseconds (car (cdr (cdr ct))))
          (hostname (notmuch-maildir-fcc-host-fixer system-name)))
      (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))
      (format "%d.%d_%d_%d.%s"
@@ -97,7 +97,7 @@ non-nil, it will write it to cur/, and mark it as read. It should
 return t if successful, and nil otherwise."
   (let ((orig-buffer (buffer-name)))
     (with-temp-buffer
-      (insert-buffer orig-buffer)
+      (insert-buffer-substring orig-buffer)
       (catch 'link-error
        (let ((msg-id (notmuch-maildir-fcc-save-buffer-to-tmp destdir)))
          (when msg-id