Function: mspools-get-spool-name

mspools-get-spool-name is a byte-compiled function defined in mspools.el.gz.

Signature

(mspools-get-spool-name)

Documentation

Return the name of the spool on the current line.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/mspools.el.gz
;; Alternative version if you have more complicated mapping of spool name
;; to file name.
;(defun get-folder-from-spool-safe (name)
;  "Return the folder name corresponding to the spool file NAME."
;  (if (string-match "^\\(.*\\)\\.spool$" name)
;      (substring name (match-beginning 1) (match-end 1))
;    (error "Could not extract folder name from spool name %s" name)))

; test
;(mspools-get-folder-from-spool "happy.spool")
;(mspools-get-folder-from-spool "happy.sp")

(defun mspools-get-spool-name ()
  "Return the name of the spool on the current line."
  (let ((line-num (1- (count-lines (point-min) (line-end-position)))))
    ;; FIXME: Why not extract the name directly from the current line's text?
    (car (nth line-num mspools-files))))