comparison lisp/vm/vm-folder.el @ 76:c0c698873ce1 r20-0b33

Import from CVS: tag r20-0b33
author cvs
date Mon, 13 Aug 2007 09:05:10 +0200
parents 131b0175ea99
children 0d2f883870bc
comparison
equal deleted inserted replaced
75:a4e0195b387b 76:c0c698873ce1
438 (defun vm-get-folder-type (&optional file start end) 438 (defun vm-get-folder-type (&optional file start end)
439 "Return a symbol indicating the folder type of the current buffer. 439 "Return a symbol indicating the folder type of the current buffer.
440 This function works by examining the beginning of a folder. 440 This function works by examining the beginning of a folder.
441 If optional arg FILE is present the type of FILE is returned instead. 441 If optional arg FILE is present the type of FILE is returned instead.
442 If optional second and third arg START and END are provided, 442 If optional second and third arg START and END are provided,
443 vm-get-folder-type will examine the text between those buffer 443 vm-get-folder-type will examine the the text between those buffer
444 positions. START and END default to 1 and (buffer-size) + 1. 444 positions. START and END default to 1 and (buffer-size) + 1.
445 445
446 Returns 446 Returns
447 nil if folder has no type (empty) 447 nil if folder has no type (empty)
448 unknown if the type is not known to VM 448 unknown if the type is not known to VM
1471 (widen) 1471 (widen)
1472 (let ((old-buffer-modified-p (buffer-modified-p)) 1472 (let ((old-buffer-modified-p (buffer-modified-p))
1473 attributes cache 1473 attributes cache
1474 (case-fold-search t) 1474 (case-fold-search t)
1475 (buffer-read-only nil) 1475 (buffer-read-only nil)
1476 ;; don't truncate the printing of large Lisp objects
1477 (print-length nil)
1476 opoint 1478 opoint
1477 ;; This prevents file locking from occuring. Disabling 1479 ;; This prevents file locking from occuring. Disabling
1478 ;; locking can speed things noticeably if the lock 1480 ;; locking can speed things noticeably if the lock
1479 ;; directory is on a slow device. We don't need locking 1481 ;; directory is on a slow device. We don't need locking
1480 ;; here because the user shouldn't care about VM stuffing 1482 ;; here because the user shouldn't care about VM stuffing
1651 ;; just insert. This will cause the summary header 1653 ;; just insert. This will cause the summary header
1652 ;; to be visible if there are no non-visible headers, 1654 ;; to be visible if there are no non-visible headers,
1653 ;; oh well, no way around this. 1655 ;; oh well, no way around this.
1654 (insert vm-labels-header " " 1656 (insert vm-labels-header " "
1655 (let ((print-escape-newlines t) 1657 (let ((print-escape-newlines t)
1658 ;; don't truncate the printing of large Lisp objects
1659 (print-length nil)
1656 (list nil)) 1660 (list nil))
1657 (mapatoms (function 1661 (mapatoms (function
1658 (lambda (sym) 1662 (lambda (sym)
1659 (setq list (cons (symbol-name sym) list)))) 1663 (setq list (cons (symbol-name sym) list))))
1660 vm-label-obarray) 1664 vm-label-obarray)
1711 (save-excursion 1715 (save-excursion
1712 (vm-save-restriction 1716 (vm-save-restriction
1713 (widen) 1717 (widen)
1714 (let ((old-buffer-modified-p (buffer-modified-p)) 1718 (let ((old-buffer-modified-p (buffer-modified-p))
1715 (case-fold-search t) 1719 (case-fold-search t)
1720 ;; don't truncate the printing of large Lisp objects
1721 (print-length nil)
1716 ;; This prevents file locking from occuring. Disabling 1722 ;; This prevents file locking from occuring. Disabling
1717 ;; locking can speed things noticeably if the lock 1723 ;; locking can speed things noticeably if the lock
1718 ;; directory is on a slow device. We don't need locking 1724 ;; directory is on a slow device. We don't need locking
1719 ;; here because the user shouldn't care about VM stuffing 1725 ;; here because the user shouldn't care about VM stuffing
1720 ;; its own status headers. 1726 ;; its own status headers.
1757 (widen) 1763 (widen)
1758 (let ((old-buffer-modified-p (buffer-modified-p)) 1764 (let ((old-buffer-modified-p (buffer-modified-p))
1759 (case-fold-search t) 1765 (case-fold-search t)
1760 (print-escape-newlines t) 1766 (print-escape-newlines t)
1761 lim 1767 lim
1768 ;; don't truncate the printing of large Lisp objects
1769 (print-length nil)
1762 (buffer-read-only nil) 1770 (buffer-read-only nil)
1763 ;; This prevents file locking from occuring. Disabling 1771 ;; This prevents file locking from occuring. Disabling
1764 ;; locking can speed things noticeably if the lock 1772 ;; locking can speed things noticeably if the lock
1765 ;; directory is on a slow device. We don't need locking 1773 ;; directory is on a slow device. We don't need locking
1766 ;; here because the user shouldn't care about VM stuffing 1774 ;; here because the user shouldn't care about VM stuffing
1800 (save-excursion 1808 (save-excursion
1801 (vm-save-restriction 1809 (vm-save-restriction
1802 (widen) 1810 (widen)
1803 (let ((old-buffer-modified-p (buffer-modified-p)) 1811 (let ((old-buffer-modified-p (buffer-modified-p))
1804 (case-fold-search t) 1812 (case-fold-search t)
1813 ;; don't truncate the printing of large Lisp objects
1814 (print-length nil)
1805 ;; This prevents file locking from occuring. Disabling 1815 ;; This prevents file locking from occuring. Disabling
1806 ;; locking can speed things noticeably if the lock 1816 ;; locking can speed things noticeably if the lock
1807 ;; directory is on a slow device. We don't need locking 1817 ;; directory is on a slow device. We don't need locking
1808 ;; here because the user shouldn't care about VM stuffing 1818 ;; here because the user shouldn't care about VM stuffing
1809 ;; its own status headers. 1819 ;; its own status headers.
1956 (if vm-summary-buffer 1966 (if vm-summary-buffer
1957 (vm-bury-buffer vm-summary-buffer)) 1967 (vm-bury-buffer vm-summary-buffer))
1958 (vm-iconify-frame)) 1968 (vm-iconify-frame))
1959 1969
1960 (defun vm-quit-no-change () 1970 (defun vm-quit-no-change ()
1961 "Exit VM without saving changes made to the folder." 1971 "Quit visiting the current folder without saving changes made to the folder."
1962 (interactive) 1972 (interactive)
1963 (vm-quit t)) 1973 (vm-quit t))
1964 1974
1965 (defun vm-quit (&optional no-change) 1975 (defun vm-quit (&optional no-change)
1966 "Quit VM, saving changes. Deleted messages are not expunged." 1976 "Quit visiting the current folder, saving changes. Deleted messages are not expunged."
1967 (interactive) 1977 (interactive)
1968 (vm-select-folder-buffer) 1978 (vm-select-folder-buffer)
1969 (if (not (memq major-mode '(vm-mode vm-virtual-mode))) 1979 (if (not (memq major-mode '(vm-mode vm-virtual-mode)))
1970 (error "%s must be invoked from a VM buffer." this-command)) 1980 (error "%s must be invoked from a VM buffer." this-command))
1971 (vm-check-for-killed-summary) 1981 (vm-check-for-killed-summary)