Codebase list flim / 39d477b
Update upstream source from tag 'upstream/1.14.9+0.20210529' Update to upstream version '1.14.9+0.20210529' with Debian dir ef4f07715685454fa423d7df0d18b98a57f708ab Tatsuya Kinoshita 2 years ago
5 changed file(s) with 71 addition(s) and 50 deletion(s). Raw diff Collapse all Expand all
155155 (defvar mel-b-builtin t)
156156
157157 (defcustom mel-b-builtin-garbage-strategy 'asis
158 "When non-nil, base64 decoder functions handle non-encoded garbage. When value is asis decoders keep garbage and when value is discard decoders delete garbage."
158 "When non-nil, base64 decoder functions handle non-encoded
159 garbage. When value is asis decoders keep garbage and when value
160 is discard decoders delete garbage."
159161 :group 'mime
160162 :type '(choice (const :tag "Keep as is" asis)
161163 (const :tag "Discard" discard)
161161 "Specify CCL-program symbol for `mime-lexical-analyze'.
162162 When nil, do not use CCL.
163163 See docstring of `std11-ccl-lexical-analyzer' for details of CCL-program.
164 If you modify `mime-lexical-analyzer', set this variable to nil or prepare corresponding CCL-program."
164 If you modify `mime-lexical-analyzer', set this variable to nil
165 or prepare corresponding CCL-program."
165166 :group 'mime
166167 :type '(choice symbol (const :tag "Do not use CCL." nil)))
167168
110110 ;; mechanism. Please discuss in the emacs-mime mailing lists.
111111
112112 (defun mime-visible-field-p (field-name visible-fields invisible-fields)
113 (or (catch 'found
114 (while visible-fields
115 (let ((regexp (car visible-fields)))
116 (if (string-match regexp field-name)
117 (throw 'found t)))
118 (setq visible-fields (cdr visible-fields))))
119 (catch 'found
120 (while invisible-fields
121 (let ((regexp (car invisible-fields)))
122 (if (string-match regexp field-name)
123 (throw 'found nil)))
124 (setq invisible-fields (cdr invisible-fields)))
125 t)))
113 (let ((case-fold-search t))
114 (catch 'found
115 (while visible-fields
116 (when (string-match (car visible-fields) field-name)
117 (throw 'found t))
118 (setq visible-fields (cdr visible-fields)))
119 (while invisible-fields
120 (when (string-match (car invisible-fields) field-name)
121 (throw 'found nil))
122 (setq invisible-fields (cdr invisible-fields)))
123 t)))
126124
127125 (defun mime-insert-header-from-buffer (buffer start end
128126 &optional invisible-fields
129127 visible-fields)
130 (let ((the-buf (current-buffer))
131 (mode-obj (mime-find-field-presentation-method 'wide))
132 field-decoder
133 f-b p f-e field-name len field field-body)
128 (let ((mode-obj (mime-find-field-presentation-method 'wide))
129 field-decoder f-b p field-name field-body result)
134130 (with-current-buffer buffer
135 (save-restriction
136 (narrow-to-region start end)
137 (goto-char start)
138 (while (re-search-forward std11-field-head-regexp nil t)
139 (setq f-b (match-beginning 0)
140 p (match-end 0)
141 field-name (buffer-substring f-b p)
142 len (string-width field-name)
143 f-e (std11-field-end))
144 (when (mime-visible-field-p field-name
145 visible-fields invisible-fields)
146 (setq field (intern
147 (capitalize (buffer-substring f-b (1- p))))
148 field-body (buffer-substring p f-e)
149 field-decoder (inline (mime-find-field-decoder-internal
150 field mode-obj)))
151 (with-current-buffer the-buf
152 (insert field-name)
153 (insert (if field-decoder
154 (funcall field-decoder field-body len)
155 ;; Don't decode
156 field-body))
157 (insert "\n"))))))))
131 (goto-char start)
132 (while (re-search-forward std11-field-head-regexp end t)
133 (setq f-b (match-beginning 0)
134 p (match-end 0)
135 field-name (buffer-substring f-b p))
136 (when (mime-visible-field-p field-name
137 visible-fields invisible-fields)
138 (setq field-body (buffer-substring p (std11-field-end end))
139 field-decoder
140 (mime-find-field-decoder-internal
141 (intern (capitalize
142 (buffer-substring-no-properties f-b (1- p))))
143 mode-obj)
144 result
145 (cons "\n"
146 (cons (if field-decoder
147 (funcall field-decoder
148 field-body
149 (string-width field-name))
150 ;; Don't decode
151 field-body)
152 (cons field-name result)))))))
153 (when result
154 (apply #'insert (nreverse result)))))
158155
159156
160157 ;;; @ end
6262
6363 (defcustom sasl-xoauth2-host-url-table
6464 '(;; Gmail
65 ("gmail\\.com$"
65 ("\\.gmail\\.com$"
6666 "https://accounts.google.com/o/oauth2/v2/auth"
6767 "https://www.googleapis.com/oauth2/v4/token"
6868 "https://mail.google.com/"
6969 nil)
7070 ;; Outlook.com
71 ("outlook\\.com$"
71 ("\\.outlook\\.com$"
7272 "https://login.live.com/oauth20_authorize.srf"
7373 "https://login.live.com/oauth20_token.srf"
7474 "wl.offline_access wl.imap"
7575 ;; You need register redirect URL at Application Registration Portal
7676 ;; https://apps.dev.microsoft.com/
77 "http://localhost/result"))
77 "http://localhost/result")
78 ;; office365
79 ("\\.office365\\.com$"
80 "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
81 "https://login.microsoftonline.com/common/oauth2/v2.0/token"
82 "https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access"
83 nil)
84 ;; yahoo.com
85 ("\\.yahoo\\.com$"
86 "https://api.login.yahoo.com/oauth2/request_auth"
87 "https://api.login.yahoo.com/oauth2/get_token"
88 "mail-w"
89 nil)
90 ;; aol.com
91 ("\\.aol\\.com$"
92 "https://api.login.aol.com/oauth2/request_auth"
93 "https://api.login.aol.com/oauth2/get_token"
94 "mail-w"
95 nil))
7896 "List of OAuth 2.0 URLs. Each element of list is regexp for host, auth-url, token-url, scope and redirect-uri (optional)."
7997 :type '(repeat (list
8098 (regexp :tag "Regexp for Host")
167167 ;;;
168168
169169 (defcustom std11-unfold-strip-leading-tab t
170 "When non-nil, `std11-unfold-string' strips leading TAB, which is mainly added by incorrect folding."
170 "When non-nil, `std11-unfold-string' strips leading TAB, which is
171 mainly added by incorrect folding."
171172 :group 'news
172173 :group 'mail
173174 :type 'boolean)
360361 'std11-default-ccl-lexical-analyzer)
361362 "Specify CCL-program symbol for `std11-lexical-analyze'.
362363 When nil, do not use CCL.
363 CCL-program returns a string which expresses a cons.
364 When cons's cdr is non-nil, CCL-program succeeds in analyzing and car is analyzed result.
365 When cdr is nil,CCL-program fails in analyzing.
366 If you modify `std11-lexical-analyzer', set this variable to nil or prepare corresponding CCL-program."
364
365 CCL-program returns a string which expresses a cons. When cons's
366 cdr is non-nil, CCL-program succeeds in analyzing and car is
367 analyzed result. When cdr is nil, CCL-program fails in analyzing.
368 If you modify `std11-lexical-analyzer', set this variable to nil
369 or prepare corresponding CCL-program."
367370 :group 'news
368371 :group 'mail
369372 :type '(choice symbol (const :tag "Do not use CCL." nil)))