aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2021-10-09 07:50:36 -0700
committerGlenn Morris2021-10-09 07:50:36 -0700
commitcc202c713be60355dbcf4e5ea87603c5e16a92db (patch)
tree718f701ca6622f242172eb138a983b343efb0f5d /lisp
parentfecc4c0f79bbfcae3c6dd0ad8331a8ef6faa4034 (diff)
parent394209c1a012ec0d24cbef031101c82a79ceea83 (diff)
downloademacs-cc202c713be60355dbcf4e5ea87603c5e16a92db.tar.gz
emacs-cc202c713be60355dbcf4e5ea87603c5e16a92db.zip
Merge from origin/emacs-28
394209c1a0 (origin/emacs-28) ; Fix indentation in etc/NEWS 81f20e8b89 Fix thinko in ls-lisp--insert-directory ec9f25bd35 Mention that RET means "yes" in y-or-n-p 00eb21c897 ; * src/dispextern.h (struct glyph_string): Comment on NCH... 20eb3644ba Rewrite Antinews for Emacs 28 3a9b881603 ; * etc/NEWS: Rearrange the "incompatible changes" sections. ebb7e26013 ; * etc/NEWS: Fix a typo. 315fe20086 ; * src/Makefile.in (../native-lisp): Add comment. 47cbd103f5 * lisp/bindings.el (mode-line-position): Improve tooltip. 35a752863a * lisp/progmodes/xref.el: Bump the version. bbcd8cc1a9 Slight simplificaiton e139dd1b1e Fix doc strings of 2 categories 59782839cb (xref--collect-matches-1): Remove some intermediate alloca... 1c7d056f4d ; Fix two typos where em dash was written as en dash # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/international/characters.el4
-rw-r--r--lisp/ls-lisp.el1
-rw-r--r--lisp/progmodes/xref.el110
-rw-r--r--lisp/subr.el2
5 files changed, 60 insertions, 59 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 1cd22167c5b..e397e44b2ff 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -505,7 +505,7 @@ mouse-1: Display Line and Column Mode Menu"))
505 local-map ,mode-line-column-line-number-mode-map 505 local-map ,mode-line-column-line-number-mode-map
506 mouse-face mode-line-highlight 506 mouse-face mode-line-highlight
507 ;; XXX needs better description 507 ;; XXX needs better description
508 help-echo "Size indication mode\n\ 508 help-echo "Buffer Position
509mouse-1: Display Line and Column Mode Menu") 509mouse-1: Display Line and Column Mode Menu")
510 (size-indication-mode 510 (size-indication-mode
511 (8 ,(propertize 511 (8 ,(propertize
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 475a669dc40..5aefda23283 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -116,11 +116,11 @@ Base characters (Unicode General Category L,N,P,S,Zs)")
116Combining diacritic or mark (Unicode General Category M)") 116Combining diacritic or mark (Unicode General Category M)")
117 117
118;; bidi types 118;; bidi types
119(define-category ?R "Right-to-left (strong) 119(define-category ?R "Strong R2L
120Characters with \"strong\" right-to-left directionality, i.e. 120Characters with \"strong\" right-to-left directionality, i.e.
121with R, AL, RLE, or RLO Unicode bidi character type.") 121with R, AL, RLE, or RLO Unicode bidi character type.")
122 122
123(define-category ?L "Left-to-right (strong) 123(define-category ?L "Strong L2R
124Characters with \"strong\" left-to-right directionality, i.e. 124Characters with \"strong\" left-to-right directionality, i.e.
125with L, LRE, or LRO Unicode bidi character type.") 125with L, LRE, or LRO Unicode bidi character type.")
126 126
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 8e81f79e429..82153ff0adb 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -283,6 +283,7 @@ are also supported; unsupported long options are silently ignored."
283 (funcall orig-fun 283 (funcall orig-fun
284 file switches wildcard full-directory-p) 284 file switches wildcard full-directory-p)
285 ;; We need the directory in order to find the right handler. 285 ;; We need the directory in order to find the right handler.
286 (setq switches (or switches ""))
286 (let ((handler (find-file-name-handler (expand-file-name file) 287 (let ((handler (find-file-name-handler (expand-file-name file)
287 'insert-directory)) 288 'insert-directory))
288 (orig-file file) 289 (orig-file file)
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 0d51019f735..52a4e0c5435 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1,7 +1,7 @@
1;;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*- 1;;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*-
2 2
3;; Copyright (C) 2014-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
4;; Version: 1.2.2 4;; Version: 1.3.0
5;; Package-Requires: ((emacs "26.1")) 5;; Package-Requires: ((emacs "26.1"))
6 6
7;; This is a GNU ELPA :core package. Avoid functionality that is not 7;; This is a GNU ELPA :core package. Avoid functionality that is not
@@ -956,13 +956,11 @@ GROUP is a string for decoration purposes and XREF is an
956`xref-item' object." 956`xref-item' object."
957 (require 'compile) ; For the compilation faces. 957 (require 'compile) ; For the compilation faces.
958 (cl-loop for (group . xrefs) in xref-alist 958 (cl-loop for (group . xrefs) in xref-alist
959 for max-line-width = 959 for max-line = (cl-loop for xref in xrefs
960 (cl-loop for xref in xrefs 960 maximize (xref-location-line
961 maximize (let ((line (xref-location-line 961 (xref-item-location xref)))
962 (xref-item-location xref)))) 962 for line-format = (and max-line
963 (and line (1+ (floor (log line 10)))))) 963 (format "%%%dd: " (1+ (floor (log max-line 10)))))
964 for line-format = (and max-line-width
965 (format "%%%dd: " max-line-width))
966 with item-text-props = (list 'mouse-face 'highlight 964 with item-text-props = (list 'mouse-face 'highlight
967 'keymap xref--button-map 965 'keymap xref--button-map
968 'help-echo 966 'help-echo
@@ -973,27 +971,27 @@ GROUP is a string for decoration purposes and XREF is an
973 do 971 do
974 (xref--insert-propertized '(face xref-file-header xref-group t) 972 (xref--insert-propertized '(face xref-file-header xref-group t)
975 group "\n") 973 group "\n")
976 (cl-loop for xref in xrefs do 974 (dolist (xref xrefs)
977 (pcase-let (((cl-struct xref-item summary location) xref)) 975 (pcase-let (((cl-struct xref-item summary location) xref))
978 (let* ((line (xref-location-line location)) 976 (let* ((line (xref-location-line location))
979 (prefix 977 (prefix
980 (cond 978 (cond
981 ((not line) " ") 979 ((not line) " ")
982 ((and (equal line prev-line) 980 ((and (equal line prev-line)
983 (equal prev-group group)) 981 (equal prev-group group))
984 "") 982 "")
985 (t (propertize (format line-format line) 983 (t (propertize (format line-format line)
986 'face 'xref-line-number))))) 984 'face 'xref-line-number)))))
987 ;; Render multiple matches on the same line, together. 985 ;; Render multiple matches on the same line, together.
988 (when (and (equal prev-group group) 986 (when (and (equal prev-group group)
989 (or (null line) 987 (or (null line)
990 (not (equal prev-line line)))) 988 (not (equal prev-line line))))
991 (insert "\n")) 989 (insert "\n"))
992 (xref--insert-propertized (nconc (list 'xref-item xref) 990 (xref--insert-propertized (nconc (list 'xref-item xref)
993 item-text-props) 991 item-text-props)
994 prefix summary) 992 prefix summary)
995 (setq prev-line line 993 (setq prev-line line
996 prev-group group)))) 994 prev-group group))))
997 (insert "\n")) 995 (insert "\n"))
998 (add-to-invisibility-spec '(ellipsis . t)) 996 (add-to-invisibility-spec '(ellipsis . t))
999 (save-excursion 997 (save-excursion
@@ -1883,34 +1881,36 @@ Such as the current syntax table and the applied syntax properties."
1883 syntax-needed))))) 1881 syntax-needed)))))
1884 1882
1885(defun xref--collect-matches-1 (regexp file line line-beg line-end syntax-needed) 1883(defun xref--collect-matches-1 (regexp file line line-beg line-end syntax-needed)
1886 (let (match-pairs matches) 1884 (let (matches
1885 stop beg end
1886 last-beg last-end
1887 summary-end)
1887 (when syntax-needed 1888 (when syntax-needed
1888 (syntax-propertize line-end)) 1889 (syntax-propertize line-end))
1889 (while (and 1890 (while (not stop)
1890 ;; REGEXP might match an empty string. Or line. 1891 (if (and
1891 (or (null match-pairs) 1892 ;; REGEXP might match an empty string. Or line.
1892 (> (point) line-beg)) 1893 (not (and last-beg (eql end line-beg)))
1893 (re-search-forward regexp line-end t)) 1894 (re-search-forward regexp line-end t))
1894 (push (cons (match-beginning 0) 1895 (setq beg (match-beginning 0)
1895 (match-end 0)) 1896 end (match-end 0)
1896 match-pairs)) 1897 summary-end beg)
1897 (setq match-pairs (nreverse match-pairs)) 1898 (setq stop t
1898 (while match-pairs 1899 summary-end line-end))
1899 (let* ((beg-end (pop match-pairs)) 1900 (when last-beg
1900 (beg-column (- (car beg-end) line-beg)) 1901 (let* ((beg-column (- last-beg line-beg))
1901 (end-column (- (cdr beg-end) line-beg)) 1902 (end-column (- last-end line-beg))
1902 (loc (xref-make-file-location file line beg-column)) 1903 (summary-start (if matches last-beg line-beg))
1903 (summary (buffer-substring (if matches (car beg-end) line-beg) 1904 (summary (buffer-substring summary-start
1904 (if match-pairs 1905 summary-end))
1905 (caar match-pairs) 1906 (loc (xref-make-file-location file line beg-column)))
1906 line-end)))) 1907 (add-face-text-property (- last-beg summary-start)
1907 (when matches 1908 (- last-end summary-start)
1908 (cl-decf beg-column (- (car beg-end) line-beg)) 1909 'xref-match t summary)
1909 (cl-decf end-column (- (car beg-end) line-beg))) 1910 (push (xref-make-match summary loc (- end-column beg-column))
1910 (add-face-text-property beg-column end-column 'xref-match 1911 matches)))
1911 t summary) 1912 (setq last-beg beg
1912 (push (xref-make-match summary loc (- end-column beg-column)) 1913 last-end end))
1913 matches)))
1914 (nreverse matches))) 1914 (nreverse matches)))
1915 1915
1916(defun xref--find-file-buffer (file) 1916(defun xref--find-file-buffer (file)
diff --git a/lisp/subr.el b/lisp/subr.el
index 33aa3ced446..cca6d53ba73 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3219,7 +3219,7 @@ PROMPT is also updated to show `help-char' like \"(y, n or C-h) \",
3219where `help-char' is automatically bound to `help-form-show'. 3219where `help-char' is automatically bound to `help-form-show'.
3220 3220
3221No confirmation of the answer is requested; a single character is 3221No confirmation of the answer is requested; a single character is
3222enough. SPC also means yes, and DEL means no. 3222enough. RET and SPC also means yes, and DEL means no.
3223 3223
3224To be precise, this function translates user input into responses 3224To be precise, this function translates user input into responses
3225by consulting the bindings in `query-replace-map'; see the 3225by consulting the bindings in `query-replace-map'; see the