Skip to content

Commit ce4e7bb

Browse files
author
Yuuki Harano
committed
Merge branch 'master' of https://github.com/emacs-mirror/emacs into pgtk
2 parents 63585c7 + 299744e commit ce4e7bb

26 files changed

+719
-432
lines changed

doc/emacs/frames.texi

+9-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,15 @@ default bound to scrolling with the @key{Ctrl} modifier.
217217
@vindex mouse-wheel-tilt-scroll
218218
@vindex mouse-wheel-flip-direction
219219
Emacs can also support horizontal scrolling if your mouse's wheel can
220-
be tilted. This feature is off by default; the variable
221-
@code{mouse-wheel-tilt-scroll} turns it on. If you'd like to reverse
222-
the direction of horizontal scrolling, customize the variable
223-
@code{mouse-wheel-flip-direction} to a non-@code{nil} value.
220+
be tilted, or if your touchpad supports it. This feature is off by
221+
default; the variable @code{mouse-wheel-tilt-scroll} turns it on, if
222+
you customize it to a non-@code{nil} value. By default, tilting the
223+
mouse wheel scrolls the window's view horizontally in the direction of
224+
the tilt: e.g., tilting to the right scrolls the window to the right,
225+
so that the text displayed in the window moves horizontally to the
226+
left. If you'd like to reverse the direction of horizontal scrolling,
227+
customize the variable @code{mouse-wheel-flip-direction} to a
228+
non-@code{nil} value.
224229

225230
When the mouse pointer is over an image, scrolling the mouse wheel
226231
with the @key{Ctrl} modifier scales the image under the mouse pointer.

doc/lispref/searching.texi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1021,8 +1021,8 @@ or, using shorter synonyms and written more compactly,
10211021
@example
10221022
@group
10231023
(rx "/*"
1024-
(* (| (not (any "*"))
1025-
(: "*" (not (any "/")))))
1024+
(* (| (not "*")
1025+
(: "*" (not "/"))))
10261026
(+ "*") "/")
10271027
@end group
10281028
@end example

etc/NEWS.27

+9-1
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,14 @@ its '--eval' command-line option), as well as in
360360
'lisp-interaction-mode' and 'ielm-mode', used in the "*scratch*" and
361361
"*ielm*" buffers.
362362

363+
We envision that most Lisp code is already either written with
364+
lexical-binding in mind, or will work unchanged under
365+
lexical-binding. If, for some reason, your code used in 'M-:' or
366+
'--eval' doesn't work as result of this change, either modify the code
367+
to work with lexical binding, or wrap it in an extra level of 'eval'.
368+
For example, --eval FORM becomes --eval "(eval 'FORM)" (note the extra
369+
quote in 'FORM).
370+
363371
---
364372
** The new user option 'tooltip-resize-echo-area' avoids truncating
365373
tooltip text on GUI frames when tooltips are displayed in the echo
@@ -779,7 +787,7 @@ an offset to absolute line numbers.
779787
** table
780788

781789
+++
782-
*** 'table-generate-source' now supports wiki and mediawiki
790+
*** 'table-generate-source' now supports wiki and mediawiki.
783791
This command can now output wiki and mediawiki format tables.
784792

785793
** telnet-mode

lisp/emacs-lisp/cl-extra.el

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ strings case-insensitively."
7272
(cond ((eq x y) t)
7373
((stringp x)
7474
(and (stringp y) (= (length x) (length y))
75-
(or (string-equal x y)
76-
(string-equal (downcase x) (downcase y))))) ;Lazy but simple!
75+
(eq (compare-strings x nil nil y nil nil t) t)))
7776
((numberp x)
7877
(and (numberp y) (= x y)))
7978
((consp x)

lisp/emacs-lisp/eldoc.el

+33-36
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,9 @@
3232
;; the one-line documentation for that variable instead, to remind you of
3333
;; that variable's meaning.
3434

35-
;; One useful way to enable this minor mode is to put the following in your
36-
;; .emacs:
37-
;;
38-
;; (add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
39-
;; (add-hook 'lisp-interaction-mode-hook 'eldoc-mode)
40-
;; (add-hook 'ielm-mode-hook 'eldoc-mode)
41-
;; (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode)
35+
;; This mode is now enabled by default in all major modes that provide
36+
;; support for it, such as `emacs-lisp-mode'.
37+
;; This is controlled by `global-eldoc-mode'.
4238

4339
;; Major modes for other languages may use ElDoc by adding an
4440
;; appropriate function to the buffer-local value of
@@ -57,20 +53,17 @@ If user input arrives before this interval of time has elapsed after the
5753
last input, no documentation will be printed.
5854
5955
If this variable is set to 0, no idle time is required."
60-
:type 'number
61-
:group 'eldoc)
56+
:type 'number)
6257

6358
(defcustom eldoc-print-after-edit nil
6459
"If non-nil eldoc info is only shown when editing.
6560
Changing the value requires toggling `eldoc-mode'."
66-
:type 'boolean
67-
:group 'eldoc)
61+
:type 'boolean)
6862

6963
;;;###autoload
7064
(defcustom eldoc-minor-mode-string (purecopy " ElDoc")
7165
"String to display in mode line when ElDoc Mode is enabled; nil for none."
72-
:type '(choice string (const :tag "None" nil))
73-
:group 'eldoc)
66+
:type '(choice string (const :tag "None" nil)))
7467

7568
(defcustom eldoc-argument-case #'identity
7669
"Case to display argument names of functions, as a symbol.
@@ -82,8 +75,7 @@ Note that this variable has no effect, unless
8275
`eldoc-documentation-function' handles it explicitly."
8376
:type '(radio (function-item upcase)
8477
(function-item downcase)
85-
function)
86-
:group 'eldoc)
78+
function))
8779
(make-obsolete-variable 'eldoc-argument-case nil "25.1")
8880

8981
(defcustom eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit
@@ -106,15 +98,13 @@ Note that this variable has no effect, unless
10698
:type '(radio (const :tag "Always" t)
10799
(const :tag "Never" nil)
108100
(const :tag "Yes, but truncate symbol names if it will\
109-
enable argument list to fit on one line" truncate-sym-name-if-fit))
110-
:group 'eldoc)
101+
enable argument list to fit on one line" truncate-sym-name-if-fit)))
111102

112103
(defface eldoc-highlight-function-argument
113104
'((t (:inherit bold)))
114105
"Face used for the argument at point in a function's argument list.
115106
Note that this face has no effect unless the `eldoc-documentation-function'
116-
handles it explicitly."
117-
:group 'eldoc)
107+
handles it explicitly.")
118108

119109
;;; No user options below here.
120110

@@ -182,8 +172,7 @@ area displays information about a function or variable in the
182172
text where point is. If point is on a documented variable, it
183173
displays the first line of that variable's doc string. Otherwise
184174
it displays the argument list of the function called in the
185-
expression point is on."
186-
:group 'eldoc :lighter eldoc-minor-mode-string
175+
expression point is on." :lighter eldoc-minor-mode-string
187176
(setq eldoc-last-message nil)
188177
(cond
189178
((not (eldoc--supported-p))
@@ -193,19 +182,18 @@ expression point is on."
193182
(eldoc-mode
194183
(when eldoc-print-after-edit
195184
(setq-local eldoc-message-commands (eldoc-edit-message-commands)))
196-
(add-hook 'post-command-hook 'eldoc-schedule-timer nil t)
197-
(add-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area nil t))
185+
(add-hook 'post-command-hook #'eldoc-schedule-timer nil t)
186+
(add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area nil t))
198187
(t
199188
(kill-local-variable 'eldoc-message-commands)
200-
(remove-hook 'post-command-hook 'eldoc-schedule-timer t)
201-
(remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)
189+
(remove-hook 'post-command-hook #'eldoc-schedule-timer t)
190+
(remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
202191
(when eldoc-timer
203192
(cancel-timer eldoc-timer)
204193
(setq eldoc-timer nil)))))
205194

206195
;;;###autoload
207196
(define-globalized-minor-mode global-eldoc-mode eldoc-mode turn-on-eldoc-mode
208-
:group 'eldoc
209197
:initialize 'custom-initialize-delay
210198
:init-value t
211199
;; For `read--expression', the usual global mode mechanism of
@@ -284,17 +272,15 @@ Otherwise work like `message'."
284272
(when (stringp format-string)
285273
(apply #'format-message format-string args)))
286274
(force-mode-line-update)))
287-
(apply 'message format-string args)))
275+
(apply #'message format-string args)))
288276

289277
(defun eldoc-message (&optional string)
290278
"Display STRING as an ElDoc message if it's non-nil.
291279
292280
Also store it in `eldoc-last-message' and return that value."
293281
(let ((omessage eldoc-last-message))
294282
(setq eldoc-last-message string)
295-
;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
296-
;; are recorded in a log. Do not put eldoc messages in that log since
297-
;; they are Legion.
283+
;; Do not put eldoc messages in the log since they are Legion.
298284
;; Emacs way of preventing log messages.
299285
(let ((message-log-max nil))
300286
(cond (eldoc-last-message
@@ -307,12 +293,15 @@ Also store it in `eldoc-last-message' and return that value."
307293
(and (symbolp command)
308294
(intern-soft (symbol-name command) eldoc-message-commands)))
309295

310-
;; This function goes on pre-command-hook for XEmacs or when using idle
311-
;; timers in Emacs. Motion commands clear the echo area for some reason,
296+
;; This function goes on pre-command-hook.
297+
;; Motion commands clear the echo area for some reason,
312298
;; which make eldoc messages flicker or disappear just before motion
313299
;; begins. This function reprints the last eldoc message immediately
314300
;; before the next command executes, which does away with the flicker.
315301
;; This doesn't seem to be required for Emacs 19.28 and earlier.
302+
;; FIXME: The above comment suggests we don't really understand why
303+
;; this is needed. Maybe it's not needed any more, but if it is
304+
;; we should figure out why.
316305
(defun eldoc-pre-command-refresh-echo-area ()
317306
"Reprint `eldoc-last-message' in the echo area."
318307
(and eldoc-last-message
@@ -385,7 +374,7 @@ Meant as a value for `eldoc-documentation-function'."
385374
(defcustom eldoc-documentation-function #'eldoc-documentation-default
386375
"Function to call to return doc string.
387376
The function of no args should return a one-line string for displaying
388-
doc about a function etc. appropriate to the context around point.
377+
doc about a function etc. appropriate to the context around point.
389378
It should return nil if there's no doc appropriate for the context.
390379
Typically doc is returned if point is on a function-like name or in its
391380
arg list.
@@ -398,13 +387,21 @@ effect."
398387
:type '(radio (function-item eldoc-documentation-default)
399388
(function-item eldoc-documentation-compose)
400389
(function :tag "Other function"))
401-
:version "28.1"
402-
:group 'eldoc)
390+
:version "28.1")
403391

404392
(defun eldoc--supported-p ()
405393
"Non-nil if an ElDoc function is set for this buffer."
406394
(and (not (memq eldoc-documentation-function '(nil ignore)))
407-
eldoc-documentation-functions))
395+
(or eldoc-documentation-functions
396+
;; The old API had major modes set `eldoc-documentation-function'
397+
;; to provide eldoc support. It's impossible now to determine
398+
;; reliably whether the `eldoc-documentation-function' provides
399+
;; eldoc support (as in the old API) or whether it just provides
400+
;; a way to combine the results of the
401+
;; `eldoc-documentation-functions' (as in the new API).
402+
;; But at least if it's set buffer-locally it's a good hint that
403+
;; there's some eldoc support in the current buffer.
404+
(local-variable-p 'eldoc-documentation-function))))
408405

409406
(defun eldoc-print-current-symbol-info ()
410407
"Print the text produced by `eldoc-documentation-function'."

lisp/emacs-lisp/package.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ correspond to previously loaded files (those returned by
798798
;; FIXME: not the friendliest, but simple.
799799
(require 'info)
800800
(info-initialize)
801-
(push pkg-dir Info-directory-list))
801+
(add-to-list 'Info-directory-list pkg-dir))
802802
(push name package-activated-list)
803803
;; Don't return nil.
804804
t)))
@@ -2045,7 +2045,7 @@ Mark the installed package as selected by adding it to
20452045

20462046
When called from Lisp and optional argument DONT-SELECT is
20472047
non-nil, install the package but do not add it to
2048-
`package-select-packages'.
2048+
`package-selected-packages'.
20492049

20502050
If PKG is a `package-desc' and it is already installed, don't try
20512051
to install it but still mark it as selected."
@@ -3042,6 +3042,7 @@ column in the header line."
30423042

30433043
(defun package-menu--generate (remember-pos &optional packages keywords)
30443044
"Populate and display the Package Menu.
3045+
If REMEMBER-POS is non-nil, keep point on the same entry.
30453046
PACKAGES should be t, which means to display all known packages,
30463047
or a list of package names (symbols) to display.
30473048

lisp/frame.el

+1-5
Original file line numberDiff line numberDiff line change
@@ -2710,11 +2710,7 @@ See also `toggle-frame-maximized'."
27102710
(set-frame-parameter frame 'fullscreen fullscreen-restore)
27112711
(set-frame-parameter frame 'fullscreen nil)))
27122712
(modify-frame-parameters
2713-
frame `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))
2714-
;; Manipulating a frame without waiting for the fullscreen
2715-
;; animation to complete can cause a crash, or other unexpected
2716-
;; behavior, on macOS (bug#28496).
2717-
(when (featurep 'cocoa) (sleep-for 0.5))))
2713+
frame `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))))
27182714

27192715

27202716
;;;; Key bindings

lisp/gnus/mml.el

+3-4
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,7 @@ type detected."
547547
new-parts))
548548
(setq cid (1+ cid)))))))
549549
;; We have local images that we want to include.
550-
(if (not new-parts)
551-
(list cont)
550+
(when new-parts
552551
(setcdr (assq 'contents cont) (buffer-string))
553552
(setq cont
554553
(nconc (list 'multipart (cons 'type "related"))
@@ -561,8 +560,8 @@ type detected."
561560
(nth 1 new-part)
562561
(nth 2 new-part))
563562
(id . ,(concat "<" (nth 0 new-part)
564-
">")))))))
565-
cont))))
563+
">"))))))))
564+
cont)))
566565

567566
(autoload 'image-property "image")
568567

lisp/mwheel.el

+8-2
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,19 @@ face height."
145145
;;; For tilt-scroll
146146
;;;
147147
(defcustom mouse-wheel-tilt-scroll nil
148-
"Enable scroll using tilting mouse wheel."
148+
"Enable horizontal scrolling by tilting mouse wheel or via touchpad.
149+
Also see `mouse-wheel-flip-direction'."
149150
:group 'mouse
150151
:type 'boolean
151152
:version "26.1")
152153

153154
(defcustom mouse-wheel-flip-direction nil
154-
"Swap direction of `wheel-right' and `wheel-left'."
155+
"Swap direction of `wheel-right' and `wheel-left'.
156+
By default, `wheel-right' scrolls the text to the right,
157+
and `wheel-left' scrolls in the other direction.
158+
If this variable is non-nil, it inverts the direction of
159+
horizontal scrolling by tilting the mouse wheel.
160+
Also see `mouse-wheel-tilt-scroll'."
155161
:group 'mouse
156162
:type 'boolean
157163
:version "26.1")

lisp/net/rcirc.el

+10-6
Original file line numberDiff line numberDiff line change
@@ -2626,12 +2626,16 @@ the only argument."
26262626
(and ;; nickserv
26272627
(string= sender "NickServ")
26282628
(string= target rcirc-nick)
2629-
(member message
2630-
(list
2631-
(format "You are now identified for \C-b%s\C-b." rcirc-nick)
2632-
(format "You are successfully identified as \C-b%s\C-b." rcirc-nick)
2633-
"Password accepted - you are now recognized."
2634-
)))
2629+
(cl-member
2630+
message
2631+
(list
2632+
(format "You are now identified for \C-b%s\C-b." rcirc-nick)
2633+
(format "You are successfully identified as \C-b%s\C-b."
2634+
rcirc-nick)
2635+
"Password accepted - you are now recognized.")
2636+
;; The nick may have a different case, so match
2637+
;; case-insensitively (Bug#39345).
2638+
:test #'cl-equalp))
26352639
(and ;; quakenet
26362640
(string= sender "Q")
26372641
(string= target rcirc-nick)

0 commit comments

Comments
 (0)