commit e13509468b7cc733c3511310d999554e6bcda708 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Sat Sep 3 07:23:08 2022 +0200 Make "rlogin" method obsolete in url*.el * lisp/url/url-about.el (url-probe-protocols): Remove "rlogin". * lisp/url/url-gw.el (url-gateway-rlogin-host) (url-gateway-rlogin-user-name, url-gateway-rlogin-parameters) (url-open-rlogin): Make obsolete. (Bug#56891) (url-open-stream): * lisp/url/url-misc.el (url-do-terminal-emulator): Warn when using "rlogin". (url-rlogin): Make obsolete. * lisp/url/url-vars.el (url-gateway-method): Remove "rlogin" choice. * lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once) * lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once): New variables, immediately marked obsolete. * doc/misc/url.texi (telnet/tn3270): Rename section from "rlogin/telnet/tn3270". (Gateways in general, Customization): Don't mention "rlogin" method. diff --git a/doc/misc/url.texi b/doc/misc/url.texi index 5644027f95..546639b017 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -380,7 +380,7 @@ for specific schemes. * info:: Emacs "Info" pages. * mailto:: Sending email. * news/nntp/snews:: Usenet news. -* rlogin/telnet/tn3270:: Remote host connectivity. +* telnet/tn3270:: Remote host connectivity. * irc:: Internet Relay Chat. * data:: Embedded data URLs. * nfs:: Networked File System. @@ -675,9 +675,8 @@ environment variable @samp{NNTPSERVER}, or @samp{news} if that environment variable is unset. @end defopt -@node rlogin/telnet/tn3270 -@section rlogin, telnet and tn3270 -@cindex rlogin +@node telnet/tn3270 +@section telnet and tn3270 @cindex telnet @cindex tn3270 @cindex terminal emulation @@ -694,10 +693,10 @@ telnet://@var{user}:@var{password}@@@var{host}:@var{port} but the @var{password} component is ignored. By default, the @code{telnet} scheme is handled via Tramp (@pxref{Tramp}). -To handle rlogin, telnet and tn3270 URLs, a @code{rlogin}, -@code{telnet} or @code{tn3270} (the program names and arguments are -hardcoded) session is run in a @code{terminal-emulator} buffer. -Well-known ports are used if the URL does not specify a port. +To handle telnet and tn3270 URLs, a @code{telnet} or @code{tn3270} +(the program names and arguments are hardcoded) session is run in a +@code{terminal-emulator} buffer. Well-known ports are used if the URL +does not specify a port. @node irc @section irc @@ -1039,12 +1038,6 @@ a list of symbols. Possible values are: Use this method if you must first telnet and log into a gateway host, and then run telnet from that host to connect to outside machines. -@item rlogin -@cindex @command{rlogin} -This method is identical to @code{telnet}, but uses @command{rlogin} -to log into the remote machine without having to send the username and -password over the wire every time. - @item socks @cindex @sc{socks} Use if the firewall has a @sc{socks} gateway running on it. The @@ -1087,19 +1080,6 @@ The password to send when logging in. This is a regular expression that matches the shell prompt. @end defopt -@defopt url-gateway-rlogin-host -Host to @samp{rlogin} to before telnetting out. -@end defopt -@defopt url-gateway-rlogin-parameters -Parameters to pass to @samp{rsh}. -@end defopt -@defopt url-gateway-rlogin-user-name -User name to use when logging in to the gateway. -@end defopt -@defopt url-gateway-prompt-pattern -This is a regular expression that matches the shell prompt. -@end defopt - @defopt socks-server This specifies the default server, it takes the form @w{@code{("Default server" @var{server} @var{port} @var{version})}} @@ -1327,8 +1307,6 @@ from the local machine. The supported methods are: @table @code @item telnet Run telnet in a subprocess to connect; -@item rlogin -Rlogin to another machine to connect; @item socks Connect through a socks server; @item ssl diff --git a/etc/NEWS b/etc/NEWS index 5feef9aa63..255d92414f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,18 @@ the major mode according to 'initial-major-mode', like at Emacs startup. Previously, these functions ignored 'initial-scratch-message' and left "*scratch*" in 'fundamental-mode'. +--- +** The 'rlogin' method in the URL library is now obsolete. +Emacs will now display a warning if you request a URL like +"rlogin://foo@example.org". + +--- +** Setting 'url-gateway-method' to 'rlogin' is now obsolete. +Emacs will now display a warning when setting it to that value. +The user options 'url-gateway-rlogin-host', +'url-gateway-rlogin-parameters', and 'url-gateway-rlogin-user-name' +are also obsolete. + --- ** The autoarg.el library is now marked obsolete. This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor diff --git a/lisp/obsolete/url-about.el b/lisp/obsolete/url-about.el index 608df3f2a5..b9f8732b28 100644 --- a/lisp/obsolete/url-about.el +++ b/lisp/obsolete/url-about.el @@ -32,7 +32,7 @@ (or (get 'url-extension-protocols 'probed) (mapc (lambda (s) (url-scheme-get-property s 'name)) (or (get 'url-extension-protocols 'schemes) - (let ((schemes '("info" "man" "rlogin" "telnet" + (let ((schemes '("info" "man" "telnet" "tn3270" "data" "snews"))) (mapc (lambda (d) (mapc (lambda (f) diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index c4a41f56b3..e4d1ca72a0 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -28,8 +28,6 @@ (require 'url-vars) (require 'url-parse) -;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? - (autoload 'socks-open-network-stream "socks") (defgroup url-gateway nil @@ -51,17 +49,20 @@ "What hostname to actually rlog into before doing a telnet." :type '(choice (const nil) string) :group 'url-gateway) +(make-obsolete-variable 'url-gateway-rlogin-host nil "29.1") (defcustom url-gateway-rlogin-user-name nil "Username to log into the remote machine with when using rlogin." :type '(choice (const nil) string) :group 'url-gateway) +(make-obsolete-variable 'url-gateway-rlogin-user-name nil "29.1") (defcustom url-gateway-rlogin-parameters '("telnet" "-8") "Parameters to `url-open-rlogin'. This list will be used as the parameter list given to rsh." :type '(repeat string) :group 'url-gateway) +(make-obsolete-variable 'url-gateway-rlogin-parameters nil "29.1") (defcustom url-gateway-telnet-host nil "What hostname to actually login to before doing a telnet." @@ -141,6 +142,7 @@ linked Emacs under SunOS 4.x." ;; Stolen from red gnus nntp.el (defun url-open-rlogin (name buffer host service) "Open a connection using rsh." + (declare (obsolete nil "29.1")) (if (not (stringp service)) (setq service (int-to-string service))) (let ((proc (if url-gateway-rlogin-user-name @@ -205,6 +207,9 @@ linked Emacs under SunOS 4.x." (delete-region (point) (point-max))) proc))) +(defvar url-gw-rlogin-obsolete-warned-once nil) +(make-obsolete-variable url-gw-rlogin-obsolete-warned-once nil "29.1") + ;;;###autoload (defun url-open-stream (name buffer host service &optional gateway-method) "Open a stream to HOST, possibly via a gateway. @@ -255,7 +260,11 @@ overriding the value of `url-gateway-method'." ('telnet (url-open-telnet name buffer host service)) ('rlogin - (url-open-rlogin name buffer host service)) + (unless url-gw-rlogin-obsolete-warned-once + (lwarn 'url :error "Setting `url-gateway-method' to `rlogin' is obsolete") + (setq url-gw-rlogin-obsolete-warned-once t)) + (with-suppressed-warnings ((obsolete url-open-rlogin)) + (url-open-rlogin name buffer host service))) (_ (error "Bad setting of url-gateway-method: %s" url-gateway-method)))))) diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el index 479f64c3e0..0c1f79a0c5 100644 --- a/lisp/url/url-misc.el +++ b/lisp/url/url-misc.el @@ -47,6 +47,9 @@ (error "Malformed url: %s" (url-recreate-url url))) nil)) +(defvar url-misc-rlogin-obsolete-warned-once nil) +(make-obsolete-variable url-misc-rlogin-obsolete-warned-once nil "29.1") + (defun url-do-terminal-emulator (type server port user) (switch-to-buffer (apply @@ -58,6 +61,9 @@ (t (error "Unknown terminal emulator required: %s" type))) nil (cond ((eq type 'rlogin) + (unless url-misc-rlogin-obsolete-warned-once + (lwarn 'url :error "Method `rlogin' is obsolete") + (setq url-misc-rlogin-obsolete-warned-once t)) (if user (list server "-l" user) (list server))) ((eq type 'telnet) (if port (list server port) (list server))) @@ -74,7 +80,7 @@ nil) ;;;###autoload -(defalias 'url-rlogin 'url-generic-emulator-loader) +(define-obsolete-function-alias 'url-rlogin #'url-generic-emulator-loader "29.1") ;;;###autoload (defalias 'url-telnet 'url-generic-emulator-loader) ;;;###autoload diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 859a5c75ed..4cdca05554 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -350,13 +350,11 @@ Should be a symbol specifying how to get a connection from the local machine. Currently supported methods: `telnet': Run telnet in a subprocess to connect; -`rlogin': Rlogin to another machine to connect; `socks': Connect through a socks server; `tls': Connect with TLS; `ssl': Connect with SSL (deprecated, use `tls' instead); `native': Connect directly." :type '(radio (const :tag "Telnet to gateway host" :value telnet) - (const :tag "Rlogin to gateway host" :value rlogin) (const :tag "Use SOCKS proxy" :value socks) (const :tag "Use SSL/TLS for all connections" :value tls) (const :tag "Use SSL for all connections (obsolete)" :value ssl) commit 64c1eff1b0ae7a9b3c0aece3f78d80fe5a6798b7 Merge: b0f4b48ebc f9f92772dc Author: Stefan Kangas Date: Sat Sep 3 06:30:27 2022 +0200 ; Merge from origin/emacs-28 The following commit was skipped: f9f92772dc ; Normalize email commit b0f4b48ebc09b2943c0b4a5b8db8196f855d0b01 Merge: 63ee620700 d89e65c638 Author: Stefan Kangas Date: Sat Sep 3 06:30:26 2022 +0200 Merge from origin/emacs-28 d89e65c638 Update acknowledgments commit f9f92772dcdab739db54cf03dad9037f4b53473d (refs/remotes/origin/emacs-28) Author: Stefan Kangas Date: Sat Sep 3 01:39:55 2022 +0200 ; Normalize email Don't merge to master. diff --git a/lisp/textmodes/etc-authors-mode.el b/lisp/textmodes/etc-authors-mode.el index 3912b829d2..a97f9f036a 100644 --- a/lisp/textmodes/etc-authors-mode.el +++ b/lisp/textmodes/etc-authors-mode.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2021-2022 Free Software Foundation, Inc. -;; Author: Stefan Kangas +;; Author: Stefan Kangas ;; Keywords: internal ;; This file is part of GNU Emacs. commit d89e65c6380d1b8805f2e0542489847bbb6bbb11 Author: Stefan Kangas Date: Sat Sep 3 01:37:09 2022 +0200 Update acknowledgments * doc/emacs/ack.texi (Acknowledgments): Update. * doc/emacs/emacs.texi (Acknowledgments): Add several names from Author: headers. diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index d0f2cc343b..52ce8a16e6 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -244,6 +244,11 @@ into Emacs. Theresa O'Connor wrote @file{json.el}, a file for parsing and generating JSON files. +@item +Andrea Corallo wrote the native compilation support in @file{comp.c} +and @file{comp.el}, for compiling Emacs Lisp to native code using +@samp{libgccjit}. + @item Georges Brun-Cottan and Stefan Monnier wrote @file{easy-mmode.el}, a package for easy definition of major and minor modes. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 2433001657..e9544d7b3a 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1409,23 +1409,23 @@ USA @c It's hard to update this fairly. @c I wonder if it would be better to drop it in favor of AUTHORS? -Contributors to GNU Emacs include Jari Aalto, Per Abrahamsen, Tomas +Contributors to GNU Emacs include Jari Aalto, Eric Abrahamsen, Per Abrahamsen, Tomas Abrahamsson, Jay K. Adams, Alon Albert, Michael Albinus, Nagy Andras, Benjamin Andresen, Ralf Angeli, Dmitry Antipov, Joe Arceneaux, Emil Åström, Miles Bader, David Bakhash, Juanma Barranquero, Eli Barzilay, Thomas Baumann, Steven L. Baur, Jay Belanger, Alexander L. Belikoff, -Thomas Bellman, Scott Bender, Boaz Ben-Zvi, Sergey Berezin, Stephen Berman, Karl +Thomas Bellman, Scott Bender, Boaz Ben-Zvi, Sergey Berezin, Stephen Berman, Jonas Bernoulli, Karl Berry, Anna M. Bigatti, Ray Blaak, Martin Blais, Jim Blandy, Johan Bockgård, Jan Böcker, Joel Boehland, Lennart Borgman, Per Bothner, Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin Broadey, Vincent Broman, Michael Brouwer, David M. Brown, Ken Brown, Stefan Bruda, -Daniel Colascione, +Damien Cassou, Daniel Colascione, Georges Brun-Cottan, Joe Buehler, Scott Byer, Włodek Bzyl, Tino Calancha, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chris Chase, Bob Chassell, Andrew Choi, Chong Yidong, Sacha Chua, Stewart Clamen, James -Clark, Mike Clarkson, Glynn Clements, Andrew Cohen, Daniel Colascione, +Clark, Mike Clarkson, Glynn Clements, Andrea Corallo, Andrew Cohen, Daniel Colascione, Christoph Conrad, Ludovic Courtès, Andrew Csillag, -Toby Cubitt, Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki +Toby Cubitt, Baoqiu Cui, Doug Cutting, Mathias Dahl, Yue Daian, Julien Danjou, Satyaki Das, Vivek Dasmohapatra, Dan Davison, Michael DeCorte, Gary Delp, Nachum Dershowitz, Dave Detlefs, Matthieu Devin, Christophe de Dinechin, Eri Ding, Jan Djärv, Lawrence R. Dodd, Carsten Dominik, Scott Draves, @@ -1433,36 +1433,36 @@ Benjamin Drieu, Viktor Dukhovni, Jacques Duthen, Dmitry Dzhus, John Eaton, Rolf Ebert, Carl Edman, David Edmondson, Paul Eggert, Stephen Eglen, Christian Egli, Torbjörn Einarsson, Tsugutomo Enami, David Engster, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick -Farnbach, Oscar Figueiredo, Fred Fish, Steve Fisk, Karl Fogel, Gary +Farnbach, Oscar Figueiredo, Fred Fish, Steve Fisk, Thomas Fitzsimmons, Karl Fogel, Gary Foster, Eric S. Fraga, Romain Francoise, Noah Friedman, Andreas Fuchs, Shigeru Fukaya, Xue Fuqiao, Hallvard Furuseth, Keith Gabryelski, Peter S. Galbraith, Kevin Gallagher, Fabián E. Gallina, Kevin Gallo, Juan León Lahoz García, Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David -Gillespie, Bob Glickstein, Deepak Goel, David De La Harpe Golden, Boris +Gillespie, Bob Glickstein, Nicolas Goaziou, Deepak Goel, David De La Harpe Golden, Boris Goldowsky, David Goodger, Chris Gray, Kevin Greiner, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann, Michael Gschwind, Bastien Guerry, Henry Guillaume, Dmitry Gutov, Doug Gwyn, Bruno Haible, Ken'ichi Handa, Lars Hansen, Chris Hanson, Jesper Harder, Alexandru Harsanyi, K. Shane Hartman, John Heidemann, Jon K. Hellan, Magnus Henoch, Markus Heritsch, Dirk -Herrmann, Karl Heuer, Manabu Higashida, Konrad Hinsen, Anders Holst, -Jeffrey C. Honig, Tassilo Horn, Kurt Hornik, Khaled Hosny, Tom Houlder, Joakim +Herrmann, Karl Heuer, Manabu Higashida, Konrad Hinsen, Torsten Hilbrich, Anders Holst, +Jeffrey C. Honig, Jürgen Hötzel, Tassilo Horn, Kurt Hornik, Khaled Hosny, Tom Houlder, Joakim Hove, Denis Howe, Lars Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Philip Jackson, Martyn Jago, Pavel Janik, Paul Jarc, Ulf Jasper, Thorsten Jolitz, Michael K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson, Alexandre Julliard, Arne Jørgensen, Tomoji Kagatani, -Brewster Kahle, Tokuya Kameshima, Lute Kamstra, Ivan Kanis, David +Brewster Kahle, Tokuya Kameshima, Lute Kamstra, Stefan Kangas, Ivan Kanis, David Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Taro Kawagishi, Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel Klíč, Shuhei Kobayashi, Pavel Kobyakov, Larry K. Kolodney, David M. Koppelman, Koseki Yoshinori, Robert Krawitz, Sebastian Kremer, -Ryszard Kubiak, Igor Kuzmin, David Kågedal, Daniel LaLiberte, Karl -Landstrom, Mario Lang, Aaron Larson, James R. Larus, Vinicius Jose +Ryszard Kubiak, Tak Kunihiro, Igor Kuzmin, David Kågedal, Daniel LaLiberte, Karl +Landstrom, Mario Lang, Aaron Larson, James R. Larus, Gemini Lasswell, Vinicius Jose Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Christian Limpach, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Juri Linkov, Francis Litterio, Sergey Litvinov, Leo Liu, Emilio C. Lopes, -Martin Lorentzon, Dave Love, Eric Ludlam, Károly Lőrentey, Sascha +Martin Lorentzson, Dave Love, Eric Ludlam, Károly Lőrentey, Sascha Lüdecke, Greg McGary, Roland McGrath, Michael McNamara, Alan Mackenzie, -Christopher J. Madsen, Neil M. Mager, Artur Malabarba, Ken Manheimer, Bill Mann, +Christopher J. Madsen, Neil M. Mager, Arni Magnusson, Artur Malabarba, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Yukihiro Matsumoto, Tomohiro Matsuyama, David Maus, Thomas May, Will Mengarini, David Megginson, Jimmy Aguilar Mena, Stefan Merten, Ben A. Mesander, Wayne Mesard, Brad @@ -1478,7 +1478,7 @@ Jeff Peck, Damon Anton Permezel, Tom Perrine, William M. Perry, Per Persson, Jens Petersen, Nicolas Petton, Daniel Pfeiffer, Justus Piater, Richard L. Pieri, Fred Pierresteguy, François Pinard, Daniel Pittman, Christian Plaunt, Alexander Pohoyda, David Ponce, Noam Postavsky, Francesco A. Potortì, -Michael D. Prange, Mukesh Prasad, Ken Raeburn, Marko Rahamaa, Ashwin +Michael D. Prange, Mukesh Prasad, Steve Purcell, Ken Raeburn, Marko Rahamaa, Ashwin Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, David Reitter, Alex Rezinsky, Rob Riepel, Lara Rios, Adrian Robert, Nick Roberts, Roland B. Roberts, John Robinson, Denis B. Roegel, Danny @@ -1492,7 +1492,7 @@ Rainer Schöpf, Raymond Scholz, Eric Schulte, Andreas Schwab, Randal Schwartz, Oliver Seidel, Manuel Serrano, Paul Sexton, Hovav Shacham, Stanislav Shalunov, Marc Shapiro, Richard Sharman, Olin Shivers, Tibor Šimko, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith, -David Smith, Paul D. Smith, Wilson Snyder, William Sommerfeld, Simon +David Smith, JD Smith, Paul D. Smith, Wilson Snyder, William Sommerfeld, Simon South, Andre Spiegel, Michael Staats, Thomas Steffen, Ulf Stegemann, Reiner Steib, Sam Steingold, Ake Stenhoff, Philipp Stephani, Peter Stephenson, Ken Stevens, Andy Stewart, Jonathan Stigelman, Martin Stjernholm, Kim F. commit 63ee620700b1d85f7069a0b0f4232815e5374b4c Author: Stefan Kangas Date: Thu Sep 1 11:04:21 2022 +0200 Make some versions in docs match package version * doc/emacs/misc.texi (Interactive Shell): Bump Emacs version. * doc/misc/ediff.texi: * doc/misc/flymake.texi: * doc/misc/viper.texi: Fix version to match package. * lisp/emulation/viper.el: Make version match variable. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index da1b87b48b..df74577592 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -936,7 +936,7 @@ Coding}. @cindex @env{INSIDE_EMACS} environment variable Emacs sets the environment variable @env{INSIDE_EMACS} in the subshell to @samp{@var{version},comint}, where @var{version} is the -Emacs version (e.g., @samp{24.1}). Programs can check this variable +Emacs version (e.g., @samp{28.1}). Programs can check this variable to determine whether they are running inside an Emacs subshell. @node Shell Mode diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index cbc7556aa8..23334479b0 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -50,7 +50,7 @@ modify this GNU manual.'' @titlepage @title Ediff User's Manual @sp 4 -@subtitle Ediff version 2.81.2 +@subtitle Ediff version 2.81.6 @sp 1 @subtitle November 2008 @sp 5 diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 953e4605e9..b4e7f3a41f 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -1,8 +1,8 @@ \input texinfo @c -*- mode: texinfo; coding: utf-8 -*- @comment %**start of header @setfilename ../../info/flymake.info -@set VERSION 1.2 -@set UPDATED September 2021 +@set VERSION 1.2.2 +@set UPDATED November 2021 @settitle GNU Flymake @value{VERSION} @include docstyle.texi @syncodeindex pg cp diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 0703667ecc..7b91f887bb 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -34,7 +34,7 @@ modify this GNU manual.'' @titlepage @title Viper Is a Package for Emacs Rebels @subtitle a Vi emulator for Emacs -@subtitle November 2008, Viper Version 3.11.2 +@subtitle July 2013, Viper Version 3.14.2 @author Michael Kifer (Viper) @author Aamod Sane (VIP 4.4) commit 3e4e779fb1ae6a2da19e1e990a80ae86076f3bf3 Merge: e96acb1007 80c5327195 Author: Stefan Kangas Date: Fri Sep 2 23:57:18 2022 +0200 ; Merge from origin/emacs-28 The following commit was skipped: 80c5327195 Make some versions in docs match package version commit e96acb1007f12629201d4bb241d723dde863612e Merge: d0a66f3e0e 917da2641e Author: Stefan Kangas Date: Fri Sep 2 23:57:18 2022 +0200 Merge from origin/emacs-28 917da2641e Minor doc fix; improve sorting of VC backends 89695bce3e Clarify the doc string of 'set-face-attribute' commit d0a66f3e0e668d8c12c54436740c62f8e238a664 Author: Gregory Heytings Date: Fri Sep 2 20:27:59 2022 +0000 Display a warning for some uses of nil in face attributes. * src/xfaces.c (HANDLE_INVALID_NIL_VALUE): New macro, which displays a warning for invalid uses of nil as a face attribute value. (Finternal_set_lisp_face_attribute): Use the macro for the attributes :foreground, :distant-foreground and :background. diff --git a/src/xfaces.c b/src/xfaces.c index 70d5cbeb4c..5e3a47d7f8 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3052,6 +3052,15 @@ The value is TO. */) } +#define HANDLE_INVALID_NIL_VALUE(A,F) \ + if (NILP (value)) \ + { \ + add_to_log ("Warning: setting attribute `%s' of face `%s': nil " \ + "value is invalid, use `unspecified' instead.", A, F); \ + /* Compatibility with 20.x. */ \ + value = Qunspecified; \ + } + DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute, Sinternal_set_lisp_face_attribute, 3, 4, 0, doc: /* Set attribute ATTR of FACE to VALUE. @@ -3390,9 +3399,7 @@ FRAME 0 means change the face on all frames, and change the default } else if (EQ (attr, QCforeground)) { - /* Compatibility with 20.x. */ - if (NILP (value)) - value = Qunspecified; + HANDLE_INVALID_NIL_VALUE (QCforeground, face); if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) && !RESET_P (value)) @@ -3409,9 +3416,7 @@ FRAME 0 means change the face on all frames, and change the default } else if (EQ (attr, QCdistant_foreground)) { - /* Compatibility with 20.x. */ - if (NILP (value)) - value = Qunspecified; + HANDLE_INVALID_NIL_VALUE (QCdistant_foreground, face); if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) && !RESET_P (value)) @@ -3428,9 +3433,7 @@ FRAME 0 means change the face on all frames, and change the default } else if (EQ (attr, QCbackground)) { - /* Compatibility with 20.x. */ - if (NILP (value)) - value = Qunspecified; + HANDLE_INVALID_NIL_VALUE (QCbackground, face); if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) && !RESET_P (value)) commit c12838c73ef161850a081f9ccea6e375b7c2f93b Author: Stefan Monnier Date: Fri Sep 2 09:54:13 2022 -0400 * lisp/help-fns.el: Minor fixes (describe-mode--minor-modes): Don't burp on minor modes that lack a docstring. (describe-mode--minor-modes): Simplify eta-redex. (find-lisp-object-file-name): Use `autoload-file`. (help-fns--describe-function-or-command-prompt): Allow the user to insist on choosing a function even if it appears not to exist. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 1ccf9bb428..88e553c1a0 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -229,7 +229,7 @@ interactive command." (lambda (f) (if want-command (commandp f) (or (fboundp f) (get f 'function-documentation)))) - t nil nil + 'confirm nil nil (and fn (symbol-name fn))))) (unless (equal val "") (setq fn (intern val))) @@ -424,7 +424,7 @@ If ALSO-C-SOURCE is non-nil, instead of returning `C-source', this function will attempt to locate the definition of OBJECT in the C sources, too." (let* ((autoloaded (autoloadp type)) - (file-name (or (and autoloaded (nth 1 type)) + (file-name (or (and autoloaded (autoload-file type)) (symbol-file ;; FIXME: Why do we have this weird "If TYPE is the ;; value returned by `symbol-function' for a function @@ -2179,8 +2179,7 @@ documentation for the major and minor modes of that buffer." ;; Document the minor modes fully. (insert (buttonize (propertize pretty-minor-mode 'help-minor-mode mode) - (lambda (mode) - (describe-function mode)) + #'describe-function mode)) (let ((indicator (format-mode-line (assq mode minor-mode-alist)))) @@ -2189,7 +2188,8 @@ documentation for the major and minor modes of that buffer." "no indicator" (format "indicator%s" indicator))))) - (insert (help-split-fundoc (documentation mode) nil 'doc))))) + (insert (or (help-split-fundoc (documentation mode) nil 'doc) + "No docstring"))))) (forward-line -1) (fill-paragraph nil) (forward-paragraph 1) commit 513c5d827decf474f923f6f66abd2ed62e0e64f0 Author: Robert Pluim Date: Fri Sep 2 15:09:48 2022 +0200 Use `format-prompt' in `describe-char-fold-equivalences' * lisp/char-fold.el (describe-char-fold-equivalences): Use `format-prompt'. diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 2ac4cb0543..43e3cd45ec 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -439,7 +439,9 @@ non-nil, means also include partially matching ligatures and non-canonical equivalences." (interactive (list (ignore-errors (read-char-by-name - "Unicode name, single char, or hex, default all: " t)) + (format-prompt "Unicode name, single char, or hex" + "all") + t)) current-prefix-arg)) (require 'help-fns) (let ((help-buffer-under-preparation t)) commit 965ebf3484bf8ec39d0ee34f4040071fe3e5e04a Author: Lars Ingebrigtsen Date: Fri Sep 2 14:58:30 2022 +0200 Fix define-minor-mode :keymap obsoletion warning * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix some warning. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a1398bd12e..7d54a84687 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -419,7 +419,10 @@ No problems result if this variable is not bound. (cond ((keymapp m) m) ;; FIXME: `easy-mmode-define-keymap' is obsolete, ;; so this form should also be obsolete somehow. - ((listp m) (easy-mmode-define-keymap m)) + ((listp m) + (with-suppressed-warnings ((obsolete + easy-mmode-define-keymap)) + (easy-mmode-define-keymap m))) (t (error "Invalid keymap %S" m)))) ,(format "Keymap for `%s'." mode-name))) commit 99bf269ca035aeb99116a075d5bd42cf6dc1feb1 Author: Stefan Kangas Date: Fri Sep 2 14:51:27 2022 +0200 Make minibuffer-eldef-shorten-default obsolete * lisp/minibuf-eldef.el (minibuffer-eldef-shorten-default): Make variable obsolete in favor of 'minibuffer-default-prompt-format'. * doc/emacs/mini.texi (Basic Minibuffer): Delete above obsolete variable (bug#50935). diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index e71d653210..90e50a41d5 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -58,12 +58,8 @@ the default argument is shown with the user option Emacs hides the default argument as soon as you modify the contents of the minibuffer (since typing @key{RET} would no longer submit that default). If you ever bring back the original minibuffer text, the -prompt again shows the default. Furthermore, if you change the -variable @code{minibuffer-eldef-shorten-default} to a non-@code{nil} -value, the default argument is displayed as @samp{[@var{default-arg}]} -instead of @samp{(default @var{default-arg})}, saving some screen -space. To enable this minor mode, type @kbd{M-x -minibuffer-electric-default-mode}. +prompt again shows the default. To enable this minor mode, type +@kbd{M-x minibuffer-electric-default-mode}. Since the minibuffer appears in the echo area, it can conflict with other uses of the echo area. If an error message or an informative diff --git a/etc/NEWS b/etc/NEWS index 1512d45fdc..5feef9aa63 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -109,6 +109,12 @@ files when the Emacs session which locked it crashes, or was otherwise interrupted, and didn't exit gracefully. See the "(emacs) Saving Emacs Sessions" node in the Emacs manual for more details. +** Miscellaneous + ++++ +*** User option 'minibuffer-eldef-shorten-default' is now obsolete. +Customize the user option 'minibuffer-default-prompt-format' instead. + * Startup Changes in Emacs 29.1 diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el index 3f04a3e921..ba7e68eb81 100644 --- a/lisp/minibuf-eldef.el +++ b/lisp/minibuf-eldef.el @@ -64,6 +64,8 @@ :type 'boolean :group 'minibuffer :version "24.3") +(make-obsolete-variable 'minibuffer-eldef-shorten-default + 'minibuffer-default-prompt-format "29.1") (defvar minibuffer-default-in-prompt-regexps (minibuffer-default--in-prompt-regexps) commit 9474ac1b61935b198a2cf252e7b0ec9cfa70344e Author: Lars Ingebrigtsen Date: Fri Sep 2 14:23:15 2022 +0200 Default show-paren-mode to off in special-mode buffers * doc/emacs/programs.texi (Matching): Mention the new user option. * doc/misc/efaq.texi (Matching parentheses): Adjust text to the current state of affairs. * lisp/paren.el (show-paren-function): New user option (bug#50894). (show-paren-mode): Mention it. (show-paren-function): Use it. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 795aabee74..b87c659483 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -834,10 +834,16 @@ of automatic matching. Whenever point is before an opening delimiter or after a closing delimiter, the delimiter, its matching delimiter, and optionally the text between them are highlighted. To toggle Show Paren mode globally, type @kbd{M-x show-paren-mode}. To toggle it -only in the current buffer, type @kbd{M-x show-paren-local-mode}. To -customize it, type @w{@kbd{M-x customize-group @key{RET} paren-showing}}. -The customizable options which control the operation of this mode -include: +only in the current buffer, type @kbd{M-x show-paren-local-mode}. + +@vindex show-paren-predicate + By default, this mode is switched on in all buffers that are meant +for editing, but is not enabled in buffers that show data. This is +controlled by the @code{show-paren-predicate} user option. + + To customize the mode, type @w{@kbd{M-x customize-group @key{RET} +paren-showing}}. The customizable options which control the operation +of this mode include: @itemize @bullet @item diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 43fa005434..8ec23a529d 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -2364,16 +2364,7 @@ new paragraph. There are many packages available to deal with this @cindex Pairs of parentheses, highlighting @cindex Matching parentheses -Call @code{show-paren-mode} in your init file (@pxref{Setting up a -customization file}): - -@lisp -(show-paren-mode 1) -@end lisp - -You can also enable this mode by selecting the @samp{Paren Match -Highlighting} option from the @samp{Options} menu of the Emacs menu bar -at the top of any Emacs frame. +By default, @code{show-paren-mode} is enabled in all editing buffers. Alternatives to this mode include: diff --git a/etc/NEWS b/etc/NEWS index 89f4cd0ac7..1512d45fdc 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -162,6 +162,17 @@ of 'user-emacs-directory'. * Incompatible changes in Emacs 29.1 +--- +*** 'show-paren-mode' is now disabled in 'special-mode' buffers. +In Emacs versions previous to Emacs 28.1, 'show-paren-mode' defaulted +off. In Emacs 28.1, the mode was switched on in all buffers. In +Emacs 29.1, this was changed to be switched on in all editing-related +buffers, but not in buffers that inherit from 'special-mode'. To get +back to how things worked in Emacs 28.1, put the following in your +init file: + + (setopt show-paren-predicate t) + +++ *** Explicitly-set read-only state is preserved when reverting a buffer. If you use the 'C-x C-q' command to change the read-only state of the diff --git a/lisp/paren.el b/lisp/paren.el index d7580de9a9..13e219c8f6 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -118,6 +118,14 @@ On non-graphical frames, the context is shown in the echo area." (let ((ol (make-overlay (point) (point) nil t))) (delete-overlay ol) ol) "Overlay used to highlight the paren at point.") +(defcustom show-paren-predicate '(not (derived-mode . special-mode)) + "Whether to use `show-paren-mode' in a buffer. +The default is to enable the mode in all buffers that have don't +derive from `special-mode', which means that it's on (by default) +in all editing buffers." + :type 'sexp + :safe #'booleanp + :version "29.1") ;;;###autoload (define-minor-mode show-paren-mode @@ -126,6 +134,9 @@ On non-graphical frames, the context is shown in the echo area." When enabled, any matching parenthesis is highlighted in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time. +Also see `show-paren-predicate', which controls which buffers +this mode is enabled in. + This is a global minor mode. To toggle the mode in a single buffer, use `show-paren-local-mode'." :global t :group 'paren-showing @@ -414,7 +425,13 @@ It is the default value of `show-paren-data-function'." (defun show-paren-function () "Highlight the parentheses until the next input arrives." - (let ((data (and show-paren-mode (funcall show-paren-data-function)))) + (let ((data (and show-paren-mode + ;; If we're using `show-paren-local-mode', then + ;; always heed the value. + (or (local-variable-p 'show-paren-mode) + ;; If not, check that the predicate matches. + (buffer-match-p show-paren-predicate (current-buffer))) + (funcall show-paren-data-function)))) (if (not data) (progn ;; If show-paren-mode is nil in this buffer or if not at a paren that commit 3de942542a2618100de13554aaf05a8158017fef Author: Lars Ingebrigtsen Date: Fri Sep 2 13:34:55 2022 +0200 Clean up ispell "look"-related variables * lisp/textmodes/ispell.el (ispell-look-p): Make obsolete. (ispell-lookup-words): Look up the look command at run time instead (bug#50852). (ispell-have-new-look): Make obsolete. (ispell-look-options): Adjust. Apparently the version of "look" that had a "-r" (regexp interface) never took off -- it's not present in GNU/Linux or Macos, at least, as far as we can tell. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 8e63368809..4b5ed98ecc 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -262,12 +262,14 @@ This must be an absolute file name." "Non-nil means use `look' rather than `grep'. Default is based on whether `look' seems to be available." :type 'boolean) +(make-obsolete-variable 'ispell-look-p nil "29.1") (defcustom ispell-have-new-look nil "Non-nil means use the `-r' option (regexp) when running `look'." :type 'boolean) +(make-obsolete-variable 'ispell-have-new-look nil "29.1") -(defcustom ispell-look-options (if ispell-have-new-look "-dfr" "-df") +(defcustom ispell-look-options "-df" "String of command options for `ispell-look-command'." :type 'string) @@ -2519,8 +2521,10 @@ if defined." (let* ((process-connection-type ispell-use-ptys-p) (wild-p (string-search "*" word)) - (look-p (and ispell-look-p ; Only use look for an exact match. - (or ispell-have-new-look (not wild-p)))) + (look-p (and ispell-look-command + (file-exists-p ispell-look-command) + ;; Only use look for an exact match. + (not wild-p))) (prog (if look-p ispell-look-command ispell-grep-command)) (args (if look-p ispell-look-options ispell-grep-options)) status results loc) commit f84c45054ab560ad373c58cd48f43cc582c125ca Author: Lars Ingebrigtsen Date: Fri Sep 2 12:09:18 2022 +0200 Fix quotes in mailcap-add-mailcap-entry doc string * lisp/net/mailcap.el (mailcap-add-mailcap-entry): Fix usage of quotes. diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index 1fa4130339..fd244a97b1 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -722,11 +722,11 @@ MAJOR and MINOR should be strings. MINOR is treated as a regexp in later lookups, and, therefore, you may need to escape it appropriately. -The format of INFO is described in ‘mailcap-mime-data’. +The format of INFO is described in `mailcap-mime-data'. STORAGE should be a symbol refering to a variable. The value of -this variable should have the same format as ‘mailcap-mime-data’. -STORAGE defaults to ‘mailcap--computed-mime-data’. +this variable should have the same format as `mailcap-mime-data'. +STORAGE defaults to `mailcap--computed-mime-data'. None of this is enforced." (let* ((storage (or storage 'mailcap--computed-mime-data)) commit 1a2b3fde44d0e1934e5d5909195614b8cacb8ecb Author: Felix Dietrich Date: Sun Mar 6 20:41:41 2022 +0100 Restructure ‘mailcap-add-mailcap-entry’ * lisp/net/mailcap.el (mailcap-add-mailcap-entry): Restructure mailcap-add-mailcap-entry to improve readability. diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index 469643dbca..1fa4130339 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -716,27 +716,43 @@ to supply to the test." result)))) (defun mailcap-add-mailcap-entry (major minor info &optional storage) + "Add handler INFO for mime type MAJOR/MINOR to STORAGE. + +MAJOR and MINOR should be strings. MINOR is treated as a regexp +in later lookups, and, therefore, you may need to escape it +appropriately. + +The format of INFO is described in ‘mailcap-mime-data’. + +STORAGE should be a symbol refering to a variable. The value of +this variable should have the same format as ‘mailcap-mime-data’. +STORAGE defaults to ‘mailcap--computed-mime-data’. + +None of this is enforced." (let* ((storage (or storage 'mailcap--computed-mime-data)) - (old-major (assoc major (symbol-value storage)))) - (if (null old-major) ; New major area - (set storage - (cons (cons major (list (cons minor info))) - (symbol-value storage))) - (let ((cur-minor (assoc minor old-major))) - (cond - ((or (null cur-minor) ; New minor area, or - (assq 'test info)) ; Has a test, insert at beginning - (setcdr old-major - (cons (cons minor info) (cdr old-major)))) - ((and (not (assq 'test info)) ; No test info, replace completely - (not (assq 'test cur-minor)) - (equal (assq 'viewer info) ; Keep alternative viewer - (assq 'viewer cur-minor))) - (setcdr cur-minor info)) - (t - (setcdr old-major - (setcdr old-major - (cons (cons minor info) (cdr old-major)))))))))) + (major-entry (assoc major (symbol-value storage))) + (new-minor-entry (cons minor info)) + minor-entry) + (cond + ((null major-entry) + ;; Add a new major entry containing the new minor entry. + (setf major-entry (list major new-minor-entry)) + (push major-entry (symbol-value storage))) + ((and (setf minor-entry (assoc minor major-entry)) + (not (assq 'test info)) + (not (assq 'test minor-entry)) + (equal (assq 'viewer info) + (assq 'viewer minor-entry))) + ;; Replace a previous MINOR entry if it and the entry to be + ;; added both do *not* have a ‘test’ associated in their info + ;; alist and both use the same ‘viewer’ command. This ignores + ;; other fields in the previous entryʼs info alist: they will be + ;; lost when the info alist in the cdr of the previous entry is + ;; replaced with the new INFO alist. + (setf (cdr minor-entry) info)) + (t + ;; Add the new minor entry to the existing major entry. + (push new-minor-entry (cdr major-entry)))))) (defun mailcap-add (type viewer &optional test) "Add VIEWER as a handler for TYPE. commit 81f8bb7ae5d95b19a87904cedbfd3674720cb312 Author: Felix Dietrich Date: Mon Mar 14 14:01:26 2022 +0100 Add tests for ‘mailcap-add-mailcap-entry’ * test/lisp/net/mailcap-tests.el: Add tests for ‘mailcap-add-mailcap-entry’ diff --git a/test/lisp/net/mailcap-tests.el b/test/lisp/net/mailcap-tests.el index 188706fc86..c4f011dd1a 100644 --- a/test/lisp/net/mailcap-tests.el +++ b/test/lisp/net/mailcap-tests.el @@ -133,4 +133,409 @@ (mailcap-view-file (ert-resource-file "test.test"))) (should mailcap--test-result)))) + + +(ert-deftest mailcap-add-mailcap-entry-new-major () + "Add a major entry not yet in ‘mailcap-mime-data’." + (let ((mailcap-mime-data)) + + ;; Add a new major entry to a empty ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major1" "minor1" + (list (cons 'viewer "viewer1")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major1" + ("minor1" . ((viewer . "viewer1"))))))) + + ;; Add a new major entry to a non-empty ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major2" "minor2" + (list (cons 'viewer "viewer2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major2" + ("minor2" . ((viewer . "viewer2")))) + ("major1" + ("minor1" . ((viewer . "viewer1")))))))) + + ;; Same spiel but with extra entries in INFO. + (let ((mailcap-mime-data)) + ;; Add a new major entry to an empty ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major1" "minor1" + (list (cons 'viewer "viewer1") + (cons 'print "print1")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major1" + ("minor1" . ((viewer . "viewer1") + (print . "print1"))))))) + + ;; Add a new major entry to a non-empty ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major2" "minor2" + (list (cons 'viewer "viewer2") + (cons 'print "print2") + (cons 'compose "compose2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major2" + ("minor2" . ((viewer . "viewer2") + (print . "print2") + (compose . "compose2")))) + ("major1" + ("minor1" . ((viewer . "viewer1") + (print . "print1"))))))))) + + +(ert-deftest mailcap-add-mailcap-entry-new-minor-to-empty-major () + "Add a minor entry to a an empty major entry." + (let ((mailcap-mime-data (list (list "major")))) + (mailcap-add-mailcap-entry "major" "minor1" + (list (cons 'viewer "viewer1") + (cons 'print "print1")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor1" . ((viewer . "viewer1") + (print . "print1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-new-minor-to-non-empty-major () + "Add a minor to a major entry containing already minor entries." + (let ((mailcap-mime-data + (list + (list "major" + (list "minor1" + (cons 'viewer "viewer1") + (cons 'test "test1") + (cons 'print "print1")))))) + + (mailcap-add-mailcap-entry "major" "minor2" + (list (cons 'viewer "viewer2") + (cons 'test "test2") + (cons 'print "print2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor2" . ((viewer . "viewer2") + (test . "test2") + (print . "print2"))) + ("minor1" . ((viewer . "viewer1") + (test . "test1") + (print . "print1"))))))) + + (mailcap-add-mailcap-entry "major" "minor3" + (list (cons 'viewer "viewer3") + (cons 'test "test3") + (cons 'compose "compose3")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor3" . ((viewer . "viewer3") + (test . "test3") + (compose . "compose3"))) + ("minor2" . ((viewer . "viewer2") + (test . "test2") + (print . "print2"))) + ("minor1" . ((viewer . "viewer1") + (test . "test1") + (print . "print1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-new-minor-to-various-major-positions () + "Add a new minor entry to major entries at various postions +in ‘mailcap-mime-data’." + (let ((mailcap-mime-data + (list + (list "major1" + (list "minor1.1" + (cons 'viewer "viewer1.1") + (cons 'print "print1.1"))) + (list "major2" + (list "minor2.1" + (cons 'viewer "viewer2.1") + (cons 'print "print2.1") + (cons 'compose "compose2.1"))) + (list "major3" + (list "minor3.1" + (cons 'viewer "viewer3.1") + (cons 'compose "compose3.1"))) + (list "major4" + (list "minor4.1" + (cons 'viewer "viewer4.1") + (cons 'edit "edit4.1")))))) + + ;; Add a minor entry to a major mode at the front of + ;; ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major1" "minor1.2" + (list (cons 'viewer "viewer1.2") + (cons 'test "test1.2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major1" + ("minor1.2" . ((viewer . "viewer1.2") + (test . "test1.2"))) + ("minor1.1" . ((viewer . "viewer1.1") + (print . "print1.1")))) + ("major2" + ("minor2.1" . ((viewer . "viewer2.1") + (print . "print2.1") + (compose . "compose2.1")))) + ("major3" + ("minor3.1" . ((viewer . "viewer3.1") + (compose . "compose3.1")))) + ("major4" + ("minor4.1" . ((viewer . "viewer4.1") + (edit . "edit4.1"))))))) + + ;; Add a minor entry to a major mode in the middle of + ;; ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major3" "minor3.2" + (list (cons 'viewer "viewer3.2") + (cons 'test "test3.2") + (cons 'compose "compose3.2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major1" + ("minor1.2" . ((viewer . "viewer1.2") + (test . "test1.2"))) + ("minor1.1" . ((viewer . "viewer1.1") + (print . "print1.1")))) + ("major2" + ("minor2.1" . ((viewer . "viewer2.1") + (print . "print2.1") + (compose . "compose2.1")))) + ("major3" + ("minor3.2" . ((viewer . "viewer3.2") + (test . "test3.2") + (compose . "compose3.2"))) + ("minor3.1" . ((viewer . "viewer3.1") + (compose . "compose3.1")))) + ("major4" + ("minor4.1" . ((viewer . "viewer4.1") + (edit . "edit4.1"))))))) + + ;; Add a minor entry to a major mode at the end of + ;; ‘mailcap-mime-data’. + (mailcap-add-mailcap-entry "major4" "minor4.2" + (list (cons 'viewer "viewer4.2") + (cons 'test "test4.2") + (cons 'print "print4.2") + (cons 'compose "compose4.2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major1" + ("minor1.2" . ((viewer . "viewer1.2") + (test . "test1.2"))) + ("minor1.1" . ((viewer . "viewer1.1") + (print . "print1.1")))) + ("major2" + ("minor2.1" . ((viewer . "viewer2.1") + (print . "print2.1") + (compose . "compose2.1")))) + ("major3" + ("minor3.2" . ((viewer . "viewer3.2") + (test . "test3.2") + (compose . "compose3.2"))) + ("minor3.1" . ((viewer . "viewer3.1") + (compose . "compose3.1")))) + ("major4" + ("minor4.2" . ((viewer . "viewer4.2") + (test . "test4.2") + (print . "print4.2") + (compose . "compose4.2"))) + ("minor4.1" . ((viewer . "viewer4.1") + (edit . "edit4.1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-existing-with-test-differing-viewer () + "Add a new entry for an already existing major/minor entry." + + ;; The new and the existing entry have each a test info field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer1") + (cons 'test "test1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer2") + (cons 'test "test2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer2") + (test . "test2"))) + ("minor" . ((viewer . "viewer1") + (test . "test1") + (print . "print1")))))))) + + ;; Only the new entry has a test info field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer2") + (cons 'test "test2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer2") + (test . "test2"))) + ("minor" . ((viewer . "viewer1") + (print . "print1")))))))) + + ;; Only the existing entry has a test info field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer1") + (cons 'test "test1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer2"))) + ("minor" . ((viewer . "viewer1") + (test . "test1") + (print . "print1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-existing-with-test-same-viewer () + "Add a new entry for an already existing major/minor entry." + ;; Both the new and the existing entry have each a test info field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer") + (cons 'test "test1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer") + (cons 'test "test2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer") + (test . "test2"))) + ("minor" . ((viewer . "viewer") + (test . "test1") + (print . "print1")))))))) + + ;; Only the new entry has a test field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer") + (cons 'test "test2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer") + (test . "test2"))) + ("minor" . ((viewer . "viewer") + (print . "print1")))))))) + + ;; Only the existing entry has a test info field. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer") + (cons 'test "test1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer"))) + ("minor" . ((viewer . "viewer") + (test . "test1") + (print . "print1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-existing-without-test-differing-viewer () + "Add a new entry for an already existing major/minor entry." + ;; Both entries do not have test fields. + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer1") + (cons 'print "print1")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer2") + (cons 'compose "print2")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer2") + (compose . "print2"))) + ("minor" . ((viewer . "viewer1") + (print . "print1"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-simple-merge () + "Merge entries without tests (no extra info fields in the existing entry)." + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer")) + 'mailcap-mime-data) + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer")))))))) + + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer") + (cons 'print "print")) + 'mailcap-mime-data) + + (should (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer") + (print . "print"))))))))) + +(ert-deftest mailcap-add-mailcap-entry-erroneous-merge () + "Merge entries without tests (extra info fields in existing entry). + +In its current implementation ‘mailcap-add-mailcap-entry’ loses +extra fields of an entry already existing in ‘mailcap-mime-data’. +This test does not actually verify a correct result; it merely +checks whether ‘mailcap-add-mailcap-entry’ behaviour is still the +incorrect one. As such, it can be satisfied by any other result +than the expected and known wrong one, and its success does not +help to verify the correct addition and merging of an entry." + :expected-result :failed + + (let ((mailcap-mime-data + (list + (list "major" + (list "minor" + (cons 'viewer "viewer") + (cons 'print "print")))))) + (mailcap-add-mailcap-entry "major" "minor" + (list (cons 'viewer "viewer") + (cons 'edit "edit")) + 'mailcap-mime-data) + ;; Has the print field been lost? + (should-not (equal mailcap-mime-data + '(("major" + ("minor" . ((viewer . "viewer") + (edit . "edit"))))))))) + + ;;; mailcap-tests.el ends here commit 865338150eabb5d221cffc79f549a87c26c4ec68 Author: Robert Pluim Date: Fri Sep 2 11:15:43 2022 +0200 Use frame-monitor-attributes in gamegrid * lisp/play/gamegrid.el (gamegrid-calculate-glyph-size): Use `frame-monitor-attributes' to get the frame attributes directly instead of iterating over `display-monitor-attributes-list'. diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 8cff67c5bc..4e4982e7b0 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -80,12 +80,8 @@ directory will be used.") (defun gamegrid-calculate-glyph-size () "Calculate appropriate glyph size in pixels based on display resolution. Return a multiple of 8 no less than 16." - (let (atts + (let ((atts (frame-monitor-attributes)) y-pitch) - (dolist (mon (display-monitor-attributes-list)) - (when-let ((frames (alist-get 'frames mon)) - (match (memq (selected-frame) frames))) - (setq atts mon))) (setq y-pitch (cond (atts (/ (nth 4 (assq 'geometry atts)) commit 2ff57638365411904e76979ef628534098ce3549 Author: Po Lu Date: Fri Sep 2 17:19:29 2022 +0800 Prevent crashes when embedding Emacs in a nonexistent parent * src/xfns.c (x_window, Fx_create_frame): Handle X errors while trying to reparent the frame onto an explicitly specified parent. * src/xterm.c (handle_one_xevent): Handle unparenting embedded windows correctly. This only works if the embedder is aware of the fixes extension and has put the window into the right save set. (x_embed_frame): New function. * src/xterm.h (FRAME_X_EMBEDDED_P): Fix coding style. diff --git a/src/xfns.c b/src/xfns.c index 0b1f707e9f..2da1e7bcf8 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3955,10 +3955,6 @@ x_window (struct frame *f, long window_prompting) XtManageChild (pane_widget); XtRealizeWidget (shell_widget); - if (FRAME_X_EMBEDDED_P (f)) - XReparentWindow (FRAME_X_DISPLAY (f), XtWindow (shell_widget), - f->output_data.x->parent_desc, 0, 0); - FRAME_X_WINDOW (f) = XtWindow (frame_widget); initial_set_up_x_back_buffer (f); validate_x_resource_name (); @@ -4132,7 +4128,7 @@ x_window (struct frame *f) block_input (); FRAME_X_WINDOW (f) = XCreateWindow (FRAME_X_DISPLAY (f), - f->output_data.x->parent_desc, + FRAME_DISPLAY_INFO (f)->root_window, f->left_pos, f->top_pos, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f), @@ -4958,6 +4954,12 @@ This function is an internal primitive--use `make-frame' instead. */) x_window (f); #endif +#ifndef USE_GTK + if (FRAME_X_EMBEDDED_P (f) + && !x_embed_frame (dpyinfo, f)) + error ("The frame could not be embedded; does the embedder exist?"); +#endif + x_icon (f, parms); x_make_gc (f); diff --git a/src/xterm.c b/src/xterm.c index 71b84f8174..138fa7ea6c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18416,6 +18416,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = x_top_window_to_frame (dpyinfo, event->xreparent.window); if (f) { +#ifndef USE_GTK + if (FRAME_OUTPUT_DATA (f)->parent_desc + && FRAME_X_EMBEDDED_P (f)) + { + /* The frame's embedder was destroyed; mark the frame as + no longer embedded, and map the frame. An + UnmapNotify event must have previously been received + during the start of save-set processing. */ + + FRAME_X_OUTPUT (f)->explicit_parent = false; + x_make_frame_visible (f); + } +#endif + /* Maybe we shouldn't set this for child frames ?? */ f->output_data.x->parent_desc = event->xreparent.parent; @@ -27456,6 +27470,31 @@ x_get_atom_name (struct x_display_info *dpyinfo, Atom atom, return value; } +#ifndef USE_GTK + +/* Set up XEmbed for F, and change its save set to handle the parent + being destroyed. */ + +bool +x_embed_frame (struct x_display_info *dpyinfo, struct frame *f) +{ + bool rc; + + x_catch_errors (dpyinfo->display); + /* Catch errors; the target window might no longer exist. */ + XReparentWindow (dpyinfo->display, FRAME_OUTER_WINDOW (f), + FRAME_OUTPUT_DATA (f)->parent_desc, 0, 0); + rc = x_had_errors_p (dpyinfo->display); + x_uncatch_errors_after_check (); + + if (rc) + return false; + + return true; +} + +#endif + /* Setting window manager hints. */ diff --git a/src/xterm.h b/src/xterm.h index a0ae3a330a..7c5a889af3 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1209,7 +1209,6 @@ enum FOCUS_EXPLICIT = 2 }; - /* Return the X output data for frame F. */ #define FRAME_X_OUTPUT(f) ((f)->output_data.x) #define FRAME_OUTPUT_DATA(f) FRAME_X_OUTPUT (f) @@ -1588,6 +1587,7 @@ extern void x_wm_set_size_hint (struct frame *, long, bool); && defined HAVE_CLOCK_GETTIME extern void x_sync_init_fences (struct frame *); #endif +extern bool x_embed_frame (struct x_display_info *, struct frame *); extern void x_delete_terminal (struct terminal *); extern Cursor x_create_font_cursor (struct x_display_info *, int); @@ -1827,7 +1827,7 @@ extern void mark_xterm (void); /* Is the frame embedded into another application? */ -#define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT(f)->explicit_parent != 0) +#define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT (f)->explicit_parent != 0) #define STORE_NATIVE_RECT(nr,rx,ry,rwidth,rheight) \ ((nr).x = (rx), \ commit 0ec831b91cde2a0e1b65f99c1190975c6e6959f9 Author: Robert Pluim Date: Thu Sep 1 18:10:58 2022 +0200 Make single char entry easier for `describe-char-fold-equivalences' * lisp/char-fold.el (describe-char-fold-equivalences): Improve docstring. Pass t for 'allow-single' arg in call to `read-char-by-name' so that single characters can be entered directly. diff --git a/lisp/char-fold.el b/lisp/char-fold.el index b2002826f7..2ac4cb0543 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -431,15 +431,15 @@ BOUND NOERROR COUNT are passed to `re-search-backward'." ;;;###autoload (defun describe-char-fold-equivalences (char &optional lax) "Display characters equivalent to CHAR under character-folding. -Prompt for CHAR (using `read-char-by-name', which see for how can -you specify the character). With no input, i.e. when CHAR is nil, +Prompt for CHAR (using `read-char-by-name', which see for how to +specify the character). With no input, i.e. when CHAR is nil, describe all available character equivalences of `char-fold-to-regexp'. Optional argument LAX (interactively, the prefix argument), if non-nil, means also include partially matching ligatures and non-canonical equivalences." (interactive (list (ignore-errors (read-char-by-name - "Character (Unicode name or hex, default all): ")) + "Unicode name, single char, or hex, default all: " t)) current-prefix-arg)) (require 'help-fns) (let ((help-buffer-under-preparation t)) commit b1c08a9581d2a0efcda3dae8d3bd90f5382d82d7 Author: Robert Pluim Date: Thu Sep 1 17:59:10 2022 +0200 Allow easy entry of single chars in `read-char-by-name' * lisp/international/mule-cmds.el (read-char-by-name): Add optional 'allow-single' argument, meaning to accept single chars as themselves. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 12896cc4b0..4137642528 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -3195,7 +3195,7 @@ Defines the sorting order either by character names or their codepoints." :group 'mule :version "28.1") -(defun read-char-by-name (prompt) +(defun read-char-by-name (prompt &optional allow-single) "Read a character by its Unicode name or hex number string. Display PROMPT and read a string that represents a character by its Unicode property `name' or `old-name'. @@ -3216,7 +3216,10 @@ Accept a name like \"CIRCULATION FUNCTION\", a hexadecimal number like \"2A10\", or a number in hash notation (e.g., \"#x2a10\" for hex, \"10r10768\" for decimal, or \"#o25020\" for octal). Treat otherwise-ambiguous strings like \"BED\" (U+1F6CF) -as names, not numbers." +as names, not numbers. + +Optional arg ALLOW-SINGLE non-nil means to additionally allow +single characters to be treated as standing for themselves." (let* ((enable-recursive-minibuffers t) (completion-ignore-case t) (completion-tab-width 4) @@ -3239,6 +3242,9 @@ as names, not numbers." (char (cond ((char-from-name input t)) + ((and allow-single + (string-match-p "\\`.\\'" input) + (ignore-errors (string-to-char input)))) ((string-match-p "\\`[[:xdigit:]]+\\'" input) (ignore-errors (string-to-number input 16))) ((string-match-p "\\`#\\([bBoOxX]\\|[0-9]+[rR]\\)[0-9a-zA-Z]+\\'" commit 80c53271953eb6450b2fb71705fbb959b55195ec Author: Stefan Kangas Date: Thu Sep 1 11:04:21 2022 +0200 Make some versions in docs match package version * doc/emacs/misc.texi (Interactive Shell): Bump Emacs version. * doc/misc/ediff.texi: * doc/misc/flymake.texi: * doc/misc/viper.texi: Fix version to match package. * lisp/emulation/viper.el: Make version match variable. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 08c86e7a16..737c871d3f 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -914,7 +914,7 @@ Coding}. @cindex @env{INSIDE_EMACS} environment variable Emacs sets the environment variable @env{INSIDE_EMACS} in the subshell to @samp{@var{version},comint}, where @var{version} is the -Emacs version (e.g., @samp{24.1}). Programs can check this variable +Emacs version (e.g., @samp{28.1}). Programs can check this variable to determine whether they are running inside an Emacs subshell. @node Shell Mode diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 8a7de88d65..01353ebe4c 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -50,7 +50,7 @@ modify this GNU manual.'' @titlepage @title Ediff User's Manual @sp 4 -@subtitle Ediff version 2.81.2 +@subtitle Ediff version 2.81.6 @sp 1 @subtitle November 2008 @sp 5 diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 451d6c76c4..ab0385aa13 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -1,8 +1,8 @@ \input texinfo @c -*-texinfo; coding: utf-8 -*- @comment %**start of header @setfilename ../../info/flymake.info -@set VERSION 1.2 -@set UPDATED September 2021 +@set VERSION 1.2.2 +@set UPDATED November 2021 @settitle GNU Flymake @value{VERSION} @include docstyle.texi @syncodeindex pg cp diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 0e2473ddf3..97bb7d75cf 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -34,7 +34,7 @@ modify this GNU manual.'' @titlepage @title Viper Is a Package for Emacs Rebels @subtitle a Vi emulator for Emacs -@subtitle November 2008, Viper Version 3.11.2 +@subtitle July 2013, Viper Version 3.14.2 @author Michael Kifer (Viper) @author Aamod Sane (VIP 4.4) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 51c1bf7d62..2b3908049e 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -7,7 +7,7 @@ ;; Author: Michael Kifer ;; Keywords: emulations -;; Version: 3.14.1 +;; Version: 3.14.2 ;; Yoni Rabkin contacted the maintainer of this ;; file on 20/3/2008, and the maintainer agreed that when a bug is commit 917da2641eeeacbb08b0fd35492eeecd3d3c4f0a Author: Stefan Kangas Date: Thu Sep 1 11:01:14 2022 +0200 Minor doc fix; improve sorting of VC backends * doc/emacs/maintaining.texi (Version Control Systems): Minor doc fix; rearrange list to put git, cvs and subversion at the top. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index c23907ddfb..81a24d0587 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -170,26 +170,12 @@ which it refers to as @dfn{back ends}: @itemize @bullet -@cindex SCCS -@item -SCCS was the first version control system ever built, and was long ago -superseded by more advanced ones. VC compensates for certain features -missing in SCCS (e.g., tag names for releases) by implementing them -itself. Other VC features, such as multiple branches, are simply -unavailable. Since SCCS is non-free, we recommend avoiding it. - -@cindex CSSC -@item -CSSC is a free replacement for SCCS@. You should use CSSC only if, for -some reason, you cannot use a more recent and better-designed version -control system. - -@cindex RCS +@cindex git @item -RCS is the free version control system around which VC was initially -built. It is relatively primitive: it cannot be used over the -network, and works at the level of individual files. Almost -everything you can do with RCS can be done through VC. +Git is a decentralized version control system originally invented by +Linus Torvalds to support development of Linux (his kernel). VC +supports many common Git operations, but others, such as repository +syncing, must be done from the command line. @cindex CVS @item @@ -208,12 +194,26 @@ similar to CVS but without its problems (e.g., it supports atomic commits of filesets, and versioning of directories, symbolic links, meta-data, renames, copies, and deletes). -@cindex git +@cindex SCCS @item -Git is a decentralized version control system originally invented by -Linus Torvalds to support development of Linux (his kernel). VC -supports many common Git operations, but others, such as repository -syncing, must be done from the command line. +SCCS was the first version control system ever built, and was long ago +superseded by more advanced ones. VC compensates for certain features +missing in SCCS (e.g., tag names for releases) by implementing them +itself. Other VC features, such as multiple branches, are simply +unavailable. Since SCCS is non-free, we recommend avoiding it. + +@cindex CSSC +@item +CSSC is a free replacement for SCCS@. You should use CSSC only if, for +some reason, you cannot use a more recent and better-designed version +control system. + +@cindex RCS +@item +RCS is the free version control system around which VC was initially +built. It is relatively primitive: it cannot be used over the +network, and works at the level of individual files. Almost +everything you can do with RCS can be done through VC. @cindex hg @cindex Mercurial commit 89695bce3e4f3716cdb2d322cf3efd0fe5454bec Author: Eli Zaretskii Date: Thu Sep 1 11:42:33 2022 +0300 Clarify the doc string of 'set-face-attribute' * lisp/faces.el (set-face-attribute): Clarify the issue with resetting attribute values to 'unspecified' for future frames. (Bug#57499) diff --git a/lisp/faces.el b/lisp/faces.el index 59287ffbbd..ba33bec70d 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -668,21 +668,28 @@ If FACE is a face-alias, get the documentation for the target face." (defun set-face-attribute (face frame &rest args) "Set attributes of FACE on FRAME from ARGS. -This function overrides the face attributes specified by FACE's -face spec. It is mostly intended for internal use only. - -If FRAME is nil, set the attributes for all existing frames, as -well as the default for new frames. If FRAME is t, change the -default for new frames only. As an exception, to reset the value -of some attribute to `unspecified' in a way that overrides the -non-`unspecified' value defined by the face's spec in `defface', -for new frames, you must explicitly call this function with FRAME -set to t and the attribute's value set to `unspecified'; just -using FRAME of nil will not affect new frames in this case. - -ARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a -valid face attribute name. All attributes can be set to -`unspecified'; this fact is not further mentioned below. +This function overrides the face attributes specified by FACE's face spec. +It is mostly intended for internal use. + +If FRAME is a frame, set the FACE's attributes only for that frame. If +FRAME is nil, set attribute values for all existing frames, as well as +the default for new frames. If FRAME is t, change the default values +of attributes for new frames. + +ARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a valid face +attribute name and VALUE must be a value that is valid for ATTRIBUTE, +as described below for each attribute. + +In addition to the attribute values listed below, all attributes can +also be set to the special value `unspecified', which means the face +doesn't by itself specify a value for the attribute. + +When a new frame is created, attribute values in the FACE's `defface' +spec normally override the `unspecified' values in the FACE's +default attributes. To avoid that, i.e. to cause ATTRIBUTE's value +be reset to `unspecified' when creating new frames, disregarding +what the FACE's face spec says, call this function with FRAME set to +t and the ATTRIBUTE's value set to `unspecified'. The following attributes are recognized: