diff --git a/admin/git-bisect-start b/admin/git-bisect-start index a439ee7fe15..65bfffc0ad6 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -82,7 +82,7 @@ done # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 ## The list below is the exhaustive list of all commits between Dec 1 -## 2016 and Dec 31 2022 on which building Emacs with the default +## 2016 and Jan 31 2023 on which building Emacs with the default ## options, on a GNU/Linux computer and with GCC, fails. It is ## possible (though unlikely) that building Emacs with non-default ## options, with other compilers, or on other platforms, would succeed @@ -1674,3 +1674,36 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE # SKIP-SINGLE 8c13e8497821881b5197a1717e9e53b9991859d0 # SKIP-SINGLE a6db8464e150c49724c71c5969b97f205ee2dec5 # SKIP-SINGLE cfbfd393b450d4eb7ac0b7922b44208688553c9e +# SKIP-SINGLE 382e018856a884a96a94ad551dbc1d7b0317b2e5 +# SKIP-SINGLE 8360e12f0ea3a3ccf0305adab3c7ea7e38af36c1 +# SKIP-SINGLE 56e8607dc99b90c43f82001cbf073e58a4698298 +# SKIP-SINGLE 956889d8ff1c79db45ca9b1711f406961e71c272 +# SKIP-SINGLE e2e937300f5a68ce1e2a349a583859a29394ac5f +# SKIP-SINGLE 176830fe2bb1c80ee128e515f6223cddc8b0a2ca +# SKIP-SINGLE 3f069bd796b0024033640051b5f74ba9834985f8 +# SKIP-SINGLE 435ba92ccc4c46914c261de57f71ac6d92c20178 +# SKIP-SINGLE ad6d8f7df180a9563d3f064f29c6366f114b8de0 +# SKIP-SINGLE 8d7ad65665833ae99b7e7119dae37afa438968a4 +# SKIP-SINGLE 10032f424ccf611783f5b92742e91e70595587c4 +# SKIP-SINGLE 4b1714571c8c6cf7ae2ee2602c66b7c903c45a4a +# SKIP-SINGLE f27a330b99eebbe7f4690163358b4cacbd4e17a1 +# SKIP-SINGLE b73539832d9c4e802925cb8f261a13473da383b3 +# SKIP-SINGLE f50cb7d7c4b37cd8e4bb1ffa5d3f9273c7e19e10 +# SKIP-SINGLE 96015c9c8cc1720e8ee7cd9cea4de48126dd9122 +# SKIP-SINGLE 2bd0b9475384adfb4dd2cc794bbe1d8621546717 +# SKIP-SINGLE d9a2673ee95cf7172a622dc0229ddf72aec8e8c1 +# SKIP-SINGLE 0116e27b26cb4a98f2de8dca12d8e9d90d222992 +# SKIP-SINGLE 96601cd90ba1b8a650d0e41dad2a58cb9e270f1b +# SKIP-SINGLE 99e40959f4036debe099f144ed2664a38e23563d +# SKIP-SINGLE 207a0d9408cb97b9ae78469e2487e3075ade03f8 +# SKIP-SINGLE 64fee21d5f85db465198970a4d636cb17d500f26 +# SKIP-SINGLE 48bd17923a98f49a30bdce2f3a52e03fe45d63f0 +# SKIP-SINGLE 9058601308db4892fbc3e599b83fe4326fef9886 +# SKIP-SINGLE a3003492ace0571e5179500b42bbe44cb9763dbb +# SKIP-SINGLE 197f994384cb37ae4ae7a771815bbe565d4ae242 +# SKIP-SINGLE 1970726e26a979243925fabe32686ba2ee757c6b +# SKIP-SINGLE 1de6ebf2878485a0ef6b778df7d6a14d5b22a01c +# SKIP-SINGLE 013ab7e2a83afa7fb577c356ae686439a2906f34 +# SKIP-SINGLE 1c3ca3bb649b7e812a84b4a559463462d4357080 +# SKIP-SINGLE 48ed4228a75907ae1bb7a2d4314ffb3277c75e3a +# SKIP-SINGLE b9025c507a3a7dae4de19b18cafaa09b18183832 diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index e9268ff2a0d..69b4f56bee1 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -540,15 +540,18 @@ declaration (@code{c-indent-defun} in CC mode, @kindex C-M-q @r{(C mode)} @findex c-indent-exp @findex prog-indent-sexp -Reindent each line in the balanced expression that follows point. In -CC mode, this invokes @code{c-indent-exp}; in tree-sitter based -@code{c-ts-mode} this invokes a more general @code{prog-indent-sexp}. -A prefix argument inhibits warning messages about invalid syntax. +Reindent each line in the balanced expression (@pxref{Expressions}), +also known as ``sexp'', that follows point. In CC mode, this invokes +@code{c-indent-exp}; in tree-sitter based @code{c-ts-mode} this +invokes a more general @code{prog-indent-sexp}. A prefix argument +inhibits warning messages about invalid syntax. @item @key{TAB} @findex c-indent-line-or-region Reindent the current line, active region, or block starting on this -line (@code{c-indent-line-or-region}). +line (@code{c-indent-line-or-region}). With prefix argument, rigidly +reindent the balanced expression which starts on the current line, if +the current line needs reindentation. @vindex c-tab-always-indent If @code{c-tab-always-indent} is @code{t}, this command always reindents diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index dc78adc4520..6fd9377e1de 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -99,6 +99,12 @@ is removed from the hook. emacs, The GNU Emacs Manual}) runs these two hooks just as a keyboard command does. + Note that, when the buffer text includes very long lines, these two +hooks are called as if they were in a @code{with-restriction} form +(@pxref{Narrowing}), with a +@code{long-line-optimizations-in-command-hooks} label and with the +buffer narrowed to a portion around point. + @node Defining Commands @section Defining Commands @cindex defining commands diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index c5374e1481a..a8311f5c9a2 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3501,11 +3501,11 @@ function finishes are the ones that really matter. For efficiency, we recommend writing these functions so that they usually assign faces to around 400 to 600 characters at each call. -When the buffer text includes very long lines, these functions are -called with the buffer narrowed to a relatively small region around -@var{pos}, and with narrowing locked, so the functions cannot use -@code{widen} to gain access to the rest of the buffer. -@xref{Narrowing}. +Note that, when the buffer text includes very long lines, these +functions are called as if they were in a @code{with-restriction} form +(@pxref{Narrowing}), with a +@code{long-line-optimizations-in-fontification-functions} label and +with the buffer narrowed to a portion around @var{pos}. @end defvar @node Basic Faces diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 68f31e500bb..638b759ff13 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -1474,19 +1474,24 @@ in this frame. Its value is @code{color}, @code{grayscale} or @vindex title@r{, a frame parameter} @item title -If a frame has a non-@code{nil} title, it appears in the window +If a frame has a non-@code{nil} title, that title appears in the window system's title bar at the top of the frame, and also in the mode line of windows in that frame if @code{mode-line-frame-identification} uses @samp{%F} (@pxref{%-Constructs}). This is normally the case when Emacs is not using a window system, and can only display one frame at -a time. @xref{Frame Titles}. +a time. When Emacs is using a window system, this parameter, if +non-@code{nil}, overrides the title determined by the @code{name} +parameter and the implicit title calculated according to +@code{frame-title-format}. It also overrides the title determined by +@code{icon-title-format} for iconified frames. @xref{Frame Titles}. @vindex name@r{, a frame parameter} @item name -The name of the frame. The frame name serves as a default for the frame -title, if the @code{title} parameter is unspecified or @code{nil}. If -you don't specify a name, Emacs sets the frame name automatically -(@pxref{Frame Titles}). +The name of the frame. If you don't specify a name via this +parameter, Emacs sets the frame name automatically, as specified by +@code{frame-title-format} and @code{icon-title-format}, and that is +the frame's title that will appear on display when Emacs uses a window +system (unless the @code{title} parameter overrides it). If you specify the frame name explicitly when you create the frame, the name is also used (instead of the name of the Emacs executable) when @@ -2630,17 +2635,26 @@ frame name automatically based on a template stored in the variable frame is redisplayed. @defvar frame-title-format -This variable specifies how to compute a name for a frame when you have -not explicitly specified one. The variable's value is actually a mode +This variable specifies how to compute a name for a frame when you +have not explicitly specified one (via the frame's parameters; +@pxref{Basic Parameters}). The variable's value is actually a mode line construct, just like @code{mode-line-format}, except that the -@samp{%c}, @samp{%C}, and @samp{%l} constructs are ignored. @xref{Mode Line -Data}. +@samp{%c}, @samp{%C}, and @samp{%l} constructs are ignored. +@xref{Mode Line Data}. @end defvar @defvar icon-title-format -This variable specifies how to compute the name for an iconified frame, -when you have not explicitly specified the frame title. This title -appears in the icon itself. +This variable specifies how to compute the name for an iconified frame +when you have not explicitly specified the frame's name via the +frame's parameters. The resulting title appears in the frame's icon +itself. If the value is a string, is should be a mode line construct +like that of @code{frame-title-format}. The value can also be +@code{t}, which means to use @code{frame-title-format} instead; this +avoids problems with some window managers and desktop environments, +where a change in a frame's title (when a frame is iconified) is +interpreted as a request to raise the frame and/or give it input +focus. The default is a string identical to the default value of +@code{frame-title-format}. @end defvar @defvar multiple-frames diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index f3824436246..1b32f18922c 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -1037,11 +1037,13 @@ positions. In an interactive call, @var{start} and @var{end} are set to the bounds of the current region (point and the mark, with the smallest first). -Note that, in rare circumstances, Emacs may decide to leave, for -performance reasons, the accessible portion of the buffer unchanged -after a call to @code{narrow-to-region}. This can happen when a Lisp -program is called via low-level hooks, such as -@code{jit-lock-functions}, @code{post-command-hook}, etc. +However, when the narrowing has been set by @code{with-restriction} with +a label argument (see below), @code{narrow-to-region} can be used only +within the limits of that narrowing. If @var{start} or @var{end} are +outside these limits, the corresponding limit set by +@code{with-restriction} is used instead. To gain access to other +portions of the buffer, use @code{without-restriction} with the same +label. @end deffn @deffn Command narrow-to-page &optional move-count @@ -1065,13 +1067,13 @@ It is equivalent to the following expression: @example (narrow-to-region 1 (1+ (buffer-size))) @end example -@end deffn -Note that, in rare circumstances, Emacs may decide to leave, for -performance reasons, the accessible portion of the buffer unchanged -after a call to @code{widen}. This can happen when a Lisp program is -called via low-level hooks, such as @code{jit-lock-functions}, -@code{post-command-hook}, etc. +However, when a narrowing has been set by @code{with-restriction} with a +label argument (see below), the limits set by @code{with-restriction} +are restored, instead of canceling the narrowing. To gain access to +other portions of the buffer, use @code{without-restriction} with the +same label. +@end deffn @defun buffer-narrowed-p This function returns non-@code{nil} if the buffer is narrowed, and @@ -1086,6 +1088,9 @@ in effect. The state of narrowing is restored even in the event of an abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}). Therefore, this construct is a clean way to narrow a buffer temporarily. +This construct also saves and restores the narrowings that were set by +@code{with-restriction} with a label argument (see below). + The value returned by @code{save-restriction} is that returned by the last form in @var{body}, or @code{nil} if no body forms were given. @@ -1135,3 +1140,64 @@ This is the contents of foo@point{} @end group @end example @end defspec + +@defspec with-restriction start end [:label label] body +This special form saves the current bounds of the accessible portion +of the buffer, sets the accessible portion to start at @var{start} and +end at @var{end}, evaluates the @var{body} forms, and restores the +saved bounds. In that case it is equivalent to + +@example +(save-restriction + (narrow-to-region start end) + body) +@end example + +@cindex labeled narrowing +When the optional argument @var{label}, a symbol, is present, the +narrowing is @dfn{labeled}. A labeled narrowing differs from a +non-labeled one in several ways: + +@itemize @bullet +@item +During the evaluation of the @var{body} form, @code{narrow-to-region} +and @code{widen} can be used only within the @var{start} and @var{end} +limits. + +@item +To lift the restriction introduced by @code{with-restriction} and gain +access to other portions of the buffer, use @code{without-restriction} +with the same @var{label} argument. (Another way to gain access to +other portions of the buffer is to use an indirect buffer +(@pxref{Indirect Buffers}).) + +@item +Labeled narrowings can be nested. + +@item +Labeled narrowings can only be used in Lisp programs: they are never +visible on display, and never interfere with narrowings set by the +user. +@end itemize + +If you use @code{with-restriction} with the optional @var{label} +argument, we recommend documenting the @var{label} in the doc strings +of the functions which use it, so that other Lisp programs your code +calls could lift the labeled narrowing if and when it needs. +@end defspec + +@defspec without-restriction [:label label] body +This special form saves the current bounds of the accessible portion +of the buffer, widens the buffer, evaluates the @var{body} forms, and +restores the saved bounds. In that case it is equivalent to + +@example +(save-restriction + (widen) + body) +@end example + +When the optional argument @var{label} is present, the narrowing set +by @code{with-restriction} with the same @var{label} argument is +lifted. +@end defspec diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 8030dfa4bb7..d5ec0f48e1c 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -90,7 +90,8 @@ Advanced Usage @chapter Introduction ERC is a powerful, modular, and extensible IRC client for Emacs. -It is distributed with Emacs since version 22.1. +It has been included in Emacs since 2006 (@pxref{History}) and is also +available on GNU ELPA. IRC is short for Internet Relay Chat. When using IRC, you can communicate with other users on the same IRC network. There are many @@ -1463,6 +1464,7 @@ or if you have bugs to report, there are several places you can go. @item @uref{https://www.emacswiki.org/emacs/ERC} is the emacswiki.org page for ERC@. Anyone may add tips, hints, etc.@: to it. +If you do so, please help keep it up to date. @item You can ask questions about using ERC on the Emacs mailing list, @@ -1471,7 +1473,13 @@ You can ask questions about using ERC on the Emacs mailing list, @item You can visit the IRC Libera.Chat channel @samp{#emacs}. Many of the contributors are frequently around and willing to answer your -questions. +questions. You can also try the relatively quiet @samp{#erc}, on the +same network, for more involved questions. + +@item +You can check GNU ELPA between Emacs releases to see if a newer +version is available that might contain a fix for your issue: +@uref{https://elpa.gnu.org/packages/erc.html}. @item To report a bug in ERC, use @kbd{M-x erc-bug}. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 1769b70c9bc..486171a080a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -3853,15 +3853,6 @@ The dribble file will be saved, though (@pxref{Auto Save}). @code{gnus-after-exiting-gnus-hook} is called as the final item when exiting Gnus. -Note: - -@quotation -Miss Lisa Cannifax, while sitting in English class, felt her feet go -numbly heavy and herself fall into a hazy trance as the boy sitting -behind her drew repeated lines with his pencil across the back of her -plastic chair. -@end quotation - @node Group Topics @section Group Topics diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index 9d09172401f..d5e256d9d33 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -47,18 +47,18 @@ From now on, only the most essential operations will be officially supported in its absence, and users will see a warning upon entry-point invocation when it's not present. -** Tighter auth-source integration with bigger changes on the horizon. +** Tighter auth-source integration. The days of hit-and-miss auth-source queries are hopefully behind us. With the overhaul of the services module temporarily shelved and the transition to SASL-based authentication still underway, users may feel left in the lurch to endure yet another release cycle of backtick hell. For some, auth-source may provide a workaround in the form of -nonstandard server passwords. See the section titled "auth-source" in -the Integrations chapter of ERC's manual. +nonstandard server passwords. See the section entitled "auth-source" +in the Integrations chapter of ERC's manual. ** Rudimentary SASL support has arrived. -A new module, 'erc-sasl', now ships with ERC 5.5. See the SASL -section in the manual for details. +A new module, 'erc-sasl', now ships with ERC. See Info node "(erc) +SASL" in the manual for details. ** Username argument for entry-point commands. Commands 'erc' and 'erc-tls' now accept a ':user' keyword argument, @@ -88,8 +88,8 @@ off by default, new users are encouraged to enable them. Clicking on 'irc://' and 'ircs://' links elsewhere in Emacs now does the right thing most of the time. However, for security reasons, users are now prompted to confirm connection parameters prior to lift -off. See the new '(erc) Integrations' section in the Info manual to -override this. +off. See the new '(erc) Integrations' section in the Info manual for +details. ** Miscellaneous behavioral changes impacting the user experience. A bug has been fixed that saw prompts being mangled, doubled, or @@ -117,6 +117,12 @@ file called erc-common.el. This was done to further lessen the various complications arising from the mutual dependency between 'erc' and 'erc-backend'. +ERC now relies on the Compat library from GNU ELPA to supply forward +compatibility shims for users running older versions of Emacs. The +required Compat version resides atop ERC's main library file, in the +'Package-Requires' header. Third-party ERC modules will benefit +automatically from this adoption. + The function 'erc-network' always returns non-nil in server and target buffers belonging to a successfully established IRC connection, even after that connection has been closed. (Also see the note in the diff --git a/etc/NEWS b/etc/NEWS index 8f344aa5764..6d3d849a757 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -563,7 +563,7 @@ documented from day one; it just didn't behave according to documentation. It turns out some Lisp programs were using this coding-system on the wrong assumption that the "auto" part means some automagic handling of the end-of-line (EOL) format conversion; those -program will now start to fail, because BOM signature in UTF-8 encoded +programs will now start to fail, because BOM signature in UTF-8 encoded text is rarely expected. That is the reason we mention this bugfix here. @@ -608,8 +608,19 @@ with 'C-x x t', or try disabling all known slow minor modes with and the major mode with 'M-x so-long-mode', or visit the file with 'M-x find-file-literally' instead of the usual 'C-x C-f'. -Note that the display optimizations in these cases may cause the -buffer to be occasionally mis-fontified. +In buffers in which these display optimizations are in effect, the +'fontification-functions', 'pre-command-hook' and 'post-command-hook' +hooks are executed on a narrowed portion of the buffer, whose size is +controlled by the variables 'long-line-optimizations-region-size' and +'long-line-optimizations-bol-search-limit', as if they were in a +'with-restriction' form. This may, in particular, cause occasional +mis-fontifications in these buffers. Modes which are affected by +these optimizations and by the fact that the buffer is narrowed, +should adapt and either modify their algorithm so as not to expect the +entire buffer to be accessible, or, if accessing outside of the +narrowed region doesn't hurt performance, use the +'without-restriction' form to temporarily lift the restriction and +access portions of the buffer outside of the narrowed region. The new function 'long-line-optimizations-p' returns non-nil when these optimizations are in effect in the current buffer. @@ -1184,6 +1195,13 @@ the most recently deleted frame. With a numerical prefix argument between 1 and 16, where 1 is the most recently deleted frame, undelete the corresponding deleted frame. ++++ +*** The variable 'icon-title-format' can now have the value t. +That value means to use 'frame-title-format' for iconified frames. +This is useful with some window managers and desktop environments +which treat changes in frame's title as requests to raise the frame +and/or give it input focus. + ** Tab Bars and Tab Lines --- @@ -3807,6 +3825,14 @@ TIMEOUT is the idle time after which to deactivate the transient map. The default timeout value can be defined by the new variable 'set-transient-map-timeout'. ++++ +** New forms 'with-restriction' and 'without-restriction'. +These forms can be used as enhanced alternatives to the +'save-restriction' form combined with, respectively, +'narrow-to-region' and 'widen'. They also accept an optional label +argument, with which labeled narrowings can be created and lifted. +See the "(elisp) Narrowing" node for details. + ** Connection Local Variables +++ diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 70681f42c90..8ced4144105 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -85,6 +85,9 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, (* 0.0107306 time time) (* 0.00001236 time time time)) 360.0)) + ;; moon-lat is the argument of latitude, which is the angle + ;; of the moon measured from the ascending node of its orbit + ;; (i.e. argument of perigee + true anomaly). (moon-lat (mod (+ 21.2964 (* 390.67050646 index) @@ -153,9 +156,11 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, ;; Line 7000 Peter Duffett-Smith Cambridge University Press 1990 (defun eclipse-check (moon-lat phase) (let* ((moon-lat (* (/ float-pi 180) moon-lat)) + ;; For positions near the ascending or descending node, + ;; calculate the absolute angular distance from that node. (moon-lat (abs (- moon-lat (* (floor (/ moon-lat float-pi)) float-pi)))) - (moon-lat (if (> moon-lat 0.37) + (moon-lat (if (> moon-lat 0.37) ; FIXME (* 0.5 float-pi) (- float-pi moon-lat) moon-lat)) (phase-name (cond ((= phase 0) "Solar") diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index bf49f274bfd..b753adcb8a0 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -435,21 +435,26 @@ version of that package." (push pkg missing)))))) (version-order (a b) "Predicate to sort packages in order." - (version-list-< (cadr b) (cadr a))) + (version-list-< + (package-desc-version b) + (package-desc-version a))) (duplicate-p (a b) "Are A and B the same package?" - (eq (car a) (car b))) + (eq (package-desc-name a) (package-desc-name b))) (depends-on-p (target package) "Does PACKAGE depend on TARGET?" (or (eq target package) (let* ((pac package-archive-contents) (desc (cadr (assoc package pac)))) - (seq-some - (apply-partially #'depends-on-p target) - (package-desc-reqs desc))))) + (and desc (seq-some + (apply-partially #'depends-on-p target) + (package-desc-reqs desc)))))) (dependent-order (a b) - (or (not (depends-on-p (car b) (car a))) - (depends-on-p (car a) (car b))))) + (let ((desc-a (package-desc-name a)) + (desc-b (package-desc-name b))) + (or (not desc-a) (not desc-b) + (not (depends-on-p desc-b desc-a)) + (depends-on-p desc-a desc-b))))) (mapc #'search requirements) (cl-callf sort to-install #'version-order) (cl-callf seq-uniq to-install #'duplicate-p) @@ -597,6 +602,13 @@ attribute in PKG-SPEC." (vc-retrieve-tag dir release-rev) (message "No release revision was found, continuing..."))))) +(defvar package-vc-non-code-file-names + '(".dir-locals.el" ".dir-locals-2.el") + "List of file names that do not contain Emacs Lisp code. +This list is used by `package-vc--unpack' to better check if the +user is fetching code from a repository that does not contain any +Emacs Lisp files.") + (defun package-vc--unpack (pkg-desc pkg-spec &optional rev) "Install the package described by PKG-DESC. PKG-SPEC is a package specification, a property list describing @@ -606,7 +618,7 @@ checkout. This overrides the `:branch' attribute in PKG-SPEC." (pcase-let* (((map :lisp-dir) pkg-spec) (name (package-desc-name pkg-desc)) (dirname (package-desc-full-name pkg-desc)) - (pkg-dir (expand-file-name dirname package-user-dir))) + (pkg-dir (file-name-as-directory (expand-file-name dirname package-user-dir)))) (when (string-empty-p name) (user-error "Empty package name")) (setf (package-desc-dir pkg-desc) pkg-dir) @@ -615,6 +627,17 @@ checkout. This overrides the `:branch' attribute in PKG-SPEC." (package--delete-directory pkg-dir) (error "There already exists a checkout for %s" name))) (package-vc--clone pkg-desc pkg-spec pkg-dir rev) + (when (directory-empty-p pkg-dir) + (delete-directory pkg-dir) + (error "Empty checkout for %s" name)) + (unless (seq-remove + (lambda (file) + (member (file-name-nondirectory file) package-vc-non-code-file-names)) + (directory-files-recursively pkg-dir "\\.el\\'" nil)) + (when (yes-or-no-p (format "No Emacs Lisp files found when fetching \"%s\", \ +abort installation?" name)) + (delete-directory pkg-dir t) + (user-error "Installation aborted"))) ;; When nothing is specified about a `lisp-dir', then should ;; heuristically check if there is a sub-directory with lisp diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 1da701aebc4..cf0b734bd28 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -425,7 +425,7 @@ Called with a server buffer as its only argument. Potential uses include exponential backoff and probing for connectivity prior to dialing. Use `erc-schedule-reconnect' to instead try again later and optionally alter the attempts tally." - :package-version '(ERC . "5.4.1") ; FIXME on next release + :package-version '(ERC . "5.5") :type '(choice (function-item erc-server-delayed-reconnect) function)) @@ -1167,7 +1167,7 @@ Note that future bundled modules providing IRCv3 functionality will not be compatible with the legacy format. User code should eventually transition to expecting this \"5.5+ variant\" and set this option to nil." - :package-version '(ERC . "5.4.1") ; FIXME increment on next release + :package-version '(ERC . "5.5") :type '(choice (const nil) (const legacy) (const overridable))) @@ -1201,7 +1201,7 @@ instead, leave them as a single string." (get 'erc-parse-tags 'erc-v3-warned-p)) (put 'erc-parse-tags 'erc-v3-warned-p t) (display-warning - 'ERC + 'erc (concat "Legacy ERC tags behavior is currently in effect, but other modules," " including those bundled with ERC, may override this in future" diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 1be47c3e665..c28dddefa0e 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -176,7 +176,7 @@ PAR is a number of a regexp grouping whose text will be passed to CALLBACK. There can be several PAR arguments. If REGEXP is `nicknames', these are ignored, and CALLBACK will be called with the nickname matched as the argument." - :version "29.1" + :package-version '(ERC . "5.5") :type '(repeat (list :tag "Button" (choice :tag "Matches" diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 499bcaf5724..52ee5c855f3 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -244,7 +244,7 @@ server and other miscellaneous functions." "Whether to `regexp-quote' when adding to a match list interactively. When the value is a boolean, the opposite behavior will be made available via universal argument." - :package-version '(ERC . "5.4.1") ; FIXME increment on next release + :package-version '(ERC . "5.5") :type '(choice (const ask) (const t) (const nil))) diff --git a/lisp/erc/erc-sasl.el b/lisp/erc/erc-sasl.el index 97c7c54a517..ed91f412255 100644 --- a/lisp/erc/erc-sasl.el +++ b/lisp/erc/erc-sasl.el @@ -24,13 +24,13 @@ ;; ;; https://lists.gnu.org/archive/html/erc-discuss/2012-02/msg00001.html ;; -;; See options and Info manual for usage. +;; See M-x customize-group RET erc-sasl RET and (info "(erc) SASL") +;; for usage. ;; ;; TODO: ;; -;; - Find a way to obfuscate the password in memory (via something -;; like `auth-source--obfuscate'); it's currently visible in -;; backtraces. +;; - Obfuscate non-auth-source passwords in memory. They're currently +;; visible in backtraces. ;; ;; - Implement a proxy mechanism that chooses the strongest available ;; mechanism for you. Requires CAP 3.2 (see bug#49860). @@ -52,7 +52,7 @@ (defgroup erc-sasl nil "SASL for ERC." :group 'erc - :package-version '(ERC . "5.4.1")) ; FIXME increment on next release + :package-version '(ERC . "5.5")) (defcustom erc-sasl-mechanism 'plain "SASL mechanism to connect with. @@ -76,19 +76,19 @@ commands, `erc' and `erc-tls'." (defcustom erc-sasl-password :password "Optional account password to send when authenticating. -When `erc-sasl-auth-source-function' is a function, ERC will -attempt an auth-source query and prompt for input if it fails. -Otherwise, when the value is a nonempty string, ERC will use it -unconditionally for most mechanisms. Likewise with `:password', -except ERC will instead use the \"session password\" on file, if -any, which often originates from the entry-point commands `erc' -or `erc-tls'. As with auth-source, ERC will prompt for input as -a fallback. +When `erc-sasl-auth-source-function' is a function, ERC attempts +an auth-source query and prompts for input if it fails. +Otherwise, when the value of this option is a nonempty string, +ERC uses it unconditionally for most mechanisms. Likewise with a +value of `:password', except ERC instead uses the \"session +password\" on file, if any, which often originates from the +entry-point commands `erc' or `erc-tls'. As with auth-source, +ERC prompts for input as a fallback. -Note that, with `:password', ERC will forgo sending a traditional +Note that, with `:password', ERC forgoes sending a traditional server password via the IRC \"PASS\" command. Also, when -`erc-sasl-mechanism' is set to `ecdsa-nist256p-challenge', this -option should hold the file name of the key." +`erc-sasl-mechanism' is set to `ecdsa-nist256p-challenge', ERC +expects this option to hold the file name of the key." :type '(choice (const nil) (const :password) string symbol)) (defcustom erc-sasl-auth-source-function nil @@ -100,9 +100,8 @@ though ERC itself only specifies `:user' paired with a ERC binds all options defined in this library, such as `erc-sasl-password', to their values from entry-point invocation. In return, ERC expects a string to send as the SASL password, or -nil, in which case, ERC will prompt the for input. See info -node `(erc) auth-source' for details on ERC's auth-source -integration." +nil, in which case, ERC prompts for input. See Info node `(erc) +auth-source' for details on ERC's auth-source integration." :type '(choice (function-item erc-sasl-auth-source-password-as-host) (function-item erc-auth-source-search) (const nil) diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 1c2fc2fcdc8..2e6959cc3f0 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -180,9 +180,9 @@ Called with a subset of keyword parameters known to `auth-source-search' and relevant to authenticating to nickname services. In return, ERC expects a string to send as the password, or nil, to fall through to the next method, such as -prompting. See info node `(erc) auth-source' for details." - :package-version '(ERC . "5.4.1") ; FIXME update when publishing to ELPA - :type '(choice (const erc-auth-source-search) +prompting. See Info node `(erc) auth-source' for details." + :package-version '(ERC . "5.5") + :type '(choice (function-item erc-auth-source-search) (const nil) function)) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index ff1820cfaf2..d35907a1677 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -217,8 +217,8 @@ parameters and authentication." This variable only exists for legacy reasons. It's not customizable and is limited to a single server password. Users looking for similar -functionality should consider auth-source instead. See info -node `(auth) Top' and info node `(erc) auth-source'.") +functionality should consider auth-source instead. See Info +node `(auth) Top' and Info node `(erc) auth-source'.") (make-obsolete-variable 'erc-password "use auth-source instead" "29.1") @@ -250,19 +250,19 @@ node `(auth) Top' and info node `(erc) auth-source'.") Issue an error when the number of input lines submitted for sending exceeds this value. The value t means disallow more than 1 line of input." - :package-version '(ERC . "5.4.1") ; FIXME match to next release + :package-version '(ERC . "5.5") :group 'erc :type '(choice integer boolean)) (defcustom erc-ask-about-multiline-input nil "Whether to ask to ignore `erc-inhibit-multiline-input' when tripped." - :package-version '(ERC . "5.4.1") ; FIXME match to next release + :package-version '(ERC . "5.5") :group 'erc :type 'boolean) (defcustom erc-prompt-hidden ">" "Text to show in lieu of the prompt when hidden." - :package-version '(ERC . "5.4.1") ; FIXME increment on next ELPA release + :package-version '(ERC . "5.5") :group 'erc-display :type 'string) @@ -272,7 +272,7 @@ To unhide, type something in the input area. Once revealed, a prompt remains unhidden until the next disconnection. Channel prompts are unhidden upon rejoining. See `erc-unhide-query-prompt' for behavior concerning query prompts." - :package-version '(ERC . "5.4.1") ; FIXME increment on next ELPA release + :package-version '(ERC . "5.5") :group 'erc-display :type '(choice (const :tag "Always hide prompt" t) (set (const server) @@ -284,7 +284,7 @@ prompts are unhidden upon rejoining. See Otherwise, prompts in a connection's query buffers remain hidden until the user types in the input area or a new message arrives from the target." - :package-version '(ERC . "5.4.1") ; FIXME increment on next ELPA release + :package-version '(ERC . "5.5") :group 'erc-display ;; Extensions may one day offer a way to discover whether a target ;; is online. When that happens, this can be expanded accordingly. @@ -1479,7 +1479,7 @@ The available choices are: `bury' - bury it in a new buffer, `buffer' - in place of the current buffer, any other value - in place of the current buffer." - :package-version '(ERC . "5.4.1") ; FIXME increment upon publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc-buffers :type '(choice (const :tag "Split window and select" window) (const :tag "Split window, don't select" window-noselect) @@ -1495,7 +1495,7 @@ This only affects automatic reconnections and is ignored when issuing a /reconnect command or reinvoking `erc-tls' with the same args (assuming success, of course). See `erc-join-buffer' for a description of possible values." - :package-version '(ERC . "5.4.1") ; FIXME increment upon publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc-buffers :type '(choice (const :tag "Use value of `erc-join-buffer'" nil) (const :tag "Split window and select" window) @@ -2319,7 +2319,7 @@ Example usage: When present, ID should be a symbol or a string to use for naming the server buffer and identifying the connection unequivocally. -See info node `(erc) Network Identifier' for details. Like USER +See Info node `(erc) Network Identifier' for details. Like USER and CLIENT-CERTIFICATE, this parameter cannot be specified interactively." (interactive (let ((erc-default-port erc-default-port-tls)) @@ -3258,10 +3258,10 @@ if any. In return, ERC expects a string to send as the server password, or nil, to skip the \"PASS\" command completely. An explicit `:password' argument to entry-point commands `erc' and `erc-tls' also inhibits lookup, as does setting this option to -nil. See info node `(erc) auth-source' for details." - :package-version '(ERC . "5.4.1") ; FIXME update when publishing to ELPA +nil. See Info node `(erc) auth-source' for details." + :package-version '(ERC . "5.5") :group 'erc - :type '(choice (const erc-auth-source-search) + :type '(choice (function-item erc-auth-source-search) (const nil) function)) @@ -3272,11 +3272,11 @@ Called with a subset of keyword arguments known to channel. In return, ERC expects a string to use as the channel \"key\", or nil to just join the channel normally. Setting the option itself to nil tells ERC to always forgo consulting -auth-source for channel keys. For more information, see info +auth-source for channel keys. For more information, see Info node `(erc) auth-source'." - :package-version '(ERC . "5.4.1") ; FIXME update when publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc - :type '(choice (const erc-auth-source-search) + :type '(choice (function-item erc-auth-source-search) (const nil) function)) @@ -6837,8 +6837,8 @@ shortened server name instead." ;; erc-goodies is required at end of this file. -;; FIXME when 29.1 is cut and `format-spec' is added to ELPA Compat, -;; remove the function invocations from the spec form below. +;; TODO when ERC drops Emacs 28, replace the expressions in the format +;; spec below with functions. (defun erc-update-mode-line-buffer (buffer) "Update the mode line in a single ERC buffer BUFFER." (with-current-buffer buffer @@ -7213,7 +7213,7 @@ See also `format-spec'." (defcustom erc-kill-server-hook '(erc-kill-server erc-networks-shrink-ids-and-buffer-names) "Invoked whenever a live server buffer is killed via `kill-buffer'." - :package-version '(ERC . "5.4.1") ; FIXME increment upon publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc-hooks :type 'hook) @@ -7222,7 +7222,7 @@ See also `format-spec'." erc-networks-shrink-ids-and-buffer-names erc-networks-rename-surviving-target-buffer) "Invoked whenever a channel-buffer is killed via `kill-buffer'." - :package-version '(ERC . "5.4.1") ; FIXME increment upon publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc-hooks :type 'hook) @@ -7232,7 +7232,7 @@ See also `format-spec'." "Hook run whenever a query buffer is killed. See also `kill-buffer'." - :package-version '(ERC . "5.4.1") ; FIXME increment upon publishing to ELPA + :package-version '(ERC . "5.5") :group 'erc-hooks :type 'hook) @@ -7311,7 +7311,7 @@ Called with a string meant to represent a URL scheme, like \"ircs\", followed by any number of keyword arguments recognized by `erc' and `erc-tls'." :group 'erc - :package-version '(ERC . "5.4.1") ; FIXME increment on release + :package-version '(ERC . "5.5") :type '(choice (const nil) function)) (defun erc--url-default-connect-function (scheme &rest plist) diff --git a/lisp/faces.el b/lisp/faces.el index 4933b495a6c..d1a7881e396 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -191,7 +191,7 @@ For internal use only." (let ((face-id (car (gethash face face--new-frame-defaults)))) (push `(,face-id ,face . ,spec) faces))) (frame--face-hash-table frame)) - (mapcar #'cdr (sort faces (lambda (f1 f2) (< (car f1) (car f2))))))) + (mapcar #'cdr (sort faces (lambda (f1 f2) (> (car f1) (car f2))))))) (defun face-list () "Return a list of all defined faces." @@ -199,7 +199,7 @@ For internal use only." (maphash (lambda (face spec) (push `(,(car spec) . ,face) faces)) face--new-frame-defaults) - (mapcar #'cdr (sort faces (lambda (f1 f2) (< (car f1) (car f2))))))) + (mapcar #'cdr (sort faces (lambda (f1 f2) (> (car f1) (car f2))))))) (defun make-face (face) "Define a new face with name FACE, a symbol. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 52019697ad7..25b90b49c8f 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2544,6 +2544,7 @@ This function is intended to be added to `auto-coding-functions'." ;; coding-system-equal, since it isn't a ;; coding-system. So test that up front. (not (equal sym-type 'charset)) + (not (equal bfcs-type 'charset)) (coding-system-equal 'utf-8 sym-type) (coding-system-equal 'utf-8 bfcs-type)) buffer-file-coding-system diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index dfb076e52df..dfa14140b4e 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -2921,7 +2921,7 @@ and corresponding effects. ;;; Generated autoloads from progmodes/c-ts-common.el -(register-definition-prefixes "c-ts-common" '("c-ts-")) +(register-definition-prefixes "c-ts-common" '("c-ts-common-")) ;;; Generated autoloads from progmodes/c-ts-mode.el @@ -7881,36 +7881,53 @@ Display-Line-Numbers mode. (fn &optional ARG)" t) (defvar header-line-indent "" "\ -String to indent at the start if the header line. -This is used in `header-line-indent-mode', and buffers that have -this switched on should have a `header-line-format' that look like: +String of spaces to indent the beginning of header-line due to line numbers. +This is intended to be used in `header-line-format', and requires +the `header-line-indent-mode' to be turned on, in order for the width +of this string to be kept updated when the line-number width changes +on display. An example of a `header-line-format' that uses this +variable might look like this: (\"\" header-line-indent THE-REST...) +where THE-REST is the format string which produces the actual text +of the header-line. Also see `header-line-indent-width'.") (defvar header-line-indent-width 0 "\ -The width of the current line numbers displayed. -This is updated when `header-line-indent-mode' is switched on. - +The width of the current line number display in the window. +This is measured in units of the frame's canonical columns. +This is updated when `header-line-indent-mode' is switched on, +and is intended for use in `:align-to' display specifications +that are part of `header-line-format', when portions of header-line +text should be aligned to respective parts of buffer text. Also see `header-line-indent'.") (autoload 'header-line-indent-mode "display-line-numbers" "\ -Mode to indent the header line in `display-line-numbers-mode' buffers. +Minor mode to help with alignment of header line when line numbers are shown. -This means that the header line will be kept indented so that it -has blank space that's as wide as the displayed line numbers in -the buffer. +This minor mode should be turned on in buffers which display header-line +that needs to be aligned with buffer text when `display-line-numbers-mode' +is turned on in the buffer. -Buffers that have this switched on should have a -`header-line-format' that look like: +Buffers that have this switched on should have a `header-line-format' +that uses the `header-line-indent' or the `header-line-indent-width' +variables, which this mode will keep up-to-date with the current +display of line numbers. For example, a `header-line-format' that +looks like this: (\"\" header-line-indent THE-REST...) -The `header-line-indent-width' variable is also kept updated, and -has the width of `header-line-format'. This can be used, for -instance, in `:align-to' specs, like: +will make sure the text produced by THE-REST (which should be +a header-line format string) is always indented to be aligned on +display with the first column of buffer text. + +The `header-line-indent-width' variable is also kept updated, +and can be used, for instance, in `:align-to' specs as part +of `header-line-format', like this: (space :align-to (+ header-line-indent-width 10)) +See also `line-number-display-width'. + This is a minor mode. If called interactively, toggle the `Header-Line-Indent mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable @@ -9763,6 +9780,10 @@ If called from Lisp, return the name as a string; return nil if the name is not known. (fn GLYPH &optional INTERACTIVE)" t) +(autoload 'emoji--init "emoji" "\ + + +(fn &optional FORCE INHIBIT-ADJUST)") (autoload 'emoji-zoom-increase "emoji" "\ Increase the size of the character under point. FACTOR is the multiplication factor for the size. @@ -10219,7 +10240,7 @@ Example usage: When present, ID should be a symbol or a string to use for naming the server buffer and identifying the connection unequivocally. -See info node `(erc) Network Identifier' for details. Like USER +See Info node `(erc) Network Identifier' for details. Like USER and CLIENT-CERTIFICATE, this parameter cannot be specified interactively. @@ -15815,7 +15836,7 @@ it is disabled. ;;; Generated autoloads from progmodes/hideshow.el -(defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "