[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 87b8f8769e6 1/2: Merge remote-tracking branch 'origin/ma
From: |
Po Lu |
Subject: |
feature/android 87b8f8769e6 1/2: Merge remote-tracking branch 'origin/master' into feature/android |
Date: |
Wed, 14 Jun 2023 03:38:44 -0400 (EDT) |
branch: feature/android
commit 87b8f8769e6cd4563f82747c279c858617ce1b2b
Merge: 5268f8476fc 4c975111af2
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/android
---
admin/unidata/Makefile.in | 14 +++++---
admin/unidata/emoji-zwj.awk | 16 ++++-----
etc/NEWS | 4 +++
lisp/emacs-lisp/bytecomp.el | 80 +++++++++++++++++++++++++++++++++++++++++++++
lisp/emacs-lisp/macroexp.el | 28 +---------------
lisp/gnus/gnus-icalendar.el | 20 ++++++------
6 files changed, 111 insertions(+), 51 deletions(-)
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index cccd85213f1..c7737583700 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -105,19 +105,23 @@ ${unidir}/idna-mapping.el: ${srcdir}/unidata-gen.el \
charscript.el: ${unidir}/charscript.el
blocks = ${srcdir}/blocks.awk
-
+blocks_sources = ${srcdir}/Blocks.txt ${srcdir}/emoji-data.txt
${unidir}/charscript.el: ${blocks}
-${unidir}/charscript.el: ${srcdir}/Blocks.txt ${srcdir}/emoji-data.txt
- $(AM_V_GEN)$(AWK) -f ${blocks} $^ > $@
+# Don't use $^, since that includes the awk script.
+${unidir}/charscript.el: ${blocks_sources}
+ $(AM_V_GEN)$(AWK) -f ${blocks} ${blocks_sources} > $@
.PHONY: emoji-zwj.el
emoji-zwj.el: ${unidir}/emoji-zwj.el
zwj = ${srcdir}/emoji-zwj.awk
+zwj_sources = ${srcdir}/emoji-zwj-sequences.txt $(srcdir)/emoji-sequences.txt
+${unidir}/emoji-zwj.el: ${zwj}
-${unidir}/emoji-zwj.el: ${srcdir}/emoji-zwj-sequences.txt
$(srcdir)/emoji-sequences.txt ${zwj}
- $(AM_V_GEN)$(AWK) -f ${zwj} $^ > $@
+# Don't use $^, since that includes the awk script.
+${unidir}/emoji-zwj.el: ${zwj_sources}
+ $(AM_V_GEN)$(AWK) -f ${zwj} ${zwj_sources} > $@
.PHONY: clean bootstrap-clean distclean maintainer-clean gen-clean
diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk
index 4b648aa675e..53170214d8a 100644
--- a/admin/unidata/emoji-zwj.awk
+++ b/admin/unidata/emoji-zwj.awk
@@ -83,31 +83,29 @@ END {
trigger_codepoints[12] = "1F575"
trigger_codepoints[13] = "1F590"
- printf "(setq auto-composition-emoji-eligible-codepoints\n"
- printf "'("
+ print "(setq auto-composition-emoji-eligible-codepoints"
+ print "'("
for (trig in trigger_codepoints)
{
- printf("\n?\\N{U+%s}", trigger_codepoints[trig])
+ print "?\\N{U+" trigger_codepoints[trig] "}"
}
- printf "\n))\n\n"
+ print "))"
# We add entries for 'codepoint U+FE0F' here to ensure that the
# code in font_range is triggered.
for (trig in trigger_codepoints)
{
- codepoint = trigger_codepoints[trig]
- c = sprintf("\\N{U+%s}", codepoint)
- vec[codepoint] = vec[codepoint] "\n\"" c "\\N{U+FE0F}\""
+ vec[codepoint] = vec[codepoint] "\n\"\\N{U+" trigger_codepoints[trig]
"}\\N{U+FE0F}\""
}
print "(dolist (elt `("
for (elt in ch)
{
- entries = vec[elt]
sprintf("\n\"\\N{U+%s}\\N{U+FE0E}\"\n\"\\N{U+%s}\\N{U+FE0F}\"", elt, elt)
- printf("(#x%s .\n,(eval-when-compile (regexp-opt\n'(\n%s\n))))\n",
elt, entries)
+ print "(#x" elt " .\n,(eval-when-compile (regexp-opt\n'(\n" vec[elt]
+ print "\"\\N{U+" elt "}\\N{U+FE0E}\"\n\"\\N{U+" elt
"}\\N{U+FE0F}\"\n))))"
}
print "))"
print " (set-char-table-range composition-function-table"
diff --git a/etc/NEWS b/etc/NEWS
index efe480b5be0..66784e1c250 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -290,6 +290,10 @@ asynchronously (which is the default behavior).
---
*** New face 'doc-view-svg-face'.
This replaces 'doc-view-svg-foreground' and 'doc-view-svg-background'.
+If you don't like the colors produced by the default definition of
+this new face when DocView displays documents, customize this face to
+restore the colors you were used to, or to get colors more to your
+liking.
** Shortdoc
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4cf244aedbf..0d878846304 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3505,6 +3505,18 @@ lambda-expression."
(if (consp arg) "list" (type-of arg))
idx))))))
+ (let ((funargs (function-get (car form) 'funarg-positions)))
+ (dolist (funarg funargs)
+ (let ((arg (if (numberp funarg)
+ (nth funarg form)
+ (cadr (memq funarg form)))))
+ (when (and (eq 'quote (car-safe arg))
+ (eq 'lambda (car-safe (cadr arg))))
+ (byte-compile-warn-x
+ arg "(lambda %s ...) quoted with %s rather than with #%s"
+ (or (nth 1 (cadr arg)) "()")
+ "'" "'"))))) ; avoid styled quotes
+
(if (eq (car-safe (symbol-function (car form))) 'macro)
(byte-compile-report-error
(format-message "`%s' defined after use in %S (missing `require'
of a library file?)"
@@ -3614,6 +3626,74 @@ lambda-expression."
(dolist (entry mutating-fns)
(put (car entry) 'mutates-arguments (cdr entry))))
+;; Record which arguments expect functions, so we can warn when those
+;; are accidentally quoted with ' rather than with #'
+;; The value of the `funarg-positions' property is a list of function
+;; argument positions, starting with 1, and keywords.
+(dolist (f '( funcall apply mapcar mapatoms mapconcat mapc maphash
+ mapcan map-char-table map-keymap map-keymap-internal
+ functionp
+ seq-do seq-do-indexed seq-sort seq-sort-by seq-group-by
+ seq-find seq-count
+ seq-filter seq-reduce seq-remove seq-keep
+ seq-map seq-map-indexed seq-mapn seq-mapcat
+ seq-drop-while seq-take-while
+ seq-some seq-every-p
+ cl-every cl-some
+ cl-mapcar cl-mapcan cl-mapcon cl-mapc cl-mapl cl-maplist
+ ))
+ (put f 'funarg-positions '(1)))
+(dolist (f '( defalias fset sort
+ replace-regexp-in-string
+ add-hook remove-hook advice-remove advice--remove-function
+ global-set-key local-set-key keymap-global-set keymap-local-set
+ set-process-filter set-process-sentinel
+ ))
+ (put f 'funarg-positions '(2)))
+(dolist (f '( assoc assoc-default assoc-delete-all
+ plist-get plist-member
+ advice-add define-key keymap-set
+ run-at-time run-with-idle-timer run-with-timer
+ seq-contains seq-contains-p seq-set-equal-p
+ seq-position seq-positions seq-uniq
+ seq-union seq-intersection seq-difference))
+ (put f 'funarg-positions '(3)))
+(dolist (f '( cl-find cl-member cl-assoc cl-rassoc cl-position cl-count
+ cl-remove cl-delete
+ cl-subst cl-nsubst
+ cl-substitute cl-nsubstitute
+ cl-remove-duplicates cl-delete-duplicates
+ cl-union cl-nunion cl-intersection cl-nintersection
+ cl-set-difference cl-nset-difference
+ cl-set-exclusive-or cl-nset-exclusive-or
+ cl-nsublis
+ cl-search
+ ))
+ (put f 'funarg-positions '(:test :test-not :key)))
+(dolist (f '( cl-find-if cl-find-if-not cl-member-if cl-member-if-not
+ cl-assoc-if cl-assoc-if-not cl-rassoc-if cl-rassoc-if-not
+ cl-position-if cl-position-if-not cl-count-if cl-count-if-not
+ cl-remove-if cl-remove-if-not cl-delete-if cl-delete-if-not
+ cl-reduce cl-adjoin
+ cl-subsetp
+ ))
+ (put f 'funarg-positions '(1 :key)))
+(dolist (f '( cl-subst-if cl-subst-if-not cl-nsubst-if cl-nsubst-if-not
+ cl-substitute-if cl-substitute-if-not
+ cl-nsubstitute-if cl-nsubstitute-if-not
+ cl-sort cl-stable-sort
+ ))
+ (put f 'funarg-positions '(2 :key)))
+(dolist (fa '((plist-put 4) (alist-get 5) (add-to-list 5)
+ (cl-merge 4 :key)
+ (custom-declare-variable :set :get :initialize :safe)
+ (make-process :filter :sentinel)
+ (make-network-process :filter :sentinel)
+ (all-completions 2 3) (try-completion 2 3) (test-completion 2 3)
+ (completing-read 2 3)
+ ))
+ (put (car fa) 'funarg-positions (cdr fa)))
+
(defun byte-compile-normal-call (form)
(when (and (symbolp (car form))
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 8a0185d597b..f3d0804323e 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -461,20 +461,7 @@ Assumes the caller has bound
`macroexpand-all-environment'."
(_ `(,fn ,eexp . ,eargs)))))
(`(funcall . ,_) form) ;bug#53227
(`(,func . ,_)
- (let ((handler (function-get func 'compiler-macro))
- (funargs (function-get func 'funarg-positions)))
- ;; Check functions quoted with ' rather than with #'
- (dolist (funarg funargs)
- (let ((arg (nth funarg form)))
- (when (and (eq 'quote (car-safe arg))
- (eq 'lambda (car-safe (cadr arg))))
- (setcar
- (nthcdr funarg form)
- (macroexp-warn-and-return
- (format
- "(lambda %s ...) quoted with ' rather than with #'"
- (or (nth 1 (cadr arg)) "()"))
- arg nil nil (cadr arg))))))
+ (let ((handler (function-get func 'compiler-macro)))
;; Macro expand compiler macros. This cannot be delayed to
;; byte-optimize-form because the output of the compiler-macro
can
;; use macros.
@@ -501,19 +488,6 @@ Assumes the caller has bound
`macroexpand-all-environment'."
(_ form))))
(pop byte-compile-form-stack)))
-;; Record which arguments expect functions, so we can warn when those
-;; are accidentally quoted with ' rather than with #'
-(dolist (f '( funcall apply mapcar mapatoms mapconcat mapc cl-mapcar maphash
- mapcan map-char-table map-keymap map-keymap-internal))
- (put f 'funarg-positions '(1)))
-(dolist (f '( add-hook remove-hook advice-remove advice--remove-function
- defalias fset global-set-key run-after-idle-timeout
- set-process-filter set-process-sentinel sort))
- (put f 'funarg-positions '(2)))
-(dolist (f '( advice-add define-key
- run-at-time run-with-idle-timer run-with-timer ))
- (put f 'funarg-positions '(3)))
-
;;;###autoload
(defun macroexpand-all (form &optional environment)
"Return result of expanding macros at all levels in FORM.
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index adbc39547ff..b0efe689636 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -642,16 +642,16 @@ is searched."
(delete-region (point) entry-end))
;; put new event description in the entry body
- (when description
- (save-restriction
- (narrow-to-region (point) (point))
- (insert "\n"
- (gnus-icalendar-event:org-timestamp event)
- "\n\n"
- (replace-regexp-in-string "[\n]+$" "\n"
description)
- "\n")
- (indent-region (point-min) (point-max) (1+
entry-outline-level))
- (fill-region (point-min) (point-max))))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (insert "\n"
+ (gnus-icalendar-event:org-timestamp event)
+ "\n\n"
+ (replace-regexp-in-string "[\n]+$" "\n"
+ (or description "No
description"))
+ "\n")
+ (indent-region (point-min) (point-max) (1+
entry-outline-level))
+ (fill-region (point-min) (point-max)))
;; update entry properties
(cl-labels