[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android a8f9a4d2d9b 4/5: Merge remote-tracking branch 'origin/ma
From: |
Po Lu |
Subject: |
feature/android a8f9a4d2d9b 4/5: Merge remote-tracking branch 'origin/master' into feature/android |
Date: |
Sun, 30 Apr 2023 23:29:56 -0400 (EDT) |
branch: feature/android
commit a8f9a4d2d9bc982217b4be783b236778f9d6dd32
Merge: 5550816f596 aa56253407e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/android
---
lisp/erc/erc-fill.el | 3 ++-
lisp/net/mailcap.el | 13 +++----------
test/lisp/erc/erc-fill-tests.el | 11 ++++++++---
test/lisp/erc/resources/fill/snapshots/merge-01-start.eld | 2 +-
test/lisp/erc/resources/fill/snapshots/merge-02-right.eld | 2 +-
5 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index c29d292abce..7b6495f9f3f 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -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)
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 10c5a7744c1..4d01737e3e6 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -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)))))
;;;
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el
index f249be8fb86..e8dd25e8ea1 100644
--- a/test/lisp/erc/erc-fill-tests.el
+++ b/test/lisp/erc/erc-fill-tests.el
@@ -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 ()
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
index db3136a9d9e..88defb6c09e 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging
all user I/O. If you do not wish for everything you send to be readable by the
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause
to complain of? Come me to what was done to her.\n<bob> alice: Either your
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging
all user I/O. If you do not wish for everything you send to be readable by the
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause
to complain of? Come me to what was done to her.\n<bob> alice: Either your
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
index fcb9e59b757..c5a9cbfc05d 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging
all user I/O. If you do not wish for everything you send to be readable by the
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause
to complain of? Come me to what was done to her.\n<bob> alice: Either your
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging
all user I/O. If you do not wish for everything you send to be readable by the
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause
to complain of? Come me to what was done to her.\n<bob> alice: Either your
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file