From 736b5829aef623bbb36e00001af2644edef3c578 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 24 Jul 2013 00:32:49 -0700 Subject: [PATCH 01/57] * lisp/dired-x.el (dired-mark-extension): Convert comment to doc string. --- lisp/ChangeLog | 4 ++++ lisp/dired-x.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cb6371c082..0c5b857d374 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-07-24 Glenn Morris + + * dired-x.el (dired-mark-extension): Convert comment to doc string. + 2013-07-20 Glenn Morris * image-dired.el (image-dired-track-original-file): diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 7c0def7f809..4f9213fa5cf 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -331,9 +331,9 @@ See also the functions: ;; Mark files with some extension. (defun dired-mark-extension (extension &optional marker-char) "Mark all files with a certain EXTENSION for use in later commands. -A `.' is *not* automatically prepended to the string entered." - ;; EXTENSION may also be a list of extensions instead of a single one. - ;; Optional MARKER-CHAR is marker to use. +A `.' is *not* automatically prepended to the string entered. +EXTENSION may also be a list of extensions instead of a single one. +Optional MARKER-CHAR is marker to use." (interactive "sMarking extension: \nP") (or (listp extension) (setq extension (list extension))) From 6758206c805224a21a27bb323d56b8a858c0d848 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 24 Jul 2013 07:17:32 -0400 Subject: [PATCH 02/57] Auto-commit of loaddefs files. --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 76809f992cc..026da9a1251 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4296,7 +4296,7 @@ instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) -;;;;;; "dired-x" "dired-x.el" "ce753ade80ea9f4e64ab3569e3a5421e") +;;;;;; "dired-x" "dired-x.el" "efb14a36ac91f2a10197082b87a84b65") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ From cb3a56d2389eb6fe0635bd28b863c3a0734279c6 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 25 Jul 2013 02:37:56 +0200 Subject: [PATCH 03/57] lisp/desktop.el: Add workaround for bug#14949. (desktop--make-frame): Do not pass the `fullscreen' parameter to modify-frame-parameters if the value has not changed. (desktop--make-frame): On cl-delete-if call, check parameter name, not full parameter. --- lisp/ChangeLog | 8 ++++++++ lisp/desktop.el | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 587c9b921c9..85c68323cfe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-07-25 Juanma Barranquero + + * desktop.el (desktop--make-frame): Do not pass the `fullscreen' + parameter to modify-frame-parameters if the value has not changed; + this is a workaround for bug#14949. + (desktop--make-frame): On cl-delete-if call, check parameter name, + not full parameter. + 2013-07-24 Juanma Barranquero * desktop.el (desktop-restoring-frames-p): Return a true boolean. diff --git a/lisp/desktop.el b/lisp/desktop.el index f4622ae4961..291f28a79db 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1289,7 +1289,7 @@ its window state. Internal use only." (visible (assq 'visibility filtered-cfg))) (setq filtered-cfg (cl-delete-if (lambda (p) (memq p '(visibility fullscreen width height))) - filtered-cfg)) + filtered-cfg :key #'car)) (when width (setq filtered-cfg (append `((user-size . t) (width . ,width)) filtered-cfg))) @@ -1302,7 +1302,11 @@ its window state. Internal use only." ;; Time to select or create a frame an apply the big bunch of parameters (if (setq frame (desktop--select-frame display filtered-cfg)) - (modify-frame-parameters frame filtered-cfg) + (modify-frame-parameters frame + (if (eq (frame-parameter frame 'fullscreen) fullscreen) + ;; Workaround for bug#14949 + (assq-delete-all 'fullscreen filtered-cfg) + filtered-cfg)) (setq frame (make-frame-on-display display filtered-cfg))) ;; Let's give the finishing touches (visibility, tool-bar, maximization). From 7add5a8a7a65bdff16f6f4eeaad9074996683dd0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 24 Jul 2013 21:25:18 -0400 Subject: [PATCH 04/57] Reduce use of @email in doc/misc In many cases it serves no purpose. It gets converted to mailto: in html output, which is mainly just an invitation to get spam. * doc/misc/erc.texi (Special Features): Update contact information. (History): Avoid using @email. * doc/misc/eshell.texi (Bugs and ideas): Minor updates. * doc/misc/faq.texi (Reporting bugs, Origin of the term Emacs) (Setting up a customization file) (Using an already running Emacs process, Turning off beeping) (Packages that do not come with Emacs) (Replying to the sender of a message): Avoid using @email. * doc/misc/pcl-cvs.texi (Contributors, Bugs): Avoid using @email. * doc/misc/reftex.texi (Imprint): Avoid using @email. * doc/misc/ses.texi (Top): Update bug reporting instructions. (Acknowledgments): Avoid using @email. * doc/misc/woman.texi (Introduction, Background): Remove outdated information. (Bugs, Acknowledgments): Avoid using @email. --- doc/misc/ChangeLog | 23 ++++++++ doc/misc/erc.texi | 18 +++--- doc/misc/eshell.texi | 10 ++-- doc/misc/faq.texi | 42 ++++++++------ doc/misc/pcl-cvs.texi | 44 ++++++++------ doc/misc/reftex.texi | 4 +- doc/misc/ses.texi | 71 +++++++++++++++-------- doc/misc/woman.texi | 130 ++++++++++++++++++++++++++---------------- 8 files changed, 222 insertions(+), 120 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 4f45fb44c6a..959e426ea01 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,26 @@ +2013-07-25 Glenn Morris + + * erc.texi (Special Features): Update contact information. + (History): Avoid using @email. + + * eshell.texi (Bugs and ideas): Minor updates. + + * faq.texi (Reporting bugs, Origin of the term Emacs) + (Setting up a customization file) + (Using an already running Emacs process, Turning off beeping) + (Packages that do not come with Emacs) + (Replying to the sender of a message): Avoid using @email. + + * pcl-cvs.texi (Contributors, Bugs): Avoid using @email. + + * reftex.texi (Imprint): Avoid using @email. + + * ses.texi (Top): Update bug reporting instructions. + (Acknowledgments): Avoid using @email. + + * woman.texi (Introduction, Background): Remove outdated information. + (Bugs, Acknowledgments): Avoid using @email. + 2013-07-06 Glenn Morris * mh-e.texi: Fix external links. diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index beb8d545586..2a66396df67 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -235,8 +235,8 @@ forwards. Different channels and servers may have different language encodings. In addition, it is possible to translate the messages that ERC uses into -multiple languages. Please contact the developers of ERC at -@email{erc-discuss@@gnu.org} if you are interested in helping with the +multiple languages. Please contact the Emacs developers +if you are interested in helping with the translation effort. @item user scripting @@ -784,9 +784,9 @@ To report a bug in ERC, use @kbd{M-x report-emacs-bug}. @chapter History @cindex history, of ERC -ERC was originally written by Alexander L. Belikoff -@email{abel@@bfr.co.il} and Sergey Berezin -@email{sergey.berezin@@cs.cmu.edu}. They stopped development around +@c abel@@bfr.co.il, sergey.berezin@@cs.cmu.edu +ERC was originally written by Alexander L. Belikoff and Sergey Berezin. +They stopped development around December 1999. Their last released version was ERC 2.0. P.S.: If one of the original developers of ERC reads this, we'd like to @@ -796,8 +796,9 @@ general. @itemize @item 2001 -In June 2001, Mario Lang @email{mlang@@delysid.org} and Alex Schroeder -@email{alex@@gnu.org} took over development and created a ERC Project at +@c mlang@@delysid.org, alex@@gnu.org +In June 2001, Mario Lang and Alex Schroeder +took over development and created a ERC Project at @uref{http://sourceforge.net/projects/erc}. In reaction to a mail about the new ERC development effort, Sergey @@ -825,7 +826,8 @@ ERC 4.0 was released. @item 2005 -ERC 5.0 was released. Michael Olson @email{mwolson@@gnu.org} became +@c mwolson@@gnu.org +ERC 5.0 was released. Michael Olson became the release manager and eventually the maintainer. After some discussion between him and the Emacs developers, it was diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 688a547feeb..0db60957d73 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -800,16 +800,18 @@ Eshell module.} You also need to load the following as shown: @cindex known bugs @cindex bugs, known -If you find a bug or misfeature, don't hesitate to let me know! Send -email to @email{johnw@@gnu.org}. Feature requests should also be sent -there. I prefer discussing one thing at a time. If you find several +If you find a bug or misfeature, don't hesitate to report it, by +using @kbd{M-x report-emacs-bug}. The same applies to feature requests. +It is best to discuss one thing at a time. If you find several unrelated bugs, please report them separately. +@ignore If you have ideas for improvements, or if you have written some extensions to this package, I would like to hear from you. I hope you find this package useful! +@end ignore -Below is a complete list of known problems with Eshell version 2.4.2, +Below is a list of some known problems with Eshell version 2.4.2, which is the version included with Emacs 22. @table @asis diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index 39b4a9037bd..f51d3a91a6e 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -445,9 +445,9 @@ mail-to-news gateway). The correct way to report Emacs bugs is to use the command @kbd{M-x report-emacs-bug}. It sets up a mail buffer with the -essential information and the correct e-mail address, which is -@email{bug-gnu-emacs@@gnu.org} for the released versions of Emacs. -Anything sent to @email{bug-gnu-emacs@@gnu.org} also appears in the +essential information and the correct e-mail address, +@email{bug-gnu-emacs@@gnu.org}. +Anything sent there also appears in the newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of news to submit the bug report. This ensures a reliable return address so you can be contacted for further details. @@ -460,13 +460,17 @@ report (@pxref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}). RMS says: @quotation -Sending bug reports to @email{help-gnu-emacs@@gnu.org} (which has the -effect of posting on @uref{news:gnu.emacs.help}) is undesirable because -it takes the time of an unnecessarily large group of people, most of -whom are just users and have no idea how to fix these problem. -@email{bug-gnu-emacs@@gnu.org} reaches a much smaller group of people -who are more likely to know what to do and have expressed a wish to -receive more messages about Emacs than the others. +Sending bug reports to +@url{http://lists.gnu.org/mailman/listinfo/help-gnu-emacs, +the help-gnu-emacs mailing list} +(which has the effect of posting on @uref{news:gnu.emacs.help}) is +undesirable because it takes the time of an unnecessarily large group +of people, most of whom are just users and have no idea how to fix +these problem. +@url{http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs, The +bug-gnu-emacs list} reaches a much smaller group of people who are +more likely to know what to do and have expressed a wish to receive +more messages about Emacs than the others. @end quotation RMS says it is sometimes fine to post to @uref{news:gnu.emacs.help}: @@ -961,7 +965,8 @@ by RMS for the editor TECO (Text Editor and COrrector, originally Tape Editor and COrrector) under ITS (the Incompatible Timesharing System) on a PDP-10. RMS had already extended TECO with a ``real-time'' full-screen mode with reprogrammable keys. Emacs was started by -@email{gls@@east.sun.com, Guy Steele} as a project to unify the many +@c gls@@east.sun.com +Guy Steele as a project to unify the many divergent TECO command sets and key bindings at MIT, and completed by RMS. @@ -1341,7 +1346,9 @@ of files from Macintosh, Microsoft, and Unix platforms. In general, new Emacs users should not be provided with @file{.emacs} files, because this can cause confusing non-standard behavior. Then -they send questions to @email{help-gnu-emacs@@gnu.org} asking why Emacs +they send questions to +@url{http://lists.gnu.org/mailman/listinfo/help-gnu-emacs, +the help-gnu-emacs mailing list} asking why Emacs isn't behaving as documented. Emacs includes the Customize facility (@pxref{Using Customize}). This @@ -1806,7 +1813,8 @@ requested by @code{emacsclient}, Emacs will switch to it; otherwise @cindex @code{gnuserv} There is an alternative version of @samp{emacsclient} called -@samp{gnuserv}, written by @email{ange@@hplb.hpl.hp.com, Andy Norman} +@c ange@@hplb.hpl.hp.com +@samp{gnuserv}, written by Andy Norman (@pxref{Packages that do not come with Emacs}). @samp{gnuserv} uses Internet domain sockets, so it can work across most network connections. @@ -1974,7 +1982,8 @@ On some systems, @key{Insert} toggles @code{overwrite-mode} on and off. @cindex Visible bell @cindex Bell, visible -@email{martin@@cc.gatech.edu, Martin R. Frank} writes: +@c martin@@cc.gatech.edu +Martin R. Frank writes: Tell Emacs to use the @dfn{visible bell} instead of the audible bell, and set the visible bell to nothing. @@ -3305,7 +3314,7 @@ to get more details about the features that it offers, and then if you wish, Emacs can download and automatically install it for you. @uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs Lisp -List (ELL)}, maintained by @email{S.J.Eglen@@damtp.cam.ac.uk, Stephen Eglen}, +List (ELL)}, maintained by Stephen Eglen, aims to provide one compact list with links to all of the current Emacs Lisp files on the Internet. The ELL can be browsed over the web, or from Emacs with @uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.el, @@ -4314,7 +4323,8 @@ these systems, you should configure @code{movemail} to use @code{flock}. @cindex Sender, replying only to @cindex Rmail, replying to the sender of a message in -@email{isaacson@@seas.upenn.edu, Ron Isaacson} says: When you hit +@c isaacson@@seas.upenn.edu +Ron Isaacson says: When you hit @key{r} to reply in Rmail, by default it CCs all of the original recipients (everyone on the original @samp{To} and @samp{CC} lists). With a prefix argument (i.e., typing @kbd{C-u} before @key{r}), diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index df972d7991f..ec7fc02edbd 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -172,17 +172,20 @@ Per Cederqvist wrote most of the otherwise unattributed functions in PCL-CVS as well as all the documentation. @item -@email{inge@@lysator.liu.se, Inge Wallin} wrote the skeleton of +@c inge@@lysator.liu.se +Inge Wallin wrote the skeleton of @file{pcl-cvs.texi}, and gave useful comments on it. He also wrote the files @file{elib-node.el} and @file{compile-all.el}. The file @file{cookie.el} was inspired by Inge.@refill @item -@email{linus@@lysator.liu.se, Linus Tolke} contributed useful comments +@c linus@@lysator.liu.se +Linus Tolke contributed useful comments on both the functionality and the documentation.@refill @item -@email{jwz@@jwz.com, Jamie Zawinski} contributed +@c jwz@@jwz.com +Jamie Zawinski contributed @file{pcl-cvs-lucid.el}, which was later renamed to @file{pcl-cvs-xemacs.el}.@refill @@ -191,34 +194,40 @@ Leif Lonnblad contributed RCVS support (since superseded by the new remote CVS support). @item -@email{jimb@@cyclic.com, Jim Blandy} contributed hooks to automatically +@c jimb@@cyclic.com +Jim Blandy contributed hooks to automatically guess CVS log entries from @file{ChangeLog} contents, and initial support of the new Cygnus / Cyclic remote CVS, as well as various sundry bug fixes and cleanups. @item -@email{kingdon@@cyclic.com, Jim Kingdon} contributed lots of fixes to +@c kingdon@@cyclic.com +Jim Kingdon contributed lots of fixes to the build and installation procedure. @item -@email{woods@@weird.com, Greg A. Woods} contributed code to implement +@c woods@@weird.com +Greg A. Woods contributed code to implement the use of per-file diff buffers, and vendor join diffs with emerge and ediff, as well as various and sundry bug fixes and cleanups. @item -@email{greg.klanderman@@alum.mit.edu, Greg Klanderman} implemented +@c greg.klanderman@@alum.mit.edu +Greg Klanderman implemented toggling of marked files, setting of CVS command flags via prefix arguments, updated the XEmacs support, updated the manual, and fixed numerous bugs. @item -@email{monnier@@gnu.org, Stefan Monnier} added a slew of other +@c monnier@@gnu.org +Stefan Monnier added a slew of other features and introduced even more new bugs. If there's any bug left, you can be sure it's his. @item @c wordy to avoid an underfull hbox -@email{masata-y@@is.aist-nara.ac.jp, Masatake YAMATO} made a gracious +@c masata-y@@is.aist-nara.ac.jp +Masatake YAMATO made a gracious contribution of his cvstree code to display a tree of tags which was later superseded by the new @code{cvs-status-mode}. @end itemize @@ -1369,18 +1378,19 @@ Used to highlight CVS messages. @cindex FAQ @cindex Problems, list of common -If you find a bug or misfeature, don't hesitate to tell us! Send email -to @email{bug-gnu-emacs@@gnu.org} which is gatewayed to the newsgroup -@samp{gnu.emacs.bugs}. Feature requests should also be sent there. We -prefer discussing one thing at a time. If you find several unrelated +If you find a bug or misfeature, don't hesitate to tell us! +Use @kbd{M-x report-emacs-bug} to send us a report. +You can follow the same process for feature requests. +We prefer discussing one thing at a time. If you find several unrelated bugs, please report them separately. If you are running PCL-CVS under XEmacs, you should also send a copy of bug reports to -@email{xemacs-beta@@xemacs.org}. +the @url{http://lists.xemacs.org/mailman/listinfo/xemacs-beta, +XEmacs mailing list}. If you have problems using PCL-CVS or other questions, send them to -@email{help-gnu-emacs@@gnu.org}, which is gatewayed to the -@samp{gnu.emacs.help} newsgroup. This is a good place to get help, as -is @email{cvs-info@@gnu.org}, gatewayed to @samp{gnu.cvs.help}. +the @url{http://lists.gnu.org/mailman/listinfo/help-gnu-emacs, +help-gnu-emacs mailing list}. This is a good place to get help, as is +the @url{http://lists.nongnu.org/mailman/listinfo/info-cvs, info-cvs list}. If you have ideas for improvements, or if you have written some extensions to this package, we would like to hear from you. We hope that diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 15bb2c4cc0a..2a7a231aa55 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -3637,8 +3637,8 @@ With @i{Viper} mode prior to Vipers version 3.01, you need to protect @cindex @code{http}, @RefTeX{} home page @cindex @code{ftp}, @RefTeX{} site -@RefTeX{} was written by @i{Carsten Dominik} -@email{dominik@@science.uva.nl}, with contributions by @i{Stephen +@c dominik@@science.uva.nl +@RefTeX{} was written by @i{Carsten Dominik}, with contributions by @i{Stephen Eglen}. @RefTeX{} is currently maintained by @value{MAINTAINER}, see the @value{MAINTAINERSITE} for detailed information. diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 2bef526257e..96d03e0847a 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -60,7 +60,7 @@ by formulas that can refer to the values of other cells. @end display @end ifnottex -To report bugs, send email to @email{jyavner@@member.fsf.org}. +To report bugs, use @kbd{M-x report-emacs-bug}. @insertcopying @@ -938,39 +938,62 @@ cell. Coding by: @quotation -Jonathan Yavner @email{jyavner@@member.fsf.org}@* -Stefan Monnier @email{monnier@@gnu.org}@* -Shigeru Fukaya @email{shigeru.fukaya@@gmail.com} +@c jyavner@@member.fsf.org +Jonathan Yavner, +@c monnier@@gnu.org +Stefan Monnier, +@c shigeru.fukaya@@gmail.com +Shigeru Fukaya @end quotation @noindent Texinfo manual by: @quotation -Jonathan Yavner @email{jyavner@@member.fsf.org}@* -Brad Collins +@c jyavner@@member.fsf.org +Jonathan Yavner, +@c brad@@chenla.org +Brad Collins @end quotation @noindent Ideas from: @quotation -Christoph Conrad @email{christoph.conrad@@gmx.de}@* -CyberBob @email{cyberbob@@redneck.gacracker.org}@* -Syver Enstad @email{syver-en@@online.no}@* -Ami Fischman @email{fischman@@zion.bpnetworks.com}@* -Thomas Gehrlein @email{Thomas.Gehrlein@@t-online.de}@* -Chris F.A. Johnson @email{c.f.a.johnson@@rogers.com}@* -Yusong Li @email{lyusong@@hotmail.com}@* -Juri Linkov @email{juri@@jurta.org}@* -Harald Maier @email{maierh@@myself.com}@* -Alan Nash @email{anash@@san.rr.com}@* -François Pinard @email{pinard@@iro.umontreal.ca}@* -Pedro Pinto @email{ppinto@@cs.cmu.edu}@* -Stefan Reichör @email{xsteve@@riic.at}@* -Oliver Scholz @email{epameinondas@@gmx.de}@* -Richard M. Stallman @email{rms@@gnu.org}@* -Luc Teirlinck @email{teirllm@@dms.auburn.edu}@* -J. Otto Tennant @email{jotto@@pobox.com}@* -Jean-Philippe Theberge @email{jphil@@acs.pagesjaunes.fr} +@c christoph.conrad@@gmx.de +Christoph Conrad, +@c cyberbob@@redneck.gacracker.org +CyberBob, +@c syver-en@@online.no +Syver Enstad, +@c fischman@@zion.bpnetworks.com +Ami Fischman, +@c Thomas.Gehrlein@@t-online.de +Thomas Gehrlein, +@c c.f.a.johnson@@rogers.com +Chris F.A.@: Johnson, +@c lyusong@@hotmail.com +Yusong Li, +@c juri@@jurta.org +Juri Linkov, +@c maierh@@myself.com +Harald Maier, +@c anash@@san.rr.com +Alan Nash, +@c pinard@@iro.umontreal.ca +François Pinard, +@c ppinto@@cs.cmu.edu +Pedro Pinto, +@c xsteve@@riic.at +Stefan Reichör, +@c epameinondas@@gmx.de +Oliver Scholz, +@c rms@@gnu.org +Richard M. Stallman, +@c teirllm@@dms.auburn.edu +Luc Teirlinck, +@c jotto@@pobox.com +J. Otto Tennant, +@c jphil@@acs.pagesjaunes.fr +Jean-Philippe Theberge @end quotation @c =================================================================== diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index d7ef94872b4..2dbcc6dcd47 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -4,7 +4,7 @@ @settitle WoMan: Browse Unix Manual Pages ``W.O. (without) Man'' @c FIXME @c Manual last updated: -@set UPDATED Time-stamp: <2013-02-12 09:05:54 eggert> +@set UPDATED Time-stamp: @c Software version: @set VERSION 0.54 (beta) @afourpaper @@ -114,10 +114,7 @@ version of Emacs. It was developed primarily on various versions of Microsoft Windows, but has also been tested on MS-DOS, and various versions of UNIX and GNU/Linux. -WoMan is distributed with GNU Emacs. In addition, the current source -code and documentation files are available from -@uref{http://centaur.maths.qmw.ac.uk/Emacs/WoMan/, the WoMan web -server}. +WoMan is distributed with GNU Emacs. WoMan implements a subset of the formatting performed by the Emacs @code{man} (or @code{manual-entry}) command to format a Unix-style @@ -157,11 +154,7 @@ which begin with the prefix @code{woman-} (or occasionally either running the command @code{woman-mini-help} or selecting the WoMan menu option @samp{Mini Help}. -WoMan is (of course) still under development! Please -@email{F.J.Wright@@qmw.ac.uk, let me know} what doesn't work---I am -adding and improving functionality as testing shows that it is -necessary. Guidance on reporting bugs is given below. @xref{Bugs, , -Reporting Bugs}. +Guidance on reporting bugs is given below. @xref{Bugs, , Reporting Bugs}. @c =================================================================== @@ -286,6 +279,7 @@ of the facilities implemented in the Emacs @code{man} library. WoMan and man can happily co-exist, which is very useful for comparison and debugging purposes. +@ignore @code{nroff} simulates non-@acronym{ASCII} characters by using one or more @acronym{ASCII} characters. WoMan should be able to do much better than this. I have recently begun to add support for WoMan to use more of the @@ -294,6 +288,7 @@ aspect that I intend to develop further in the near future. It should be possible to move WoMan from an emulation of @code{nroff} to an emulation of @code{troff} as GNU Emacs moves to providing bit-mapped display facilities. +@end ignore @node Finding, Browsing, Background, Top @comment node-name, next, previous, up @@ -1321,8 +1316,8 @@ try the latest version of @file{woman.el} from the Emacs repository on @uref{http://savannah.gnu.org/projects/emacs/}. If it still fails, please @item -send a bug report to @email{bug-gnu-emacs@@gnu.org} and to -@email{F.J.Wright@@qmw.ac.uk}. Please include the entry from the +use @kbd{M-x report-emacs-bug} to send a bug report. +Please include the entry from the @code{*WoMan-Log*} buffer relating to the problem file, together with a brief description of the problem. Please indicate where you got the man source file from, but do not send it unless asked to send it. @@ -1342,43 +1337,80 @@ I also thank the following for helpful suggestions, bug reports, code fragments, general interest, etc.: @quotation -Jari Aalto, @email{jari.aalto@@cs.tpu.fi}@* -Dean Andrews, @email{dean@@dra.com}@* -Juanma Barranquero, @email{barranquero@@laley-actualidad.es}@* -Karl Berry, @email{kb@@cs.umb.edu}@* -Jim Chapman, @email{jchapman@@netcomuk.co.uk}@* -Frederic Corne, @email{frederic.corne@@erli.fr}@* -Peter Craft, @email{craft@@alacritech.com}@* -Charles Curley, @email{ccurley@@trib.com}@* -Jim Davidson, @email{jdavidso@@teknowledge.com}@* -Kevin D'Elia, @email{Kevin.DElia@@mci.com}@* -John Fitch, @email{jpff@@maths.bath.ac.uk}@* -Hans Frosch, @email{jwfrosch@@rish.b17c.ingr.com}@* -Guy Gascoigne-Piggford, @email{ggp@@informix.com}@* -Brian Gorka, @email{gorkab@@sanchez.com}@* -Nicolai Henriksen, @email{nhe@@lyngso-industri.dk}@* -Thomas Herchenroeder, @email{the@@software-ag.de}@* -Alexander Hinds, @email{ahinds@@thegrid.net}@* -Stefan Hornburg, @email{sth@@hacon.de}@* -Theodore Jump, @email{tjump@@cais.com}@* -Paul Kinnucan, @email{paulk@@mathworks.com}@* -Jonas Linde, @email{jonas@@init.se}@* -Andrew McRae, @email{andrewm@@optimation.co.nz}@* -Howard Melman, @email{howard@@silverstream.com}@* -Dennis Pixton, @email{dennis@@math.binghamton.edu}@* -T. V. Raman, @email{raman@@Adobe.com}@* -Bruce Ravel, @email{bruce.ravel@@nist.gov}@* -Benjamin Riefenstahl, @email{benny@@crocodial.de}@* -Kevin Ruland, @email{kruland@@seistl.com}@* -Tom Schutter, @email{tom@@platte.com}@* -Wei-Xue Shi, @email{wxshi@@ma.neweb.ne.jp}@* -Fabio Somenzi, @email{fabio@@joplin.colorado.edu}@* -Karel Sprenger, @email{ks@@ic.uva.nl}@* -Chris Szurgot, @email{szurgot@@itribe.net}@* -Paul A. Thompson, @email{pat@@po.cwru.edu}@* -Arrigo Triulzi, @email{arrigo@@maths.qmw.ac.uk}@* -Geoff Voelker, @email{voelker@@cs.washington.edu}@* -Eli Zaretskii, @email{eliz@@is.elta.co.il} +@c jari.aalto@@cs.tpu.fi +Jari Aalto, +@c dean@@dra.com +Dean Andrews, +@c barranquero@@laley-actualidad.es +Juanma Barranquero, +@c kb@@cs.umb.edu +Karl Berry, +@c jchapman@@netcomuk.co.uk +Jim Chapman, +@c frederic.corne@@erli.fr +Frederic Corne, +@c craft@@alacritech.com +Peter Craft, +@c ccurley@@trib.com +Charles Curley, +@c jdavidso@@teknowledge.com +Jim Davidson, +@c Kevin.DElia@@mci.com +Kevin D'Elia, +@c jpff@@maths.bath.ac.uk +John Fitch, +@c jwfrosch@@rish.b17c.ingr.com +Hans Frosch, +@c ggp@@informix.com +Guy Gascoigne-Piggford, +@c gorkab@@sanchez.com +Brian Gorka, +@c nhe@@lyngso-industri.dk +Nicolai Henriksen, +@c the@@software-ag.de +Thomas Herchenroeder, +@c ahinds@@thegrid.net +Alexander Hinds, +@c sth@@hacon.de +Stefan Hornburg, +@c tjump@@cais.com +Theodore Jump, +@c paulk@@mathworks.com +Paul Kinnucan, +@c jonas@@init.se +Jonas Linde, +@c andrewm@@optimation.co.nz +Andrew McRae, +@c howard@@silverstream.com +Howard Melman, +@c dennis@@math.binghamton.edu +Dennis Pixton, +@c raman@@Adobe.com +T. V. Raman, +@c bruce.ravel@@nist.gov +Bruce Ravel, +@c benny@@crocodial.de +Benjamin Riefenstahl, +@c kruland@@seistl.com +Kevin Ruland, +@c tom@@platte.com +Tom Schutter, +@c wxshi@@ma.neweb.ne.jp +Wei-Xue Shi, +@c fabio@@joplin.colorado.edu +Fabio Somenzi, +@c ks@@ic.uva.nl +Karel Sprenger, +@c szurgot@@itribe.net +Chris Szurgot, +@c pat@@po.cwru.edu +Paul A. Thompson, +@c arrigo@@maths.qmw.ac.uk +Arrigo Triulzi, +@c voelker@@cs.washington.edu +Geoff Voelker, +@c eliz@@is.elta.co.il +Eli Zaretskii @end quotation @c =================================================================== From ef75383cd2b764f8df0b84f780adfe0bd552457c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 24 Jul 2013 23:57:25 -0700 Subject: [PATCH 05/57] * make-dist: Add a --tests option, to include test/. --- ChangeLog | 4 ++++ make-dist | 31 ++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a1a82f6c3b..cc30c8198e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-07-25 Glenn Morris + + * make-dist: Add a --tests option, to include test/. + 2013-07-24 Glenn Morris * configure.ac: Use self-descriptive tags for AC_CONFIG_COMMANDS. diff --git a/make-dist b/make-dist index 34e5c3f75e1..75e4b22b238 100755 --- a/make-dist +++ b/make-dist @@ -1,8 +1,7 @@ #!/bin/sh ### make-dist: create an Emacs distribution tar file from current srcdir -## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, -## Inc. +## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, Inc. ## This file is part of GNU Emacs. @@ -51,6 +50,7 @@ clean_up=no make_tar=no default_gzip=gzip newer="" +with_tests=no while [ $# -gt 0 ]; do case "$1" in @@ -98,6 +98,12 @@ while [ $# -gt 0 ]; do check=no ;; + ## Include the test/ directory. + ## This option is mainly for the hydra build server. + "--tests") + with_tests=yes + ;; + "--help") echo "Usage: ${progname} [options]" echo "" @@ -110,6 +116,7 @@ while [ $# -gt 0 ]; do echo " --no-update don't recompile or do analogous things" echo " --snapshot same as --clean-up --no-update --tar --no-check" echo " --tar make a tar file" + echo " --tests include the test/ directory" echo "" exit 0 ;; @@ -289,7 +296,7 @@ for subdir in site-lisp \ build-aux build-aux/snippet \ src src/bitmaps lib lib-src oldXMenu lwlib \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ - `find etc lisp admin -type d` \ + `find etc lisp admin test -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ info m4 msdos \ nextstep nextstep/templates \ @@ -300,6 +307,13 @@ for subdir in site-lisp \ nextstep/GNUstep/Emacs.base \ nextstep/GNUstep/Emacs.base/Resources do + + if [ "$with_tests" != "yes" ]; then + case $subdir in + test*) continue ;; + esac + fi + ## site-lisp for in-place installs (?). [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \ echo "WARNING: $subdir not found, making anyway" @@ -447,6 +461,17 @@ for f in `find admin -type f`; do ln $f $tempdir/$f done +if [ "$with_tests" = "yes" ]; then + echo "Making links to \`test' and its subdirectories" + for f in `find test -type f`; do + case $f in + test/automated/flymake/warnpred/a.out) continue ;; + test/automated/Makefile) continue ;; + esac + ln $f $tempdir/$f + done +fi + echo "Making links to \`etc' and its subdirectories" for f in `find etc -type f`; do case $f in From ff62aabc622fdf35aaa878fd284f446de85fc5fd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Jul 2013 00:03:33 -0700 Subject: [PATCH 06/57] * make-dist: Add a --tests option, to include test/ (backport from trunk) --- ChangeLog | 4 ++++ make-dist | 31 ++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54853f4a600..723baca9547 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-07-25 Glenn Morris + + * make-dist: Add a --tests option, to include test/. + 2013-07-02 Christoph Egger (tiny change) * configure.ac (emacs_broken_SIGIO): Set on gnu-kfreebsd to avoid hang. diff --git a/make-dist b/make-dist index 788dca3462c..986f784164c 100755 --- a/make-dist +++ b/make-dist @@ -1,8 +1,7 @@ #!/bin/sh ### make-dist: create an Emacs distribution tar file from current srcdir -## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, -## Inc. +## Copyright (C) 1995, 1997-1998, 2000-2013 Free Software Foundation, Inc. ## This file is part of GNU Emacs. @@ -51,6 +50,7 @@ clean_up=no make_tar=no default_gzip=gzip newer="" +with_tests=no while [ $# -gt 0 ]; do case "$1" in @@ -102,6 +102,12 @@ while [ $# -gt 0 ]; do check=no ;; + ## Include the test/ directory. + ## This option is mainly for the hydra build server. + "--tests") + with_tests=yes + ;; + "--help") echo "Usage: ${progname} [options]" echo "" @@ -115,6 +121,7 @@ while [ $# -gt 0 ]; do echo " --no-update don't recompile or do analogous things" echo " --snapshot same as --clean-up --no-update --tar --no-check" echo " --tar make a tar file" + echo " --tests include the test/ directory" echo "" exit 0 ;; @@ -294,7 +301,7 @@ for subdir in site-lisp \ build-aux build-aux/snippet \ src src/bitmaps lib lib-src oldXMenu lwlib \ nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ - `find etc lisp admin -type d` \ + `find etc lisp admin test -type d` \ doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \ info m4 msdos \ nextstep nextstep/templates \ @@ -305,6 +312,13 @@ for subdir in site-lisp \ nextstep/GNUstep/Emacs.base \ nextstep/GNUstep/Emacs.base/Resources do + + if [ "$with_tests" != "yes" ]; then + case $subdir in + test*) continue ;; + esac + fi + ## site-lisp for in-place installs (?). [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \ echo "WARNING: $subdir not found, making anyway" @@ -447,6 +461,17 @@ for f in `find admin -type f`; do ln $f $tempdir/$f done +if [ "$with_tests" = "yes" ]; then + echo "Making links to \`test' and its subdirectories" + for f in `find test -type f`; do + case $f in + test/automated/flymake/warnpred/a.out) continue ;; + test/automated/Makefile) continue ;; + esac + ln $f $tempdir/$f + done +fi + echo "Making links to \`etc' and its subdirectories" for f in `find etc -type f`; do case $f in From 9d611ffe280d0af4aa43406e5e102636606d3204 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 25 Jul 2013 08:29:36 +0100 Subject: [PATCH 07/57] * fileio.c (Finsert_file_contents): Avoid double-close. Fixes: debbugs:14936 --- src/ChangeLog | 4 ++++ src/fileio.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 64b13a5ac28..56fe20fda98 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-07-25 Paul Eggert + + * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936). + 2013-07-24 Eli Zaretskii * xdisp.c (redisplay_window): Instead of moving point out of diff --git a/src/fileio.c b/src/fileio.c index a19fcd9f663..1350e19ef27 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3860,7 +3860,11 @@ by calling `format-decode', which see. */) if (same_at_start - BEGV_BYTE == end_offset - beg_offset) { emacs_close (fd); - specpdl_ptr--; + + /* Discard the unwind protect for closing the file, and any + unwind protect for restoring point. */ + specpdl_ptr = specpdl + fd_index; + /* Truncate the buffer to the size of the file. */ del_range_1 (same_at_start, same_at_end, 0, 0); goto handled; From b68060293249e7a86c23dfb7a831a11dbb5bd694 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 25 Jul 2013 09:07:47 +0100 Subject: [PATCH 08/57] * fileio.c (Finsert_file_contents): Use a more-conservative fix. Fixes: debbugs:14936 --- src/fileio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 1350e19ef27..c47b3533145 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3860,10 +3860,7 @@ by calling `format-decode', which see. */) if (same_at_start - BEGV_BYTE == end_offset - beg_offset) { emacs_close (fd); - - /* Discard the unwind protect for closing the file, and any - unwind protect for restoring point. */ - specpdl_ptr = specpdl + fd_index; + clear_unwind_protect (fd_index); /* Truncate the buffer to the size of the file. */ del_range_1 (same_at_start, same_at_end, 0, 0); From 025309873b9f363d226694953e66ee98d8b11683 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 25 Jul 2013 10:35:04 +0200 Subject: [PATCH 09/57] lisp/desktop.el: Rename internal "desktop-X" frame params to "desktop--X". (desktop-filter-parameters-alist, desktop--filter-restore-desktop-parm) (desktop--filter-save-desktop-parm, desktop--process-minibuffer-frames) (desktop--select-frame, desktop--sort-states, desktop-restore-frames): Change accordingly. --- lisp/ChangeLog | 8 +++++ lisp/desktop.el | 94 ++++++++++++++++++++++++------------------------- 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 358a23450a8..455c9cdd2e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-07-25 Juanma Barranquero + + * desktop.el: Rename internal "desktop-X" frame params to "desktop--X". + (desktop-filter-parameters-alist, desktop--filter-restore-desktop-parm) + (desktop--filter-save-desktop-parm, desktop--process-minibuffer-frames) + (desktop--select-frame, desktop--sort-states, desktop-restore-frames): + Change accordingly. + 2013-07-25 Glenn Morris * dired-x.el (dired-mark-extension): Convert comment to doc string. diff --git a/lisp/desktop.el b/lisp/desktop.el index 291f28a79db..4fff2ffbe7c 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -878,30 +878,30 @@ DIRNAME must be the directory in which the desktop file will be saved." ;; ---------------------------------------------------------------------------- (defvar desktop-filter-parameters-alist - '((background-color . desktop--filter-*-color) - (buffer-list . t) - (buffer-predicate . t) - (buried-buffer-list . t) - (desktop-font . desktop--filter-restore-desktop-parm) - (desktop-fullscreen . desktop--filter-restore-desktop-parm) - (desktop-height . desktop--filter-restore-desktop-parm) - (desktop-width . desktop--filter-restore-desktop-parm) - (font . desktop--filter-save-desktop-parm) - (font-backend . t) - (foreground-color . desktop--filter-*-color) - (fullscreen . desktop--filter-save-desktop-parm) - (height . desktop--filter-save-desktop-parm) - (left . desktop--filter-iconified-position) - (minibuffer . desktop--filter-minibuffer) - (name . t) - (outer-window-id . t) - (parent-id . t) - (top . desktop--filter-iconified-position) - (tty . desktop--filter-tty*) - (tty-type . desktop--filter-tty*) - (width . desktop--filter-save-desktop-parm) - (window-id . t) - (window-system . t)) + '((background-color . desktop--filter-*-color) + (buffer-list . t) + (buffer-predicate . t) + (buried-buffer-list . t) + (desktop--font . desktop--filter-restore-desktop-parm) + (desktop--fullscreen . desktop--filter-restore-desktop-parm) + (desktop--height . desktop--filter-restore-desktop-parm) + (desktop--width . desktop--filter-restore-desktop-parm) + (font . desktop--filter-save-desktop-parm) + (font-backend . t) + (foreground-color . desktop--filter-*-color) + (fullscreen . desktop--filter-save-desktop-parm) + (height . desktop--filter-save-desktop-parm) + (left . desktop--filter-iconified-position) + (minibuffer . desktop--filter-minibuffer) + (name . t) + (outer-window-id . t) + (parent-id . t) + (top . desktop--filter-iconified-position) + (tty . desktop--filter-tty*) + (tty-type . desktop--filter-tty*) + (width . desktop--filter-save-desktop-parm) + (window-id . t) + (window-system . t)) "Alist of frame parameters and filtering functions. Each element is a cons (PARAM . FILTER), where PARAM is a parameter @@ -972,27 +972,27 @@ Only meaningful when called from a filtering function in t))) (defun desktop--filter-restore-desktop-parm (current parameters saving) - ;; When switching to a GUI frame, convert desktop-XXX parameter to XXX + ;; When switching to a GUI frame, convert desktop--XXX parameter to XXX (or saving (not (desktop-switch-to-gui-p parameters)) (let ((val (cdr current))) (if (eq val :desktop-processed) nil (cons (intern (substring (symbol-name (car current)) - 8)) ;; (length "desktop-") + 9)) ;; (length "desktop--") val))))) (defun desktop--filter-save-desktop-parm (current parameters saving) - ;; When switching to a tty frame, save parameter XXX as desktop-XXX so it + ;; When switching to a tty frame, save parameter XXX as desktop--XXX so it ;; can be restored in a subsequent GUI session, unless it already exists. (cond (saving t) ((desktop-switch-to-tty-p parameters) - (let ((sym (intern (format "desktop-%s" (car current))))) + (let ((sym (intern (format "desktop--%s" (car current))))) (if (assq sym parameters) nil (cons sym (cdr current))))) ((desktop-switch-to-gui-p parameters) - (let* ((dtp (assq (intern (format "desktop-%s" (car current))) + (let* ((dtp (assq (intern (format "desktop--%s" (car current))) parameters)) (val (cdr dtp))) (if (eq val :desktop-processed) @@ -1047,34 +1047,34 @@ Internal use only." filtered)) (defun desktop--process-minibuffer-frames (frames) - ;; Adds a desktop-mini parameter to frames - ;; desktop-mini is a list (MINIBUFFER NUMBER DEFAULT?) where + ;; Adds a desktop--mini parameter to frames + ;; desktop--mini is a list (MINIBUFFER NUMBER DEFAULT?) where ;; MINIBUFFER t if the frame (including minibuffer-only) owns a minibuffer ;; NUMBER if MINIBUFFER = t, an ID for the frame; if nil, the ID of ;; the frame containing the minibuffer used by this frame ;; DEFAULT? if t, this frame is the value of default-minibuffer-frame (let ((count 0)) - ;; Reset desktop-mini for all frames + ;; Reset desktop--mini for all frames (dolist (frame (frame-list)) - (set-frame-parameter frame 'desktop-mini nil)) + (set-frame-parameter frame 'desktop--mini nil)) ;; Number all frames with its own minibuffer (dolist (frame (minibuffer-frame-list)) - (set-frame-parameter frame 'desktop-mini + (set-frame-parameter frame 'desktop--mini (list t (cl-incf count) (eq frame default-minibuffer-frame)))) ;; Now link minibufferless frames with their minibuffer frames (dolist (frame frames) - (unless (frame-parameter frame 'desktop-mini) + (unless (frame-parameter frame 'desktop--mini) (let ((mb-frame (window-frame (minibuffer-window frame)))) ;; Frames whose minibuffer frame has been filtered out will have - ;; desktop-mini = nil, so desktop-restore-frames will restore them - ;; according to their minibuffer parameter. Set up desktop-mini + ;; desktop--mini = nil, so desktop-restore-frames will restore them + ;; according to their minibuffer parameter. Set up desktop--mini ;; for the rest. (when (memq mb-frame frames) - (set-frame-parameter frame 'desktop-mini + (set-frame-parameter frame 'desktop--mini (list nil - (cl-second (frame-parameter mb-frame 'desktop-mini)) + (cl-second (frame-parameter mb-frame 'desktop--mini)) nil)))))))) (defun desktop-save-frames () @@ -1234,23 +1234,23 @@ is the parameter list of the frame being restored. Internal use only." (;; If the frame has its own minibuffer, let's see whether ;; that frame has already been loaded (which can happen after ;; M-x desktop-read). - (car (setq mini (cdr (assq 'desktop-mini frame-cfg)))) + (car (setq mini (cdr (assq 'desktop--mini frame-cfg)))) (setq frame (or (desktop--find-frame (lambda (f m) - (equal (frame-parameter f 'desktop-mini) m)) + (equal (frame-parameter f 'desktop--mini) m)) display mini)))) (;; For minibufferless frames, check whether they already exist, ;; and that they are linked to the right minibuffer frame. mini (setq frame (desktop--find-frame (lambda (f n) - (let ((m (frame-parameter f 'desktop-mini))) + (let ((m (frame-parameter f 'desktop--mini))) (and m (null (cl-first m)) (= (cl-second m) n) (equal (cl-second (frame-parameter (window-frame (minibuffer-window f)) - 'desktop-mini)) + 'desktop--mini)) n)))) display (cl-second mini)))) (;; Default to just finding a frame in the same display. @@ -1320,8 +1320,8 @@ its window state. Internal use only." ;; Order: default minibuffer frame ;; other frames with minibuffer, ascending ID ;; minibufferless frames, ascending ID - (let ((dm1 (cdr (assq 'desktop-mini (car state1)))) - (dm2 (cdr (assq 'desktop-mini (car state2))))) + (let ((dm1 (cdr (assq 'desktop--mini (car state1)))) + (dm2 (cdr (assq 'desktop--mini (car state2))))) (cond ((cl-third dm1) t) ((cl-third dm2) nil) ((eq (cl-first dm1) (cl-first dm2)) @@ -1355,7 +1355,7 @@ being set (usually, by reading it from the desktop)." (condition-case err (let* ((frame-cfg (car state)) (window-cfg (cdr state)) - (d-mini (cdr (assq 'desktop-mini frame-cfg))) + (d-mini (cdr (assq 'desktop--mini frame-cfg))) num frame to-tty) ;; Only set target if forcing displays and the target display is different. (if (or (not forcing) @@ -1377,7 +1377,7 @@ being set (usually, by reading it from the desktop)." ;; global state; it's best to do it here than add a bunch of global ;; variables to pass info back-and-forth to/from the filter function. (cond - ((null d-mini)) ;; No desktop-mini. Process as normal frame. + ((null d-mini)) ;; No desktop--mini. Process as normal frame. (to-tty) ;; Ignore minibuffer stuff and process as normal frame. ((cl-first d-mini) ;; Frame has minibuffer (or it is minibuffer-only). (setq num (cl-second d-mini)) From f63ebeb54e453b3da139d3495eb2f1f59bab46c7 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 25 Jul 2013 11:24:26 +0200 Subject: [PATCH 10/57] lisp/desktop.el: Use pcase-let, pcase-let* in a few places. (desktop--select-frame, desktop--sort-states, desktop-restore-frames): Deobfuscate access to desktop--mini values. --- lisp/ChangeLog | 2 ++ lisp/desktop.el | 58 ++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 455c9cdd2e3..384e15f758c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,8 @@ (desktop--filter-save-desktop-parm, desktop--process-minibuffer-frames) (desktop--select-frame, desktop--sort-states, desktop-restore-frames): Change accordingly. + (desktop--select-frame, desktop--sort-states, desktop-restore-frames): + Use pcase-let, pcase-let* to deobfuscate access to desktop--mini values. 2013-07-25 Glenn Morris diff --git a/lisp/desktop.el b/lisp/desktop.el index 4fff2ffbe7c..28c781d95e2 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1228,33 +1228,34 @@ is the parameter list of the frame being restored. Internal use only." ;; session has already been loaded. The other main use case, which ;; is the initial desktop-read upon starting Emacs, should usually ;; only have one, or very few, frame(s) to reuse. - (cond (;; When the target is tty, every existing frame is reusable. - (null display) + (cond ((null display) + ;; When the target is tty, every existing frame is reusable. (setq frame (desktop--find-frame nil display))) - (;; If the frame has its own minibuffer, let's see whether + ((car (setq mini (cdr (assq 'desktop--mini frame-cfg)))) + ;; If the frame has its own minibuffer, let's see whether ;; that frame has already been loaded (which can happen after ;; M-x desktop-read). - (car (setq mini (cdr (assq 'desktop--mini frame-cfg)))) (setq frame (or (desktop--find-frame (lambda (f m) (equal (frame-parameter f 'desktop--mini) m)) display mini)))) - (;; For minibufferless frames, check whether they already exist, + (mini + ;; For minibufferless frames, check whether they already exist, ;; and that they are linked to the right minibuffer frame. - mini (setq frame (desktop--find-frame (lambda (f n) - (let ((m (frame-parameter f 'desktop--mini))) + (pcase-let (((and m `(,hasmini ,num)) + (frame-parameter f 'desktop--mini))) (and m - (null (cl-first m)) - (= (cl-second m) n) + (null hasmini) + (= num n) (equal (cl-second (frame-parameter (window-frame (minibuffer-window f)) 'desktop--mini)) n)))) display (cl-second mini)))) - (;; Default to just finding a frame in the same display. - t + (t + ;; Default to just finding a frame in the same display. (setq frame (desktop--find-frame nil display)))) ;; If found, remove from the list. (when frame @@ -1320,14 +1321,12 @@ its window state. Internal use only." ;; Order: default minibuffer frame ;; other frames with minibuffer, ascending ID ;; minibufferless frames, ascending ID - (let ((dm1 (cdr (assq 'desktop--mini (car state1)))) - (dm2 (cdr (assq 'desktop--mini (car state2))))) - (cond ((cl-third dm1) t) - ((cl-third dm2) nil) - ((eq (cl-first dm1) (cl-first dm2)) - (< (cl-second dm1) (cl-second dm2))) - (t - (cl-first dm1))))) + (pcase-let ((`(,_p1 ,hasmini1 ,num1 ,default1) (assq 'desktop--mini (car state1))) + (`(,_p2 ,hasmini2 ,num2 ,default2) (assq 'desktop--mini (car state2)))) + (cond (default1 t) + (default2 nil) + ((eq hasmini1 hasmini2) (< num1 num2)) + (t hasmini1)))) (defun desktop-restoring-frames-p () "True if calling `desktop-restore-frames' will actually restore frames." @@ -1353,10 +1352,10 @@ being set (usually, by reading it from the desktop)." (dolist (state desktop-saved-frame-states) (condition-case err - (let* ((frame-cfg (car state)) - (window-cfg (cdr state)) - (d-mini (cdr (assq 'desktop--mini frame-cfg))) - num frame to-tty) + (pcase-let* ((`(,frame-cfg . ,window-cfg) state) + ((and d-mini `(,hasmini ,num ,default)) + (cdr (assq 'desktop--mini frame-cfg))) + (frame nil) (to-tty nil)) ;; Only set target if forcing displays and the target display is different. (if (or (not forcing) (equal target (or (assq 'display frame-cfg) '(display . nil)))) @@ -1379,15 +1378,14 @@ being set (usually, by reading it from the desktop)." (cond ((null d-mini)) ;; No desktop--mini. Process as normal frame. (to-tty) ;; Ignore minibuffer stuff and process as normal frame. - ((cl-first d-mini) ;; Frame has minibuffer (or it is minibuffer-only). - (setq num (cl-second d-mini)) + (hasmini ;; Frame has minibuffer (or it is minibuffer-only). (when (eq (cdr (assq 'minibuffer frame-cfg)) 'only) (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) frame-cfg)))) (t ;; Frame depends on other frame's minibuffer window. - (let ((mb-frame (cdr (assq (cl-second d-mini) frame-mb-map)))) + (let ((mb-frame (cdr (assq num frame-mb-map)))) (unless (frame-live-p mb-frame) - (error "Minibuffer frame %s not found" (cl-second d-mini))) + (error "Minibuffer frame %s not found" num)) (let ((mb-param (assq 'minibuffer frame-cfg)) (mb-window (minibuffer-window mb-frame))) (unless (and (window-live-p mb-window) @@ -1400,9 +1398,9 @@ being set (usually, by reading it from the desktop)." ;; restore the window config. (setq frame (desktop--make-frame frame-cfg window-cfg)) ;; Set default-minibuffer if required. - (when (cl-third d-mini) (setq default-minibuffer-frame frame)) - ;; Store frame/NUM to assign to minibufferless frames. - (when num (push (cons num frame) frame-mb-map)))) + (when default (setq default-minibuffer-frame frame)) + ;; Store NUM/frame to assign to minibufferless frames. + (when hasmini (push (cons num frame) frame-mb-map)))) (error (delay-warning 'desktop (error-message-string err) :error)))) From f47ad11b6b9db136d1fdbfdb4ac575d620d14597 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Thu, 25 Jul 2013 11:58:27 +0200 Subject: [PATCH 11/57] In display-buffer bind split-window-keep-point to t, bug#14829. * window.el (display-buffer): In display-buffer bind split-window-keep-point to t, bug#14829. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 384e15f758c..6e0b22c9835 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-25 Martin Rudalics + + * window.el (display-buffer): In display-buffer bind + split-window-keep-point to t, bug#14829. + 2013-07-25 Juanma Barranquero * desktop.el: Rename internal "desktop-X" frame params to "desktop--X". diff --git a/lisp/window.el b/lisp/window.el index a2acd2a81b0..86d93c0a9f6 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5470,6 +5470,9 @@ argument, ACTION is t." (let ((buffer (if (bufferp buffer-or-name) buffer-or-name (get-buffer buffer-or-name))) + ;; Make sure that when we split windows the old window keeps + ;; point, bug#14829. + (split-window-keep-point t) ;; Handle the old form of the first argument. (inhibit-same-window (and action (not (listp action))))) (unless (listp action) (setq action nil)) From 6bd128d53d43ac5e6d1a124be4e8781667a5012f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Jul 2013 06:18:09 -0400 Subject: [PATCH 12/57] Auto-commit of loaddefs files. --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 2a7d9a297f0..c871761bb3c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4367,7 +4367,7 @@ instead. ;;;*** -;;;### (autoloads nil "dired-x" "dired-x.el" "9bfe6b761cb88b4d3ab78a7905979371") +;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ From 57cff7120613c70198a934bfc94f08714ba2a1a8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Jul 2013 08:46:00 -0700 Subject: [PATCH 13/57] Add Makefile rules for ido.texi * doc/misc/Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido. (ido, $(buildinfodir)/ido$(INFO_EXT), ido.dvi, ido.pdf): New rules. * info/dir: Add ido. --- ChangeLog | 2 ++ doc/misc/ChangeLog | 3 +++ doc/misc/Makefile.in | 13 ++++++++++++- info/dir | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc30c8198e7..fe958751041 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2013-07-25 Glenn Morris + * info/dir: Add ido. + * make-dist: Add a --tests option, to include test/. 2013-07-24 Glenn Morris diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 7bc396fd284..24a69282bab 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,8 @@ 2013-07-25 Glenn Morris + * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido. + (ido, $(buildinfodir)/ido$(INFO_EXT), ido.dvi, ido.pdf): New rules. + * erc.texi (Special Features): Update contact information. (History): Avoid using @email. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 712fbccbfde..67a899af8ce 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -45,7 +45,7 @@ MAKEINFO_OPTS = --force -I$(emacsdir) INFO_TARGETS = ada-mode auth autotype bovine calc ccmode cl \ dbus dired-x ebrowse ede ediff edt eieio \ emacs-mime epa erc ert eshell eudc efaq \ - flymake forms gnus emacs-gnutls htmlfontify idlwave info.info \ + flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \ mairix-el message mh-e newsticker nxml-mode \ org pcl-cvs pgg rcirc remember reftex sasl \ sc semantic ses sieve smtpmail speedbar srecode tramp \ @@ -79,6 +79,7 @@ DVI_TARGETS = \ emacs-gnutls.dvi \ htmlfontify.dvi \ idlwave.dvi \ + ido.dvi \ info.dvi \ mairix-el.dvi \ message.dvi \ @@ -135,6 +136,7 @@ PDF_TARGETS = \ htmlfontify.pdf \ emacs-gnutls.pdf \ idlwave.pdf \ + ido.pdf \ info.pdf \ mairix-el.pdf \ message.pdf \ @@ -452,6 +454,15 @@ idlwave.dvi: ${srcdir}/idlwave.texi ${gfdl} idlwave.pdf: ${srcdir}/idlwave.texi ${gfdl} $(ENVADD) $(TEXI2PDF) ${srcdir}/idlwave.texi +ido : $(buildinfodir)/ido$(INFO_EXT) +$(buildinfodir)/ido$(INFO_EXT): ${srcdir}/ido.texi $(emacsdir)/emacsver.texi ${gfdl} + $(mkinfodir) + $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ido.texi +ido.dvi: ${srcdir}/ido.texi $(emacsdir)/emacsver.texi ${gfdl} + $(ENVADD) $(TEXI2DVI) ${srcdir}/ido.texi +ido.pdf: ${srcdir}/ido.texi $(emacsdir)/emacsver.texi ${gfdl} + $(ENVADD) $(TEXI2PDF) ${srcdir}/ido.texi + # NB this one needs --no-split even without a .info extension. # Avoid name clash with overall "info" target. info.info : $(buildinfodir)/info$(INFO_EXT) diff --git a/info/dir b/info/dir index 55f7c71de79..cecc0d00f47 100644 --- a/info/dir +++ b/info/dir @@ -75,6 +75,7 @@ Emacs misc features * Forms: (forms). Emacs package for editing data bases by filling in forms. * Htmlfontify: (htmlfontify). Convert source code to html. +* Ido: (ido). Interactively do things with buffers and files. * PCL-CVS: (pcl-cvs). Emacs front-end to CVS. * RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. From 02e2beb94bff2a96f6925f25f2f90e1526e9adca Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 25 Jul 2013 23:40:51 +0000 Subject: [PATCH 14/57] gnus-art.el (gnus-button-url-regexp): Make it match url in which punctuation characters follow parentheses (bug#14950) --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-art.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5d3de61aa91..3e7d8c992e7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-07-25 Andreas Schwab + + * gnus-art.el (gnus-button-url-regexp): Make it match url in which + punctuation characters follow parentheses (bug#14950). + 2013-07-23 Katsumi Yamaoka * gnus.el (gnus-continuum-version): diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 31a108a3c98..e65b9fb99e4 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -7177,15 +7177,17 @@ groups." "\\(?:" ;; Match paired parentheses, e.g. in Wikipedia URLs: ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com - "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*" + "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" + "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?" "\\|" - "[" chars punct "]+" "[" chars "]" + "[" chars punct "]+" "[" chars "]" "\\)")) (concat ;; XEmacs 21.4 doesn't support POSIX. "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+" "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)")) "\\)") "Regular expression that matches URLs." + :version "24.4" :group 'gnus-article-buttons :type 'regexp) From de8f06aff4b7768d05769798d13482c183153bce Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 25 Jul 2013 21:45:52 -0400 Subject: [PATCH 15/57] * etc/spook.lines: Additions (tiny change) Fixes: debbugs:14658 --- etc/ChangeLog | 4 ++++ etc/spook.lines | Bin 9643 -> 12802 bytes 2 files changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index d477f8e3d36..c201772cd93 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2013-07-26 Micah Anderson (tiny change) + + * spook.lines: Additions. (Bug#14658) + 2013-07-16 Jan Djärv * NEWS: Document blink-cursor-blinks and blink timers stopped. diff --git a/etc/spook.lines b/etc/spook.lines index 16bc696e0f34dc92525f4a8de2b87d091f0b1870..2a1a0ac1cb962ef8f6fb8644f3bacfb14757e548 100644 GIT binary patch delta 4783 zcmYjVO^h7JbsqkcLs1leOp(;?vX@IyG^rVqOZ|jG9IK~$etLJhd(_plOEQ3!nwi>} z;`Vfns=If0cv-=R1jr!?R0v=LL7-d$C=QSS@y(YU64=fuKoI0$IDrAfMh-Dx(|v)uio!h^S$+NkN)y!K*i8$m14Bp76}1M{ga?a+#XXj=IO{Zr!h&e>vJ; zYBVd=hU0jZ>R!fBpj%0wiY;GdoRR&~h7%Ic{MPJMjx_6c%|G&6sFYV~Ls^qKj|sl`=C>2xbmyFx<+ zrDsa>Tv(YH7Fy_gE2;?U7T=7-Fjt3G_qQM&_0uRlUCIgxET)gN7V7+gKfo#Hc-<6jYFPID%EB^L?+M}6MaaBh1#}Rcy;}(i=1e-Z?-|lTI6Q* z>Tiz2%+1g>AD>+~(qw^|pS^Rq-!Ol1_MdO@JxioRJ)e;mE7ev5UxPr4mg7Oa7R6P| z_08UE-#HyP&7e}|rPXc5v|1w5 zJW<1KlE{bzN+H!+Nde-+04<-HN9Tf@Ev0kI7kq?8w=^#>X-f++QV4?<7+9gj8s-P* zK0eWU1pZNEE}viA&yksJ{%odcUfbz>RH=>yQjiK*y9qOZls0Y)rN_eBtXqwOObR(P zZwt+nQBIa!W*B;Wq%>MbeF3)C2i+1sBN;%xQ zxeihf>b<)8tMis^cW|%{mr!oPlObu};fWj+*sfz!LFw=*hZj1wZzI{rYaOn4I90g` zGQs@v{Cd4Z?w-i;$Soy}J zn8L@96k4M3ujaF`Ni6jmyR``T0S4v?%%6aQR{MQSJc0}ATs}UvA$mxU@y(7GvTaw zk>)Z}G#Q;Im*a9bh*hdGsv$Im^3&7&6JigP!en*=7Ow1Dei4ns!!2>D%CX`4G9A*m1E@;immYsHiQ~$_68PP zqjs~_g3s3^vdMZP@D>jqS^ue=aCmXei<`dr{A+)6w~I2qt}?ZQg_3);L)UI}y#Swg zxz*xRnMh9jP?x1&UV7v7Kwyb(vl-it`SjBJhg#1q>Nv?{|+dkFsgfXaPQ*x{_6Yh!Vz!?^an*OD448;F1O2*1U7srES*xi z=cVkW(|x{0iu!yErxs@Q^*`L7a=lH)@a>4|xzF`pnVLS&icvW?=Tn7q(Yqal-*(B( zw-PwXC$QkVt3*g|m(-=|=8Mq~#+r&TEg{kax+`-!qtGZ>H0Hc^VgipLjLdIdZ+Zw= z->cn!p9WgVdk;hoCyEct7364?h%#Nt;yKr(!gJ1|lP8HpX&MUCzr4Jfsy$jGra3P| z5`tQ{TfTr-{Sf(bkiAotnBTwr^+4~6G|Sa4lFv5Hk1yA*K8Az+dG<+S$@J+#bFWkb+hLwLdgaa$JNC?-EB|#D zs05}9?2Szuu}!11*$Wt0{!D^4sG0;NGzlDLo8_wy?*$$<4dgZ=Bk+8D4rKBa)`oux zAAs53!4ZOxJ`EjawywUnN{A= z5X=fT@kMC&%`dLnA98>exFFPHp2}x{bVDtt*fZ35>3H;;i5ig`!VJ}t1|SycX!F!0KT13kCDBF82 z`l1cpXA_z3nSXzy`*xRJCVX5#DU75W1}X#Pkk`=U!R1s6%{La_JO&HdZS(O$=l6O& ztkmma&6yT8F-0?{3W$eHj>@h>Y*r(r$un9JzyL)Qrv$fy8D;aI!6F=oh7Wp?M=iXk z~CvUulcWP7gZE?&FM zXFy$%;3ZJ3R3pcSwpt7TMDZjrABMz;RG2L;`A7_U99a$(D4IF4QiZDrNw<<0AsM0H ziYLmVc0R6`wLR)fNaS?dCU z#_BezqEjc1aGDhhj>XvBgSR&298B7^1MJE8XoNP_DFDVv9cEKQ1O*xjm#!}n-$O7n z8<>f41RC)a`=F7TFMa(=qijN~!5|y*>9n*6bG(-MVrk*EVS&DlHv|q@)9#udE(QB# ztrcZ4(q$Pg0XlFx?g;Qf`BcL77e(0u20$l=JrU<$5fTLkO}7p9=*41M~RW!r@NK=xew4 zJ)}PK+OEwW(|N%)H=wW_?Om<9il2d*(AMJT>OpYHMs|erl~8 z?g!@otc5fEXanF3v--GynoG+czPUkxwrL|avt2zK0ZQyi3lpdqA355Ptb}^3u3Xn%3BL?AIi2ejMkgprDFY#eZp>#Bt)6DzufT*3TPzoA=(j zyU%eF;F2p6pp1m73ej@lPar6w_W}nBswz&X2M$QR0OA1U2tqL17J8YTo!y<;`DVV^ zEq}CdW3S0q7L0hzf}2g&=h5borq+BmpMnc5OK`JgtaBx~tm(;>Tps>uc@3a-rfC-L zwT^(V?RhA)6?@a^oTis7ih>fi#%&6>+D<}u`wFbL8}MEGML6M`0nZn0m3vR)KW36>FE@PNN3XUd&l{1t4bVdQ|=lLaiQM%BHZtcL607Q3EhED^b&-- zvfy@2JUxa3#5Nj~)VPaYcui`$#YK$^;!#6Vt1g(gjVA>&U4RE&C*b71ul<%} z4&Ia7(xZ-qp>7GEbq5B>CMz5Byy_YSe2tzmnSzNjn?ym0SC!!Rztyfxb0*yOzt>u3 z4HsV7AA$GxZ^6`olAk6@+$m`~O;|)$;rjy%aJ=WQK#i5D!z@kD3P(B43NG>MQ0$Gv zZtq=R3Q?TRB%yKe3Pk$G!|P0{b5gPq*;$+OvRdjW@)@|^w{&P-kUHAd1*K(Ec8OI<8SaHXo#v8na!p@MrWSKc3#brd zmN?92MClEKy6aq6^ijHtlx)BcN1lbl;Q=@mjzB4FblKakg@EM~)6c+z@Ku2RUY|!C zj`f2({r&s$)J0!;Ds1LLPbAyRtSTp#GO9Qp5!-Mra`eEHO!B$a#Ns0S5gBcj694&J zGzfNd%)c!!+XizlQA=eEH==R4AN{41>@ZDVO6Ah`zqZRx~L1L-k?Sb7O-C%A-)0gqTiK3ZAExU^1%rZ0v z7Z2K`Qpab@HgfRc;!^l+Fb3hF>_AP>1a)evOqz}xi5;z)WLeP1JcKWYjJ?DRxAQP#SYHdjIL|Cs*#eCVVTu)RFSz7eHQ7q%O(C6l}9VH7*@W>xVncE zAtgAn?VV$T@a?hTuxX_DmZqD=0!4nCq+BMBF;|z8VkL^h104lr6}Z_O9*tSVaj3v{ zH7#U{`w#^)eKun_ifM{vW+t~cvJ`(ZGR()r!$|YGYpKpRspC-2Dq`nV1r9H860gGFiI8fU>50?9HLU(>1M8r|uWr|>T=DGeYyqxMgy5@* zF?|U~W*$w2W$2r{&}^FU#^iChJsD}oG4EOw`lbfE)`-Q&ja9luB=9MK{nImWVLAsl cru+KODQ0Qt<8 From 15ac32d5284476d27dd40bd238c3bab633081aee Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Jul 2013 21:55:06 -0400 Subject: [PATCH 16/57] * lisp/simple.el (global-visual-line-mode): Do not duplicate the mode lighter. Fixes: debbugs:14858 --- lisp/ChangeLog | 5 +++++ lisp/simple.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e0b22c9835..25ce0ff9cd3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Glenn Morris + + * simple.el (global-visual-line-mode): + Do not duplicate the mode lighter. (Bug#14858) + 2013-07-25 Martin Rudalics * window.el (display-buffer): In display-buffer bind diff --git a/lisp/simple.el b/lisp/simple.el index 4b158d31f36..6f5cac2d011 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5530,8 +5530,7 @@ Mode' for details." (visual-line-mode 1)) (define-globalized-minor-mode global-visual-line-mode - visual-line-mode turn-on-visual-line-mode - :lighter " vl") + visual-line-mode turn-on-visual-line-mode) (defun transpose-chars (arg) From 8358a09d4f1e7e26bec6f72c267fd2b931d00c19 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 25 Jul 2013 22:45:15 -0400 Subject: [PATCH 17/57] * lisp/align.el (align-regexp): Doc fix. (align-region): Explicit error if subexpression missing/does not match. Fixes: debbugs:14857 --- lisp/ChangeLog | 3 +++ lisp/align.el | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 25ce0ff9cd3..79582ea560a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-07-26 Glenn Morris + * align.el (align-regexp): Doc fix. (Bug#14857) + (align-region): Explicit error if subexpression missing/does not match. + * simple.el (global-visual-line-mode): Do not duplicate the mode lighter. (Bug#14858) diff --git a/lisp/align.el b/lisp/align.el index 1b62042be75..3d2ca192245 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -906,15 +906,8 @@ on the format of these lists." ;;;###autoload (defun align-regexp (beg end regexp &optional group spacing repeat) "Align the current region using an ad-hoc rule read from the minibuffer. -BEG and END mark the limits of the region. This function will prompt -for the REGEXP to align with. If no prefix arg was specified, you -only need to supply the characters to be lined up and any preceding -whitespace is replaced. If a prefix arg was specified, the full -regexp with parenthesized whitespace should be supplied; it will also -prompt for which parenthesis GROUP within REGEXP to modify, the amount -of SPACING to use, and whether or not to REPEAT the rule throughout -the line. See `align-rules-list' for more information about these -options. +BEG and END mark the limits of the region. Interactively, this function +prompts for the regular expression REGEXP to align with. For example, let's say you had a list of phone numbers, and wanted to align them so that the opening parentheses would line up: @@ -925,8 +918,29 @@ align them so that the opening parentheses would line up: Joe (123) 456-7890 There is no predefined rule to handle this, but you could easily do it -using a REGEXP like \"(\". All you would have to do is to mark the -region, call `align-regexp' and type in that regular expression." +using a REGEXP like \"(\". Interactively, all you would have to do is +to mark the region, call `align-regexp' and enter that regular expression. + +REGEXP must contain at least one parenthesized subexpression, typically +whitespace of the form \"\\\\(\\\\s-*\\\\)\". In normal interactive use, +this is automatically added to the start of your regular expression after +you enter it. You only need to supply the characters to be lined up, and +any preceding whitespace is replaced. + +If you specify a prefix argument (or use this function non-interactively), +you must enter the full regular expression, including the subexpression. +The function also then prompts for which subexpression parenthesis GROUP +\(default 1) within REGEXP to modify, the amount of SPACING (default +`align-default-spacing') to use, and whether or not to REPEAT the rule +throughout the line. + +See `align-rules-list' for more information about these options. + +The non-interactive form of the previous example would look something like: + \(align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\") + +This function is a nothing more than a small wrapper that helps you +construct a rule to pass to `align-region', which does the real work." (interactive (append (list (region-beginning) (region-end)) @@ -1498,6 +1512,9 @@ aligner would have dealt with are." (setq rule-beg (match-beginning first) save-match-data (match-data)) + (or rule-beg + (error "No match for subexpression %s" first)) + ;; unless the `valid' attribute is set, and tells ;; us that the rule is not valid at this point in ;; the code.. From f6b1502430653fac080f76a08edd2eb690f92146 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 Jul 2013 09:56:35 +0300 Subject: [PATCH 18/57] Fix bug #14946 with documentation of fringe-mode the variable. doc/emacs/display.texi (Fringes): Document the variable fringe-mode. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/display.texi | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index e634117f89c..ad2f091f27f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Eli Zaretskii + + * display.texi (Fringes): Document the variable fringe-mode. + (Bug#14946) + 2013-07-03 Glenn Morris * maintaining.texi (EDE): Fix cross-reference. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 482d7e7741a..aa9977a52e5 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1017,12 +1017,15 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}. @findex set-fringe-style @findex fringe-mode +@vindex fringe-mode @r{(variable)} On graphical displays, each Emacs window normally has narrow @dfn{fringes} on the left and right edges. The fringes are used to display symbols that provide information about the text in the window. You can type @kbd{M-x fringe-mode} to disable the fringes, or modify their width. This command affects fringes in all frames; to modify fringes on the selected frame only, use @kbd{M-x set-fringe-style}. +You can make your changes to the fringes permanent by customizing the +variable @code{fringe-mode}. The most common use of the fringes is to indicate a continuation line (@pxref{Continuation Lines}). When one line of text is split From 56ea72917a7a700e29cf6c115fd1cd75ad782e9e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Jul 2013 03:38:18 -0400 Subject: [PATCH 19/57] Add support for lexical variables to the debugger's `e' command. * lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-* vars, except for debugger-outer-match-data. (debugger-frame-number): Move check for "on a function call" from callers into it. Add `skip-base' argument. (debugger-frame, debugger-frame-clear): Simplify accordingly. (debugger-env-macro): Only reset the state stored in non-variables, i.e. current-buffer and match-data. (debugger-eval-expression): Rewrite using backtrace-eval. * lisp/subr.el (internal--called-interactively-p--get-frame): Remove. (called-interactively-p): * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new `base' arg of backtrace-frame instead. * src/eval.c (set_specpdl_old_value): New function. (unbind_to): Minor simplification. (get_backtrace_frame): New function. (Fbacktrace_frame): Use it. Add `base' argument. (backtrace_eval_unrewind, Fbacktrace_eval): New functions. (syms_of_eval): Export backtrace-eval. * src/xterm.c (x_focus_changed): Simplify. --- etc/NEWS | 4 + lisp/ChangeLog | 16 ++++ lisp/emacs-lisp/debug.el | 145 +++++++------------------------- lisp/emacs-lisp/edebug.el | 2 +- lisp/subr.el | 18 +--- src/ChangeLog | 10 +++ src/eval.c | 169 ++++++++++++++++++++++++++++++++------ src/xterm.c | 15 +--- 8 files changed, 212 insertions(+), 167 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index feb45f43348..c9805ab55ba 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -158,6 +158,10 @@ You can pick the name of the function and the variables with `C-x 4 a'. * Changes in Specialized Modes and Packages in Emacs 24.4 +** The debugger's `e' command evaluates the code in the context at point. +This includes using the lexical environment at point, which means that +`e' now lets you access lexical variables as well. + ** `eshell' now supports visual subcommands and options Eshell has been able to handle "visual" commands (interactive, non-line oriented commands such as top that require display diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79582ea560a..84919e634be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2013-07-26 Stefan Monnier + + Add support for lexical variables to the debugger's `e' command. + * emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-* + vars, except for debugger-outer-match-data. + (debugger-frame-number): Move check for "on a function call" from + callers into it. Add `skip-base' argument. + (debugger-frame, debugger-frame-clear): Simplify accordingly. + (debugger-env-macro): Only reset the state stored in non-variables, + i.e. current-buffer and match-data. + (debugger-eval-expression): Rewrite using backtrace-eval. + * subr.el (internal--called-interactively-p--get-frame): Remove. + (called-interactively-p): + * emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new + `base' arg of backtrace-frame instead. + 2013-07-26 Glenn Morris * align.el (align-regexp): Doc fix. (Bug#14857) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 0728e86d072..aee48eef668 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -102,22 +102,6 @@ The value used here is passed to `quit-restore-window'." This is to optimize `debugger-make-xrefs'.") (defvar debugger-outer-match-data) -(defvar debugger-outer-load-read-function) -(defvar debugger-outer-overriding-local-map) -(defvar debugger-outer-overriding-terminal-local-map) -(defvar debugger-outer-track-mouse) -(defvar debugger-outer-last-command) -(defvar debugger-outer-this-command) -(defvar debugger-outer-unread-command-events) -(defvar debugger-outer-unread-post-input-method-events) -(defvar debugger-outer-last-input-event) -(defvar debugger-outer-last-command-event) -(defvar debugger-outer-last-nonmenu-event) -(defvar debugger-outer-last-event-frame) -(defvar debugger-outer-standard-input) -(defvar debugger-outer-standard-output) -(defvar debugger-outer-inhibit-redisplay) -(defvar debugger-outer-cursor-in-echo-area) (defvar debugger-will-be-back nil "Non-nil if we expect to get back in the debugger soon.") @@ -174,24 +158,6 @@ first will be printed into the backtrace buffer." ;; Save the outer values of these vars for the `e' command ;; before we replace the values. (debugger-outer-match-data (match-data)) - (debugger-outer-load-read-function load-read-function) - (debugger-outer-overriding-local-map overriding-local-map) - (debugger-outer-overriding-terminal-local-map - overriding-terminal-local-map) - (debugger-outer-track-mouse track-mouse) - (debugger-outer-last-command last-command) - (debugger-outer-this-command this-command) - (debugger-outer-unread-command-events unread-command-events) - (debugger-outer-unread-post-input-method-events - unread-post-input-method-events) - (debugger-outer-last-input-event last-input-event) - (debugger-outer-last-command-event last-command-event) - (debugger-outer-last-nonmenu-event last-nonmenu-event) - (debugger-outer-last-event-frame last-event-frame) - (debugger-outer-standard-input standard-input) - (debugger-outer-standard-output standard-output) - (debugger-outer-inhibit-redisplay inhibit-redisplay) - (debugger-outer-cursor-in-echo-area cursor-in-echo-area) (debugger-with-timeout-suspend (with-timeout-suspend))) ;; Set this instead of binding it, so that `q' ;; will not restore it. @@ -294,26 +260,6 @@ first will be printed into the backtrace buffer." (funcall (nth 0 debugger-previous-state)))))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) - ;; Put into effect the modified values of these variables - ;; in case the user set them with the `e' command. - (setq load-read-function debugger-outer-load-read-function) - (setq overriding-local-map debugger-outer-overriding-local-map) - (setq overriding-terminal-local-map - debugger-outer-overriding-terminal-local-map) - (setq track-mouse debugger-outer-track-mouse) - (setq last-command debugger-outer-last-command) - (setq this-command debugger-outer-this-command) - (setq unread-command-events debugger-outer-unread-command-events) - (setq unread-post-input-method-events - debugger-outer-unread-post-input-method-events) - (setq last-input-event debugger-outer-last-input-event) - (setq last-command-event debugger-outer-last-command-event) - (setq last-nonmenu-event debugger-outer-last-nonmenu-event) - (setq last-event-frame debugger-outer-last-event-frame) - (setq standard-input debugger-outer-standard-input) - (setq standard-output debugger-outer-standard-output) - (setq inhibit-redisplay debugger-outer-inhibit-redisplay) - (setq cursor-in-echo-area debugger-outer-cursor-in-echo-area) (setq debug-on-next-call debugger-step-after-exit) debugger-value))) @@ -518,18 +464,21 @@ removes itself from that hook." (setq debugger-jumping-flag nil) (remove-hook 'post-command-hook 'debugger-reenable)) -(defun debugger-frame-number () +(defun debugger-frame-number (&optional skip-base) "Return number of frames in backtrace before the one point points at." (save-excursion (beginning-of-line) + (if (looking-at " *;;;\\|[a-z]") + (error "This line is not a function call")) (let ((opoint (point)) (count 0)) - (while (not (eq (cadr (backtrace-frame count)) 'debug)) - (setq count (1+ count))) - ;; Skip debug--implement-debug-on-entry frame. - (when (eq 'debug--implement-debug-on-entry - (cadr (backtrace-frame (1+ count)))) - (setq count (+ 2 count))) + (unless skip-base + (while (not (eq (cadr (backtrace-frame count)) 'debug)) + (setq count (1+ count))) + ;; Skip debug--implement-debug-on-entry frame. + (when (eq 'debug--implement-debug-on-entry + (cadr (backtrace-frame (1+ count)))) + (setq count (+ 2 count)))) (goto-char (point-min)) (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") (goto-char (match-end 0)) @@ -551,12 +500,8 @@ removes itself from that hook." "Request entry to debugger when this frame exits. Applies to the frame whose line point is on in the backtrace." (interactive) - (save-excursion - (beginning-of-line) - (if (looking-at " *;;;\\|[a-z]") - (error "This line is not a function call"))) - (beginning-of-line) (backtrace-debug (debugger-frame-number) t) + (beginning-of-line) (if (= (following-char) ? ) (let ((inhibit-read-only t)) (delete-char 1) @@ -567,12 +512,8 @@ Applies to the frame whose line point is on in the backtrace." "Do not enter debugger when this frame exits. Applies to the frame whose line point is on in the backtrace." (interactive) - (save-excursion - (beginning-of-line) - (if (looking-at " *;;;\\|[a-z]") - (error "This line is not a function call"))) - (beginning-of-line) (backtrace-debug (debugger-frame-number) nil) + (beginning-of-line) (if (= (following-char) ?*) (let ((inhibit-read-only t)) (delete-char 1) @@ -583,59 +524,33 @@ Applies to the frame whose line point is on in the backtrace." "Run BODY in original environment." (declare (indent 0)) `(save-excursion - (if (null (buffer-name debugger-old-buffer)) + (if (null (buffer-live-p debugger-old-buffer)) ;; old buffer deleted (setq debugger-old-buffer (current-buffer))) (set-buffer debugger-old-buffer) - (let ((load-read-function debugger-outer-load-read-function) - (overriding-terminal-local-map - debugger-outer-overriding-terminal-local-map) - (overriding-local-map debugger-outer-overriding-local-map) - (track-mouse debugger-outer-track-mouse) - (last-command debugger-outer-last-command) - (this-command debugger-outer-this-command) - (unread-command-events debugger-outer-unread-command-events) - (unread-post-input-method-events - debugger-outer-unread-post-input-method-events) - (last-input-event debugger-outer-last-input-event) - (last-command-event debugger-outer-last-command-event) - (last-nonmenu-event debugger-outer-last-nonmenu-event) - (last-event-frame debugger-outer-last-event-frame) - (standard-input debugger-outer-standard-input) - (standard-output debugger-outer-standard-output) - (inhibit-redisplay debugger-outer-inhibit-redisplay) - (cursor-in-echo-area debugger-outer-cursor-in-echo-area)) - (set-match-data debugger-outer-match-data) - (prog1 - (progn ,@body) - (setq debugger-outer-match-data (match-data)) - (setq debugger-outer-load-read-function load-read-function) - (setq debugger-outer-overriding-terminal-local-map - overriding-terminal-local-map) - (setq debugger-outer-overriding-local-map overriding-local-map) - (setq debugger-outer-track-mouse track-mouse) - (setq debugger-outer-last-command last-command) - (setq debugger-outer-this-command this-command) - (setq debugger-outer-unread-command-events unread-command-events) - (setq debugger-outer-unread-post-input-method-events - unread-post-input-method-events) - (setq debugger-outer-last-input-event last-input-event) - (setq debugger-outer-last-command-event last-command-event) - (setq debugger-outer-last-nonmenu-event last-nonmenu-event) - (setq debugger-outer-last-event-frame last-event-frame) - (setq debugger-outer-standard-input standard-input) - (setq debugger-outer-standard-output standard-output) - (setq debugger-outer-inhibit-redisplay inhibit-redisplay) - (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area) - )))) + (set-match-data debugger-outer-match-data) + (prog1 + (progn ,@body) + (setq debugger-outer-match-data (match-data))))) (defun debugger-eval-expression (exp) - "Eval an expression, in an environment like that outside the debugger." + "Eval an expression, in an environment like that outside the debugger. +The environment used is the one when entering the activation frame at point." (interactive (list (read-from-minibuffer "Eval: " nil read-expression-map t 'read-expression-history))) - (debugger-env-macro (eval-expression exp))) + (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base)) + (error 0))) ;; If on first line. + (base (if (eq 'debug--implement-debug-on-entry + (cadr (backtrace-frame 1 'debug))) + 'debug--implement-debug-on-entry 'debug))) + (debugger-env-macro + (let ((val (backtrace-eval exp nframe base))) + (prog1 + (prin1 val t) + (let ((str (eval-expression-print-format val))) + (if str (princ str t)))))))) (defvar debugger-mode-map (let ((map (make-keymap)) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 36c72f3a3bd..7771c3adaa4 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4268,7 +4268,7 @@ With prefix argument, make it a temporary breakpoint." (eq (nth 1 (nth 1 frame1)) '()) (eq (nth 1 frame2) 'edebug-enter)) ;; `edebug-enter' calls itself on its first invocation. - (if (eq (nth 1 (internal--called-interactively-p--get-frame i)) + (if (eq (nth 1 (backtrace-frame i 'called-interactively-p)) 'edebug-enter) 2 1))) diff --git a/lisp/subr.el b/lisp/subr.el index 7130639dbe5..3b85a9bedb0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4191,22 +4191,6 @@ I is the index of the frame after FRAME2. It should return nil if those frames don't seem special and otherwise, it should return the number of frames to skip (minus 1).") -(defmacro internal--called-interactively-p--get-frame (n) - ;; `sym' will hold a global variable, which will be used kind of like C's - ;; "static" variables. - (let ((sym (make-symbol "base-index"))) - `(progn - (defvar ,sym) - (unless (boundp ',sym) - (let ((i 1)) - (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t) - (indirect-function 'called-interactively-p))) - (setq i (1+ i))) - (setq ,sym i))) - ;; (unless (eq (nth 1 (backtrace-frame ,sym)) 'called-interactively-p) - ;; (error "called-interactively-p: %s is out-of-sync!" ,sym)) - (backtrace-frame (+ ,sym ,n))))) - (defun called-interactively-p (&optional kind) "Return t if the containing function was called by `call-interactively'. If KIND is `interactive', then only return t if the call was made @@ -4241,7 +4225,7 @@ command is called from a keyboard macro?" (get-next-frame (lambda () (setq frame nextframe) - (setq nextframe (internal--called-interactively-p--get-frame i)) + (setq nextframe (backtrace-frame i 'called-interactively-p)) ;; (message "Frame %d = %S" i nextframe) (setq i (1+ i))))) (funcall get-next-frame) ;; Get the first frame. diff --git a/src/ChangeLog b/src/ChangeLog index 56fe20fda98..6542703adbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2013-07-26 Stefan Monnier + + * eval.c (set_specpdl_old_value): New function. + (unbind_to): Minor simplification. + (get_backtrace_frame): New function. + (Fbacktrace_frame): Use it. Add `base' argument. + (backtrace_eval_unrewind, Fbacktrace_eval): New functions. + (syms_of_eval): Export backtrace-eval. + * xterm.c (x_focus_changed): Simplify. + 2013-07-25 Paul Eggert * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936). diff --git a/src/eval.c b/src/eval.c index 6cb2b7a92b8..e55a3b259e0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -138,6 +138,13 @@ specpdl_old_value (union specbinding *pdl) return pdl->let.old_value; } +static void +set_specpdl_old_value (union specbinding *pdl, Lisp_Object val) +{ + eassert (pdl->kind >= SPECPDL_LET); + pdl->let.old_value = val; +} + static Lisp_Object specpdl_where (union specbinding *pdl) { @@ -3301,6 +3308,8 @@ unbind_to (ptrdiff_t count, Lisp_Object value) case SPECPDL_UNWIND_VOID: specpdl_ptr->unwind_void.func (); break; + case SPECPDL_BACKTRACE: + break; case SPECPDL_LET: /* If variable has a trivial value (no forwarding), we can just set it. No need to check for constant symbols here, @@ -3315,27 +3324,20 @@ unbind_to (ptrdiff_t count, Lisp_Object value) Fset_default (specpdl_symbol (specpdl_ptr), specpdl_old_value (specpdl_ptr)); break; - case SPECPDL_BACKTRACE: + case SPECPDL_LET_DEFAULT: + Fset_default (specpdl_symbol (specpdl_ptr), + specpdl_old_value (specpdl_ptr)); break; case SPECPDL_LET_LOCAL: - case SPECPDL_LET_DEFAULT: - { /* If the symbol is a list, it is really (SYMBOL WHERE - . CURRENT-BUFFER) where WHERE is either nil, a buffer, or a - frame. If WHERE is a buffer or frame, this indicates we - bound a variable that had a buffer-local or frame-local - binding. WHERE nil means that the variable had the default - value when it was bound. CURRENT-BUFFER is the buffer that - was current when the variable was bound. */ + { Lisp_Object symbol = specpdl_symbol (specpdl_ptr); Lisp_Object where = specpdl_where (specpdl_ptr); Lisp_Object old_value = specpdl_old_value (specpdl_ptr); eassert (BUFFERP (where)); - if (specpdl_ptr->kind == SPECPDL_LET_DEFAULT) - Fset_default (symbol, old_value); /* If this was a local binding, reset the value in the appropriate buffer, but only if that buffer's binding still exists. */ - else if (!NILP (Flocal_variable_p (symbol, where))) + if (!NILP (Flocal_variable_p (symbol, where))) set_internal (symbol, old_value, where, 1); } break; @@ -3422,7 +3424,30 @@ Output stream used is value of `standard-output'. */) return Qnil; } -DEFUN ("backtrace-frame", Fbacktrace_frame, Sbacktrace_frame, 1, 1, NULL, +union specbinding * +get_backtrace_frame (Lisp_Object nframes, Lisp_Object base) +{ + union specbinding *pdl = backtrace_top (); + register EMACS_INT i; + + CHECK_NATNUM (nframes); + + if (!NILP (base)) + { /* Skip up to `base'. */ + base = Findirect_function (base, Qt); + while (backtrace_p (pdl) + && !EQ (base, Findirect_function (backtrace_function (pdl), Qt))) + pdl = backtrace_next (pdl); + } + + /* Find the frame requested. */ + for (i = XFASTINT (nframes); i > 0 && backtrace_p (pdl); i--) + pdl = backtrace_next (pdl); + + return pdl; +} + +DEFUN ("backtrace-frame", Fbacktrace_frame, Sbacktrace_frame, 1, 2, NULL, doc: /* Return the function and arguments NFRAMES up from current execution point. If that frame has not evaluated the arguments yet (or is a special form), the value is (nil FUNCTION ARG-FORMS...). @@ -3431,17 +3456,12 @@ the value is (t FUNCTION ARG-VALUES...). A &rest arg is represented as the tail of the list ARG-VALUES. FUNCTION is whatever was supplied as car of evaluated list, or a lambda expression for macro calls. -If NFRAMES is more than the number of frames, the value is nil. */) - (Lisp_Object nframes) +If NFRAMES is more than the number of frames, the value is nil. +If BASE is non-nil, it should be a function and NFRAMES counts from its +nearest activation frame. */) + (Lisp_Object nframes, Lisp_Object base) { - union specbinding *pdl = backtrace_top (); - register EMACS_INT i; - - CHECK_NATNUM (nframes); - - /* Find the frame requested. */ - for (i = 0; backtrace_p (pdl) && i < XFASTINT (nframes); i++) - pdl = backtrace_next (pdl); + union specbinding *pdl = get_backtrace_frame (nframes, base); if (!backtrace_p (pdl)) return Qnil; @@ -3456,6 +3476,108 @@ If NFRAMES is more than the number of frames, the value is nil. */) } } +/* For backtrace-eval, we want to temporarily unwind the last few elements of + the specpdl stack, and then rewind them. We store the pre-unwind values + directly in the pre-existing specpdl elements (i.e. we swap the current + value and the old value stored in the specpdl), kind of like the inplace + pointer-reversal trick. As it turns out, the rewind does the same as the + unwind, except it starts from the other end of the spepdl stack, so we use + the same function for both unwind and rewind. */ +void +backtrace_eval_unrewind (int distance) +{ + union specbinding *tmp = specpdl_ptr; + int step = -1; + if (distance < 0) + { /* It's a rewind rather than unwind. */ + tmp += distance - 1; + step = 1; + distance = -distance; + } + + for (; distance > 0; distance--) + { + tmp += step; + /* */ + switch (tmp->kind) + { + /* FIXME: Ideally we'd like to "temporarily unwind" (some of) those + unwind_protect, but the problem is that we don't know how to + rewind them afterwards. */ + case SPECPDL_UNWIND: + case SPECPDL_UNWIND_PTR: + case SPECPDL_UNWIND_INT: + case SPECPDL_UNWIND_VOID: + case SPECPDL_BACKTRACE: + break; + case SPECPDL_LET: + /* If variable has a trivial value (no forwarding), we can + just set it. No need to check for constant symbols here, + since that was already done by specbind. */ + if (XSYMBOL (specpdl_symbol (tmp))->redirect + == SYMBOL_PLAINVAL) + { + struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (tmp)); + Lisp_Object old_value = specpdl_old_value (tmp); + set_specpdl_old_value (tmp, SYMBOL_VAL (sym)); + SET_SYMBOL_VAL (sym, old_value); + break; + } + else + /* FALLTHROUGH! + NOTE: we only ever come here if make_local_foo was used for + the first time on this var within this let. */ + ; + case SPECPDL_LET_DEFAULT: + { + Lisp_Object sym = specpdl_symbol (tmp); + Lisp_Object old_value = specpdl_old_value (tmp); + set_specpdl_old_value (tmp, Fdefault_value (sym)); + Fset_default (sym, old_value); + } + break; + case SPECPDL_LET_LOCAL: + { + Lisp_Object symbol = specpdl_symbol (tmp); + Lisp_Object where = specpdl_where (tmp); + Lisp_Object old_value = specpdl_old_value (tmp); + eassert (BUFFERP (where)); + + /* If this was a local binding, reset the value in the appropriate + buffer, but only if that buffer's binding still exists. */ + if (!NILP (Flocal_variable_p (symbol, where))) + { + set_specpdl_old_value + (tmp, Fbuffer_local_value (symbol, where)); + set_internal (symbol, old_value, where, 1); + } + } + break; + } + } +} + +DEFUN ("backtrace-eval", Fbacktrace_eval, Sbacktrace_eval, 2, 3, NULL, + doc: /* Evaluate EXP in the context of some activation frame. +NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'. */) + (Lisp_Object exp, Lisp_Object nframes, Lisp_Object base) +{ + union specbinding *pdl = get_backtrace_frame (nframes, base); + ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t distance = specpdl_ptr - pdl; + eassert (distance >= 0); + + if (!backtrace_p (pdl)) + error ("Activation frame not found!"); + + backtrace_eval_unrewind (distance); + record_unwind_protect_int (backtrace_eval_unrewind, -distance); + + /* Use eval_sub rather than Feval since the main motivation behind + backtrace-eval is to be able to get/set the value of lexical variables + from the debugger. */ + return unbind_to (count, eval_sub (exp)); +} void mark_specpdl (void) @@ -3701,6 +3823,7 @@ alist of active lexical bindings. */); defsubr (&Sbacktrace_debug); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame); + defsubr (&Sbacktrace_eval); defsubr (&Sspecial_variable_p); defsubr (&Sfunctionp); } diff --git a/src/xterm.c b/src/xterm.c index 74e495e5645..b3534871da9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3435,17 +3435,10 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ /* When run as a daemon, Vterminal_frame is always NIL. */ - if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt)) - && CONSP (Vframe_list) - && !NILP (XCDR (Vframe_list))) - { - bufp->arg = Qt; - } - else - { - bufp->arg = Qnil; - } - + bufp->arg = (((NILP (Vterminal_frame) || EQ (Fdaemonp (), Qt)) + && CONSP (Vframe_list) + && !NILP (XCDR (Vframe_list))) + ? Qt : Qnil); bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); } From d5a7a9d94b84c99bc0a7178002d83ea7754732c0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 26 Jul 2013 09:39:55 +0100 Subject: [PATCH 20/57] Fix minor problems found by static checking. * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static. (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC. --- src/ChangeLog | 6 ++++++ src/eval.c | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6542703adbb..2b105e2405e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-07-26 Paul Eggert + + Fix minor problems found by static checking. + * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static. + (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC. + 2013-07-26 Stefan Monnier * eval.c (set_specpdl_old_value): New function. diff --git a/src/eval.c b/src/eval.c index e55a3b259e0..bb5d5efc9ba 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3424,7 +3424,7 @@ Output stream used is value of `standard-output'. */) return Qnil; } -union specbinding * +static union specbinding * get_backtrace_frame (Lisp_Object nframes, Lisp_Object base) { union specbinding *pdl = backtrace_top (); @@ -3483,7 +3483,7 @@ nearest activation frame. */) pointer-reversal trick. As it turns out, the rewind does the same as the unwind, except it starts from the other end of the spepdl stack, so we use the same function for both unwind and rewind. */ -void +static void backtrace_eval_unrewind (int distance) { union specbinding *tmp = specpdl_ptr; @@ -3524,10 +3524,11 @@ backtrace_eval_unrewind (int distance) break; } else - /* FALLTHROUGH! - NOTE: we only ever come here if make_local_foo was used for - the first time on this var within this let. */ - ; + { + /* FALLTHROUGH! + NOTE: we only ever come here if make_local_foo was used for + the first time on this var within this let. */ + } case SPECPDL_LET_DEFAULT: { Lisp_Object sym = specpdl_symbol (tmp); From b1fb3596b0428947a2afd0204ab12e22c630e3e5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 26 Jul 2013 05:32:44 -0400 Subject: [PATCH 21/57] Add aliases for encrypting mail. * epa.el (epa-mail-aliases): New option. * epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs. Bind inhibit-read-only so read-only text doesn't ruin everything. (epa-mail-default-recipients): New subroutine broken out. Handle epa-mail-aliases. --- lisp/ChangeLog | 9 +++ lisp/epa-mail.el | 191 +++++++++++++++++++++++++++-------------------- lisp/epa.el | 12 +++ 3 files changed, 133 insertions(+), 79 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84919e634be..28a2f5b492d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2013-07-26 Richard Stallman + + Add aliases for encrypting mail. + * epa.el (epa-mail-aliases): New option. + * epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs. + Bind inhibit-read-only so read-only text doesn't ruin everything. + (epa-mail-default-recipients): New subroutine broken out. + Handle epa-mail-aliases. + 2013-07-26 Stefan Monnier Add support for lexical variables to the debugger's `e' command. diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 6ba29d3748f..896fc2a954e 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -109,94 +109,127 @@ If no one is selected, default secret key is used. " (if verbose (epa--read-signature-type) 'clear))))) - (epa-sign-region start end signers mode)) + (let ((inhibit-read-only t)) + (epa-sign-region start end signers mode))) + +(defun epa-mail-default-recipients () + "Return the default list of encryption recipients for a mail buffer." + (let ((config (epg-configuration)) + recipients-string real-recipients) + (save-excursion + (goto-char (point-min)) + (save-restriction + (narrow-to-region (point) + (if (search-forward mail-header-separator nil 0) + (match-beginning 0) + (point))) + (setq recipients-string + (mapconcat #'identity + (nconc (mail-fetch-field "to" nil nil t) + (mail-fetch-field "cc" nil nil t) + (mail-fetch-field "bcc" nil nil t)) + ",")) + (setq recipients-string + (mail-strip-quoted-names + (with-temp-buffer + (insert "to: " recipients-string "\n") + (expand-mail-aliases (point-min) (point-max)) + (car (mail-fetch-field "to" nil nil t)))))) + + (setq real-recipients + (split-string recipients-string "," t "[ \t\n]*")) + + ;; Process all the recipients thru the list of GnuPG groups. + ;; Expand GnuPG group names to what they stand for. + (setq real-recipients + (apply #'nconc + (mapcar + (lambda (recipient) + (or (epg-expand-group config recipient) + (list recipient))) + real-recipients))) + + ;; Process all the recipients thru the user's list + ;; of encryption aliases. + (setq real-recipients + (apply #'nconc + (mapcar + (lambda (recipient) + (let ((tem (assoc recipient epa-mail-aliases))) + (if tem (cdr tem) + (list recipient)))) + real-recipients))) + ))) ;;;###autoload -(defun epa-mail-encrypt (start end recipients sign signers) - "Encrypt the current buffer. -The buffer is expected to contain a mail message. +(defun epa-mail-encrypt (&optional recipients signers) + "Encrypt the outgoing mail message in the current buffer. +Takes the recipients from the text in the header in the buffer +and translates them through `epa-mail-aliases'. +With prefix argument, asks you to select among them interactively +and also whether and how to sign. -Don't use this command in Lisp programs!" +Called from Lisp, the optional argument RECIPIENTS is a list +of recipient addresses, t to perform symmetric encryption, +or nil meaning use the defaults. + +SIGNERS is a list of keys to sign the message with." (interactive - (save-excursion - (let ((verbose current-prefix-arg) - (config (epg-configuration)) - (context (epg-make-context epa-protocol)) - recipients-string recipients recipient-key sign) - (goto-char (point-min)) - (save-restriction - (narrow-to-region (point) - (if (search-forward mail-header-separator nil 0) - (match-beginning 0) - (point))) - (setq recipients-string - (mapconcat #'identity - (nconc (mail-fetch-field "to" nil nil t) - (mail-fetch-field "cc" nil nil t) - (mail-fetch-field "bcc" nil nil t)) - ",")) - (setq recipients - (mail-strip-quoted-names - (with-temp-buffer - (insert "to: " recipients-string "\n") - (expand-mail-aliases (point-min) (point-max)) - (car (mail-fetch-field "to" nil nil t)))))) - (if recipients - (setq recipients (delete "" - (split-string recipients - "[ \t\n]*,[ \t\n]*")))) - - ;; Process all the recipients thru the list of GnuPG groups. - ;; Expand GnuPG group names to what they stand for. - (setq recipients - (apply #'nconc - (mapcar - (lambda (recipient) - (or (epg-expand-group config recipient) - (list recipient))) - recipients))) - - (goto-char (point-min)) - (if (search-forward mail-header-separator nil t) - (forward-line)) - (setq epa-last-coding-system-specified - (or coding-system-for-write - (epa--select-safe-coding-system (point) (point-max)))) - (list (point) (point-max) - (if verbose - (epa-select-keys - context - "Select recipients for encryption. + (let ((verbose current-prefix-arg) + (context (epg-make-context epa-protocol))) + (list (if verbose + (or (epa-select-keys + context + "Select recipients for encryption. If no one is selected, symmetric encryption will be performed. " - recipients) - (if recipients + (epa-mail-default-recipients)) + t)) + (and verbose (y-or-n-p "Sign? ") + (epa-select-keys context + "Select keys for signing. "))))) + (let (start recipient-keys default-recipients) + (save-excursion + (setq recipient-keys + (cond ((eq recipients t) + nil) + (recipients recipients) + (t + (setq default-recipients + (epa-mail-default-recipients)) + ;; Convert recipients to keys. (apply 'nconc (mapcar (lambda (recipient) - (setq recipient-key - (epa-mail--find-usable-key - (epg-list-keys - (epg-make-context epa-protocol) - (if (string-match "@" recipient) - (concat "<" recipient ">") - recipient)) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format - "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - (if recipient-key (list recipient-key))) - recipients)))) - (setq sign (if verbose (y-or-n-p "Sign? "))) - (if sign - (epa-select-keys context - "Select keys for signing. ")))))) - ;; Don't let some read-only text stop us from encrypting. - (let ((inhibit-read-only t)) - (epa-encrypt-region start end recipients sign signers))) + (let ((recipient-key + (epa-mail--find-usable-key + (epg-list-keys + (epg-make-context epa-protocol) + (if (string-match "@" recipient) + (concat "<" recipient ">") + recipient)) + 'encrypt))) + (unless (or recipient-key + (y-or-n-p + (format + "No public key for %s; skip it? " + recipient))) + (error "No public key for %s" recipient)) + (if recipient-key (list recipient-key)))) + default-recipients))))) + + (goto-char (point-min)) + (if (search-forward mail-header-separator nil t) + (forward-line)) + (setq start (point)) + + (setq epa-last-coding-system-specified + (or coding-system-for-write + (epa--select-safe-coding-system (point) (point-max))))) + + ;; Don't let some read-only text stop us from encrypting. + (let ((inhibit-read-only t)) + (epa-encrypt-region start (point-max) recipient-keys signers signers)))) ;;;###autoload (defun epa-mail-import-keys () diff --git a/lisp/epa.el b/lisp/epa.el index 68e7a18fe17..a99fb9230e1 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -48,6 +48,18 @@ :version "23.1" :group 'epa) +(defcustom epa-mail-aliases nil + "Alist of aliases of email addresses that stand for encryption keys. +Each element is (ALIAS EXPANSIONS...). +It means that when a message is addressed to ALIAS, +instead of encrypting it for ALIAS, encrypt it for EXPANSIONS... +If EXPANSIONS is empty, ignore ALIAS as regards encryption. +That is a handy way to avoid warnings about addresses +that you don't have any key for." + :type '(repeat (cons (string :tag "Alias") (repeat '(string :tag "Expansion")))) + :group 'epa + :version "24.4") + (defface epa-validity-high '((default :weight bold) (((class color) (background dark)) :foreground "PaleTurquoise")) From ed02dcfae3c9d11c48230fc8f14adc981bed8f10 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 26 Jul 2013 05:33:38 -0400 Subject: [PATCH 22/57] *** empty log message *** --- etc/NEWS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index c9805ab55ba..6f645545f75 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -276,6 +276,22 @@ restoring the window/frame configuration. Additional options If set to a number, this can be used to avoid accidentally paste large amounts of data into the ERC input. +** EPA + +*** New option `epa-mail-aliases'. + +You can set this to a list of alias expansions for keys to use +in `epa-mail-encrypt'. + +If one element of the variable's value is ("foo@bar.com" "foo@hello.org"), +that means: when one of the recipients of the message being encrypted +is `foo@bar.com', encrypt the message for `foo@hello.org' instead. + +If one element of the variable's value is ("foo@bar.com"), +that means: when one of the recipients of the message being encrypted +is `foo@bar.com', ignore that name as regards encryption. +This is useful to avoid a query when you have no key for that name. + --- ** New F90 mode option `f90-smart-end-names'. From 59070b327cdccefe52338abcdb7e3ec957fafef3 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Fri, 26 Jul 2013 11:49:59 +0200 Subject: [PATCH 23/57] lisp/vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. --- lisp/ChangeLog | 4 ++++ lisp/vc/vc-dir.el | 1 + 2 files changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28a2f5b492d..d7074c0b4dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-07-26 Matthias Meulien + + * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. + 2013-07-26 Richard Stallman Add aliases for encrypting mail. diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 80f78496a43..325e66ea530 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -240,6 +240,7 @@ See `run-hooks'." (define-key map "i" 'vc-register) ;; C-x v i (define-key map "+" 'vc-update) ;; C-x v + (define-key map "l" 'vc-print-log) ;; C-x v l + (define-key map "L" 'vc-print-root-log) ;; C-x v L ;; More confusing than helpful, probably ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark. ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer From a8f93651727e5497cb8c0b992da0030f698afff4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 Jul 2013 12:59:59 +0300 Subject: [PATCH 24/57] Fix bug #14841 with invisible frames on MS-Windows. src/w32term.c (w32_read_socket) : Warn about frame being re-exposed only if it didn't ask to become visible. : Under SIZE_RESTORED, only set the frame visible if it was previously iconified. (x_iconify_frame): Mark the frame iconified. --- src/ChangeLog | 8 ++++++++ src/w32term.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2b105e2405e..59eb16a81e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2013-07-26 Eli Zaretskii + + * w32term.c (w32_read_socket) : Warn about frame + being re-exposed only if it didn't ask to become visible. + : Under SIZE_RESTORED, only set the frame visible if it + was previously iconified. (Bug#14841) + (x_iconify_frame): Mark the frame iconified. + 2013-07-26 Paul Eggert Fix minor problems found by static checking. diff --git a/src/w32term.c b/src/w32term.c index 2fe3fe07462..0b22fd178e4 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4360,8 +4360,9 @@ w32_read_socket (struct terminal *terminal, SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, 0); SET_FRAME_GARBAGED (f); - DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, - SDATA (f->name))); + if (!f->output_data.w32->asked_for_visible) + DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, + SDATA (f->name))); /* WM_PAINT serves as MapNotify as well, so report visibility changes properly. */ @@ -4819,7 +4820,8 @@ w32_read_socket (struct terminal *terminal, { bool iconified = FRAME_ICONIFIED_P (f); - SET_FRAME_VISIBLE (f, 1); + if (iconified) + SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, 0); /* wait_reading_process_output will notice this @@ -6129,6 +6131,9 @@ x_iconify_frame (struct frame *f) /* Simulate the user minimizing the frame. */ SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); + unblock_input (); } From 045f7a53f9cd934488d5ac75d023c57eee059e85 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 26 Jul 2013 16:01:19 +0200 Subject: [PATCH 25/57] lisp/desktop.el (desktop-restore-frames): Call `sit-for'. We want to be sure that new frames are visible before deleting any remaining ones. --- lisp/ChangeLog | 6 ++++++ lisp/desktop.el | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7074c0b4dd..59f2bed01aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-26 Juanma Barranquero + + * desktop.el (desktop-restore-frames): Call `sit-for' once all frames + are restored to be sure that they are visible before deleting any + remaining ones. + 2013-07-26 Matthias Meulien * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. diff --git a/lisp/desktop.el b/lisp/desktop.el index 28c781d95e2..a29a30971aa 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1404,6 +1404,10 @@ being set (usually, by reading it from the desktop)." (error (delay-warning 'desktop (error-message-string err) :error)))) + ;; In case we try to delete the initial frame, we want to make sure that + ;; other frames are already visible (discussed in thread for bug#14841). + (sit-for 0 t) + ;; Delete remaining frames, but do not fail if some resist being deleted. (unless (eq desktop-restoring-reuses-frames 'keep) (dolist (frame desktop--reuse-list) From 53ff3e77b4c6e15b53404948254e58024c5e1556 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Jul 2013 11:09:04 -0400 Subject: [PATCH 26/57] * lisp/emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. (edebug-eval): Use backtrace-eval. (edebug--display, edebug--recursive-edit): Don't let-bind the edebug-outer-* vars that keep track of variables we locally let-bind. (edebug-outside-excursion): Don't restore outside values of locally let-bound vars. (edebug--display): Use user-error. (cl-lexical-debug, cl-debug-env): Remove. --- lisp/ChangeLog | 11 +++ lisp/emacs-lisp/edebug.el | 202 ++++++-------------------------------- 2 files changed, 40 insertions(+), 173 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 59f2bed01aa..28a9dde666c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2013-07-26 Stefan Monnier + + * emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. + (edebug-eval): Use backtrace-eval. + (edebug--display, edebug--recursive-edit): Don't let-bind the + edebug-outer-* vars that keep track of variables we locally let-bind. + (edebug-outside-excursion): Don't restore outside values of locally + let-bound vars. + (edebug--display): Use user-error. + (cl-lexical-debug, cl-debug-env): Remove. + 2013-07-26 Juanma Barranquero * desktop.el (desktop-restore-frames): Call `sit-for' once all frames diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 7771c3adaa4..ae20e5270e1 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2088,8 +2088,6 @@ expressions; a `progn' form will be returned enclosing these forms." (defvar edebug-coverage) ; the coverage results of each expression of function. (defvar edebug-buffer) ; which buffer the function is in. -(defvar edebug-outside-executing-macro) -(defvar edebug-outside-defining-kbd-macro) (defvar edebug-execution-mode 'step) ; Current edebug mode set by user. (defvar edebug-next-execution-mode nil) ; Use once instead of initial mode. @@ -2097,12 +2095,6 @@ expressions; a `progn' form will be returned enclosing these forms." (defvar edebug-outside-debug-on-error) ; the value of debug-on-error outside (defvar edebug-outside-debug-on-quit) ; the value of debug-on-quit outside - -(defvar edebug-outside-pre-command-hook) -(defvar edebug-outside-post-command-hook) - -(defvar cl-lexical-debug) ;; Defined in cl.el - ;;; Handling signals (defun edebug-signal (signal-name signal-data) @@ -2154,10 +2146,7 @@ error is signaled again." ;; Binding these may not be the right thing to do. ;; We want to allow the global values to be changed. (debug-on-error (or debug-on-error edebug-on-error)) - (debug-on-quit edebug-on-quit) - - ;; Lexical bindings must be uncompiled for this to work. - (cl-lexical-debug t)) + (debug-on-quit edebug-on-quit)) (unwind-protect (let ((signal-hook-function 'edebug-signal)) (setq edebug-execution-mode (or edebug-next-execution-mode @@ -2386,9 +2375,6 @@ MSG is printed after `::::} '." (defvar edebug-window-data) ; window and window-start for current function (defvar edebug-outside-windows) ; outside window configuration (defvar edebug-eval-buffer) ; for the evaluation list. -(defvar edebug-outside-o-a-p) ; outside overlay-arrow-position -(defvar edebug-outside-o-a-s) ; outside overlay-arrow-string -(defvar edebug-outside-c-i-e-a) ; outside cursor-in-echo-area (defvar edebug-outside-d-c-i-n-s-w) ; outside default-cursor-in-non-selected-windows (defvar edebug-eval-list nil) ;; List of expressions to evaluate. @@ -2398,8 +2384,6 @@ MSG is printed after `::::} '." ;; Emacs 19 adds an arg to mark and mark-marker. (defalias 'edebug-mark-marker 'mark-marker) -(defvar edebug-outside-unread-command-events) - (defun edebug--display (value offset-index arg-mode) (unless (marker-position edebug-def-mark) ;; The buffer holding the source has been killed. @@ -2421,7 +2405,6 @@ MSG is printed after `::::} '." (edebug-outside-buffer (current-buffer)) (edebug-outside-point (point)) (edebug-outside-mark (edebug-mark)) - (edebug-outside-unread-command-events unread-command-events) edebug-outside-windows ; Window or screen configuration. edebug-buffer-points @@ -2431,9 +2414,6 @@ MSG is printed after `::::} '." edebug-trace-window edebug-trace-window-start - (edebug-outside-o-a-p overlay-arrow-position) - (edebug-outside-o-a-s overlay-arrow-string) - (edebug-outside-c-i-e-a cursor-in-echo-area) (edebug-outside-d-c-i-n-s-w (default-value 'cursor-in-non-selected-windows))) (unwind-protect @@ -2445,8 +2425,7 @@ MSG is printed after `::::} '." ) (setq-default cursor-in-non-selected-windows t) (if (not (buffer-name edebug-buffer)) - (let ((debug-on-error nil)) - (error "Buffer defining %s not found" edebug-function))) + (user-error "Buffer defining %s not found" edebug-function)) (if (eq 'after arg-mode) ;; Compute result string now before windows are modified. @@ -2486,10 +2465,9 @@ MSG is printed after `::::} '." ;; Check whether positions are up-to-date. ;; This assumes point is never before symbol. (if (not (memq (following-char) '(?\( ?\# ?\` ))) - (let ((debug-on-error nil)) - (error "Source has changed - reevaluate definition of %s" - edebug-function) - ))) + (user-error "Source has changed - reevaluate definition of %s" + edebug-function) + )) (setcdr edebug-window-data (edebug-adjust-window (cdr edebug-window-data))) @@ -2645,11 +2623,6 @@ MSG is printed after `::::} '." (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) (with-timeout-unsuspend edebug-with-timeout-suspend) ;; Reset global variables to outside values in case they were changed. - (setq - unread-command-events edebug-outside-unread-command-events - overlay-arrow-position edebug-outside-o-a-p - overlay-arrow-string edebug-outside-o-a-s - cursor-in-echo-area edebug-outside-c-i-e-a) (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) ))) @@ -2667,27 +2640,6 @@ MSG is printed after `::::} '." (defvar edebug-inside-windows) (defvar edebug-interactive-p) -(defvar edebug-outside-map) -(defvar edebug-outside-standard-output) -(defvar edebug-outside-standard-input) -(defvar edebug-outside-current-prefix-arg) -(defvar edebug-outside-last-command) -(defvar edebug-outside-this-command) - -;; Note: here we have defvars for variables that are -;; built-in in certain versions. -;; Each defvar makes a difference -;; in versions where the variable is *not* built-in. - -;; Emacs 18 FIXME - -;; Emacs 19. -(defvar edebug-outside-last-command-event) -(defvar edebug-outside-last-input-event) -(defvar edebug-outside-last-event-frame) -(defvar edebug-outside-last-nonmenu-event) -(defvar edebug-outside-track-mouse) - (defun edebug--recursive-edit (arg-mode) ;; Start up a recursive edit inside of edebug. ;; The current buffer is the edebug-buffer, which is put into edebug-mode. @@ -2705,28 +2657,6 @@ MSG is printed after `::::} '." ;; The window configuration may be saved and restored ;; during a recursive-edit edebug-inside-windows - - ;; Save the outside value of executing macro. (here??) - (edebug-outside-executing-macro executing-kbd-macro) - (edebug-outside-pre-command-hook - (edebug-var-status 'pre-command-hook)) - (edebug-outside-post-command-hook - (edebug-var-status 'post-command-hook)) - - (edebug-outside-standard-output standard-output) - (edebug-outside-standard-input standard-input) - (edebug-outside-defining-kbd-macro defining-kbd-macro) - - (edebug-outside-last-command last-command) - (edebug-outside-this-command this-command) - - (edebug-outside-current-prefix-arg current-prefix-arg) - - (edebug-outside-last-input-event last-input-event) - (edebug-outside-last-command-event last-command-event) - (edebug-outside-last-event-frame last-event-frame) - (edebug-outside-last-nonmenu-event last-nonmenu-event) - (edebug-outside-track-mouse track-mouse) ) (unwind-protect @@ -2757,7 +2687,7 @@ MSG is printed after `::::} '." (overriding-local-map nil) (overriding-terminal-local-map nil) - ;; Bind again to outside values. + ;; Bind again to outside values. (debug-on-error edebug-outside-debug-on-error) (debug-on-quit edebug-outside-debug-on-quit) @@ -2805,27 +2735,7 @@ MSG is printed after `::::} '." ;; gotta have a buffer to let its buffer local variables be set (get-buffer-create " bogus edebug buffer")) ));; inner let - - ;; Reset global vars to outside values, in case they have been changed. - (setq - last-command-event edebug-outside-last-command-event - last-command edebug-outside-last-command - this-command edebug-outside-this-command - current-prefix-arg edebug-outside-current-prefix-arg - last-input-event edebug-outside-last-input-event - last-event-frame edebug-outside-last-event-frame - last-nonmenu-event edebug-outside-last-nonmenu-event - track-mouse edebug-outside-track-mouse - - standard-output edebug-outside-standard-output - standard-input edebug-outside-standard-input - defining-kbd-macro edebug-outside-defining-kbd-macro) - - (setq executing-kbd-macro edebug-outside-executing-macro) - (edebug-restore-status - 'post-command-hook edebug-outside-post-command-hook) - (edebug-restore-status - 'pre-command-hook edebug-outside-pre-command-hook)))) + ))) ;;; Display related functions @@ -3423,6 +3333,9 @@ edebug-mode." (defmacro edebug-outside-excursion (&rest body) "Evaluate an expression list in the outside context. Return the result of the last expression." + ;; Only restores the non-variables context since all the variables let-bound + ;; by Edebug will be properly reset to the appropriate context's value by + ;; backtrace-eval. (declare (debug t)) `(save-excursion ; of current-buffer (if edebug-save-windows @@ -3435,89 +3348,32 @@ Return the result of the last expression." (edebug-set-windows edebug-outside-windows))) (set-buffer edebug-buffer) ; why? - ;; (use-local-map edebug-outside-map) (set-match-data edebug-outside-match-data) ;; Restore outside context. - (let (;; (edebug-inside-map (current-local-map)) ;; restore map?? - (last-command-event edebug-outside-last-command-event) - (last-command edebug-outside-last-command) - (this-command edebug-outside-this-command) - (unread-command-events edebug-outside-unread-command-events) - (current-prefix-arg edebug-outside-current-prefix-arg) - (last-input-event edebug-outside-last-input-event) - (last-event-frame edebug-outside-last-event-frame) - (last-nonmenu-event edebug-outside-last-nonmenu-event) - (track-mouse edebug-outside-track-mouse) - (standard-output edebug-outside-standard-output) - (standard-input edebug-outside-standard-input) + (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) + (unwind-protect + (with-current-buffer edebug-outside-buffer ; of edebug-buffer + (goto-char edebug-outside-point) + (if (marker-buffer (edebug-mark-marker)) + (set-marker (edebug-mark-marker) edebug-outside-mark)) + ,@body) - (executing-kbd-macro edebug-outside-executing-macro) - (defining-kbd-macro edebug-outside-defining-kbd-macro) - ;; Get the values out of the saved statuses. - (pre-command-hook (cdr edebug-outside-pre-command-hook)) - (post-command-hook (cdr edebug-outside-post-command-hook)) + ;; Back to edebug-buffer. Restore rest of inside context. + ;; (use-local-map edebug-inside-map) + (if edebug-save-windows + ;; Restore inside windows. + (edebug-set-windows edebug-inside-windows)) - ;; See edebug-display. - (overlay-arrow-position edebug-outside-o-a-p) - (overlay-arrow-string edebug-outside-o-a-s) - (cursor-in-echo-area edebug-outside-c-i-e-a) - ) - (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) - (unwind-protect - (with-current-buffer edebug-outside-buffer ; of edebug-buffer - (goto-char edebug-outside-point) - (if (marker-buffer (edebug-mark-marker)) - (set-marker (edebug-mark-marker) edebug-outside-mark)) - ,@body) + ;; Save values that may have been changed. + (setq edebug-outside-d-c-i-n-s-w + (default-value 'cursor-in-non-selected-windows)) - ;; Back to edebug-buffer. Restore rest of inside context. - ;; (use-local-map edebug-inside-map) - (if edebug-save-windows - ;; Restore inside windows. - (edebug-set-windows edebug-inside-windows)) - - ;; Save values that may have been changed. - (setq - edebug-outside-last-command-event last-command-event - edebug-outside-last-command last-command - edebug-outside-this-command this-command - edebug-outside-unread-command-events unread-command-events - edebug-outside-current-prefix-arg current-prefix-arg - edebug-outside-last-input-event last-input-event - edebug-outside-last-event-frame last-event-frame - edebug-outside-last-nonmenu-event last-nonmenu-event - edebug-outside-track-mouse track-mouse - edebug-outside-standard-output standard-output - edebug-outside-standard-input standard-input - - edebug-outside-executing-macro executing-kbd-macro - edebug-outside-defining-kbd-macro defining-kbd-macro - - edebug-outside-o-a-p overlay-arrow-position - edebug-outside-o-a-s overlay-arrow-string - edebug-outside-c-i-e-a cursor-in-echo-area - edebug-outside-d-c-i-n-s-w (default-value - 'cursor-in-non-selected-windows) - ) - - ;; Restore the outside saved values; don't alter - ;; the outside binding loci. - (setcdr edebug-outside-pre-command-hook pre-command-hook) - (setcdr edebug-outside-post-command-hook post-command-hook) - - (setq-default cursor-in-non-selected-windows t) - )) ; let - )) - -(defvar cl-debug-env) ; defined in cl; non-nil when lexical env used. + ;; Restore the outside saved values; don't alter + ;; the outside binding loci. + (setq-default cursor-in-non-selected-windows t)))) (defun edebug-eval (expr) - ;; Are there cl lexical variables active? - (eval (if (and (bound-and-true-p cl-debug-env) - (fboundp 'cl-macroexpand-all)) - (cl-macroexpand-all expr cl-debug-env) - expr) - lexical-binding)) + (backtrace-eval expr 0 'edebug-after)) (defun edebug-safe-eval (expr) ;; Evaluate EXPR safely. From a04689de43f58c4120e8780628bc9439efaf6393 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 26 Jul 2013 19:02:22 +0200 Subject: [PATCH 27/57] Fix typos in ChangeLogs. --- ChangeLog | 18 +++++++++--------- doc/lispref/ChangeLog | 2 +- doc/misc/ChangeLog | 2 +- lisp/ChangeLog.10 | 4 ++-- lisp/ChangeLog.15 | 2 +- lisp/ChangeLog.16 | 4 ++-- lisp/ChangeLog.7 | 4 ++-- lisp/gnus/ChangeLog | 8 ++++---- lisp/gnus/ChangeLog.1 | 2 +- lisp/gnus/ChangeLog.2 | 4 ++-- lisp/mh-e/ChangeLog.1 | 34 +++++++++++++++++----------------- lisp/org/ChangeLog | 6 +++--- src/ChangeLog.12 | 6 +++--- 13 files changed, 48 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe958751041..61a3131d02c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,7 +61,7 @@ * lib/ignore-value.h: Remove this gnulib-imported file. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. -2013-07-08 Magnus Henoch (tiny change) +2013-07-08 Magnus Henoch (tiny change) * configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798). @@ -2027,7 +2027,7 @@ * Makefile.in (install-arch-indep, install-doc, install-info) (uninstall): Scrap superfluous subshells. -2012-05-19 Ulrich Mueller +2012-05-19 Ulrich Müller * Makefile.in (install-etc): Respect DESTDIR. (Bug#11518) @@ -3803,7 +3803,7 @@ * Makefile.in (install-arch-indep, info): Replace MAKEINFO = off with HAVE_MAKEINFO = no. -2010-12-29 Ulrich Mueller +2010-12-29 Ulrich Müller * configure.in: Make gameuser configurable (Bug#7717). @@ -5013,7 +5013,7 @@ * info/dir: Untabify. -2008-11-28 Ulrich Mueller +2008-11-28 Ulrich Müller * configure.in: Fix last change. @@ -5076,7 +5076,7 @@ * configure (*-sunos5*, *-solaris*): Use the new file sol2-10.h. Use sol2-6.h for Solaris 7-9. -2008-10-18 Ulrich Mueller +2008-10-18 Ulrich Müller * configure.in: Add support for GNU/Linux on SuperH. @@ -5160,7 +5160,7 @@ * configure.in (COCOA_EXPERIMENTAL_CTRL_G): Fix 2008-08-04 change. -2008-08-05 Ulrich Mueller +2008-08-05 Ulrich Müller * configure.in: Add checks for krb5_error.text and krb5_error.e_text struct members. @@ -5528,7 +5528,7 @@ * configure.in (--with-gcc): Remove. * INSTALL (DETAILED BUILDING AND INSTALLATION): Remove --with-gcc. -2008-02-05 Ulrich Mueller +2008-02-05 Ulrich Müller * INSTALL: Recommend giflib, not libungif. @@ -5550,7 +5550,7 @@ * configure.in: For libotf and m17n-flt checks, set shell vars HAVE_LIBOTF and HAVE_M17N_FLT instead of pkg_check_libotf and pkg_check_m17n_flt, respectively, for the sake of the summary output. - Reported by Ulrich Mueller. + Reported by Ulrich Müller. 2008-02-02 Eli Zaretskii @@ -5864,7 +5864,7 @@ * configure.in: Put quotes around nested macro calls. -2007-08-31 Ulrich Mueller (tiny change) +2007-08-31 Ulrich Müller (tiny change) * configure.in: Fix typo. * configure: Regenerate. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index d8d21794baa..32717946b04 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1080,7 +1080,7 @@ * display.texi (Face Attributes): Copyedits. Add a few cindex entries. Overlining no longer behaves exactly like underlining. -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel * display.texi (Face Attributes): Document wave-style underline face attribute. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 24a69282bab..da2491cb94a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1122,7 +1122,7 @@ corresponding function names, according to `org-agenda-view-mode-dispatch'. -2012-09-30 Jan Bäcker +2012-09-30 Jan Böcker * org.texi (The spreadsheet): Fix typo. diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10 index 2d331a2819d..30afe9ce970 100644 --- a/lisp/ChangeLog.10 +++ b/lisp/ChangeLog.10 @@ -5182,7 +5182,7 @@ inserted. (Info-hide-note-references): Fix doc and customize type. -2003-03-02 Matt Swift +2003-03-02 Matthew Swift * emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): New custom variable. @@ -5228,7 +5228,7 @@ (tramp-send-region): Correct debug message. (tramp-bug): Add `tramp-chunksize'. -2003-02-26 Matt Swift +2003-02-26 Matthew Swift * startup.el: Streamline code in several functions for efficiency and readability. Rephrase booleans to avoid `(not noninteractive)'. diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15 index 4d0ff9a40e2..afa2bce104e 100644 --- a/lisp/ChangeLog.15 +++ b/lisp/ChangeLog.15 @@ -5119,7 +5119,7 @@ (x-setup-function-keys, xw-defined-colors): Merge x- and w32- definitions here. -2010-10-24 T.V. Raman (tiny change) +2010-10-24 T. V. Raman (tiny change) * net/mairix.el (mairix-searches-mode-map): * mail/mspools.el (mspools-mode-map): Fix 2010-10-10 change. diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16 index d6d1bac43c2..7692a0fffa8 100644 --- a/lisp/ChangeLog.16 +++ b/lisp/ChangeLog.16 @@ -4569,7 +4569,7 @@ * bookmark.el (bookmark-completing-read): Set the completion category to `bookmark' (bug#11131). -2012-10-26 Bastien +2012-10-26 Bastien Guerry Stefan Monnier * face-remap.el: Use lexical-binding. @@ -9712,7 +9712,7 @@ * international/mule-cmds.el (mule-menu-keymap) (set-language-environment, set-locale-environment): Doc tweaks. -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel * cus-face.el (custom-face-attributes): Add wave-style underline attribute. diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index 4eec1795789..f52fdd7e194 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -7617,7 +7617,7 @@ Delete the binding for toggle-enable-multibyte-characters. (mule-menu-keymap): Delete the menu item for it. -1997-12-17 Peter Galbraith +1997-12-17 Peter S Galbraith * simple.el (copy-region-as-kill): Deactivate mark in transient-mark-mode. @@ -19637,7 +19637,7 @@ * term/x-win.el (function-key-map): Define iso-lefttab. -1997-03-24 Vince Del Vecchio +1997-03-24 Vincent Del Vecchio * mh-utils.el (mh-find-progs): When looking for mh-lib, construct likely paths based on mh-progs rather than using a static list. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3e7d8c992e7..a67c55947ac 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1897,7 +1897,7 @@ * nnmail.el (mail-send-and-exit): Silence the byte compiler. -2012-06-26 Peter Munster +2012-06-26 Peter Münster * gnus-demon.el (gnus-demon-timers): Now a plist (function -> timer). (gnus-demon-cancel): Ditto. @@ -2124,7 +2124,7 @@ (spam-check-BBDB): Use it. (spam-enter-ham-BBDB): Use it. -2012-06-26 Peter Munster (tiny change) +2012-06-26 Peter Münster (tiny change) * gnus-group.el (gnus-group-get-new-news): New parameter `one-level' for scanning exactly one level. @@ -8487,7 +8487,7 @@ * nnimap.el (nnimap-request-group): Low higher than high to signal no messages in empty groups. -2010-10-01 Ted Zlatanov +2010-10-01 Teodor Zlatanov * nnimap.el (nnimap-request-group): Don't bug out when there's an empty non-UIDNEXT group. @@ -8628,7 +8628,7 @@ * nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". Fix found by Nils Ackermann. -2010-09-29 Ludovic Courtes +2010-09-29 Ludovic Courtès * nnregistry.el: Add. diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1 index 9043a23361e..9a71bc35b41 100644 --- a/lisp/gnus/ChangeLog.1 +++ b/lisp/gnus/ChangeLog.1 @@ -340,7 +340,7 @@ * nnmail.el (nnmail-spool-file): Allow lists of files. -1998-08-20 Per Starback +1998-08-20 Per Starbäck * gnus/gnus-start.el (gnus-check-first-time-used): Change current buffer before creating help group. diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 4ddd622ce9a..df223bd332b 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -210,7 +210,7 @@ * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before encrypting. -2003-12-28 Ivan Boldyrev (tiny change). +2003-12-28 Ivan Boldyrev (tiny change) * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding. @@ -4490,7 +4490,7 @@ * gnus-start.el (gnus-backup-startup-file): Fixed custom type. -2003-02-24 Ted Zlatanov +2003-02-24 Teodor Zlatanov * spam.el: Disabled spam-get-article-as-filename. diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1 index e57911947b1..f90d88ee0de 100644 --- a/lisp/mh-e/ChangeLog.1 +++ b/lisp/mh-e/ChangeLog.1 @@ -1403,11 +1403,11 @@ (mh-x-image-url-display): Don't display image if the URL looks malformed. -2003-10-04 Mark D Baushke +2003-10-04 Mark D. Baushke * mh-comp.el (mh-letter-menu): Simplify menu heading. -2003-10-03 Mark D Baushke +2003-10-03 Mark D. Baushke * mh-mime.el (mh-mml-query-cryptographic-method): Avoid revisionist history and still provide a good default. @@ -3877,7 +3877,7 @@ runs checkdoc and lm-verify which is useful before releasing the software. It can and should be expanded to do real unit tests. -2003-04-22 Mark D Baushke +2003-04-22 Mark D. Baushke * mh-alias.el: Update Copyright. * mh-comp.el: Ditto. @@ -6106,7 +6106,7 @@ explicitly stated. (mh-visit-folder): Really fix it this time. -2003-01-01 Mark D Baushke +2003-01-01 Mark D. Baushke * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the mh-autoload comment or mh-customize may have problems finding the @@ -6854,7 +6854,7 @@ * Makefile: Moved .PHONY rule after all rule for compatibility with BSD/OS's old pmake. -2002-12-03 Mark D Baushke +2002-12-03 Mark D. Baushke * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. (mh-add-cur-notation): Remove unnecessary function. @@ -6878,7 +6878,7 @@ number of scan lines is fewer than mh-large-folders (closes SF #646794). -2002-12-02 Mark D Baushke +2002-12-02 Mark D. Baushke * mh-e.el (mh-add-cur-notation): New function to mark the current message with the mh-note-cur character. @@ -8312,7 +8312,7 @@ variable as new-file-flag. This addresses part of SF #627015. -2002-10-24 Mark D Baushke +2002-10-24 Mark D. Baushke * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference in last commit to be mh-mml-compose-insert-flag. @@ -8581,7 +8581,7 @@ * mh-comp.el (mh-mml-to-mime autoload): Ditto. -2002-10-21 Mark D Baushke +2002-10-21 Mark D. Baushke * mh-mime.el (smiley-region): Use load for a non-fatal dependency on the smiley library. @@ -8735,7 +8735,7 @@ prompted for the number of messages to display, you got an error. This has been fixed. -2002-10-19 Mark D Baushke +2002-10-19 Mark D. Baushke * mh-e.el (mh-last-destination-folder): Destination of last refile command. @@ -8777,7 +8777,7 @@ macro mh-compat-write-file-hook to use write-file-functions for Emacs 21.4 and local-write-file-hooks for older versions. -2002-10-18 Mark D Baushke +2002-10-18 Mark D. Baushke * mh-utils.el (mh-invisible-headers): Add more anti-spam headers. @@ -9079,7 +9079,7 @@ (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid compiler-warnings. -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * Makefile (EMACS_OPTIONS): New macro for command-line compile options. @@ -9088,13 +9088,13 @@ (COMPILE_COMMAND): Combine the compile command with its options. (.el.elc): Use the new $(COMPILE_COMMAND). -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * mh-speed.el (mh-speed-select-attached-frame): Define a new compatibility macro for getting to the attached-frame. (mh-speed-update-current-folder): Use it. -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame if we are in a newer speedbar @@ -9452,7 +9452,7 @@ present in the load-path. * mh-mime.el (mh-require): Don't use it anymore. -2002-07-15 Mark D Baushke +2002-07-15 Mark D. Baushke * mh-utils.el (mh-update-scan-format): Rewrite for compatibility with XEmacs as replace-match appears not to have identical @@ -9531,7 +9531,7 @@ * mh-mime.el (mm-destroy-parts): Add definition for old emacs. -2002-06-30 Mark D Baushke +2002-06-30 Mark D. Baushke * mh-utils.el (mh-update-scan-format): Add documentation string. (mh-scan-msg-format-regexp): Update the regexp to find %(msg). @@ -9574,7 +9574,7 @@ * mh-index.el (mh-count-windows): This function works around the lack of the window-list builtin function in emacs20. -2002-06-29 Mark D Baushke +2002-06-29 Mark D. Baushke * mh-utils.el (mh-message-number-width): New function to scan the last message of a folder and return its width. @@ -9625,7 +9625,7 @@ * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that mm-uu-dissect doesn't cause error. -2002-06-27 Mark D Baushke +2002-06-27 Mark D. Baushke * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this variable should be made via the new mh-set-default-cmd-note diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 16097c1c0b2..019fa8a358d 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -3983,7 +3983,7 @@ (org-export-latex-tables-tend): New options. (org-export-latex-tables): Use the new options. -2012-09-30 tumashu (tiny change) +2012-09-30 Feng Shu (tiny change) * org-exp.el (org-export-language-setup): Add simplified chinese translation. @@ -9437,7 +9437,7 @@ (org-update-checkbox-count-maybe): Add an optional argument passed to org-update-checkbox-count. -2011-07-28 Ted Zlatanov +2011-07-28 Teodor Zlatanov * org.el (org-fontify-meta-lines-and-blocks): Ignore errors. @@ -18000,7 +18000,7 @@ * org-habit.el (org-habit-build-graph): Help-echo date when mouse is over stars. -2010-07-19 Jan Böker +2010-07-19 Jan Böcker * org.el (org-file-apps): Improve docstring to reflect grouping matches. diff --git a/src/ChangeLog.12 b/src/ChangeLog.12 index 2b22690bb87..053baa3d487 100644 --- a/src/ChangeLog.12 +++ b/src/ChangeLog.12 @@ -69,7 +69,7 @@ * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW. -2013-03-10 handa +2013-03-10 Kenichi Handa * lisp.h (adjust_after_replace): Extern it. @@ -11043,7 +11043,7 @@ * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't referenced (Bug#11583). -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel Implement wave-style variant of underlining. * dispextern.h (face_underline_type): New enum. @@ -21400,7 +21400,7 @@ * process.c (Fformat_network_address): Doc fix. -2011-04-08 T.V. Raman (tiny change) +2011-04-08 T. V. Raman (tiny change) * xml.c (parse_region): Avoid creating spurious whitespace nodes. From d58d31fbe7f1ee045f2040ac65c3b7f8797b30fc Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 26 Jul 2013 19:49:52 +0200 Subject: [PATCH 28/57] lisp/desktop.el (desktop--select-frame): Try harder to reuse the initial frame. --- lisp/ChangeLog | 5 +++++ lisp/desktop.el | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28a9dde666c..d2f03c15301 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Juanma Barranquero + + * desktop.el (desktop--select-frame): + Try harder to reuse the initial frame. + 2013-07-26 Stefan Monnier * emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. diff --git a/lisp/desktop.el b/lisp/desktop.el index a29a30971aa..d5895a8de57 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1235,10 +1235,20 @@ is the parameter list of the frame being restored. Internal use only." ;; If the frame has its own minibuffer, let's see whether ;; that frame has already been loaded (which can happen after ;; M-x desktop-read). - (setq frame (or (desktop--find-frame - (lambda (f m) - (equal (frame-parameter f 'desktop--mini) m)) - display mini)))) + (setq frame (desktop--find-frame + (lambda (f m) + (equal (frame-parameter f 'desktop--mini) m)) + display mini)) + ;; If it has not been loaded, and it is not a minibuffer-only frame, + ;; let's look for an existing non-minibuffer-only frame to reuse. + (unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only)) + (setq frame (desktop--find-frame + (lambda (f) + (let ((w (frame-parameter f 'minibuffer))) + (and (window-live-p w) + (window-minibuffer-p w) + (eq (window-frame w) f)))) + display)))) (mini ;; For minibufferless frames, check whether they already exist, ;; and that they are linked to the right minibuffer frame. From 7ced0d044656b5fa4a9cd2bcc2326908be432bcf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Jul 2013 14:41:18 -0400 Subject: [PATCH 29/57] * lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new `base' arg of backtrace-frame. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/nadvice.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2f03c15301..9aecbd0f280 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Stefan Monnier + + * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new + `base' arg of backtrace-frame. + 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 8b149aad7bb..edcfc409085 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -425,7 +425,7 @@ of the piece of advice." (get-next-frame (lambda () (setq frame1 frame2) - (setq frame2 (internal--called-interactively-p--get-frame i)) + (setq frame2 (backtrace-frame i #'called-interactively-p)) ;; (message "Advice Frame %d = %S" i frame2) (setq i (1+ i))))) (when (and (eq (nth 1 frame2) 'apply) From fec9206062b420aca84f53d05a72c3ee43244022 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 Jul 2013 21:48:05 +0300 Subject: [PATCH 30/57] Fix documentation of list-processes and process-list. src/process.c (Fprocess_list): Doc fix. lisp/simple.el (list-processes): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 7 +++++-- src/ChangeLog | 2 ++ src/process.c | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9aecbd0f280..65bbc8a305b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,10 @@ * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new `base' arg of backtrace-frame. +2013-07-26 Eli Zaretskii + + * simple.el (list-processes): Doc fix. + 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): diff --git a/lisp/simple.el b/lisp/simple.el index 6f5cac2d011..1fb2fa6014c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3141,14 +3141,17 @@ Also, delete any process that is exited or signaled." (display-buffer (button-get button 'process-buffer))) (defun list-processes (&optional query-only buffer) - "Display a list of all processes. + "Display a list of all processes that are Emacs sub-processes. If optional argument QUERY-ONLY is non-nil, only processes with the query-on-exit flag set are listed. Any process listed as exited or signaled is actually eliminated after the listing is made. Optional argument BUFFER specifies a buffer to use, instead of \"*Process List*\". -The return value is always nil." +The return value is always nil. + +This function lists only processes that were launched by Emacs. To +see other processes running on the system, use `list-system-processes'." (interactive) (or (fboundp 'process-list) (error "Asynchronous subprocesses are not supported on this system")) diff --git a/src/ChangeLog b/src/ChangeLog index 59eb16a81e9..38fa72b0506 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2013-07-26 Eli Zaretskii + * process.c (Fprocess_list): Doc fix. + * w32term.c (w32_read_socket) : Warn about frame being re-exposed only if it didn't ask to become visible. : Under SIZE_RESTORED, only set the frame visible if it diff --git a/src/process.c b/src/process.c index 34783fae5fd..d87a1803fe2 100644 --- a/src/process.c +++ b/src/process.c @@ -1330,7 +1330,7 @@ Returns nil if format of ADDRESS is invalid. */) } DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0, - doc: /* Return a list of all processes. */) + doc: /* Return a list of all processes that are Emacs sub-processes. */) (void) { return Fmapcar (Qcdr, Vprocess_alist); From 13afd560a137730c2fd22b9ee664867f9d4e17d6 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Fri, 26 Jul 2013 22:24:33 +0000 Subject: [PATCH 31/57] Gnus: Add option to sort threads non-recursively gnus-sum.el (gnus-sort-threads-recursively): New defcustom. (gnus-sort-threads): Use it. gnus.texi (Sorting the Summary Buffer): Document new defcustom `gnus-sort-threads-recursively'. --- doc/misc/ChangeLog | 5 +++++ doc/misc/gnus.texi | 5 +++++ lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-sum.el | 15 ++++++++++++--- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index da2491cb94a..50214bb364c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Tassilo Horn + + * gnus.texi (Sorting the Summary Buffer): Document new defcustom + `gnus-sort-threads-recursively'. + 2013-07-25 Glenn Morris * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index be0425a679b..5f9e0b9db28 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -7394,6 +7394,11 @@ say something like: gnus-thread-sort-by-score)) @end lisp +By default, threads are sorted recursively, that is, first the roots, +then all subthreads, and so on. If you feel more like sorting only +the roots, so that inside a thread the original chronological order is +retained, you can set @code{gnus-sort-threads-recursively} to nil. + @vindex gnus-thread-score-function The function in the @code{gnus-thread-score-function} variable (default @code{+}) is used for calculating the total score of a thread. Useful diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a67c55947ac..c32853a2a9f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-07-26 Tassilo Horn + + * gnus-sum.el (gnus-sort-threads-recursively): New defcustom. + (gnus-sort-threads): Use it. + 2013-07-25 Andreas Schwab * gnus-art.el (gnus-button-url-regexp): Make it match url in which diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index f3918b0a215..15cbb5a45e6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -847,6 +847,13 @@ controls how articles are sorted." (function :tag "other")) (boolean :tag "Reverse order")))) +(defcustom gnus-sort-threads-recursively t + "If non-nil, `gnus-thread-sort-functions' are applied recursively. +Setting this to nil allows sorting high-score, recent, +etc. threads to the top of the summary buffer while still +retaining chronological old to new sorting order inside threads." + :group 'gnus-summary-sort + :type 'boolean) (defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number) "*List of functions used for sorting threads in the summary buffer. @@ -4876,9 +4883,11 @@ If LINE, insert the rebuilt thread starting on line LINE." (gnus-message 8 "Sorting threads...") (prog1 (condition-case nil - (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000))) - (gnus-sort-threads-recursive - threads (gnus-make-sort-function gnus-thread-sort-functions))) + (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000)) + (sort-func (gnus-make-sort-function gnus-thread-sort-functions))) + (if gnus-sort-threads-recursively + (gnus-sort-threads-recursive threads sort-func) + (sort threads sort-func))) ;; Even after binding max-lisp-eval-depth, the recursive ;; sorter might fail for very long threads. In that case, ;; try using a (less well-tested) non-recursive sorter. From e4c467f919b37ccb56f44a49571565741d49a0db Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Sat, 27 Jul 2013 08:09:51 +0800 Subject: [PATCH 32/57] Keybinding fix for vc-dir. * lisp/vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. * doc/emacs/maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/maintaining.texi | 2 +- etc/NEWS | 5 +++++ lisp/ChangeLog | 4 ++++ lisp/vc/vc-dir.el | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index ad2f091f27f..810dcac185c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2013-07-27 Xue Fuqiao + + * maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. + 2013-07-26 Eli Zaretskii * display.texi (Fringes): Document the variable fringe-mode. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e89660dfaf5..6184684fbb0 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1222,7 +1222,7 @@ Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}). The VC Directory buffer also defines some single-key shortcuts for VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l}, -@kbd{i}, and @kbd{v}. +@kbd{i}, @kbd{D}, @kbd{L} and @kbd{v}. For example, you can commit a set of edited files by opening a VC Directory buffer, where the files are listed with the @samp{edited} diff --git a/etc/NEWS b/etc/NEWS index 6f645545f75..1aa374939d8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -233,6 +233,11 @@ The default separator is changed to allow surrounding spaces around the comma. *** New variable `diary-from-outlook-function', used by the command `diary-from-outlook'. +** VC Directory Mode + +*** `D' displays diffs between VC-controlled whole tree revisions. +*** `L' lists the change log for the current VC controlled tree in a window. + ** cl-lib *** New macro cl-tagbody. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65bbc8a305b..ef409aa3005 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-07-26 Xue Fuqiao + + * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. + 2013-07-26 Stefan Monnier * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 325e66ea530..7df2bd6687d 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -237,6 +237,7 @@ See `run-hooks'." ;; VC commands (define-key map "v" 'vc-next-action) ;; C-x v v (define-key map "=" 'vc-diff) ;; C-x v = + (define-key map "D" 'vc-root-diff) ;; C-x v D (define-key map "i" 'vc-register) ;; C-x v i (define-key map "+" 'vc-update) ;; C-x v + (define-key map "l" 'vc-print-log) ;; C-x v l From 742a3501a0ded5aa65780592ffa5159f32b8bba7 Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Sat, 27 Jul 2013 08:23:21 +0800 Subject: [PATCH 33/57] ChangeLog fix. --- doc/emacs/ChangeLog | 3 ++- lisp/ChangeLog | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 810dcac185c..a57a62ad728 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,6 +1,7 @@ 2013-07-27 Xue Fuqiao - * maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. + * maintaining.texi (VC Directory Commands): Mention `D' and `L' in + vc-dir. (Bug#14948) 2013-07-26 Eli Zaretskii diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef409aa3005..9f0fdddc574 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2013-07-26 Xue Fuqiao * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. + (Bug#14948) 2013-07-26 Stefan Monnier @@ -35,7 +36,8 @@ 2013-07-26 Matthias Meulien - * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. + * vc/vc-dir.el (vc-dir-mode-map): Add binding for + vc-print-root-log. (Bug#14948) 2013-07-26 Richard Stallman From d85c4d508105431699fc200135a14bfa7d86c0d7 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 27 Jul 2013 03:02:00 +0200 Subject: [PATCH 34/57] lisp/desktop.el: Restore frames at their positions, even if offscreen. (desktop--make-frame): Apply most frame parameters after creating the frame to force (partially or totally) offscreen frames to be restored as such. --- lisp/ChangeLog | 8 +++++++- lisp/desktop.el | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9f0fdddc574..42ad403583b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-27 Juanma Barranquero + + * desktop.el (desktop--make-frame): Apply most frame parameters after + creating the frame to force (partially or totally) offscreen frames to + be restored as such. + 2013-07-26 Xue Fuqiao * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. @@ -15,7 +21,7 @@ 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): - Try harder to reuse the initial frame. + Try harder to reuse existing frames. 2013-07-26 Stefan Monnier diff --git a/lisp/desktop.el b/lisp/desktop.el index d5895a8de57..297f09b269e 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1311,14 +1311,22 @@ its window state. Internal use only." (push visible alt-cfg) (push (cons 'fullscreen fullscreen) alt-cfg))) - ;; Time to select or create a frame an apply the big bunch of parameters - (if (setq frame (desktop--select-frame display filtered-cfg)) - (modify-frame-parameters frame - (if (eq (frame-parameter frame 'fullscreen) fullscreen) - ;; Workaround for bug#14949 - (assq-delete-all 'fullscreen filtered-cfg) - filtered-cfg)) - (setq frame (make-frame-on-display display filtered-cfg))) + ;; Time to find or create a frame an apply the big bunch of parameters. + ;; If a frame needs to be created and it falls partially or wholly offscreen, + ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards is + ;; allowed. So we create the frame as invisible and then reapply the full + ;; parameter list (including position and size parameters). + (setq frame (or (desktop--select-frame display filtered-cfg) + (make-frame-on-display display + (cons '(visibility) + (cl-loop + for param in '(left top width height) + collect (assq param filtered-cfg)))))) + (modify-frame-parameters frame + (if (eq (frame-parameter frame 'fullscreen) fullscreen) + ;; Workaround for bug#14949 + (assq-delete-all 'fullscreen filtered-cfg) + filtered-cfg)) ;; Let's give the finishing touches (visibility, tool-bar, maximization). (when lines (push lines alt-cfg)) From 885e792c90bd0e34e017d3913b8453f5bbfdf1fe Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 26 Jul 2013 21:18:21 -0400 Subject: [PATCH 35/57] * configure.ac: Extend the --with-sound option to allow specification of OSS or ALSA (see bug#14812#64). --- ChangeLog | 5 +++ configure.ac | 86 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 62 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61a3131d02c..1ae456dda5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-27 Glenn Morris + + * configure.ac: Extend the --with-sound option to allow + specification of OSS or ALSA (see bug#14812#64). + 2013-07-25 Glenn Morris * info/dir: Add ido. diff --git a/configure.ac b/configure.ac index b79f3e005dc..d8557f29898 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,18 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], [string giving default POP mail host])], AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.])) -OPTION_DEFAULT_ON([sound],[don't compile with sound support]) +AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE], + [compile with sound support (VALUE one of: yes, ossaudio, alsa, no; +default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])], + [ case "${withval}" in + yes|no|ossaudio|alsa) val=$withval ;; + *) AC_MSG_ERROR([`--with-sound=$withval' is invalid; +this option's value should be `yes', `no', `ossaudio', or `alsa'.]) + ;; + esac + with_sound=$val + ], + [with_sound=$with_features]) dnl FIXME currently it is not the last. dnl This should be the last --with option, because --with-x is @@ -1253,6 +1264,7 @@ AC_DEFUN([PKG_CHECK_MODULES], [ fi ]) +HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h], @@ -1262,47 +1274,61 @@ if test "${with_sound}" != "no"; then #include #endif ]) - # Emulation library used on NetBSD. - AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then + # Emulation library used on NetBSD. + AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ + AC_MSG_ERROR([ossaudio sound support requested but not found.]) + dnl FIXME? If we did find ossaudio, should we set with_sound=ossaudio? + dnl Traditionally, we go on to check for alsa too. Does that make sense? + fi AC_SUBST(LIBSOUND) - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" - PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], - emacs_alsa_normal=yes, - emacs_alsa_normal=no) - if test "$emacs_alsa_normal" != yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[snd_lib_error_set_handler (0);]])], - emacs_alsa_subdir=yes, - emacs_alsa_subdir=no) - if test "$emacs_alsa_subdir" != yes; then - AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" + PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], + emacs_alsa_normal=yes, + emacs_alsa_normal=no) + if test "$emacs_alsa_normal" != yes; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[snd_lib_error_set_handler (0);]])], + emacs_alsa_subdir=yes, + emacs_alsa_subdir=no) + if test "$emacs_alsa_subdir" != yes; then + AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" - fi - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) - fi + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) + elif test "${with_sound}" = "alsa"; then + AC_MSG_ERROR([ALSA sound support requested but not found.]) + fi + fi dnl with_sound = alsa|yes dnl Define HAVE_SOUND if we have sound support. We know it works and dnl compiles only on the specified platforms. For others, it dnl probably doesn't make sense to try. + dnl FIXME So surely we should bypass this whole section if not using + dnl one of these platforms? if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ + dnl Adjust the --with-sound help text if you change this. gnu-linux|freebsd|netbsd|mingw32) AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) + HAVE_SOUND=yes ;; esac fi @@ -4749,6 +4775,8 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" +echo " Does Emacs support sound? ${HAVE_SOUND}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" From 9dabd86d4b2af464a25148321bebeadf6a8e53f3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 27 Jul 2013 06:17:30 -0400 Subject: [PATCH 36/57] Auto-commit of generated files. --- autogen/configure | 72 ++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/autogen/configure b/autogen/configure index fc0463a4a8d..3d207e12537 100755 --- a/autogen/configure +++ b/autogen/configure @@ -2233,7 +2233,9 @@ Optional Packages: --with-mail-unlink unlink, rather than empty, mail spool after reading --with-mailhost=HOSTNAME string giving default POP mail host - --without-sound don't compile with sound support + --with-sound=VALUE compile with sound support (VALUE one of: yes, + ossaudio, alsa, no; default yes). Only for + GNU/Linux, FreeBSD, NetBSD, MinGW. --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no) --with-wide-int prefer wide Emacs integers (typically 62-bit) @@ -4116,9 +4118,16 @@ fi # Check whether --with-sound was given. if test "${with_sound+set}" = set; then : - withval=$with_sound; + withval=$with_sound; case "${withval}" in + yes|no|ossaudio|alsa) val=$withval ;; + *) as_fn_error "\`--with-sound=$withval' is invalid; +this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5 + ;; + esac + with_sound=$val + else - with_sound=$with_features + with_sound=$with_features fi @@ -8995,6 +9004,7 @@ fi +HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h @@ -9017,8 +9027,9 @@ fi done - # Emulation library used on NetBSD. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 + if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then + # Emulation library used on NetBSD. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -9060,10 +9071,14 @@ else LIBSOUND= fi + test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ + as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5 + fi - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" + if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" succeeded=no @@ -9115,12 +9130,12 @@ $as_echo "no" >&6; } HAVE_ALSA=no fi - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9137,8 +9152,8 @@ else emacs_alsa_normal=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_normal" != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$emacs_alsa_normal" != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9155,27 +9170,30 @@ else emacs_alsa_subdir=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_subdir" != yes; then - as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + if test "$emacs_alsa_subdir" != yes; then + as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" - fi - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" $as_echo "#define HAVE_ALSA 1" >>confdefs.h + elif test "${with_sound}" = "alsa"; then + as_fn_error "ALSA sound support requested but not found." "$LINENO" 5 + fi fi - - if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then + if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in - gnu-linux|freebsd|netbsd|mingw32) + gnu-linux|freebsd|netbsd|mingw32) $as_echo "#define HAVE_SOUND 1" >>confdefs.h + HAVE_SOUND=yes ;; esac fi @@ -28679,6 +28697,8 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" +echo " Does Emacs support sound? ${HAVE_SOUND}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" From 5ab78d3d6a7efcb49d2a9be5b4bdb8eaf78f7a14 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 27 Jul 2013 12:07:43 +0000 Subject: [PATCH 37/57] Make Java try-with-resources statement parse properly. progmodes/cc-langs.el (c-block-stmt-1-2-kwds, c-block-stmt-1-2-key): New language constants/variables. progmodes/cc-engine.el (c-beginning-of-statement-1, c-after-conditional): Adapt to deal with c-block-stmt-1-2-key. progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal with c-block-stmt-1-2-key. --- lisp/ChangeLog | 10 ++++++++++ lisp/progmodes/cc-engine.el | 13 +++++++++---- lisp/progmodes/cc-fonts.el | 3 ++- lisp/progmodes/cc-langs.el | 12 ++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42ad403583b..e74c4ffe486 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2013-07-27 Alan Mackenzie + + Make Java try-with-resources statement parse properly. + * progmodes/cc-langs.el (c-block-stmt-1-2-kwds) + (c-block-stmt-1-2-key): New language constants/variables. + * progmodes/cc-engine.el (c-beginning-of-statement-1) + (c-after-conditional): Adapt to deal with c-block-stmt-1-2-key. + * progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal + with c-block-stmet-1-2-key. + 2013-07-27 Juanma Barranquero * desktop.el (desktop--make-frame): Apply most frame parameters after diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index a3bd000a4f3..c2ff5011a0e 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1135,9 +1135,13 @@ comment at the start of cc-engine.el for more info." (not (memq sym '(boundary ignore nil)))) ;; Need to investigate closer whether we've crossed ;; between a substatement and its containing statement. - (if (setq saved (if (looking-at c-block-stmt-1-key) - ptok - pptok)) + (if (setq saved + (cond ((and (looking-at c-block-stmt-1-2-key) + (eq (char-after ptok) ?\()) + pptok) + ((looking-at c-block-stmt-1-key) + ptok) + (t pptok))) (cond ((> start saved) (setq pos saved)) ((= start saved) (setq ret 'up))))) @@ -7988,7 +7992,8 @@ comment at the start of cc-engine.el for more info." (or (looking-at c-block-stmt-1-key) (and (eq (char-after) ?\() (zerop (c-backward-token-2 1 t lim)) - (looking-at c-block-stmt-2-key))) + (or (looking-at c-block-stmt-2-key) + (looking-at c-block-stmt-1-2-key)))) (point)))) (defun c-after-special-operator-id (&optional lim) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 6a4bfd9e875..4e8ce6bac28 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1307,7 +1307,8 @@ casts and declarations are fontified. Used on level 2 and higher." (goto-char match-pos) (backward-char) (c-backward-token-2) - (looking-at c-block-stmt-2-key))) + (or (looking-at c-block-stmt-2-key) + (looking-at c-block-stmt-1-2-key)))) (setq context nil c-restricted-<>-arglists t)) ;; Near BOB. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index af52ad53aad..4e488344e16 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -2187,6 +2187,18 @@ identifiers that follows the type in a normal declaration." t (c-make-keywords-re t (c-lang-const c-block-stmt-1-kwds))) (c-lang-defvar c-block-stmt-1-key (c-lang-const c-block-stmt-1-key)) +(c-lang-defconst c-block-stmt-1-2-kwds + "Statement keywords optionally followed by a paren sexp. +Keywords here should also be in `c-block-stmt-1-kwds'." + t nil + java '("try")) + +(c-lang-defconst c-block-stmt-1-2-key + ;; Regexp matching the start of a statement which may be followed by a + ;; paren sexp and will then be followed by a substatement. + t (c-make-keywords-re t (c-lang-const c-block-stmt-1-2-kwds))) +(c-lang-defvar c-block-stmt-1-2-key (c-lang-const c-block-stmt-1-2-key)) + (c-lang-defconst c-block-stmt-2-kwds "Statement keywords followed by a paren sexp and then by a substatement." t '("for" "if" "switch" "while") From e95da6d36ca628fd7ae4d1bd1affa11ff489daa4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jul 2013 16:08:03 +0300 Subject: [PATCH 38/57] Fix focus-out events on MS-Windows. src/w32term.c (w32_read_socket) : Call w32_detect_focus_change instead of doing part of its job by hand. This fixes the problem whereby FOCUS_OUT events were not sent to the event queue. --- src/ChangeLog | 7 +++++++ src/w32term.c | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 38fa72b0506..95fdd2da94e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-07-27 Eli Zaretskii + + * w32term.c (w32_read_socket) : Call + w32_detect_focus_change instead of doing part of its job by hand. + This fixes the problem whereby FOCUS_OUT events were not sent to + the event queue. + 2013-07-26 Eli Zaretskii * process.c (Fprocess_list): Doc fix. diff --git a/src/w32term.c b/src/w32term.c index 0b22fd178e4..a596a487f3d 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4923,16 +4923,11 @@ w32_read_socket (struct terminal *terminal, break; case WM_KILLFOCUS: + w32_detect_focus_change (dpyinfo, &msg, &inev); f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { - if (f == dpyinfo->w32_focus_event_frame) - dpyinfo->w32_focus_event_frame = 0; - - if (f == dpyinfo->w32_focus_frame) - x_new_focus_frame (dpyinfo, 0); - if (f == hlinfo->mouse_face_mouse_frame) { /* If we move outside the frame, then we're From ae43b66aba93d11b6dde84209154169d54c97aae Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Sat, 27 Jul 2013 17:58:56 +0200 Subject: [PATCH 39/57] * calendar/todo-mode.el: Add command to rename todo files. (todo-rename-file): New command. (todo-key-bindings-t): Add key binding for it. Change the bindings of todo-filter-regexp-items(-multifile) to use `x' instead of `r', since the latter is better suited to the new renaming command. --- lisp/ChangeLog | 9 ++++++++ lisp/calendar/todo-mode.el | 43 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e74c4ffe486..9dec56b78e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2013-07-27 Stephen Berman + + * calendar/todo-mode.el: Add command to rename todo files. + (todo-rename-file): New command. + (todo-key-bindings-t): Add key binding for it. Change the + bindings of todo-filter-regexp-items(-multifile) to use `x' + instead of `r', since the latter is better suited to the new + renaming command. + 2013-07-27 Alan Mackenzie Make Java try-with-resources statement parse properly. diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 934dfb92a57..d578950a802 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -1099,6 +1099,44 @@ Noninteractively, return the name of the new file." (todo-show)) file))) +(defun todo-rename-file (&optional arg) + "Rename the current todo file. +With prefix ARG, prompt for a todo file and rename it. +If there are corresponding archive or filtered items files, +rename these accordingly. If there are live buffers visiting +these files, also rename them accordingly." + (interactive "P") + (let* ((oname (or (and arg + (todo-read-file-name "Choose a file to rename: " + nil t)) + (buffer-file-name))) + (soname (todo-short-file-name oname)) + (nname (todo-read-file-name "New name for this file: ")) + (snname (todo-short-file-name nname)) + (files (directory-files todo-directory t + (concat ".*" (regexp-quote soname) + ".*\.tod[aorty]$") t))) + (dolist (f files) + (let ((sfname (todo-short-file-name f)) + (fext (file-name-extension f t)) + (fbuf (find-buffer-visiting f))) + (when (string-match (regexp-quote soname) sfname) + (let* ((snfname (replace-match snname t t sfname)) + (nfname (concat todo-directory snfname fext))) + (rename-file f nfname) + (when fbuf + (with-current-buffer fbuf + (set-visited-file-name nfname t t) + (cond ((member fext '(".todo" ".toda")) + (setq todo-current-todo-file (buffer-file-name)) + (setq mode-line-buffer-identification + (funcall todo-mode-line-function + (todo-current-category)))) + (t + (rename-buffer + (replace-regexp-in-string + (regexp-quote soname) snfname)))))))))))) + (defun todo-delete-file () "Delete the current todo, archive or filtered items file. If the todo file has a corresponding archive file, or vice versa, @@ -6163,6 +6201,7 @@ Filtered Items mode following todo (not done) items." ("Cey" todo-edit-category-diary-inclusion) ("Cek" todo-edit-category-diary-nonmarking) ("Fa" todo-add-file) + ("Fr" todo-rename-file) ("Ff" todo-find-filtered-items-file) ("FV" todo-toggle-view-done-only) ("V" todo-toggle-view-done-only) @@ -6171,8 +6210,8 @@ Filtered Items mode following todo (not done) items." ("Fts" todo-set-top-priorities-in-file) ("Fyy" todo-filter-diary-items) ("Fym" todo-filter-diary-items-multifile) - ("Frr" todo-filter-regexp-items) - ("Frm" todo-filter-regexp-items-multifile) + ("Fxx" todo-filter-regexp-items) + ("Fxm" todo-filter-regexp-items-multifile) ("ee" todo-edit-item) ("em" todo-edit-multiline-item) ("edt" todo-edit-item-header) From f5950f7afe5c62af0ba7dd834419a533c7215b3d Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 27 Jul 2013 17:35:04 +0000 Subject: [PATCH 40/57] Fontify a Java generic method as a function. * progmodes/cc-langs.el (c-recognize-<>-arglists): Set the Java value to t. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/cc-langs.el | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9dec56b78e8..a0680662e53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-27 Alan Mackenzie + + Fontify a Java generic method as a function. + * progmodes/cc-langs.el (c-recognize-<>-arglists): Set the Java + value to t. + 2013-07-27 Stephen Berman * calendar/todo-mode.el: Add command to rename todo files. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 4e488344e16..2c0a1317b04 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -2950,7 +2950,8 @@ identifier or one of the keywords on `c-<>-type-kwds' or `c-<>-arglist-kwds'. If there's an identifier before then the whole expression is considered to be a type." t (or (consp (c-lang-const c-<>-type-kwds)) - (consp (c-lang-const c-<>-arglist-kwds)))) + (consp (c-lang-const c-<>-arglist-kwds))) + java t) (c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists)) (c-lang-defconst c-enums-contain-decls From 25ac1ded77db0e0a839841872dbd514c4c14956b Mon Sep 17 00:00:00 2001 From: David Engster Date: Sat, 27 Jul 2013 23:09:43 +0200 Subject: [PATCH 41/57] Merge from CEDET upstream (8569). * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap debug message removing middle tag in semantic-edits-verbose-flag check. * semantic/bovine/el.el (semantic/db-el): New require. * semantic/db-el.el (semanticdb-normalize-one-tag): It might be that a symbol comes from a file but cannot be found in its table. This happens for instance when a symbol was dynamically created through a macro like `defstruct'. In this case, return the original tag. (semanticdb-elisp-sym->tag): Deal with autoloaded functions, where the argument list is not available until the file is loaded. --- lisp/cedet/ChangeLog | 18 +++++++++++++++ lisp/cedet/semantic/bovine/el.el | 1 + lisp/cedet/semantic/db-el.el | 39 +++++++++++++++++++------------- lisp/cedet/semantic/edit.el | 5 ++-- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 705277c97a0..1b8e4725dc1 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,21 @@ +2013-07-27 Eric Ludlam + + * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap + debug message removing middle tag in semantic-edits-verbose-flag + check. + +2013-07-27 David Engster + + * semantic/bovine/el.el (semantic/db-el): New require. + + * semantic/db-el.el (semanticdb-normalize-one-tag): It might be + that a symbol comes from a file but cannot be found in its table. + This happens for instance when a symbol was dynamically created + through a macro like `defstruct'. In this case, return the + original tag. + (semanticdb-elisp-sym->tag): Deal with autoloaded functions, where + the argument list is not available until the file is loaded. + 2013-06-25 Stefan Monnier * data-debug.el, cedet-idutils.el: Neuter the "Version:" header. diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index 0bbe3c61d76..c6f1ceb0f94 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -25,6 +25,7 @@ (require 'semantic) (require 'semantic/bovine) +(require 'semantic/db-el) (require 'find-func) (require 'semantic/ctxt) diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 1b0f3292ad3..3376389c7d5 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -173,13 +173,17 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." (newtags (when tab (semanticdb-find-tags-by-name-method tab (semantic-tag-name tag)))) (match nil)) - ;; Find the best match. - (dolist (T newtags) - (when (semantic-tag-similar-p T tag) - (setq match T))) - ;; Backup system. - (when (not match) - (setq match (car newtags))) + ;; We might not have a parsed tag in this file, because it + ;; might be generated through a macro like defstruct. + (if (null newtags) + (setq match tag) + ;; Find the best match. + (dolist (T newtags) + (when (semantic-tag-similar-p T tag) + (setq match T))) + ;; Backup system. + (when (not match) + (setq match (car newtags)))) ;; Return it. (when tab (cons tab match)))))) @@ -196,15 +200,18 @@ TOKTYPE is a hint to the type of tag desired." (when sym (cond ((and (eq toktype 'function) (fboundp sym)) (require 'semantic/bovine/el) - (semantic-tag-new-function - (symbol-name sym) - nil ;; return type - (semantic-elisp-desymbolify - (help-function-arglist sym)) ;; arg-list - :user-visible-flag (condition-case nil - (interactive-form sym) - (error nil)) - )) + (let ((arglist (help-function-arglist sym))) + (when (not (listp arglist)) + ;; Function might be autoloaded, in which case + ;; the arglist is not available yet. + (setq arglist nil)) + (semantic-tag-new-function + (symbol-name sym) + nil ;; return type + (semantic-elisp-desymbolify arglist) + :user-visible-flag (condition-case nil + (interactive-form sym) + (error nil))))) ((and (eq toktype 'variable) (boundp sym)) (semantic-tag-new-variable (symbol-name sym) diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el index a27eab5404c..91455cdb741 100644 --- a/lisp/cedet/semantic/edit.el +++ b/lisp/cedet/semantic/edit.el @@ -882,8 +882,9 @@ pre-positioned to a convenient location." ;; reparse (semantic-parse-changes-failed "Splice-remove failed. Empty buffer?") )) - (message "To Remove Middle Tag: (%s)" - (semantic-format-tag-name first))) + (when semantic-edits-verbose-flag + (message "To Remove Middle Tag: (%s)" + (semantic-format-tag-name first)))) ;; Find in the cache the preceding tag (while (and cachestart (not (eq first (car (cdr cachestart))))) (setq cachestart (cdr cachestart))) From 94fea300fdf8322ddaddf50b2de592183d9aa71e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Jul 2013 00:14:07 +0200 Subject: [PATCH 42/57] Spelling fixes. --- doc/misc/ido.texi | 12 ++++++------ src/ChangeLog.9 | 2 +- src/eval.c | 2 +- src/nsterm.m | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/misc/ido.texi b/doc/misc/ido.texi index e61a90463c5..dbc35b09bb8 100644 --- a/doc/misc/ido.texi +++ b/doc/misc/ido.texi @@ -273,7 +273,7 @@ To go to the root directory (on the current drive), enter two slashes. On MS-DOS or Windows, to select the root of another drive, enter @samp{X:/} where @samp{X} is the drive letter. To go to the home directory, enter @samp{~/}. To enter Dired for this directory, use -@kbd{C-d}. +@kbd{C-d}. @c TODO: a new node for ftp hosts @cindex ftp hosts @@ -587,14 +587,14 @@ if you type a dot as first char (even if @code{ido-enable-prefix} is @c @defvr {User Option} ido-rotate-file-list-default @c @defvr {User Option} ido-enter-matching-directory @c @defvr {User Option} ido-create-new-buffer -@c @defvr {User Option} ido-setup-hook +@c @defvr {User Option} ido-setup-hook @c @defvr {User Option} ido-separator @c @defvr {User Option} ido-decorations @c @defvr {User Option} ido-use-virtual-buffers @c @defvr {User Option} ido-use-faces -@c @defvr {User Option} ido-make-file-list-hook -@c @defvr {User Option} ido-make-dir-list-hook -@c @defvr {User Option} ido-make-buffer-list-hook +@c @defvr {User Option} ido-make-file-list-hook +@c @defvr {User Option} ido-make-dir-list-hook +@c @defvr {User Option} ido-make-buffer-list-hook @c @defvr {User Option} ido-rewrite-file-prompt-functions @c @defvr {User Option} ido-completion-buffer @c @defvr {User Option} ido-completion-buffer-all-completions @@ -689,7 +689,7 @@ If you don't want to rely on the @code{ido-everywhere} functionality, @code{ido-read-directory-name} can be used by other packages to read a buffer name, a file name, or a directory name in the @emph{Ido} way. -@c @node Cheetsheet +@c @node Cheatsheet @c * History and Acknowledgments:: How Ido came into being @c @node History and Acknowledgments diff --git a/src/ChangeLog.9 b/src/ChangeLog.9 index b451b78944f..2e1d41b2495 100644 --- a/src/ChangeLog.9 +++ b/src/ChangeLog.9 @@ -10644,7 +10644,7 @@ (syms_of_xfns) [GLYPH_DEBUG]: Don't defsubr removed functions. (syms_of_xfns): Initialize Qcenter. - * eval.c (Fsignal): If lisp_eval_depth or spepdl_size are near + * eval.c (Fsignal): If lisp_eval_depth or specpdl_size are near to the limits, increase the limits. 2000-05-01 Kenichi Handa diff --git a/src/eval.c b/src/eval.c index bb5d5efc9ba..cb716690e3c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3481,7 +3481,7 @@ nearest activation frame. */) directly in the pre-existing specpdl elements (i.e. we swap the current value and the old value stored in the specpdl), kind of like the inplace pointer-reversal trick. As it turns out, the rewind does the same as the - unwind, except it starts from the other end of the spepdl stack, so we use + unwind, except it starts from the other end of the specpdl stack, so we use the same function for both unwind and rewind. */ static void backtrace_eval_unrewind (int distance) diff --git a/src/nsterm.m b/src/nsterm.m index 61538798337..14706f6b91d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4473,9 +4473,9 @@ - (void)sendEvent: (NSEvent *)theEvent #ifdef NS_IMPL_COCOA /* If no dialog and none of our frames have focus and it is a move, skip it. - It is a mouse move in an auxillary menu, i.e. on the top right on OSX, + It is a mouse move in an auxiliary menu, i.e. on the top right on OSX, such as Wifi, sound, date or similar. - This prevents "spooky" highlightning in the frame under the menu. */ + This prevents "spooky" highlighting in the frame under the menu. */ if (type == NSMouseMoved && [NSApp modalWindow] == nil) { struct ns_display_info *di; From ddeffb1731ce40c162287c683a30d12382543b31 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 28 Jul 2013 05:03:45 +0200 Subject: [PATCH 43/57] lisp/desktop.el: Optionally force offscreen frames back onscreen. (desktop-restoring-reuses-frames): New option. (desktop--compute-pos, desktop--move-onscreen): New functions. (desktop--make-frame): Use desktop--move-onscreen. --- lisp/ChangeLog | 7 +++++ lisp/desktop.el | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0680662e53..5fe335ecda6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-07-28 Juanma Barranquero + + * desktop.el: Optionally force offscreen frames back onscreen. + (desktop-restoring-reuses-frames): New option. + (desktop--compute-pos, desktop--move-onscreen): New functions. + (desktop--make-frame): Use desktop--move-onscreen. + 2013-07-27 Alan Mackenzie Fontify a Java generic method as a function. diff --git a/lisp/desktop.el b/lisp/desktop.el index 297f09b269e..d3bb6648099 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -387,6 +387,18 @@ If `delete', frames on other displays are deleted instead of restored." :group 'desktop :version "24.4") +(defcustom desktop-restore-forces-onscreen t + "If t, offscreen frames are restored onscreen instead. +If `all', frames that are partially offscreen are also forced onscren. +NOTE: Checking of frame boundaries is only approximate and can fail +to reliably detect frames whose onscreen/offscreen state depends on a +few pixels, especially near the right / bottom borders of the screen." + :type '(choice (const :tag "Only fully offscreen frames" t) + (const :tag "Also partially offscreen frames" 'all) + (const :tag "Do not force frames onscreen" nil)) + :group 'desktop + :version "24.4") + (defcustom desktop-restoring-reuses-frames t "If t, restoring frames reuses existing frames. If nil, existing frames are deleted. @@ -1201,6 +1213,68 @@ This function also sets `desktop-dirname' to nil." (defvar desktop--reuse-list nil "Internal use only.") +(defun desktop--compute-pos (value left/top right/bottom) + (pcase value + (`(+ ,val) (+ left/top val)) + (`(- ,val) (+ right/bottom val)) + (val val))) + +(defun desktop--move-onscreen (frame) + "If FRAME is offscreen, move it back onscreen and, if necessary, resize it. +When forced onscreen, frames wider than the monitor's workarea are converted +to fullwidth, and frames taller than the workarea are converted to fullheight. +NOTE: This only works for non-iconified frames." + (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) + (right (+ left width -1)) + (bottom (+ top height -1)) + (fr-left (desktop--compute-pos (frame-parameter frame 'left) left right)) + (fr-top (desktop--compute-pos (frame-parameter frame 'top) top bottom)) + (ch-width (frame-char-width frame)) + (ch-height (frame-char-height frame)) + (fr-width (max (frame-pixel-width frame) (* ch-width (frame-width frame)))) + (fr-height (max (frame-pixel-height frame) (* ch-height (frame-height frame)))) + (fr-right (+ fr-left fr-width -1)) + (fr-bottom (+ fr-top fr-height -1))) + (when (pcase desktop-restore-forces-onscreen + ;; Any corner is outside the screen. + (`all (or (< fr-bottom top) (> fr-bottom bottom) + (< fr-left left) (> fr-left right) + (< fr-right left) (> fr-right right) + (< fr-top top) (> fr-top bottom))) + ;; Displaced to the left, right, above or below the screen. + (`t (or (> fr-left right) + (< fr-right left) + (> fr-top bottom) + (< fr-bottom top))) + (_ nil)) + (let ((fullwidth (> fr-width width)) + (fullheight (> fr-height height)) + (params nil)) + ;; Position frame horizontally. + (cond (fullwidth + (push `(left . ,left) params)) + ((> fr-right right) + (push `(left . ,(+ left (- width fr-width))) params)) + ((< fr-left left) + (push `(left . ,left) params))) + ;; Position frame vertically. + (cond (fullheight + (push `(top . ,top) params)) + ((> fr-bottom bottom) + (push `(top . ,(+ top (- height fr-height))) params)) + ((< fr-top top) + (push `(top . ,top) params))) + ;; Compute fullscreen state, if required. + (when (or fullwidth fullheight) + (push (cons 'fullscreen + (cond ((not fullwidth) 'fullheight) + ((not fullheight) 'fullwidth) + (t 'maximized))) + params)) + ;; Finally, move the frame back onscreen. + (when params + (modify-frame-parameters frame params)))))) + (defun desktop--find-frame (predicate display &rest args) "Find a suitable frame in `desktop--reuse-list'. Look through frames whose display property matches DISPLAY and @@ -1328,6 +1402,13 @@ its window state. Internal use only." (assq-delete-all 'fullscreen filtered-cfg) filtered-cfg)) + ;; If requested, force frames to be onscreen. + (when (and desktop-restore-forces-onscreen + ;; FIXME: iconified frames should be checked too, + ;; but it is impossible without deiconifying them. + (not (eq (frame-parameter frame 'visibility) 'icon))) + (desktop--move-onscreen frame)) + ;; Let's give the finishing touches (visibility, tool-bar, maximization). (when lines (push lines alt-cfg)) (when alt-cfg (modify-frame-parameters frame alt-cfg)) From 0f91f03c05dd9be6dbcb7eecd784ccaf0fc7a24b Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Sun, 28 Jul 2013 13:54:24 +0800 Subject: [PATCH 44/57] * doc/emacs/glossary.texi (Glossary): Add some entries. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/glossary.texi | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a57a62ad728..eaae7ec5c9f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2013-07-28 Xue Fuqiao + + * glossary.texi (Glossary): Add some entries. + 2013-07-27 Xue Fuqiao * maintaining.texi (VC Directory Commands): Mention `D' and `L' in diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index ee41313c10f..0cf253396ff 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -4,6 +4,7 @@ @c See file emacs.texi for copying conditions. @node Glossary @unnumbered Glossary +@cindex glossary @table @asis @anchor{Glossary---Abbrev} @@ -18,7 +19,10 @@ Aborting means getting out of a recursive edit (q.v.). The commands @kbd{C-]} and @kbd{M-x top-level} are used for this. @xref{Quitting}. -@c FIXME? Active Region +@item Active Region +Setting the mark (q.v.) at a position in the text also activates it. +When the mark is active, we call the region an active region. +@xref{Mark}. @item Alt Alt is the name of a modifier bit that a keyboard input character may @@ -183,6 +187,11 @@ particular alphabet or script. @xref{International}. @item Character Terminal @xref{Glossary---Text Terminal}. +@item Chord +A chord is a key sequence (q.v.) in which the keys are pressed at the +same time. For example: @kbd{S-M-C-a}. You can hold down a chord to +repeat its command. + @item Click Event A click event is the kind of input event (q.v.@:) generated when you press a mouse button and release it without moving the mouse. @@ -1365,7 +1374,10 @@ are not in a recursive editing level (q.v.@:) or the minibuffer (q.v.), and not in the middle of a command. You can get back to top level by aborting (q.v.@:) and quitting (q.v.). @xref{Quitting}. -@c FIXME? Transient Mark Mode +@item Transient Mark Mode +Transient Mark mode gives you much of the standard +selection-highlighting behavior of other editors. In GNU Emacs 23 and +onwards, it is enabled by default. @xref{Disabled Transient Mark}. @item Transposition Transposing two units of text means putting each one into the place From 2e5ce5ded73aa084e12b826fd1adbebd03f900fd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Jul 2013 18:22:27 +0300 Subject: [PATCH 45/57] Fix bug #14970 with crashes when deleting many frames on MS-Windows. src/w32fns.c (w32_wnd_proc) : Make sure the frame which got the message is still alive, before dereferencing its pointer. src/frame.c (delete_frame): Test "this" frame's minibuffer window to be a live window, before using it as such. --- src/ChangeLog | 9 +++++++++ src/frame.c | 9 ++++++--- src/w32fns.c | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 95fdd2da94e..c5448fd1514 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-07-28 Eli Zaretskii + + * w32fns.c (w32_wnd_proc) : Make sure the + frame which got the message is still alive, before dereferencing + its pointer. (Bug#14970) + + * frame.c (delete_frame): Test "this" frame's minibuffer window to + be a live window, before using it as such. (Bug#14970) + 2013-07-27 Eli Zaretskii * w32term.c (w32_read_socket) : Call diff --git a/src/frame.c b/src/frame.c index 5fa54052cd2..0b59b43a445 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1157,10 +1157,13 @@ delete_frame (Lisp_Object frame, Lisp_Object force) FOR_EACH_FRAME (frames, this) { + Lisp_Object fminiw; + struct frame *this_f; + if (! EQ (this, frame) - && EQ (frame, - WINDOW_FRAME (XWINDOW - (FRAME_MINIBUF_WINDOW (XFRAME (this)))))) + && (this_f = XFRAME (this)) + && WINDOWP (fminiw = FRAME_MINIBUF_WINDOW (this_f)) + && EQ (frame, WINDOW_FRAME (XWINDOW (fminiw)))) { /* If we MUST delete this frame, delete the other first. But do this only if FORCE equals `noelisp'. */ diff --git a/src/w32fns.c b/src/w32fns.c index 675b716f3b0..2b06936d119 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -3213,6 +3213,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) described by W was deleted, as indicated by its buffer field being reset to nil. */ f = x_window_to_frame (dpyinfo, hwnd); + if (!(f && FRAME_LIVE_P (f))) + break; w = XWINDOW (FRAME_SELECTED_WINDOW (f)); /* Punt if someone changed the frame's selected window behind our back. */ From e560aba9d13100bf448e14e5fceeddf1df2e4705 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Jul 2013 21:36:23 +0200 Subject: [PATCH 46/57] * frame.c (delete_frame): Avoid unnecessary 'this_f' test. Fixes: debbugs:14970 --- src/ChangeLog | 4 ++++ src/frame.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c5448fd1514..8d6d34a83ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-07-28 Paul Eggert + + * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970). + 2013-07-28 Eli Zaretskii * w32fns.c (w32_wnd_proc) : Make sure the diff --git a/src/frame.c b/src/frame.c index 0b59b43a445..95f53569561 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1158,12 +1158,13 @@ delete_frame (Lisp_Object frame, Lisp_Object force) FOR_EACH_FRAME (frames, this) { Lisp_Object fminiw; - struct frame *this_f; - if (! EQ (this, frame) - && (this_f = XFRAME (this)) - && WINDOWP (fminiw = FRAME_MINIBUF_WINDOW (this_f)) - && EQ (frame, WINDOW_FRAME (XWINDOW (fminiw)))) + if (EQ (this, frame)) + continue; + + fminiw = FRAME_MINIBUF_WINDOW (XFRAME (this)); + + if (WINDOWP (fminiw) && EQ (frame, WINDOW_FRAME (XWINDOW (fminiw)))) { /* If we MUST delete this frame, delete the other first. But do this only if FORCE equals `noelisp'. */ From d5a845b4d03cf35b4dafcd7632df88c74e6785d0 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Mon, 29 Jul 2013 00:34:32 +0200 Subject: [PATCH 47/57] * calendar/todo-mode.el (todo-rename-file): Fix incorrect use of replace-regexp-in-string and inadvertent omissions in previous change. (todo-filter-items): Ensure only file names are comma-separated in renamed filtered items buffer. --- lisp/ChangeLog | 7 +++++++ lisp/calendar/todo-mode.el | 30 ++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5fe335ecda6..3708758df4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-07-28 Stephen Berman + + * calendar/todo-mode.el (todo-rename-file): Fix incorrect use of + replace-regexp-in-string and inadvertent omissions in previous change. + (todo-filter-items): Ensure only file names are comma-separated in + renamed filtered items buffer. + 2013-07-28 Juanma Barranquero * desktop.el: Optionally force offscreen frames back onscreen. diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index d578950a802..943aa8b34b5 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -1117,9 +1117,10 @@ these files, also rename them accordingly." (concat ".*" (regexp-quote soname) ".*\.tod[aorty]$") t))) (dolist (f files) - (let ((sfname (todo-short-file-name f)) - (fext (file-name-extension f t)) - (fbuf (find-buffer-visiting f))) + (let* ((sfname (todo-short-file-name f)) + (fext (file-name-extension f t)) + (fbuf (find-buffer-visiting f)) + (fbname (buffer-name fbuf))) (when (string-match (regexp-quote soname) sfname) (let* ((snfname (replace-match snname t t sfname)) (nfname (concat todo-directory snfname fext))) @@ -1135,7 +1136,14 @@ these files, also rename them accordingly." (t (rename-buffer (replace-regexp-in-string - (regexp-quote soname) snfname)))))))))))) + (regexp-quote soname) snname fbname)))))))))) + (setq todo-files (funcall todo-files-function) + todo-archives (funcall todo-files-function t)) + (when (string= todo-default-todo-file soname) + (setq todo-default-todo-file snname)) + (when (string= todo-global-current-todo-file oname) + (setq todo-global-current-todo-file nname)) + (todo-reevaluate-filelist-defcustoms))) (defun todo-delete-file () "Delete the current todo, archive or filtered items file. @@ -4159,7 +4167,8 @@ multifile commands for further details." (regexp ".todr"))))) (rxfiles (when regexp (directory-files todo-directory t ".*\\.todr$" t))) - (file-exists (or (file-exists-p fname) rxfiles))) + (file-exists (or (file-exists-p fname) rxfiles)) + bufname) (cond ((and top new (natnump new)) (todo-filter-items-1 (cons 'top new) flist)) ((and (not new) file-exists) @@ -4173,10 +4182,15 @@ multifile commands for further details." (todo-check-filtered-items-file)) (t (todo-filter-items-1 filter flist))) - (setq fname (replace-regexp-in-string "-" ", " - (todo-short-file-name fname))) + (dolist (s (split-string (todo-short-file-name fname) "-")) + (setq bufname (if bufname + (concat bufname (if (member s (mapcar + 'todo-short-file-name + todo-files)) + ", " "-") s) + s))) (rename-buffer (format (concat "%s for file" (if multi "s" "") - " \"%s\"") buf fname)))) + " \"%s\"") buf bufname)))) (defun todo-filter-items-1 (filter file-list) "Build a list of items by applying FILTER to FILE-LIST. From 9503c190862c8f8cc2d34f393450bd692143a34e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 29 Jul 2013 00:43:01 +0200 Subject: [PATCH 48/57] lisp/desktop.el: Fix problem creating minibuffer(less,only) frames. (desktop--make-frame): Include `minibuffer' in the minimal set of parameters passed when creating a frame, because the minibuffer status of a frame cannot be changed later. --- lisp/ChangeLog | 6 ++++++ lisp/desktop.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3708758df4b..ad193ea0d64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-28 Juanma Barranquero + + * desktop.el (desktop--make-frame): Include `minibuffer' in the + minimal set of parameters passed when creating a frame, because + the minibuffer status of a frame cannot be changed later. + 2013-07-28 Stephen Berman * calendar/todo-mode.el (todo-rename-file): Fix incorrect use of diff --git a/lisp/desktop.el b/lisp/desktop.el index d3bb6648099..299bdc0eeb4 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1394,7 +1394,7 @@ its window state. Internal use only." (make-frame-on-display display (cons '(visibility) (cl-loop - for param in '(left top width height) + for param in '(left top width height minibuffer) collect (assq param filtered-cfg)))))) (modify-frame-parameters frame (if (eq (frame-parameter frame 'fullscreen) fullscreen) From 0a760e101811746dea8b1e287b9e1f3583a709a5 Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Mon, 29 Jul 2013 06:48:15 +0800 Subject: [PATCH 49/57] * doc/emacs/glossary.texi (Glossary): Refine. --- doc/emacs/glossary.texi | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 0cf253396ff..43441c20814 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -20,7 +20,7 @@ commands @kbd{C-]} and @kbd{M-x top-level} are used for this. @xref{Quitting}. @item Active Region -Setting the mark (q.v.) at a position in the text also activates it. +Setting the mark (q.v.@:) at a position in the text also activates it. When the mark is active, we call the region an active region. @xref{Mark}. @@ -187,11 +187,6 @@ particular alphabet or script. @xref{International}. @item Character Terminal @xref{Glossary---Text Terminal}. -@item Chord -A chord is a key sequence (q.v.) in which the keys are pressed at the -same time. For example: @kbd{S-M-C-a}. You can hold down a chord to -repeat its command. - @item Click Event A click event is the kind of input event (q.v.@:) generated when you press a mouse button and release it without moving the mouse. @@ -1375,9 +1370,10 @@ are not in a recursive editing level (q.v.@:) or the minibuffer level by aborting (q.v.@:) and quitting (q.v.). @xref{Quitting}. @item Transient Mark Mode -Transient Mark mode gives you much of the standard -selection-highlighting behavior of other editors. In GNU Emacs 23 and -onwards, it is enabled by default. @xref{Disabled Transient Mark}. +The default behavior of the mark (q.v.@:) and region (q.v.), in which +setting the mark activates it and highlights the region, is called +Transient Mark mode. In GNU Emacs 23 and onwards, it is enabled by +default. @xref{Disabled Transient Mark}. @item Transposition Transposing two units of text means putting each one into the place From 42ee6f55f72216e9545cc2c9a09b621102063eec Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Mon, 29 Jul 2013 01:19:25 +0200 Subject: [PATCH 50/57] Clarify ChangeLog entry. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ad193ea0d64..677e5e5a329 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -9,7 +9,7 @@ * calendar/todo-mode.el (todo-rename-file): Fix incorrect use of replace-regexp-in-string and inadvertent omissions in previous change. (todo-filter-items): Ensure only file names are comma-separated in - renamed filtered items buffer. + name of filtered items buffer. 2013-07-28 Juanma Barranquero From dfc7be3975a43902120b709090b66e3aa1c6c0a4 Mon Sep 17 00:00:00 2001 From: Xue Fuqiao Date: Mon, 29 Jul 2013 09:32:01 +0800 Subject: [PATCH 51/57] * INSTALL: Fix description. --- ChangeLog | 4 ++++ INSTALL | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1ae456dda5f..3dbdca35692 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-07-29 Xue Fuqiao + + * INSTALL: Fix description. + 2013-07-27 Glenn Morris * configure.ac: Extend the --with-sound option to allow diff --git a/INSTALL b/INSTALL index fc4b7da7cd6..535819bc0ce 100644 --- a/INSTALL +++ b/INSTALL @@ -98,7 +98,6 @@ sections if you need to. first clean the source directories: make distclean - ./configure Note that the install automatically saves space by compressing (provided you have the `gzip' program) those installed Lisp source (.el) From 78822e94cba9b0ddf4ace7b4af8b9fa2c6eb533a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Jul 2013 09:47:53 +0200 Subject: [PATCH 52/57] * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer option. * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): Use it. --- lisp/ChangeLog | 8 ++++++++ lisp/net/tramp-sh.el | 8 ++++++-- lisp/net/tramp.el | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 677e5e5a329..6ecc18cdcda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-07-29 Michael Albinus + + * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer + option. + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) + (tramp-maybe-open-connection): Use it. + 2013-07-28 Juanma Barranquero * desktop.el (desktop--make-frame): Include `minibuffer' in the diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c92eacd4473..441849fd2af 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2248,7 +2248,10 @@ The method used must be an out-of-band method." spec (format-spec-make ?t (tramp-get-connection-property (tramp-get-connection-process v) "temp-file" "")) - options (format-spec tramp-ssh-controlmaster-options spec) + options (format-spec + (if tramp-use-ssh-controlmaster-options + tramp-ssh-controlmaster-options "") + spec) spec (format-spec-make ?h host ?u user ?p port ?c options ?k (if keep-date " " "")) @@ -4416,7 +4419,8 @@ connection if a previous connection has died for some reason." (let* ((target-alist (tramp-compute-multi-hops vec)) ;; We will apply `tramp-ssh-controlmaster-options' ;; only for the first hop. - (options tramp-ssh-controlmaster-options) + (options (if tramp-use-ssh-controlmaster-options + tramp-ssh-controlmaster-options "")) (process-connection-type tramp-process-connection-type) (process-adaptive-read-buffering nil) (coding-system-for-read nil) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index db6a1e381a6..48e13004c36 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -305,6 +305,14 @@ useful only in combination with `tramp-default-proxies-alist'.") "Call ssh to detect whether it supports the Control* arguments. Return a string to be used in `tramp-methods'.") +;;;###tramp-autoload +(defcustom tramp-use-ssh-controlmaster-options + (not (zerop (length tramp-ssh-controlmaster-options))) + "Whether to use `tramp-ssh-controlmaster-options'." + :group 'tramp + :version "24.4" + :type 'boolean) + (defcustom tramp-default-method ;; An external copy method seems to be preferred, because it performs ;; much better for large files, and it hasn't too serious delays From b69c2ea78a41d69a4970520a3b46046955d35edd Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Jul 2013 11:07:30 +0200 Subject: [PATCH 53/57] * tramp.texi (Frequently Asked Questions): Mention `tramp-use-ssh-controlmaster-options'. --- doc/misc/ChangeLog | 5 +++++ doc/misc/tramp.texi | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 50214bb364c..b4cd73bda08 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2013-07-29 Michael Albinus + + * tramp.texi (Frequently Asked Questions): Mention + `tramp-use-ssh-controlmaster-options'. + 2013-07-26 Tassilo Horn * gnus.texi (Sorting the Summary Buffer): Document new defcustom diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 1121a450ebd..03c6da3b73f 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3186,13 +3186,13 @@ for example: @end lisp Note, that "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and -"%%p", respectively. The entries of @code{ControlPath}, -@code{ControlMaster} and @code{ControlPersist} can be removed from -this setting, if they are configured properly in your -@file{~/.ssh/config}: +"%%p", respectively. + +These settings can be suppressed, if they are configured properly in +your @file{~/.ssh/config}: @lisp -(setq tramp-ssh-controlmaster-options "") +(setq tramp-use-ssh-controlmaster-options nil) @end lisp From 7bddb1202995674e629f731f35c4445de4fbfed3 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Jul 2013 13:35:16 +0200 Subject: [PATCH 54/57] * INSTALL (DETAILED BUILDING AND INSTALLATION): Add --without-file-notification to --without-all. --- ChangeLog | 5 +++++ INSTALL | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3dbdca35692..bc70b1e4446 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-29 Michael Albinus + + * INSTALL (DETAILED BUILDING AND INSTALLATION): Add + --without-file-notification to --without-all. + 2013-07-29 Xue Fuqiao * INSTALL: Fix description. diff --git a/INSTALL b/INSTALL index 535819bc0ce..262928e63ac 100644 --- a/INSTALL +++ b/INSTALL @@ -323,14 +323,15 @@ equivalent to --without-sound --without-dbus --without-libotf --without-selinux --without-xft --without-gsettings --without-gnutls --without-rsvg --without-xml2 --without-gconf --without-imagemagick --without-m17n-flt --without-jpeg --without-tiff --without-gif ---without-png --without-gpm. Note that --without-all leaves X support -enabled, and using the GTK2 or GTK3 toolkit creates a lot of library -dependencies. So if you want to build a small executable with very basic -X support, use --without-all --with-x-toolkit=no. For the smallest possible -executable without X, use --without-all --without-x. If you want to build -with just a few features enabled, you can combine --without-all with ---with-FEATURE. For example, you can use --without-all --with-dbus -to build with DBus support and nothing more. +--without-png --without-gpm --without-file-notification. Note that +--without-all leaves X support enabled, and using the GTK2 or GTK3 +toolkit creates a lot of library dependencies. So if you want to +build a small executable with very basic X support, use --without-all +--with-x-toolkit=no. For the smallest possible executable without X, +use --without-all --without-x. If you want to build with just a few +features enabled, you can combine --without-all with --with-FEATURE. +For example, you can use --without-all --with-dbus to build with DBus +support and nothing more. Use --with-wide-int to implement Emacs values with the type 'long long', even on hosts where a narrower type would do. With this option, on a From 35a89bdd27328b4d2541a52b8cce9e40fa6ddd0c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Jul 2013 19:34:53 +0300 Subject: [PATCH 55/57] Fix infloop on MS-Windows when initial frame lacks minibuffer. lisp/frame.el (frame-notice-user-settings): Avoid inflooping when the initial frame is minibuffer-less. (Bug#14841) --- lisp/ChangeLog | 5 +++++ lisp/frame.el | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ecc18cdcda..6f30ef90bad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-29 Eli Zaretskii + + * frame.el (frame-notice-user-settings): Avoid inflooping when the + initial frame is minibuffer-less. (Bug#14841) + 2013-07-29 Michael Albinus * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer diff --git a/lisp/frame.el b/lisp/frame.el index 71e7cc10de2..22cf484e54a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -317,6 +317,9 @@ there (in decreasing order of priority)." t)) ;; Create the new frame. (let (parms new) + ;; MS-Windows needs this to avoid inflooping below. + (if (eq system-type 'windows-nt) + (sit-for 0 t)) ;; If the frame isn't visible yet, wait till it is. ;; If the user has to position the window, ;; Emacs doesn't know its real position until From 218e063750a79e79651eb41f67c0b07209980056 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Mon, 29 Jul 2013 21:28:07 +0400 Subject: [PATCH 56/57] * fns.c (toplevel): Remove comment before Fsafe_length because it checks for QUIT. --- src/ChangeLog | 5 +++++ src/fns.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8d6d34a83ae..b7b2d5fba4b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-07-29 Dmitry Antipov + + * fns.c (toplevel): Remove comment before Fsafe_length because + it checks for QUIT. + 2013-07-28 Paul Eggert * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970). diff --git a/src/fns.c b/src/fns.c index 9fd0ad2a9d1..6f81635ab9d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -146,8 +146,6 @@ To get the number of bytes, use `string-bytes'. */) return val; } -/* This does not check for quits. That is safe since it must terminate. */ - DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0, doc: /* Return the length of a list, but avoid error or infinite loop. This function never gets an error. If LIST is not really a list, From 18657165bb88252b8285c4655e907dd4fc29a0f7 Mon Sep 17 00:00:00 2001 From: David Engster Date: Mon, 29 Jul 2013 22:26:19 +0200 Subject: [PATCH 57/57] Merge with CEDET upstream (rev. 8579). * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its development does no longer happens in CEDET upstream but in Emacs proper. Also remove cedet-contrib and cogre since those are only in upstream. * semantic/analyze/fcn.el (semantic-analyze-type-to-name): If TYPE has a parent, return a fully qualified name. * semantic/decorate/mode.el (semantic-decoration-on-includes-p-default) (semantic-decoration-on-includes-highlight-default): Declare for byte compiler. * semantic/wisent/python.el (semantic/format): New require. * eieio.texi (top): Make clear that EIEIO is not a full CLOS implementation. (Introduction): Add further missing features. (Building Classes): Add introductory paragraph. (Wish List): Add metaclasses and EQL specialization. --- doc/misc/ChangeLog | 8 ++++ doc/misc/eieio.texi | 58 ++++++++++++++++++---------- lisp/cedet/ChangeLog | 17 ++++++++ lisp/cedet/cedet.el | 3 -- lisp/cedet/semantic/analyze/fcn.el | 5 ++- lisp/cedet/semantic/decorate/mode.el | 4 ++ lisp/cedet/semantic/wisent/python.el | 1 + 7 files changed, 72 insertions(+), 24 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 50214bb364c..bef3f84c846 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,11 @@ +2013-07-29 David Engster + + * eieio.texi (top): Make clear that EIEIO is not a full CLOS + implementation. + (Introduction): Add further missing features. + (Building Classes): Add introductory paragraph. + (Wish List): Add metaclasses and EQL specialization. + 2013-07-26 Tassilo Horn * gnus.texi (Sorting the Summary Buffer): Document new defcustom diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index b16144e98a2..c8e8fb6d2e2 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -46,10 +46,10 @@ modify this GNU manual.'' @comment node-name, next, previous, up @top EIEIO -@eieio{} (``Enhanced Implementation of Emacs Interpreted Objects'') is -a CLOS (Common Lisp Object System) compatibility layer for Emacs Lisp. -It provides a framework for writing object-oriented applications in -Emacs. +@eieio{} (``Enhanced Implementation of Emacs Interpreted Objects'') +provides an Object Oriented layer for Emacs Lisp, following the basic +concepts of the Common Lisp Object System (CLOS). It provides a +framework for writing object-oriented applications in Emacs. @ifnottex @insertcopying @@ -201,8 +201,6 @@ Byte compilation support of methods. @item Help system extensions for classes and methods. @item -Automatic texinfo documentation generator. -@item Several base classes for interesting tasks. @item Simple test suite. @@ -212,20 +210,31 @@ Public and private classifications for slots (extensions to CLOS) Customization support in a class (extension to CLOS) @end enumerate -Here are some CLOS features that @eieio{} presently lacks: +Here are some important CLOS features that @eieio{} presently lacks: @table @asis -@item Complete @code{defclass} tag support -All CLOS tags are currently supported, but the following are not -currently implemented correctly: -@table @code -@item :metaclass -There is only one base superclass for all @eieio{} classes, which is -the @code{eieio-default-superclass}. -@item :default-initargs +@item Method dispatch +EIEO does not support method dispatch for built-in types and multiple +arguments types. In other words, method dispatch only looks at the +first argument, and this one must be an @eieio{} type. + +@item Support for metaclasses +There is just one default metaclass, @code{eieio-default-superclass}, +and you cannot define your own. The @code{:metaclass} tag in +@code{defclass} is ignored. Also, functions like `class-of' and +`find-class', which should return instances of the metaclass, behave +differently in @eieio{} in that they return symbols or plain structures +instead. + +@item EQL specialization +EIEIO does not support it. + +@item @code{:around} method tag +This CLOS method tag is non-functional. + +@item :default-initargs in @code{defclass} Each slot has an @code{:initarg} tag, so this is not really necessary. -@end table @item Mock object initializers Each class contains a mock object used for fast initialization of @@ -233,15 +242,23 @@ instantiated objects. Using functions with side effects on object slot values can potentially cause modifications in the mock object. @eieio{} should use a deep copy but currently does not. -@item @code{:around} method tag -This CLOS method tag is non-functional. - @end table @node Building Classes @comment node-name, next, previous, up @chapter Building Classes +First off, please note that this manual cannot serve as a complete +introduction to object oriented programming and generic functions in +LISP. Although EIEIO is not a complete CLOS implementation and also +differs from CLOS in several aspects, it follows the same basic +concepts. Therefore, it is highly recommended to learn these from a +textbook or tutorial first, especially if you only know OOP from +languages like C++ or Java. If on the other hand you are already +familiar with CLOS, you should be aware that @eieio{} does not implement +the full CLOS specificiation and also differs in some other aspects +(@xref{Introduction}, and @ref{CLOS compatibility}). + A @dfn{class} is a definition for organizing data and methods together. An @eieio{} class has structures similar to the classes found in other object-oriented (OO) languages. @@ -1930,8 +1947,9 @@ Some important compatibility features that would be good to add are: @enumerate @item +Support for metaclasses and EQL specialization. +@item @code{:around} method key. - @item Method dispatch for built-in types. @item diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 1b8e4725dc1..c39a8a700ef 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,20 @@ +2013-07-29 David Engster + + * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its + development does no longer happens in CEDET upstream but in Emacs + proper. Also remove cedet-contrib and cogre since those are only + in upstream. + + * semantic/analyze/fcn.el (semantic-analyze-type-to-name): If TYPE + has a parent, return a fully qualified name. + + * semantic/decorate/mode.el + (semantic-decoration-on-includes-p-default) + (semantic-decoration-on-includes-highlight-default): Declare for + byte compiler. + + * semantic/wisent/python.el (semantic/format): New require. + 2013-07-27 Eric Ludlam * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index e8720bc6624..f34442996c1 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el @@ -46,9 +46,6 @@ (semantic "2.2" nil "semantic/doc") (srecode "1.2" nil "srecode" ) (ede "1.2" nil "ede" ) - (speedbar "1.0.4" nil "speedbar" ) - (cogre "1.2" nil "cogre" ) - (cedet-contrib "1.2" "contrib" nil ) ) "Table of CEDET packages to install.") diff --git a/lisp/cedet/semantic/analyze/fcn.el b/lisp/cedet/semantic/analyze/fcn.el index 4300c89c9df..7512b7ca15a 100644 --- a/lisp/cedet/semantic/analyze/fcn.el +++ b/lisp/cedet/semantic/analyze/fcn.el @@ -165,7 +165,10 @@ SCOPE is the scope object with additional items in which to search for names." The TYPE field in a tag can be nil (return nil) or a string, or a non-positional tag." (cond ((semantic-tag-p type) - (semantic-tag-name type)) + (if (semantic-tag-named-parent type) + (semantic-analyze-unsplit-name `(,(semantic-tag-named-parent type) + ,(semantic-tag-name type))) + (semantic-tag-name type))) ((stringp type) type) ((listp type) diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index ba06c73936b..cc5e9d9bec2 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -541,6 +541,10 @@ Use a primary decoration." ;;; Decoration Modes in other files ;; +(declare-function semantic-decoration-on-includes-p-default + "semantic/decorate/include") +(declare-function semantic-decoration-on-includes-highlight-default + "semantic/decorate/include") (define-semantic-decoration-style semantic-decoration-on-includes "Highlight class members that are includes. This mode provides a nice context menu on the include statements." diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index 719868f7635..2c0ed5868ce 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -39,6 +39,7 @@ (require 'semantic/find) (require 'semantic/dep) (require 'semantic/ctxt) +(require 'semantic/format) (eval-when-compile (require 'cl))