This file is indexed.

/usr/share/emacs/site-lisp/wl/elmo/elmo-access.el is in wl-beta 2.15.9+0.20130701-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
;;; elmo-access.el --- Auto Collect Multiple Folder Interface for ELMO.

;; Copyright (C) 2005 Yuuichi Teranishi <teranisi@gohome.org>

;; Author: Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
;; Keywords: mail, net news

;; This file is part of ELMO (Elisp Library for Message Orchestration).

;; This program 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.
;;
;; This program 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:
;;

;;; Code:
;;
(require 'elmo)
(require 'elmo-multi)

(defvar elmo-access-folder-list-filename "flist"
  "Folder list cache.")

(eval-and-compile
  (luna-define-class elmo-access-folder (elmo-multi-folder)
		     (base-folder))
  (luna-define-internal-accessors 'elmo-access-folder))

(luna-define-method elmo-folder-initialize ((folder elmo-access-folder) name)
  (elmo-access-folder-set-base-folder-internal
   folder
   (elmo-get-folder name))
  (elmo-multi-folder-set-children-internal
   folder
   (mapcar #'elmo-get-folder
	   (elmo-object-load
	    (expand-file-name elmo-access-folder-list-filename
			      (elmo-folder-msgdb-path folder)))))
  (elmo-multi-folder-set-divide-number-internal
   folder
   elmo-multi-divide-number)
  (elmo-access-folder-update-children folder)
  (elmo-multi-connect-signals folder)
  folder)

(luna-define-method elmo-folder-expand-msgdb-path ((folder elmo-access-folder))
  (expand-file-name (elmo-replace-string-as-filename
		     (elmo-folder-name-internal folder))
		    (expand-file-name "access" elmo-msgdb-directory)))

(defvar elmo-access-substitute-folder nil)

(defun elmo-access-substitute-folder ()
  (or elmo-access-substitute-folder
      (setq elmo-access-substitute-folder
	    (elmo-make-folder "'null"))))

(defun elmo-access-folder-update-children (folder &optional open expunge)
  (elmo-multi-folder-set-children-internal
   folder
   (if (elmo-folder-plugged-p
	(elmo-access-folder-base-folder-internal folder))
       (let ((subfolders (elmo-folder-list-subfolders
			  (elmo-access-folder-base-folder-internal folder)))
	     children)
	 (dolist (child (elmo-multi-folder-children-internal folder))
	   (let ((name (elmo-folder-name-internal child)))
	     (cond ((member name subfolders)
		    (setq children (nconc children (list child))))
		   (expunge)
		   (t
		    (setq children
			  (nconc children
				 (list (elmo-access-substitute-folder))))))
	     (setq subfolders (delete name subfolders))))
	 (if subfolders
	     (nconc children
		    (mapcar (lambda (name)
			      (let ((folder (elmo-get-folder name)))
				(when open
				  (elmo-folder-open-internal folder))
				folder))
			    subfolders))
	   children))
     (mapcar (lambda (f)
	       (if (elmo-folder-exists-p f)
		   f
		 (elmo-access-substitute-folder)))
	     (elmo-multi-folder-children-internal folder)))))

(luna-define-method elmo-folder-open-internal
  :before ((folder elmo-access-folder))
  (elmo-access-folder-update-children folder))

(luna-define-method elmo-folder-commit :after ((folder elmo-access-folder))
  (when (elmo-folder-persistent-p folder)
    (elmo-object-save
     (expand-file-name elmo-access-folder-list-filename
		       (elmo-folder-msgdb-path folder))
     (mapcar (lambda (f) (elmo-folder-name-internal f))
	     (elmo-multi-folder-children-internal folder)))))

(luna-define-method elmo-folder-check :before ((folder elmo-access-folder))
  (elmo-access-folder-update-children folder 'open))

(luna-define-method elmo-folder-synchronize :before
  ((folder elmo-access-folder)
   &optional disable-killed ignore-msgdb no-check mask)
  (when (or ignore-msgdb
	    (not no-check))
    (elmo-access-folder-update-children folder 'open ignore-msgdb)))

(luna-define-method elmo-folder-creatable-p ((folder elmo-access-folder))
  nil)

(require 'product)
(product-provide (provide 'elmo-access) (require 'elmo-version))

;;; elmo-access.el.el ends here