------------------------------------------------------------ revno: 118119 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-15 00:19:22 -0700 message: * nextstep/README: Move most contents into INSTALL. Remove license notice from file, since it is now trivial. diff: === modified file 'nextstep/INSTALL' --- nextstep/INSTALL 2014-01-01 07:43:34 +0000 +++ nextstep/INSTALL 2014-10-15 07:19:22 +0000 @@ -2,6 +2,16 @@ See the end of the file for license conditions. +Requirements +------------ +Mac OS X 10.6 or later + +- or - + +GNUstep "Startup 0.23" or later +Tested on GNU/Linux, may work on other systems. + + Compilation ----------- === modified file 'nextstep/README' --- nextstep/README 2014-10-12 14:56:58 +0000 +++ nextstep/README 2014-10-15 07:19:22 +0000 @@ -1,37 +1,4 @@ -Copyright (C) 2008-2014 Free Software Foundation, Inc. -See the end of the file for license conditions. - -This directory contains the files needed to build Emacs on -Nextstep-based platforms, including GNUstep and Mac OS X. - -The Nextstep support code works on many POSIX systems (and possibly -W32) using the GNUstep libraries, and on MacOS X systems using the -Cocoa libraries. +This directory contains files needed to build Emacs on Nextstep-based +platforms, including GNUstep and Mac OS X (using the Cocoa libraries). See the INSTALL file in this directory for compilation instructions. - -Requirements ------------- -Mac OS X 10.6 or later - -- or - - -GNUstep "Startup 0.23" or later -Tested on GNU/Linux, should work on other systems, perhaps with minor -build tweaking. - - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . ------------------------------------------------------------ revno: 118118 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-15 00:12:31 -0700 message: * admin/notes/versioning: Relocate and rewrite. diff: === renamed file 'admin/versioning' => 'admin/notes/versioning' --- admin/versioning 2014-10-12 20:09:15 +0000 +++ admin/notes/versioning 2014-10-15 07:12:31 +0000 @@ -1,49 +1,26 @@ GNU EMACS VERSIONING -*- org -*- -The version number scheme of Emacs, including how to determine when to -bump various components of the version number, has evolved over the -years. This file defines the current method, explains why it was -chosen, and lightly documents the previous schemes. It was prompted -by http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00872.html. - -Related info: -- [[file:FOR-RELEASE][FOR-RELEASE]] -- [[file:make-tarball.txt][make-tarball.txt]] - -* what: MAJOR.MINOR - -This has always been the case (see [[was]], below). MINOR is 1 or more, -usually, the exception being for pretest releases, where there is -an additional trailing ".ALPHA" (e.g., 24.3.95 prior to 24.4). - -To determine any release's version, we follow this algorithm: - -- If MAJOR-CHANGES, increment MAJOR and set MINOR to 1. -- Otherwise, increment MINOR. - -where MAJOR-CHANGES is defined roughly as the union of: - -- dropped support for IMPORTANT - - platforms (almost never happens) - - Emacs Lisp features - - non-programming features/packages -- IMPORTANT additions and changes - - Emacs Lisp features - - non-programming features/packages - -and IMPORTANT is defined through discussion on the [[http://mail.gnu.org/archive/html/emacs-devel/][emacs-devel]] -mailing list and/or private arm-twisting (although this latter -method is somewhat discouraged :-D). - -* why - -People expect bumps in MINOR for "minor" changes. This typically -includes bugfixes, doc improvements, or fully-backward-compatible -additions and changes, only. - -Anything else is actually IMPORTANT, to the user. [Actually, who -really knows what the user thinks? I certainly don't. --ttn] - -* was - -TODO (be sure to include "ad-hoc" :-D) +Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00872.html + +Emacs version numbers have the form + + major.minor[.devel].build + +"build" increments each time Emacs is built in the same location +(without cleaning) and isn't really part of the version. + +bugfix releases increase "minor" by 1. +non-bugfix releases increase "major" by 1, and reset "minor" to 1. +(The division between bugfix and non-bugfix has not always been clear +historically.) + +Unreleased (development) versions have an extra "devel" component. +This is a fairly meaningless number that may be unchanged for a long time. +It is normally 50. +When the release process starts, it changes to 90, 91, ... +When the actual release is made, this component is removed. + +The development version for a new major release has "minor" = 0. +The development version for a new minor release has "minor" = that of +the previous release. + ------------------------------------------------------------ revno: 118117 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-15 00:07:29 -0700 message: Remove some admin/notes files * admin/notes/lel-TODO: Remove. This has not turned out to be a useful way to get things documented. * admin/notes/exit-value, admin/notes/iftc: Remove. These don't seem to have any particular relationship to Emacs development. diff: === removed file 'admin/notes/exit-value' --- admin/notes/exit-value 2014-08-07 11:49:36 +0000 +++ admin/notes/exit-value 1970-01-01 00:00:00 +0000 @@ -1,28 +0,0 @@ -ttn 2004-05-09 - -The exit value of a program returning to the shell on unixoid systems -is typically 0 for success, and non-0 (such as 1) for failure. This is -not always the case on other systems. - -From the point of view of the program stdlib.h provides macros -`EXIT_SUCCESS' and `EXIT_FAILURE' that should DTRT. N.B. The -numerical values of these macros DO NOT need to fulfill the exit value -requirements outlined in the first paragraph! That is the job of the -`exit' function. Thus, this kind of construct shows misunderstanding: - - #ifdef WEIRD_OS - exit (1); - #else - exit (0); - #endif - -Values aside from EXIT_SUCCESS and EXIT_FAILURE are tricky, but can be -used to indicate finer gradations of failure. If this is the only -information available to the caller, clamping such values to -EXIT_FAILURE loses information. If there are other ways to indicate -the problem to the caller (such as a message to stderr) it may be ok -to clamp. In all cases, it is the relationship between the program -and its caller that must be examined. - -[Insert ZAMM quote here.] <-- I presume this refers to ``Zen and the -Art of Motorcycle Maintenance'' - Reuben Thomas . === removed file 'admin/notes/iftc' --- admin/notes/iftc 2011-01-15 23:16:57 +0000 +++ admin/notes/iftc 1970-01-01 00:00:00 +0000 @@ -1,26 +0,0 @@ -Iso-Functional Type Contour - - -This is a term coined to describe "column int->float" change approach, and can -be used whenever low-level types need to change (hopefully not often!) but the -meanings of the values (whose type has changed) do not. - -The premise is that changing a low-level type potentially means lots of code -needs to be changed as well, and the question is how to do this incrementally, -which is the preferred way to change things. - -Say LOW and HIGH are C functions: - - int LOW (void) { return 1; } - void HIGH (void) { int value = LOW (); } - -We want to convert LOW to return float, so we cast HIGH usage: - - float LOW (void) { return 1.0; } - void HIGH (void) { int value = (int) LOW (); } /* iftc */ - -The comment /* iftc */ is used to mark this type of casting to differentiate -it from other casting. We commit the changes and can now go about modifying -LOW and HIGH separately. When HIGH is ready to handle the type change, the -cast can be removed. - === removed file 'admin/notes/lel-TODO' --- admin/notes/lel-TODO 2014-01-01 07:43:34 +0000 +++ admin/notes/lel-TODO 1970-01-01 00:00:00 +0000 @@ -1,124 +0,0 @@ -Some lisp/emacs-lisp/ Features and Where They Are Documented - -Copyright (C) 2007-2014 Free Software Foundation, Inc. -See the end of the file for license conditions. - - -* Status Key - - -- as yet unknown - n/a -- not applicable (internal, uninteresting, etc) - obsolete -- an obsolete feature, to be removed in future - todo -- not documented but should be - NODE -- documented in or under info node NODE - - -* Features - advice (elisp) Advising Functions - advice-preload n/a - assoc - - authors - - autoload (elisp) Autoload - avl-tree - - backquote n/a - benchmark n/a - bindat (elisp) Byte Packing - byte-compile (elisp) Byte Compilation - byte-opt - - bytecomp (elisp) Compilation Functions - checkdoc (elisp) Documentation Tips - cl (cl) - cl-compat n/a - cl-specs n/a - copyright - - crm - - cust-print (elisp) Printing in Edebug - debug (elisp) Debugger - derived (elisp) Derived Modes - disass (elisp) Disassembly - easy-mmode (elisp) Defining Minor Modes - easymenu - - edebug (elisp) Edebug - eldoc - - elint - - elp n/a - ewoc (elisp) Separated Rendering - find-func - - find-gc - - generic (elisp) Generic Modes - gulp n/a - helper - - levents obsolete - lisp-float-type - - lisp-mnt - - lisp-mode n/a - lmenu obsolete - lucid obsolete - macroexp (elisp) Expansion - pp (emacs) Program Indent - re-builder - - regexp-opt (elisp) Regexp Functions - regi - - ring (elisp) Rings - rx - - shadow - - sregex obsolete - syntax (elisp) Position Parse - testcover - - timer (elisp) Timers - tq (elisp) Transaction Queues - trace - - unsafep (elisp) Function Safety - warnings (elisp) Warnings - - -* Above list created using default directory lisp/emacs-lisp/ with - (shell-command - "sed '/^(provide '\\''/!d;s// /;s/).*//' *.el | sort | uniq") - - -* How to use this file to improve Emacs - (loop - (let* ((feature (choose-one Features)) - (status (feature-status feature))) - (if (or (eq '- status) (not (verify status))) - (update feature (current-docs feature)) - (case status - (todo (let (doc patch feedback) - (while (not (grok feature)) - (or (play-with feature) - (grep feature Internet) - (grep feature (wisdom-maybe "emacs-devel")))) - (setq doc (write-documentation feature) - patch (diff (current-docs) doc)) - (while (not (and (correct doc) - (well-placed doc) - (well-formed patch))) - (setq doc (revise doc) - patch (diff (current-docs) doc)) - feedback (wisdom-maybe "emacs-devel" patch)) - (when (install patch) - (when (update feature (current-docs feature)) - (job-well-done user-login-name))))) - (n/a (job-well-done user-login-name)))))) - - -* Etc - -This file is part of GNU Emacs. - -GNU Emacs is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -GNU Emacs is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Emacs. If not, see . - - Local variables: - mode: outline - End: ------------------------------------------------------------ revno: 118116 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-15 00:03:28 -0700 message: * README: Remove some unnecessary detail. diff: === modified file 'README' --- README 2014-10-02 15:13:05 +0000 +++ README 2014-10-15 07:03:28 +0000 @@ -39,10 +39,7 @@ detailed information. The file `configure.ac' is the input used by the autoconf program to -construct the `configure' script. Since Emacs has some configuration -requirements that autoconf can't meet directly, and for historical -reasons, `configure.ac' uses an unholy marriage of custom-baked -configuration code and autoconf macros. +construct the `configure' script. The shell script `autogen.sh' generates 'configure' and other files by running the GNU build tools autoconf and automake, which in turn use ------------------------------------------------------------ revno: 118115 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-15 00:02:43 -0700 message: * INSTALL: Remove the "by hand" sections. No-one needs to know those details, and this file is too long already. diff: === modified file 'INSTALL' --- INSTALL 2014-10-15 02:42:58 +0000 +++ INSTALL 2014-10-15 07:02:43 +0000 @@ -207,9 +207,9 @@ DETAILED BUILDING AND INSTALLATION: -(This is for a Unix or Unix-like system. For MS-DOS and MS Windows 3.X, -see msdos/INSTALL. For later versions of MS Windows, see the file -nt/INSTALL. For GNUstep and Mac OS X, see nextstep/INSTALL.) +(This is for a Unix or Unix-like system. For GNUstep and Mac OS X, +see nextstep/INSTALL. For non-ancient versions of MS Windows, see +the file nt/INSTALL. For MS-DOS and MS Windows 3.X, see msdos/INSTALL.) 1) See the basic installation summary above for the disk space requirements. @@ -359,8 +359,7 @@ `configure' doesn't do any compilation or installation itself. It just creates the files that influence those things: `./Makefile' in the top-level directory and several subdirectories; -and `./src/config.h'. For details on exactly what it does, see the -section called `CONFIGURATION BY HAND', below. +and `./src/config.h'. When it is done, `configure' prints a description of what it did and creates a shell script `config.status' which, when run, recreates the @@ -415,11 +414,6 @@ ./configure \ PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig' -The work of `configure' can be done by editing various files in the -distribution, but using `configure' is easier. See the section called -"CONFIGURATION BY HAND" below if you want to do the configuration -yourself. - 3b) To build in a separate directory, go to that directory and run the program `configure' as follows: @@ -429,9 +423,6 @@ where Emacs's configure script is located. `configure' looks for the Emacs source code in the directory that `configure' is in. -(Do not try to build in a separate directory by creating many links to -the real source directory--there is no need, and installation will fail.) - 4) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs Lisp code you want Emacs to load before it is dumped out. Use site-load.el for additional libraries if you arrange for their @@ -544,11 +535,7 @@ 9) You are done! You can remove executables and object files from the build directory by typing `make clean'. To also remove the files that `configure' created (so you can compile Emacs for a different -configuration), type `make distclean'. If you don't need some, or all -of the input methods from the Leim package, you can remove the -unneeded files in the leim subdirectories of your site's lisp -directory (usually /usr/local/share/emacs/VERSION/). - +configuration), type `make distclean'. MAKE VARIABLES @@ -656,94 +643,6 @@ when running make in the subdirectories. -CONFIGURATION BY HAND - -This should not be necessary and is not recommended. Instead of -running the `configure' program, you have to perform the following steps. - -1) Copy `./src/config.in' to `./src/config.h'. - -2) Edit `./src/config.h' to set the right options for your system. - -3) Create `Makefile' files in various directories from the -corresponding `Makefile.in' files. This isn't so hard, just a matter -of editing in appropriate substitutions for the @...@ constructs. - -The `configure' script is built from `configure.ac' by the -`autogen.sh' script, which checks that `autoconf' and other build -tools are sufficiently up to date and then runs the build tools. - -BUILDING GNU EMACS BY HAND - -Once Emacs is configured, running `make' in the top directory performs -the following steps. - -1) Run `make epaths-force' in the top directory. This produces -`./src/epaths.h' from the template file `./src/epaths.in', changing -the paths to the values specified in `./Makefile'. - -2) Go to directory `./lib' and run `make'. This creates include files -and libraries used in later steps. - -3) Go to directory `./lib-src' and run `make'. This creates -executables named `etags', `make-docfile', and others. - -4) Go to directory `./src' and run `make'. This refers to files in -the `./lisp', `./lib', and `./lib-src' subdirectories using names -`../lisp', `../lib', and `../lib-src'. - -This creates a file `./src/emacs' which is the runnable Emacs, -which has another name that contains a version number. -Each time you do this, that version number increments in the last place. - -It also creates a file in `./etc' whose name is `DOC' followed by the -current Emacs version. This file contains documentation strings for -all the functions in Emacs. Each time you run make to make a new -emacs, a new DOC file with a new name is made. You must keep the DOC -file for an Emacs version as long as you keep using that Emacs version. - - -INSTALLATION BY HAND - -The steps below are done by running `make install' in the main -directory of the Emacs distribution. - -1) Copy `./lisp' and its subdirectories, `./etc', and the executables -in `./lib-src' to their final destinations, as selected in `./src/epaths.h'. - -Strictly speaking, not all of the executables in `./lib-src' need be copied. -- The programs `hexl', `movemail', `profile', and `rcs2log' - are used by Emacs; they do need to be copied. -- The programs `etags', `ctags', and `emacsclient' are intended to be - run by users; they are handled below. -- The program `make-docfile' was used in building Emacs, and is - not needed any more. - -2) Copy the files in `./info' to the place specified in -`./lisp/site-init.el' or `./lisp/info.el'. Note that if the -destination directory already contains a file named `dir', you -probably don't want to replace it with the `dir' file in the Emacs -distribution. Instead, you should make sure that the existing `dir' -file contains an appropriate menu entry for the Emacs info. - -3) Copy `./src/emacs' to `/usr/local/bin', or to some other directory -in users' search paths. `./src/emacs' has an alternate name -`./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named -`/usr/local/bin/emacs' pointing to that alternate name, as an easy way -of installing different versions. - -You can delete `./src/temacs'. - -4) Copy the programs `emacsclient', `ctags', and `etags' from `./lib-src' -to `/usr/local/bin'. These programs are intended for users to run. - -5) Copy the man pages in `./doc/man' into the appropriate man directory. - -6) The files in the `./src' subdirectory, except for `emacs', are not -used by Emacs once it is built. However, it is very desirable to keep -the source on line for debugging. - - PROBLEMS See the file `./etc/PROBLEMS' for a list of various problems sometimes ------------------------------------------------------------ revno: 118114 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-10-14 19:42:58 -0700 message: Merge from emacs-24; up to r117586 diff: === modified file 'INSTALL' --- INSTALL 2014-09-01 09:49:51 +0000 +++ INSTALL 2014-10-15 02:42:58 +0000 @@ -1,6 +1,5 @@ GNU Emacs Installation Guide -Copyright (C) 1992, 1994, 1996-1997, 2000-2014 Free Software Foundation, -Inc. +Copyright (C) 1992, 1994, 1996-1997, 2000-2014 Free Software Foundation, Inc. See the end of the file for license conditions. @@ -34,9 +33,9 @@ sections of this guide will help you do that, so please refer to those sections if you need to. - 1. Unpacking the Emacs 24.1 release requires about 180 MB of free - disk space. Building Emacs uses about another 70 MB of space. - The final installed Emacs uses about 110 MB of disk space. + 1. Unpacking the Emacs 24 release requires about 200 MB of free + disk space. Building Emacs uses about another 200 MB of space. + The final installed Emacs uses about 150 MB of disk space. This includes the space-saving that comes from automatically compressing the Lisp source files on installation. @@ -212,20 +211,7 @@ see msdos/INSTALL. For later versions of MS Windows, see the file nt/INSTALL. For GNUstep and Mac OS X, see nextstep/INSTALL.) -1) Make sure your system has enough swapping space allocated to handle -a program whose pure code is 1.5 MB and whose data area is at -least 2.8 MB and can reach 100 MB or more. If the swapping space is -insufficient, you will get an error in the command `temacs -batch -l -loadup dump', found in `./src/Makefile.in', or possibly when -running the final dumped Emacs. (This should not be an issue -on any recent system.) - -Building Emacs requires about 230 MB of disk space (including the -Emacs sources). Once installed, Emacs occupies about 120 MB in the file -system where it is installed; this includes the executable files, Lisp -libraries, miscellaneous data files, and on-line documentation. If -the building and installation take place in different directories, -then the installation procedure momentarily requires 230+120 MB. +1) See the basic installation summary above for the disk space requirements. 2) In the unlikely event that `configure' does not detect your system type correctly, consult `./etc/MACHINES' to see what --host, --build @@ -264,8 +250,7 @@ "Image support libraries" above for Xaw3d availability). You can tell configure where to search for GTK by giving it the -argument PKG_CONFIG='/full/name/of/pkg-config'. GTK version 2.6 or -newer is required for Emacs. +argument PKG_CONFIG='/full/name/of/pkg-config'. Emacs will autolaunch a D-Bus session bus, when the environment variable DISPLAY is set, but no session bus is running. This might be === modified file 'etc/NXML-NEWS' --- etc/NXML-NEWS 2008-06-27 07:34:53 +0000 +++ etc/NXML-NEWS 2014-10-14 16:09:09 +0000 @@ -1,3 +1,10 @@ +Copyright (C) 2007-2014 Free Software Foundation, Inc. +See the end of the file for license conditions. + + +For more recent changes, see the main Emacs NEWS file. + + 20041004 -------- @@ -197,3 +204,20 @@ -------- Initial release. + + + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-15 01:56:56 +0000 +++ lisp/ChangeLog 2014-10-15 02:42:58 +0000 @@ -1,3 +1,10 @@ +2014-10-15 Eli Zaretskii + + * emacs-lisp/tabulated-list.el (tabulated-list-mode): Force + bidi-paragraph-direction to 'left-to-right'. This fixes + buffer-menu display when the first buffer happens to start with + R2L letter. + 2014-10-15 Stefan Monnier * progmodes/elisp-mode.el (elisp--local-variables-1): === modified file 'lisp/emacs-lisp/tabulated-list.el' --- lisp/emacs-lisp/tabulated-list.el 2014-06-06 00:39:22 +0000 +++ lisp/emacs-lisp/tabulated-list.el 2014-10-15 02:42:58 +0000 @@ -519,7 +519,10 @@ (setq-local buffer-read-only t) (setq-local buffer-undo-list t) (setq-local revert-buffer-function #'tabulated-list-revert) - (setq-local glyphless-char-display tabulated-list-glyphless-char-display)) + (setq-local glyphless-char-display tabulated-list-glyphless-char-display) + ;; Avoid messing up the entries' display just because the first + ;; column of the first entry happens to begin with a R2L letter. + (setq bidi-paragraph-direction 'left-to-right)) (put 'tabulated-list-mode 'mode-class 'special) ------------------------------------------------------------ revno: 118113 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18688 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2014-10-14 21:56:56 -0400 message: * lisp/progmodes/elisp-mode.el (elisp--local-variables-1): Handle quoted expressions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-14 11:59:16 +0000 +++ lisp/ChangeLog 2014-10-15 01:56:56 +0000 @@ -1,3 +1,8 @@ +2014-10-15 Stefan Monnier + + * progmodes/elisp-mode.el (elisp--local-variables-1): + Handle quoted expressions (bug#18688). + 2014-10-14 Jérémy Compostella Michael Albinus === modified file 'lisp/progmodes/elisp-mode.el' --- lisp/progmodes/elisp-mode.el 2014-09-27 10:08:59 +0000 +++ lisp/progmodes/elisp-mode.el 2014-10-15 01:56:56 +0000 @@ -255,18 +255,27 @@ (dolist (binding bindings) (push (or (car-safe binding) binding) vars)) (elisp--local-variables-1 vars (car (last body))))) - (`(lambda ,_) (setq sexp nil)) + (`(lambda ,_args) + ;; FIXME: Look for the witness inside `args'. + (setq sexp nil)) (`(lambda ,args . ,body) (elisp--local-variables-1 - (append args vars) (car (last body)))) + (append (remq '&optional (remq '&rest args)) vars) + (car (last body)))) (`(condition-case ,_ ,e) (elisp--local-variables-1 vars e)) (`(condition-case ,v ,_ . ,catches) (elisp--local-variables-1 (cons v vars) (cdr (car (last catches))))) + (`(quote . ,_) + ;; FIXME: Look for the witness inside sexp. + (setq sexp nil)) + ;; FIXME: Handle `cond'. (`(,_ . ,_) (elisp--local-variables-1 vars (car (last sexp)))) (`elisp--witness--lisp (or vars '(nil))) (_ nil))) + ;; We didn't find the witness in the last element so we try to + ;; backtrack to the last-but-one. (setq sexp (ignore-errors (butlast sexp))))) res)) ------------------------------------------------------------ revno: 118112 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18510 author: Ivan Shmakov committer: Stefan Monnier branch nick: trunk timestamp: Tue 2014-10-14 21:15:40 -0400 message: * lisp/erc/erc-track.el (erc-modified-channels-display): Update mode line more frequently. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2014-10-10 13:16:12 +0000 +++ lisp/erc/ChangeLog 2014-10-15 01:15:40 +0000 @@ -1,3 +1,8 @@ +2014-10-15 Ivan Shmakov + + * erc-track.el (erc-modified-channels-display): Update mode line + more frequently (bug#18510). + 2014-10-10 Kelvin White * erc.el (erc-initialize-log-marker): Only initialize @@ -434,9 +439,9 @@ 2011-11-28 Mike Kazantsev (tiny change) - * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Updated regexp to + * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Update regexp to match quoted filenames with spaces inside. - (erc-dcc-handle-ctcp-send): Updated regexp match group numbers, + (erc-dcc-handle-ctcp-send): Update regexp match group numbers, added processing of escaped quotes and backslashes if filename itself was in quotes. === modified file 'lisp/erc/erc-track.el' --- lisp/erc/erc-track.el 2014-09-24 17:31:59 +0000 +++ lisp/erc/erc-track.el 2014-10-15 01:15:40 +0000 @@ -860,7 +860,7 @@ faces (cdr faces))) strings))) (newobject (erc-modified-channels-object strings))) - (unless (equal oldobject newobject) + (unless (equal-including-properties oldobject newobject) (setq erc-modified-channels-object newobject) (force-mode-line-update t))))) ------------------------------------------------------------ revno: 118111 author: Ted Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2014-10-14 22:13:44 +0000 message: lisp/gnus/gnus-start.el: Optionally check the newsrc.eld file's timestamp before saving it diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2014-10-06 22:11:44 +0000 +++ lisp/gnus/ChangeLog 2014-10-14 22:13:44 +0000 @@ -1,3 +1,10 @@ +2014-10-14 Teodor Zlatanov + + * gnus-start.el (gnus-save-newsrc-file-check-timestamp): New option to + check the newsrc.eld file's timestamp before saving it. + (gnus-save-newsrc-file): Use it, with a prompt when the newsrc.eld + timestamp has changed to be newer. + 2014-10-06 Jan Tatarik * gnus-icalendar.el (gnus-icalendar-identities): === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2014-07-07 05:47:59 +0000 +++ lisp/gnus/gnus-start.el 2014-10-14 22:13:44 +0000 @@ -442,6 +442,14 @@ :group 'gnus-newsrc :type 'hook) +(defcustom gnus-save-newsrc-file-check-timestamp nil + "Check the modification time of the newsrc.eld file before saving it. +When the newsrc.eld file is updated by multiple machines, +checking the file's modification time is a good way to avoid +overwriting updated data." + :group 'gnus-newsrc + :type 'boolean) + (defcustom gnus-save-newsrc-hook nil "A hook called before saving any of the newsrc files." :group 'gnus-newsrc @@ -2783,6 +2791,7 @@ 'msdos-long-file-names (lambda () t)))) +(defvar gnus-save-newsrc-file-last-timestamp nil) (defun gnus-save-newsrc-file (&optional force) "Save .newsrc file." ;; Note: We cannot save .newsrc file if all newsgroups are removed @@ -2821,12 +2830,30 @@ (erase-buffer) (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file) + ;; check timestamp of `gnus-current-startup-file'.eld against + ;; `gnus-save-newsrc-file-last-timestamp' + (when gnus-save-newsrc-file-check-timestamp + (let* ((checkfile (concat gnus-current-startup-file ".eld")) + (mtime (nth 5 (file-attributes checkfile)))) + (when (and gnus-save-newsrc-file-last-timestamp + (time-less-p gnus-save-newsrc-file-last-timestamp + mtime)) + (unless (y-or-n-p + (format "%s was updated externally after %s, save?" + checkfile + (format-time-string + "%c" + gnus-save-newsrc-file-last-timestamp))) + (error "Couldn't save %s: updated externally" checkfile))))) + (if gnus-save-startup-file-via-temp-buffer (let ((coding-system-for-write gnus-ding-file-coding-system) (standard-output (current-buffer))) (gnus-gnus-to-quick-newsrc-format) (gnus-run-hooks 'gnus-save-quick-newsrc-hook) - (save-buffer)) + (save-buffer) + (setq gnus-save-newsrc-file-last-timestamp + (nth 5 (file-attributes buffer-file-name)))) (let ((coding-system-for-write gnus-ding-file-coding-system) (version-control gnus-backup-startup-file) (startup-file (concat gnus-current-startup-file ".eld")) @@ -2861,7 +2888,9 @@ ;; Replace the existing startup file with the temp file. (rename-file working-file startup-file t) - (gnus-set-file-modes startup-file setmodes))) + (gnus-set-file-modes startup-file setmodes) + (setq gnus-save-newsrc-file-last-timestamp + (nth 5 (file-attributes startup-file))))) (condition-case nil (delete-file working-file) (file-error nil))))) ------------------------------------------------------------ revno: 118110 committer: Jan D. branch nick: trunk timestamp: Tue 2014-10-14 17:31:44 +0200 message: * configure.ac: Require OSX >= 10.6 even if --with-ns is not given. diff: === modified file 'ChangeLog' --- ChangeLog 2014-10-14 05:07:21 +0000 +++ ChangeLog 2014-10-14 15:31:44 +0000 @@ -1,6 +1,7 @@ 2014-10-14 Jan Djärv * configure.ac: apple-darwin powerpc is unported. + Require OSX >= 10.6 even if --with-ns is not given. 2014-10-12 Ken Brown === modified file 'configure.ac' --- configure.ac 2014-10-14 05:07:21 +0000 +++ configure.ac 2014-10-14 15:31:44 +0000 @@ -705,6 +705,13 @@ Check `etc/MACHINES' for recognized configuration names.]) fi +case "$canonical" in + *-apple-darwin* ) + x="`uname -r`" + case "$x" in + [[0-9]].*) AC_MSG_ERROR([OSX 10.6 or later required]) ;; + esac +esac #### Choose a compiler. ------------------------------------------------------------ revno: 118109 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-10-14 16:45:41 +0400 message: Cleanup terminal handling code. * dispextern.h (get_named_tty): Remove prototype but... * termhooks.h (get_named_terminal): ...resurrect it under more meaningful name. (get_terminal): Likewise, but with... (decode_live_terminal): ...this name. (decode_tty_terminal): Add prototype. * term.c (get_tty_terminal): Remove. (get_named_tty): Remove. (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type) (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty): Use decode_tty_terminal. (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal. * terminal.c (get_terminal): Refactor to... (decode_terminal, decode_live_terminal): ...new functions. (decode_tty_terminal): Replacement for get_tty_terminal. (get_named_terminal): Likewise for get_named_tty. * coding.c (Fset_terminal_coding_system_internal) (Fterminal_coding_system, Fset_keyboard_coding_system_internal): (Fkeyboard_coding_system): * composite.c (Fcomposition_get_gstring): * dispnew.c (Fsend_string_to_terminal): * frame.c (Fmake_terminal_frame): * nsfns.m (check_ns_display_info): * w32fns.c, xfns.c (check_x_display_info): * xselect.c (frame_for_x_selection): Use decode_live_terminal. * keyboard.c (handle_interrupt_signal, handle_interrupt) (Fset_quit_char): Use get_named_terminal. (Fset_output_flow_control, Fset_input_meta_mode): Use decode_tty_terminal. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-13 12:44:03 +0000 +++ src/ChangeLog 2014-10-14 12:45:41 +0000 @@ -1,3 +1,36 @@ +2014-10-14 Dmitry Antipov + + Cleanup terminal handling code. + * dispextern.h (get_named_tty): Remove prototype but... + * termhooks.h (get_named_terminal): ...resurrect it under + more meaningful name. + (get_terminal): Likewise, but with... + (decode_live_terminal): ...this name. + (decode_tty_terminal): Add prototype. + * term.c (get_tty_terminal): Remove. + (get_named_tty): Remove. + (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type) + (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty): + Use decode_tty_terminal. + (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal. + * terminal.c (get_terminal): Refactor to... + (decode_terminal, decode_live_terminal): ...new functions. + (decode_tty_terminal): Replacement for get_tty_terminal. + (get_named_terminal): Likewise for get_named_tty. + * coding.c (Fset_terminal_coding_system_internal) + (Fterminal_coding_system, Fset_keyboard_coding_system_internal): + (Fkeyboard_coding_system): + * composite.c (Fcomposition_get_gstring): + * dispnew.c (Fsend_string_to_terminal): + * frame.c (Fmake_terminal_frame): + * nsfns.m (check_ns_display_info): + * w32fns.c, xfns.c (check_x_display_info): + * xselect.c (frame_for_x_selection): Use decode_live_terminal. + * keyboard.c (handle_interrupt_signal, handle_interrupt) + (Fset_quit_char): Use get_named_terminal. + (Fset_output_flow_control, Fset_input_meta_mode): + Use decode_tty_terminal. + 2014-10-13 Eli Zaretskii * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish === modified file 'src/coding.c' --- src/coding.c 2014-10-09 04:23:09 +0000 +++ src/coding.c 2014-10-14 12:45:41 +0000 @@ -9759,7 +9759,7 @@ doc: /* Internal use only. */) (Lisp_Object coding_system, Lisp_Object terminal) { - struct terminal *term = get_terminal (terminal, 1); + struct terminal *term = decode_live_terminal (terminal); struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (term); CHECK_SYMBOL (coding_system); setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); @@ -9800,7 +9800,7 @@ (Lisp_Object terminal) { struct coding_system *terminal_coding - = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); + = TERMINAL_TERMINAL_CODING (decode_live_terminal (terminal)); Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); /* For backward compatibility, return nil if it is `undecided'. */ @@ -9812,7 +9812,7 @@ doc: /* Internal use only. */) (Lisp_Object coding_system, Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_live_terminal (terminal); CHECK_SYMBOL (coding_system); if (NILP (coding_system)) coding_system = Qno_conversion; @@ -9831,7 +9831,7 @@ (Lisp_Object terminal) { return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING - (get_terminal (terminal, 1))->id); + (decode_live_terminal (terminal))->id); } === modified file 'src/composite.c' --- src/composite.c 2014-09-11 00:48:57 +0000 +++ src/composite.c 2014-10-14 12:45:41 +0000 @@ -1719,7 +1719,7 @@ if (! FONT_OBJECT_P (font_object)) { struct coding_system *coding; - struct terminal *terminal = get_terminal (font_object, 1); + struct terminal *terminal = decode_live_terminal (font_object); coding = ((TERMINAL_TERMINAL_CODING (terminal)->common_flags & CODING_REQUIRE_ENCODING_MASK) === modified file 'src/dispextern.h' --- src/dispextern.h 2014-09-23 16:07:23 +0000 +++ src/dispextern.h 2014-10-14 12:45:41 +0000 @@ -3500,7 +3500,6 @@ extern void produce_glyphs (struct it *); extern bool tty_capable_p (struct tty_display_info *, unsigned); extern void set_tty_color_mode (struct tty_display_info *, struct frame *); -extern struct terminal *get_named_tty (const char *); extern void create_tty_output (struct frame *); extern struct terminal *init_tty (const char *, const char *, bool); extern void tty_append_glyph (struct it *); === modified file 'src/dispnew.c' --- src/dispnew.c 2014-10-02 15:33:55 +0000 +++ src/dispnew.c 2014-10-14 12:45:41 +0000 @@ -5611,16 +5611,13 @@ when TERMINAL is nil. */) (Lisp_Object string, Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_live_terminal (terminal); FILE *out; /* ??? Perhaps we should do something special for multibyte strings here. */ CHECK_STRING (string); block_input (); - if (!t) - error ("Unknown terminal device"); - if (t->type == output_initial) out = stdout; else if (t->type != output_termcap && t->type != output_msdos_raw) === modified file 'src/frame.c' --- src/frame.c 2014-10-12 22:56:45 +0000 +++ src/frame.c 2014-10-14 12:45:41 +0000 @@ -964,7 +964,7 @@ if (CONSP (terminal)) { terminal = XCDR (terminal); - t = get_terminal (terminal, 1); + t = decode_live_terminal (terminal); } #ifdef MSDOS if (t && t != the_only_display_info.terminal) === modified file 'src/keyboard.c' --- src/keyboard.c 2014-10-08 22:05:48 +0000 +++ src/keyboard.c 2014-10-14 12:45:41 +0000 @@ -10349,7 +10349,7 @@ handle_interrupt_signal (int sig) { /* See if we have an active terminal on our controlling tty. */ - struct terminal *terminal = get_named_tty ("/dev/tty"); + struct terminal *terminal = get_named_terminal ("/dev/tty"); if (!terminal) { /* If there are no frames there, let's pretend that we are a @@ -10403,7 +10403,7 @@ cancel_echoing (); /* XXX This code needs to be revised for multi-tty support. */ - if (!NILP (Vquit_flag) && get_named_tty ("/dev/tty")) + if (!NILP (Vquit_flag) && get_named_terminal ("/dev/tty")) { if (! in_signal_handler) { @@ -10615,9 +10615,10 @@ See also `current-input-mode'. */) (Lisp_Object flow, Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_tty_terminal (terminal); struct tty_display_info *tty; - if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw)) + + if (!t) return Qnil; tty = t->display_info.tty; @@ -10657,11 +10658,11 @@ See also `current-input-mode'. */) (Lisp_Object meta, Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_tty_terminal (terminal); struct tty_display_info *tty; int new_meta; - if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw)) + if (!t) return Qnil; tty = t->display_info.tty; @@ -10698,9 +10699,10 @@ See also `current-input-mode'. */) (Lisp_Object quit) { - struct terminal *t = get_named_tty ("/dev/tty"); + struct terminal *t = get_named_terminal ("/dev/tty"); struct tty_display_info *tty; - if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw)) + + if (!t) return Qnil; tty = t->display_info.tty; === modified file 'src/nsfns.m' --- src/nsfns.m 2014-10-12 08:35:50 +0000 +++ src/nsfns.m 2014-10-14 12:45:41 +0000 @@ -133,7 +133,7 @@ } else if (TERMINALP (object)) { - struct terminal *t = get_terminal (object, 1); + struct terminal *t = decode_live_terminal (object); if (t->type != output_ns) error ("Terminal %d is not a Nextstep display", t->id); @@ -2541,7 +2541,7 @@ Internal use only, use `display-monitor-attributes-list' instead. */) (Lisp_Object terminal) { - struct terminal *term = get_terminal (terminal, 1); + struct terminal *term = decode_live_terminal (terminal); NSArray *screens; NSUInteger i, n_monitors; struct MonitorInfo *monitors; === modified file 'src/term.c' --- src/term.c 2014-09-24 07:17:51 +0000 +++ src/term.c 2014-10-14 12:45:41 +0000 @@ -77,7 +77,6 @@ static void tty_show_cursor (struct tty_display_info *); static void tty_hide_cursor (struct tty_display_info *); static void tty_background_highlight (struct tty_display_info *tty); -static struct terminal *get_tty_terminal (Lisp_Object, bool); static void clear_tty_hooks (struct terminal *terminal); static void set_tty_hooks (struct terminal *terminal); static void dissociate_if_controlling_tty (int fd); @@ -2032,11 +2031,9 @@ TERMINAL does not refer to a text terminal. */) (Lisp_Object terminal) { - struct terminal *t = get_tty_terminal (terminal, 0); - if (!t) - return Qnil; - else - return t->display_info.tty->TN_max_colors > 0 ? Qt : Qnil; + struct terminal *t = decode_tty_terminal (terminal); + + return (t && t->display_info.tty->TN_max_colors > 0) ? Qt : Qnil; } /* Return the number of supported colors. */ @@ -2049,11 +2046,9 @@ TERMINAL does not refer to a text terminal. */) (Lisp_Object terminal) { - struct terminal *t = get_tty_terminal (terminal, 0); - if (!t) - return make_number (0); - else - return make_number (t->display_info.tty->TN_max_colors); + struct terminal *t = decode_tty_terminal (terminal); + + return make_number (t ? t->display_info.tty->TN_max_colors : 0); } #ifndef DOS_NT @@ -2168,52 +2163,6 @@ #endif /* !DOS_NT */ - - -/* Return the tty display object specified by TERMINAL. */ - -static struct terminal * -get_tty_terminal (Lisp_Object terminal, bool throw) -{ - struct terminal *t = get_terminal (terminal, throw); - - if (t && t->type != output_termcap && t->type != output_msdos_raw) - { - if (throw) - error ("Device %d is not a termcap terminal device", t->id); - else - return NULL; - } - - return t; -} - -/* Return an active termcap device that uses the tty device with the - given name. - - This function ignores suspended devices. - - Returns NULL if the named terminal device is not opened. */ - -struct terminal * -get_named_tty (const char *name) -{ - struct terminal *t; - - eassert (name); - - for (t = terminal_list; t; t = t->next_terminal) - { - if ((t->type == output_termcap || t->type == output_msdos_raw) - && !strcmp (t->display_info.tty->name, name) - && TERMINAL_ACTIVE_P (t)) - return t; - } - - return 0; -} - - DEFUN ("tty-type", Ftty_type, Stty_type, 0, 1, 0, doc: /* Return the type of the tty device that TERMINAL uses. Returns nil if TERMINAL is not on a tty device. @@ -2222,15 +2171,10 @@ selected frame's terminal). */) (Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); - - if (t->type != output_termcap && t->type != output_msdos_raw) - return Qnil; - - if (t->display_info.tty->type) - return build_string (t->display_info.tty->type); - else - return Qnil; + struct terminal *t = decode_tty_terminal (terminal); + + return (t && t->display_info.tty->type + ? build_string (t->display_info.tty->type) : Qnil); } DEFUN ("controlling-tty-p", Fcontrolling_tty_p, Scontrolling_tty_p, 0, 1, 0, @@ -2241,13 +2185,9 @@ TERMINAL is not on a tty device. */) (Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_tty_terminal (terminal); - if ((t->type != output_termcap && t->type != output_msdos_raw) - || strcmp (t->display_info.tty->name, DEV_TTY) != 0) - return Qnil; - else - return Qt; + return (t && !strcmp (t->display_info.tty->name, DEV_TTY) ? Qt : Qnil); } DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 1, 0, @@ -2261,7 +2201,7 @@ TERMINAL does not refer to a text terminal. */) (Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_live_terminal (terminal); if (t->type == output_termcap) t->display_info.tty->TS_enter_underline_mode = 0; @@ -2276,7 +2216,7 @@ top-most frame on the text terminal. */) (Lisp_Object terminal) { - struct terminal *t = get_terminal (terminal, 1); + struct terminal *t = decode_live_terminal (terminal); if (t->type == output_termcap) return t->display_info.tty->top_frame; @@ -2306,11 +2246,11 @@ A suspended tty may be resumed by calling `resume-tty' on it. */) (Lisp_Object tty) { - struct terminal *t = get_tty_terminal (tty, 1); + struct terminal *t = decode_tty_terminal (tty); FILE *f; if (!t) - error ("Unknown tty device"); + error ("Attempt to suspend a non-text terminal device"); f = t->display_info.tty->input; @@ -2366,15 +2306,15 @@ frame's terminal). */) (Lisp_Object tty) { - struct terminal *t = get_tty_terminal (tty, 1); + struct terminal *t = decode_tty_terminal (tty); int fd; if (!t) - error ("Unknown tty device"); + error ("Attempt to resume a non-text terminal device"); if (!t->display_info.tty->input) { - if (get_named_tty (t->display_info.tty->name)) + if (get_named_terminal (t->display_info.tty->name)) error ("Cannot resume display while another display is active on the same device"); #ifdef MSDOS @@ -4007,7 +3947,7 @@ /* XXX Perhaps this should be made explicit by having init_tty always create a new terminal and separating terminal and frame creation on Lisp level. */ - terminal = get_named_tty (name); + terminal = get_named_terminal (name); if (terminal) return terminal; === modified file 'src/termhooks.h' --- src/termhooks.h 2014-09-24 20:30:28 +0000 +++ src/termhooks.h 2014-10-14 12:45:41 +0000 @@ -681,7 +681,9 @@ (t->type == output_ns ? t->display_info.ns->name_list_element : Qnil) #endif -extern struct terminal *get_terminal (Lisp_Object terminal, bool); +extern struct terminal *decode_live_terminal (Lisp_Object); +extern struct terminal *decode_tty_terminal (Lisp_Object); +extern struct terminal *get_named_terminal (const char *); extern struct terminal *create_terminal (enum output_method, struct redisplay_interface *); extern void delete_terminal (struct terminal *); === modified file 'src/terminal.c' --- src/terminal.c 2014-07-21 01:41:59 +0000 +++ src/terminal.c 2014-10-14 12:45:41 +0000 @@ -37,7 +37,9 @@ /* The initial terminal device, created by initial_term_init. */ struct terminal *initial_terminal; +Lisp_Object Qrun_hook_with_args; static Lisp_Object Qterminal_live_p; +static Lisp_Object Qdelete_terminal_functions; static void delete_initial_terminal (struct terminal *); @@ -194,34 +196,66 @@ (*FRAME_TERMINAL (f)->ins_del_lines_hook) (f, vpos, n); } - - - -/* Return the terminal object specified by TERMINAL. TERMINAL may be - a terminal object, a frame, or nil for the terminal device of the - current frame. If THROW is false, return NULL for failure, - otherwise throw an error. */ - -struct terminal * -get_terminal (Lisp_Object terminal, bool throw) +/* Return the terminal object specified by TERMINAL. TERMINAL may + be a terminal object, a frame, or nil for the terminal device of + the current frame. If TERMINAL is neither from the above or the + resulting terminal object is deleted, return NULL. */ + +static struct terminal * +decode_terminal (Lisp_Object terminal) { - struct terminal *result = NULL; + struct terminal *t; if (NILP (terminal)) terminal = selected_frame; - - if (TERMINALP (terminal)) - result = XTERMINAL (terminal); - else if (FRAMEP (terminal)) - result = FRAME_TERMINAL (XFRAME (terminal)); - - if (result && !result->name) - result = NULL; - - if (result == NULL && throw) + t = (TERMINALP (terminal) + ? XTERMINAL (terminal) + : FRAMEP (terminal) ? FRAME_TERMINAL (XFRAME (terminal)) : NULL); + return t && t->name ? t : NULL; +} + +/* Like above, but throw an error if TERMINAL is not valid or deleted. */ + +struct terminal * +decode_live_terminal (Lisp_Object terminal) +{ + struct terminal *t = decode_terminal (terminal); + + if (!t) wrong_type_argument (Qterminal_live_p, terminal); - - return result; + return t; +} + +/* Like decode_terminal, but ensure that the resulting terminal object refers + to a text-based terminal device. */ + +struct terminal * +decode_tty_terminal (Lisp_Object terminal) +{ + struct terminal *t = decode_live_terminal (terminal); + + return (t->type == output_termcap || t->type == output_msdos_raw) ? t : NULL; +} + +/* Return an active (not suspended) text-based terminal device that uses + the tty device with the given NAME, or NULL if the named terminal device + is not opened. */ + +struct terminal * +get_named_terminal (const char *name) +{ + struct terminal *t; + + eassert (name); + + for (t = terminal_list; t; t = t->next_terminal) + { + if ((t->type == output_termcap || t->type == output_msdos_raw) + && !strcmp (t->display_info.tty->name, name) + && TERMINAL_ACTIVE_P (t)) + return t; + } + return NULL; } /* Create a new terminal object of TYPE and add it to the terminal list. RIF @@ -308,8 +342,6 @@ } } -Lisp_Object Qrun_hook_with_args; -static Lisp_Object Qdelete_terminal_functions; DEFUN ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, doc: /* Delete TERMINAL by deleting all frames on it and closing the terminal. TERMINAL may be a terminal object, a frame, or nil (meaning the @@ -319,7 +351,7 @@ but if the second argument FORCE is non-nil, you may do so. */) (Lisp_Object terminal, Lisp_Object force) { - struct terminal *t = get_terminal (terminal, 0); + struct terminal *t = decode_terminal (terminal); if (!t) return Qnil; @@ -380,9 +412,7 @@ possible return values. */) (Lisp_Object object) { - struct terminal *t; - - t = get_terminal (object, 0); + struct terminal *t = decode_terminal (object); if (!t) return Qnil; @@ -429,8 +459,7 @@ selected frame's terminal). */) (Lisp_Object terminal) { - struct terminal *t - = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1); + struct terminal *t = decode_live_terminal (terminal); return t->name ? build_string (t->name) : Qnil; } @@ -467,9 +496,7 @@ selected frame's terminal). */) (Lisp_Object terminal) { - struct terminal *t - = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1); - return Fcopy_alist (t->param_alist); + return Fcopy_alist (decode_live_terminal (terminal)->param_alist); } DEFUN ("terminal-parameter", Fterminal_parameter, Sterminal_parameter, 2, 2, 0, @@ -478,12 +505,8 @@ selected frame's terminal). */) (Lisp_Object terminal, Lisp_Object parameter) { - Lisp_Object value; - struct terminal *t - = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1); CHECK_SYMBOL (parameter); - value = Fcdr (Fassq (parameter, t->param_alist)); - return value; + return Fcdr (Fassq (parameter, decode_live_terminal (terminal)->param_alist)); } DEFUN ("set-terminal-parameter", Fset_terminal_parameter, @@ -495,9 +518,7 @@ selected frame's terminal). */) (Lisp_Object terminal, Lisp_Object parameter, Lisp_Object value) { - struct terminal *t - = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1); - return store_terminal_param (t, parameter, value); + return store_terminal_param (decode_live_terminal (terminal), parameter, value); } /* Initial frame has no device-dependent output data, but has === modified file 'src/w32fns.c' --- src/w32fns.c 2014-10-08 10:39:45 +0000 +++ src/w32fns.c 2014-10-14 12:45:41 +0000 @@ -276,7 +276,7 @@ } else if (TERMINALP (object)) { - struct terminal *t = get_terminal (object, 1); + struct terminal *t = decode_live_terminal (object); if (t->type != output_w32) error ("Terminal %d is not a W32 display", t->id); === modified file 'src/xfns.c' --- src/xfns.c 2014-10-03 05:31:17 +0000 +++ src/xfns.c 2014-10-14 12:45:41 +0000 @@ -159,7 +159,7 @@ } else if (TERMINALP (object)) { - struct terminal *t = get_terminal (object, 1); + struct terminal *t = decode_live_terminal (object); if (t->type != output_x_window) error ("Terminal %d is not an X display", t->id); === modified file 'src/xselect.c' --- src/xselect.c 2014-10-03 02:20:52 +0000 +++ src/xselect.c 2014-10-14 12:45:41 +0000 @@ -1901,7 +1901,7 @@ } else if (TERMINALP (object)) { - struct terminal *t = get_terminal (object, 1); + struct terminal *t = decode_live_terminal (object); if (t->type == output_x_window) FOR_EACH_FRAME (tail, frame) ------------------------------------------------------------ revno: 118108 committer: Michael Albinus branch nick: trunk timestamp: Tue 2014-10-14 13:59:16 +0200 message: * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Reduce the amount of set environment variable commands. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-13 20:55:41 +0000 +++ lisp/ChangeLog 2014-10-14 11:59:16 +0000 @@ -1,3 +1,9 @@ +2014-10-14 Jérémy Compostella + Michael Albinus + + * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Reduce the amount of set environment variable commands. + 2014-10-12 Fabián Ezequiel Gallina Fix import completion. (Bug#18582) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2014-10-12 18:27:37 +0000 +++ lisp/net/tramp-sh.el 2014-10-14 11:59:16 +0000 @@ -3955,10 +3955,8 @@ (tramp-message vec 5 "Setting shell prompt") (tramp-send-command - vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t) - (tramp-send-command vec "PS2=''" t) - (tramp-send-command vec "PS3=''" t) - (tramp-send-command vec "PROMPT_COMMAND=''" t) + vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''" + (tramp-shell-quote-argument tramp-end-of-output)) t) ;; Try to set up the coding system correctly. ;; CCC this can't be the right way to do it. Hm. @@ -4078,15 +4076,22 @@ (let ((env (append (when (tramp-get-remote-locale vec) ; Discard `(nil)'. `(,(tramp-get-remote-locale vec))) (copy-sequence tramp-remote-process-environment))) - unset item) + unset vars item) (while env (setq item (tramp-compat-split-string (car env) "=")) (setcdr item (mapconcat 'identity (cdr item) "=")) (if (and (stringp (cdr item)) (not (string-equal (cdr item) ""))) - (tramp-send-command - vec (format "%s=%s; export %s" (car item) (cdr item) (car item)) t) + (push (format "%s %s" (car item) (cdr item)) vars) (push (car item) unset)) (setq env (cdr env))) + (when vars + (tramp-send-command + vec + (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s" + tramp-end-of-heredoc + (mapconcat 'identity vars "\n") + tramp-end-of-heredoc) + t)) (when unset (tramp-send-command vec (format "unset %s" (mapconcat 'identity unset " ")) t)))) ------------------------------------------------------------ revno: 118107 committer: Jan D. branch nick: trunk timestamp: Tue 2014-10-14 07:07:21 +0200 message: * configure.ac: apple-darwin powerpc is unported. diff: === modified file 'ChangeLog' --- ChangeLog 2014-10-12 22:56:45 +0000 +++ ChangeLog 2014-10-14 05:07:21 +0000 @@ -1,3 +1,7 @@ +2014-10-14 Jan Djärv + + * configure.ac: apple-darwin powerpc is unported. + 2014-10-12 Ken Brown * configure.ac (LD_SWITCH_SYSTEM_TEMACS) [CYGWIN]: Set stack size === modified file 'configure.ac' --- configure.ac 2014-10-12 22:56:45 +0000 +++ configure.ac 2014-10-14 05:07:21 +0000 @@ -557,7 +557,7 @@ *-apple-darwin* ) case "${canonical}" in i[3456]86-* ) ;; - powerpc-* ) ;; + powerpc-* ) unported=yes ;; x86_64-* ) ;; * ) unported=yes ;; esac ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.