mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
a8f9a4d2d9
@ -363,7 +363,8 @@ parties.")
|
||||
erc-fill--wrap-max-lull))
|
||||
(nick (buffer-substring-no-properties
|
||||
(1+ (point-min)) (- (point) 2)))
|
||||
((equal (car props) (erc-downcase nick)))))
|
||||
(props)
|
||||
((erc-nick-equal-p (car props) nick))))
|
||||
(set-marker erc-fill--wrap-last-msg (point-min))))
|
||||
|
||||
(defun erc-fill--wrap-stamp-insert-prefixed-date (args)
|
||||
|
@ -979,7 +979,7 @@ If NO-DECODE is non-nil, don't decode STRING."
|
||||
(".vox" . "audio/basic")
|
||||
(".vrml" . "x-world/x-vrml")
|
||||
(".wav" . "audio/x-wav")
|
||||
(".xls" . "application/vnd\\.ms-excel")
|
||||
(".xls" . "application/vnd.ms-excel")
|
||||
(".wrl" . "x-world/x-vrml")
|
||||
(".xbm" . "image/xbm")
|
||||
(".xpm" . "image/xpm")
|
||||
@ -1051,8 +1051,7 @@ If FORCE, re-parse even if already parsed."
|
||||
(setq save-pos (point))
|
||||
(skip-chars-forward "^ \t\n")
|
||||
(downcase-region save-pos (point))
|
||||
(setq type (mailcap--regexp-quote-type
|
||||
(buffer-substring save-pos (point))))
|
||||
(setq type (buffer-substring save-pos (point)))
|
||||
(while (not (eolp))
|
||||
(skip-chars-forward " \t")
|
||||
(setq save-pos (point))
|
||||
@ -1065,12 +1064,6 @@ If FORCE, re-parse even if already parsed."
|
||||
(setq mailcap-mime-extensions (append extns mailcap-mime-extensions)
|
||||
extns nil)))))
|
||||
|
||||
(defun mailcap--regexp-quote-type (type)
|
||||
(if (not (string-search "/" type))
|
||||
type
|
||||
(pcase-let ((`(,major ,minor) (split-string type "/")))
|
||||
(concat major "/" (regexp-quote minor)))))
|
||||
|
||||
(defun mailcap-extension-to-mime (extn)
|
||||
"Return the MIME content type of the file extensions EXTN."
|
||||
(mailcap-parse-mimetypes)
|
||||
@ -1107,7 +1100,7 @@ For instance, `image/png' will result in `png'."
|
||||
(dolist (info (cdr data))
|
||||
(setq type (cdr (assq 'type (cdr info))))
|
||||
(unless (string-search "*" type)
|
||||
(push type res))))
|
||||
(push (string-replace "\\" "" type) res))))
|
||||
(nreverse res)))))
|
||||
|
||||
;;;
|
||||
|
@ -203,18 +203,23 @@
|
||||
(erc-fill-tests--wrap-populate
|
||||
|
||||
(lambda ()
|
||||
(erc-update-channel-member
|
||||
"#chan" "Dummy" "Dummy" t nil nil nil nil nil "fake" "~u" nil nil t)
|
||||
|
||||
;; Set this here so that the first few messages are from 1970
|
||||
(let ((erc-fill-tests--time-vals (lambda () 1680332400)))
|
||||
(erc-fill-tests--insert-privmsg "bob" "zero.")
|
||||
(erc-fill-tests--insert-privmsg "alice" "one.")
|
||||
(erc-fill-tests--insert-privmsg "alice" "two.")
|
||||
(erc-fill-tests--insert-privmsg "bob" "three.")
|
||||
(erc-fill-tests--insert-privmsg "bob" "four."))
|
||||
(erc-fill-tests--insert-privmsg "bob" "four.")
|
||||
(erc-fill-tests--insert-privmsg "Dummy" "five.")
|
||||
(erc-fill-tests--insert-privmsg "Dummy" "six."))
|
||||
|
||||
(should (= erc-fill--wrap-value 27))
|
||||
(erc-fill-tests--wrap-check-prefixes
|
||||
"*** " "<alice> " "<bob> "
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> ")
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> " "<Dummy> " "<Dummy> ")
|
||||
(erc-fill-tests--compare "merge-01-start")
|
||||
|
||||
(ert-info ("Shift right by one (plus)")
|
||||
@ -222,7 +227,7 @@
|
||||
(should (= erc-fill--wrap-value 29))
|
||||
(erc-fill-tests--wrap-check-prefixes
|
||||
"*** " "<alice> " "<bob> "
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> ")
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> " "<Dummy> " "<Dummy> ")
|
||||
(erc-fill-tests--compare "merge-02-right")))))
|
||||
|
||||
(ert-deftest erc-fill-wrap-visual-keys--body ()
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user