------------------------------------------------------------ revno: 116471 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-18 00:09:51 -0800 message: Some remember doc * doc/misc/remember.texi (copying): Bump remember mode version. (Installation): Remove unnecessary chapter. (Quick Start): No need to explicitly load remember.el. (Separate Text Files): New section. * lisp/textmodes/remember.el (remember-data-directory) (remember-directory-file-name-format, remember-store-in-files) (remember-notes-initial-major-mode, remember-notes-bury-on-kill) (remember-notes-save-and-bury-buffer) (remember-notes--kill-buffer-query): Doc fixes. * etc/NEWS: Related edit. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-02-17 18:40:09 +0000 +++ doc/misc/ChangeLog 2014-02-18 08:09:51 +0000 @@ -1,3 +1,10 @@ +2014-02-18 Glenn Morris + + * remember.texi (copying): Bump remember mode version. + (Installation): Remove unnecessary chapter. + (Quick Start): No need to explicitly load remember.el. + (Separate Text Files): New section. + 2014-02-17 Glenn Morris * eieio.texi (Class Values, CLOS compatibility): === modified file 'doc/misc/remember.texi' --- doc/misc/remember.texi 2014-01-27 02:02:28 +0000 +++ doc/misc/remember.texi 2014-02-18 08:09:51 +0000 @@ -7,7 +7,7 @@ @c %**end of header @copying -This manual is for Remember Mode, version 1.9 +This manual is for Remember Mode, version 2.0 Copyright @copyright{} 2001, 2004--2005, 2007--2014 Free Software Foundation, Inc. @@ -54,7 +54,6 @@ @menu * Preface:: About the documentation. * Introduction:: What is Remember Mode? -* Installation:: How to install Remember. * Implementation:: How Remember came into existence. * Quick Start:: Get started using Remember. * Function Reference:: Interactive functions in remember.el. @@ -69,6 +68,7 @@ Backends * Text File:: Saving to a text file. +* Separate Text Files:: Saving to separate text files. * Diary:: Saving to a Diary file. * Mailbox:: Saving to a mailbox. * Org:: Saving to an Org Mode file. @@ -128,18 +128,6 @@ manual-ness which computers from the very beginning have been championed as being able to reduce. -@node Installation -@chapter Installation - -Installing Remember Mode is as simple as adding the following lines to -your Emacs configuration file (usually @file{~/.emacs.d/init.el} or -@file{~/.emacs}). - -@lisp -(add-to-list 'load-path "/path/to/remember") -(require 'remember) -@end lisp - @node Implementation @chapter Implementation @@ -187,14 +175,11 @@ @itemize @item -Load @file{remember.el}. - -@item -Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be +Type @kbd{M-x remember}. The @samp{*Remember*} buffer should be displayed. @item -Type in what you want to remember. The first line will be treated as +Type in what you want to remember. The first line will be treated as the headline, and the rest of the buffer will contain the body of the note. @@ -204,18 +189,18 @@ @end itemize By default, @code{remember-finalize} saves the note in @file{~/emacs.d/notes}. -You can edit it now to see the remembered and timestamped note. You -can edit this file however you want. New entries will always be added +You can edit it now to see the remembered and timestamped note. You +can edit this file however you want. New entries will always be added to the end. -To remember a region of text, use the universal prefix. @kbd{C-u M-x +To remember a region of text, use the universal prefix. @kbd{C-u M-x remember} displays a @samp{*Remember*} buffer with the region as the initial contents. As a simple beginning, you can start by using the Text File backend, keeping your @file{~/.emacs.d/notes} file in outline-mode format, with a final -entry called @samp{* Raw data}. Remembered data will be added to the -end of the file. Every so often, you can move the data that gets +entry called @samp{* Raw data}. Remembered data will be added to the +end of the file. Every so often, you can move the data that gets appended there into other files, or reorganize your document. You can also store remembered data in other backends. @@ -233,7 +218,7 @@ @end lisp By default, remember uses the first annotation returned by -@code{remember-annotation-functions}. To include all of the annotations, +@code{remember-annotation-functions}. To include all of the annotations, set @code{remember-run-all-annotation-functions-flag} to non-nil. @defopt remember-run-all-annotation-functions-flag @@ -242,7 +227,7 @@ @end defopt You can write custom functions that use a different set of -remember-annotation-functions. For example: +remember-annotation-functions. For example: @lisp (defun my/remember-with-filename () @@ -258,7 +243,7 @@ @file{remember.el} defines the following interactive functions: @defun remember initial -Remember an arbitrary piece of data. With a prefix, it will use the +Remember an arbitrary piece of data. With a prefix, it will use the region as @var{initial}. @end defun @@ -310,6 +295,7 @@ @menu * Text File:: Saving to a text file. +* Separate Text Files:: Saving to separate text files. * Diary:: Saving to a Diary file. * Mailbox:: Saving to a mailbox. * Org:: Saving to an Org Mode file. @@ -335,6 +321,30 @@ The text used to begin each remember item. @end defopt + +@node Separate Text Files +@section Saving to Separate Text Files +@cindex text files, saving to separate + +@subheading Insinuation + +@lisp +(setq remember-handler-functions '(remember-store-in-files)) +@end lisp + +@subheading Options + +@defopt remember-data-directory +The directory in which to store remember data as files. +@end defopt + +@defopt remember-directory-file-name-format +A format string to use for naming files in the remember directory. +File names are formed by calling @code{format-time-string} at the time +of saving, using this format string. +@end defopt + + @node Diary @section Saving to a Diary file @cindex diary, integration === modified file 'etc/NEWS' --- etc/NEWS 2014-02-18 01:33:30 +0000 +++ etc/NEWS 2014-02-18 08:09:51 +0000 @@ -28,6 +28,7 @@ This happens by default if a suitable support library is found at build time, like libacl on GNU/Linux. To prevent this, use the configure option `--disable-acl'. +FIXME? Should be --without-acl? ** Emacs can now be compiled with file notification support. This happens by default if a suitable system library is found at @@ -720,11 +721,11 @@ Without the second change, the *scratch* buffer will still be there for notes that do not need to be preserved. -*** The Remember package can now store notes in separates files. -You can use the new function `remember-store-in-files' within the -`remember-handler-functions' option. See `remember-data-directory' -and `remember-directory-file-name-format' for new options related to -this function. ++++ +*** Remember can now store notes in separate files. +To use this, add `remember-store-in-files' to the `remember-handler-functions' +option. The files are saved in `remember-data-directory' using +names specified by `remember-directory-file-name-format'. ** Rmail === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-18 01:33:30 +0000 +++ lisp/ChangeLog 2014-02-18 08:09:51 +0000 @@ -1,5 +1,11 @@ 2014-02-18 Glenn Morris + * textmodes/remember.el (remember-data-directory) + (remember-directory-file-name-format, remember-store-in-files) + (remember-notes-initial-major-mode, remember-notes-bury-on-kill) + (remember-notes-save-and-bury-buffer) + (remember-notes--kill-buffer-query): Doc fixes. + * desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes. 2014-02-17 Alan Mackenzie === modified file 'lisp/textmodes/remember.el' --- lisp/textmodes/remember.el 2014-02-14 06:55:59 +0000 +++ lisp/textmodes/remember.el 2014-02-18 08:09:51 +0000 @@ -442,21 +442,24 @@ (remember-destroy)))) (defcustom remember-data-directory "~/remember" - "The directory in which to store remember data as files." + "The directory in which to store remember data as files. +Used by `remember-store-in-files'." :type 'directory :version "24.4" :group 'remember) (defcustom remember-directory-file-name-format "%Y-%m-%d_%T-%z" - "Format string for the file name in which to store unprocessed data." + "Format string for the file name in which to store unprocessed data. +This is passed to `format-time-string'. +Used by `remember-store-in-files'." :type 'string :version "24.4" :group 'remember) (defun remember-store-in-files () "Store remember data in a file in `remember-data-directory'. -The file is named after `remember-directory-file-name-format' fed through -`format-time-string'." +The file is named by calling `format-time-string' using +`remember-directory-file-name-format' as the format string." (let ((name (format-time-string remember-directory-file-name-format (current-time))) (text (buffer-string))) @@ -572,20 +575,19 @@ :version "24.4") (defcustom remember-notes-initial-major-mode nil - "Major mode to set to notes buffer when it's created. -If set to nil will use the same mode as `initial-major-mode'." - :type '(choice (const :tag "Same as `initial-major-mode'" nil) + "Major mode to use in the notes buffer when it's created. +If this is nil, use `initial-major-mode'." + :type '(choice (const :tag "Use `initial-major-mode'" nil) (function :tag "Major mode" text-mode)) :version "24.4") (defcustom remember-notes-bury-on-kill t - "Whether to bury notes buffer instead of killing." + "Non-nil means `kill-buffer' will bury the notes buffer instead of killing." :type 'boolean :version "24.4") (defun remember-notes-save-and-bury-buffer () - "Saves and buries current buffer. -Buffer is saved only if `buffer-modified-p' returns non-nil." + "Save (if it is modified) and bury the current buffer." (interactive) (when (buffer-modified-p) (save-buffer)) @@ -648,10 +650,16 @@ buf)) (defun remember-notes--kill-buffer-query () + "Function that `remember-notes-mode' adds to `kill-buffer-query-functions'. +Save the current buffer if modified. If `remember-notes-bury-on-kill' +is non-nil, bury it and return nil; otherwise return t." (when (buffer-modified-p) (save-buffer)) (if remember-notes-bury-on-kill - (bury-buffer) + (progn + ;; bury-buffer always returns nil, but let's be explicit. + (bury-buffer) + nil) t)) ;;; remember.el ends here ------------------------------------------------------------ revno: 116470 committer: Michael Albinus branch nick: trunk timestamp: Tue 2014-02-18 08:46:38 +0100 message: * dbusbind.c (xd_close_bus): Apply proper check on busobj. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-17 21:20:44 +0000 +++ src/ChangeLog 2014-02-18 07:46:38 +0000 @@ -1,3 +1,7 @@ +2014-02-18 Michael Albinus + + * dbusbind.c (xd_close_bus): Apply proper check on busobj. + 2014-02-17 Paul Eggert temacs --daemon fix (Bug#16599). === modified file 'src/dbusbind.c' --- src/dbusbind.c 2014-02-16 05:43:44 +0000 +++ src/dbusbind.c 2014-02-18 07:46:38 +0000 @@ -973,7 +973,7 @@ return *refcount; } -/* Convert a Lisp dbus object to a pointer */ +/* Convert a Lisp D-Bus object to a pointer. */ static DBusConnection* xd_lisp_dbus_to_dbus (Lisp_Object bus) { @@ -1095,7 +1095,7 @@ return; busobj = CDR_SAFE(val); - if (NILP (val)) { + if (NILP (busobj)) { xd_registered_buses = Fdelete (val, xd_registered_buses); return; } ------------------------------------------------------------ revno: 116469 fixes bug: http://debbugs.gnu.org/16754 author: Mirek Kaim committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-02-17 17:47:35 -0800 message: * configure.ac [HAVE_W32]: Test for ImageMagick. diff: === modified file 'ChangeLog' --- ChangeLog 2014-02-14 08:05:18 +0000 +++ ChangeLog 2014-02-18 01:47:35 +0000 @@ -1,3 +1,7 @@ +2014-02-18 Mirek Kaim (tiny change) + + * configure.ac [HAVE_W32]: Test for ImageMagick. (Bug#16754) + 2014-02-14 Paul Eggert * Makefile.in (install-arch-indep): Allow ' ' in destdir (Bug#16717). === modified file 'configure.ac' --- configure.ac 2014-01-23 02:09:31 +0000 +++ configure.ac 2014-02-18 01:47:35 +0000 @@ -2236,7 +2236,7 @@ fi HAVE_IMAGEMAGICK=no -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then if test "${with_imagemagick}" != "no"; then ## 6.2.8 is the earliest version known to work, but earlier versions ## might work - let us know if you find one. ------------------------------------------------------------ revno: 116468 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-02-17 17:33:30 -0800 message: Some desktop doc * doc/emacs/misc.texi (Saving Emacs Sessions): Mention desktop-auto-save-timeout. * lisp/desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes. * etc/NEWS: Related edit. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-17 18:04:17 +0000 +++ doc/emacs/ChangeLog 2014-02-18 01:33:30 +0000 @@ -1,3 +1,7 @@ +2014-02-18 Glenn Morris + + * misc.texi (Saving Emacs Sessions): Mention desktop-auto-save-timeout. + 2014-02-17 Stefan Monnier * programs.texi (Matching): Fix typo. === modified file 'doc/emacs/misc.texi' --- doc/emacs/misc.texi 2014-02-03 07:35:44 +0000 +++ doc/emacs/misc.texi 2014-02-18 01:33:30 +0000 @@ -2150,6 +2150,12 @@ (desktop-save-mode 1) @end example +@vindex desktop-auto-save-timeout +@noindent +When @code{desktop-save-mode} is active and the desktop file exists, +Emacs auto-saves it every @code{desktop-auto-save-timeout} +seconds, if that is non-@code{nil} and non-zero. + @findex desktop-change-dir @findex desktop-revert @vindex desktop-path === modified file 'etc/NEWS' --- etc/NEWS 2014-02-17 18:04:17 +0000 +++ etc/NEWS 2014-02-18 01:33:30 +0000 @@ -468,8 +468,10 @@ ** Desktop -*** `desktop-auto-save-timeout' defines the number of seconds idle time -before auto-save of the desktop. ++++ +*** `desktop-save-mode' by default now auto-saves an existing desktop file +after `desktop-auto-save-timeout'. To disable this, customize that option +to nil (or zero). *** `desktop-restore-frames', enabled by default, allows saving and restoring the frame/window configuration (frameset). Additional options === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-17 18:16:32 +0000 +++ lisp/ChangeLog 2014-02-18 01:33:30 +0000 @@ -1,3 +1,7 @@ +2014-02-18 Glenn Morris + + * desktop.el (desktop-save-mode, desktop-auto-save-timeout): Doc fixes. + 2014-02-17 Alan Mackenzie Connect electric-indent-mode up with CC Mode. Bug #15478. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2014-02-07 07:58:10 +0000 +++ lisp/desktop.el 2014-02-18 01:33:30 +0000 @@ -1,7 +1,6 @@ ;;; desktop.el --- save partial status of Emacs when killed -*- lexical-binding: t -*- -;; Copyright (C) 1993-1995, 1997, 2000-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1993-1995, 1997, 2000-2014 Free Software Foundation, Inc. ;; Author: Morten Welinder ;; Keywords: convenience @@ -154,13 +153,24 @@ ;;;###autoload (define-minor-mode desktop-save-mode "Toggle desktop saving (Desktop Save mode). -With a prefix argument ARG, enable Desktop Save mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil. - -If Desktop Save mode is enabled, the state of Emacs is saved from -one session to another. See variable `desktop-save' and function -`desktop-read' for details." +With a prefix argument ARG, enable Desktop Save mode if ARG is positive, +and disable it otherwise. If called from Lisp, enable the mode if ARG +is omitted or nil. + +When Desktop Save mode is enabled, the state of Emacs is saved from +one session to another. In particular, Emacs will save the desktop when +it exits (this may prompt you; see the option `desktop-save'). The next +time Emacs starts, if this mode is active it will restore the desktop. + +To manually save the desktop at any time, use the command `M-x desktop-save'. +To load it, use `M-x desktop-read'. + +Once a desktop file exists, Emacs will auto-save it according to the +option `desktop-auto-save-timeout'. + +To see all the options you can set, browse the `desktop' customization group. + +For further details, see info node `(emacs)Saving Emacs Sessions'." :global t :group 'desktop (if desktop-save-mode @@ -197,6 +207,7 @@ (defcustom desktop-auto-save-timeout auto-save-timeout "Number of seconds idle time before auto-save of the desktop. +This applies to an existing desktop file when `desktop-save-mode' is enabled. Zero or nil means disable auto-saving due to idleness." :type '(choice (const :tag "Off" nil) (integer :tag "Seconds")) @@ -1055,6 +1066,7 @@ (defvar desktop-buffer-ok-count) (defvar desktop-buffer-fail-count) +;; FIXME Interactively, this should have the option to prompt for dirname. ;;;###autoload (defun desktop-read (&optional dirname) "Read and process the desktop file in directory DIRNAME. ------------------------------------------------------------ revno: 116467 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-02-17 16:45:43 -0800 message: * nt/INSTALL: Prefix must be absolute. diff: === modified file 'nt/INSTALL' --- nt/INSTALL 2014-02-08 10:25:33 +0000 +++ nt/INSTALL 2014-02-18 00:45:43 +0000 @@ -44,7 +44,7 @@ It is always preferable to use --prefix to configure Emacs for some specific location of its installed tree; the default /usr/local is not suitable for Windows (see the detailed - instructions for the reasons). + instructions for the reasons). The prefix must be absolute. You can pass other options to the configure script. Here's a typical example (for an in-place debug build): ------------------------------------------------------------ revno: 116466 committer: Paul Eggert branch nick: trunk timestamp: Mon 2014-02-17 14:51:36 -0800 message: Fix stray underscore in ChangeLog. diff: === modified file 'lisp/ChangeLog.9' --- lisp/ChangeLog.9 2014-01-26 00:47:40 +0000 +++ lisp/ChangeLog.9 2014-02-17 22:51:36 +0000 @@ -14099,7 +14099,7 @@ 2000-08-28 Peter Breton * locate.el (locate): Cleaned up locate command's interactive prompting - Thanks to François_Pinard for suggestions. + Thanks to François Pinard for suggestions. * filecache.el (file-cache-case-fold-search): New variable. (file-cache-assoc-function): New variable. ------------------------------------------------------------ revno: 116465 fixes bug: http://debbugs.gnu.org/16599 committer: Paul Eggert branch nick: trunk timestamp: Mon 2014-02-17 13:20:44 -0800 message: temacs --daemon fix * emacs.c (main): Initialize daemon_pipe[1] here ... (syms_of_emacs): ... instead of here. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-16 09:51:41 +0000 +++ src/ChangeLog 2014-02-17 21:20:44 +0000 @@ -1,3 +1,9 @@ +2014-02-17 Paul Eggert + + temacs --daemon fix (Bug#16599). + * emacs.c (main): Initialize daemon_pipe[1] here ... + (syms_of_emacs): ... instead of here. + 2014-02-16 Anders Lindgern * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask === modified file 'src/emacs.c' --- src/emacs.c 2014-01-20 19:44:56 +0000 +++ src/emacs.c 2014-02-17 21:20:44 +0000 @@ -1005,6 +1005,9 @@ exit (0); } + /* Make sure IS_DAEMON starts up as false. */ + daemon_pipe[1] = 0; + if (argmatch (argv, argc, "-daemon", "--daemon", 5, NULL, &skip_args) || argmatch (argv, argc, "-daemon", "--daemon", 5, &dname_arg, &skip_args)) { @@ -2548,7 +2551,4 @@ Vlibrary_cache = Qnil; staticpro (&Vlibrary_cache); #endif - - /* Make sure IS_DAEMON starts up as false. */ - daemon_pipe[1] = 0; } ------------------------------------------------------------ revno: 116464 fixes bug: http://debbugs.gnu.org/16772 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2014-02-17 20:04:51 +0100 message: nt/Makefile.in: Follow up to previous change. nt/Makefile.in (install): Create destination directory before copying README.W32, and use ${datadir} to refer to the file. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2014-02-17 19:01:14 +0000 +++ nt/ChangeLog 2014-02-17 19:04:51 +0000 @@ -1,7 +1,7 @@ 2014-02-17 Juanma Barranquero - * Makefile.in (install): Create destination directory before - copying README.W32 (bug#16772). + * Makefile.in (install): Create destination directory before copying + README.W32, and use ${datadir} to refer to the file (bug#16772). 2014-02-13 Juanma Barranquero === modified file 'nt/Makefile.in' --- nt/Makefile.in 2014-02-17 19:01:14 +0000 +++ nt/Makefile.in 2014-02-17 19:04:51 +0000 @@ -172,7 +172,7 @@ $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ done ${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)" - $(INSTALL_DATA) README.W32 "$(DESTDIR)${datadir}/emacs/$(version)" + $(INSTALL_DATA) ${srcdir}/README.W32 "$(DESTDIR)${datadir}/emacs/$(version)" uninstall: rm -f "$(DESTDIR)${datadir}/emacs/$(version)/README.W32" ------------------------------------------------------------ revno: 116463 fixes bug: http://debbugs.gnu.org/16772 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2014-02-17 20:01:14 +0100 message: nt/Makefile.in: Fix bug#16772. * nt/Makefile.in (install): Create destination directory before copying README.W32. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2014-02-13 03:19:57 +0000 +++ nt/ChangeLog 2014-02-17 19:01:14 +0000 @@ -1,3 +1,8 @@ +2014-02-17 Juanma Barranquero + + * Makefile.in (install): Create destination directory before + copying README.W32 (bug#16772). + 2014-02-13 Juanma Barranquero * Makefile.in (datarootdir, datadir, INSTALL_DATA): Declare. === modified file 'nt/Makefile.in' --- nt/Makefile.in 2014-02-13 03:19:57 +0000 +++ nt/Makefile.in 2014-02-17 19:01:14 +0000 @@ -171,6 +171,7 @@ for file in ${INSTALLABLES} ; do \ $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ done + ${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)" $(INSTALL_DATA) README.W32 "$(DESTDIR)${datadir}/emacs/$(version)" uninstall: ------------------------------------------------------------ revno: 116462 committer: Glenn Morris branch nick: trunk timestamp: Mon 2014-02-17 10:40:09 -0800 message: Some doc updates for eieio-describe-class/generic * doc/misc/eieio.texi (Class Values, CLOS compatibility): Remove references to deleted eieio-describe-class/generic. * lisp/cedet/ede/cpp-root.el: Comment update. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-02-16 17:23:00 +0000 +++ doc/misc/ChangeLog 2014-02-17 18:40:09 +0000 @@ -1,7 +1,11 @@ +2014-02-17 Glenn Morris + + * eieio.texi (Class Values, CLOS compatibility): + Remove references to deleted eieio-describe-class/generic. + 2014-02-16 Michael Albinus Sync with Tramp 2.2.9. - * trampver.texi: Update release number. * efaq-w32.texi (Tramp ssh): Remove also pscp1 and pscp2. === modified file 'doc/misc/eieio.texi' --- doc/misc/eieio.texi 2014-01-24 22:15:29 +0000 +++ doc/misc/eieio.texi 2014-02-17 18:40:09 +0000 @@ -1544,19 +1544,11 @@ @node Class Values @chapter Class Values -Details about any class or object can be retrieved using the function -@code{eieio-describe-class}. Interactively, type in the name of a -class. In a program, pass it a string with the name of a class, a -class symbol, or an object. The resulting buffer will display all -slot names. Additionally, all methods defined to have functionality -on this class is displayed. - -You can also use the normal @code{describe-function} to retrieve -information about a class. If you call it on a constructor function, -it will also display the class information. If you call it on a -generic function, all implementations of that generic function will be -listed, together with links through which you can directly jump to the -source. +You can use the normal @code{describe-function} command to retrieve +information about a class. Running it on constructors will show a +full description of the generated class. If you call it on a generic +function, all implementations of that generic function will be listed, +together with links through which you can directly jump to the source. @node Default Superclass @chapter Default Superclass @@ -1864,9 +1856,8 @@ work. @end table -CLOS supports the @code{describe} command, but @eieio{} only provides -@code{eieio-describe-class}, and @code{eieio-describe-generic}. Those -are automatically called by @code{describe-function} when called on a +CLOS supports the @code{describe} command, but @eieio{} provides +support for using the standard @code{describe-function} command on a constructor or generic function. When creating a new class (@pxref{Building Classes}) there are several === modified file 'lisp/cedet/ede/cpp-root.el' --- lisp/cedet/ede/cpp-root.el 2014-01-01 07:43:34 +0000 +++ lisp/cedet/ede/cpp-root.el 2014-02-17 18:40:09 +0000 @@ -95,7 +95,7 @@ ;; Where FILENAME is a file in the root directory of the project. ;; Where MYFCN is a symbol for a function. See: ;; -;; M-x describe-class RET ede-cpp-root-project RET +;; M-x describe-function RET ede-cpp-root-project RET ;; ;; for documentation about the locate-fcn extension. ;; ------------------------------------------------------------ revno: 116461 committer: Alan Mackenzie branch nick: trunk timestamp: Mon 2014-02-17 18:16:32 +0000 message: Connect electric-indent-mode up with CC Mode. Bug #15478. * progmodes/cc-mode.el (c-initialize-cc-mode): add CC Mode hooks to electric-indent-{,local-}-mode. (c-basic-common-init): Set electric-indent-inhibit. Initialise c-electric-flag from electric-indent-mode. (c-electric-indent-mode-hook, c-electric-indent-local-mode-hook): New hook functions which propagate electric-indent-mode to CC Mode. * progmodes/cc-cmds.el (c-toggle-electric-state): When C-c C-l is hit, toggle electric-indent-local-moode. * electric.el (electric-indent-mode-has-been-called): New variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-17 16:01:43 +0000 +++ lisp/ChangeLog 2014-02-17 18:16:32 +0000 @@ -1,3 +1,20 @@ +2014-02-17 Alan Mackenzie + + Connect electric-indent-mode up with CC Mode. Bug #15478. + * progmodes/cc-mode.el (c-initialize-cc-mode): add CC Mode hooks + to electric-indent-{,local-}-mode. + (c-basic-common-init): Set electric-indent-inhibit. Initialise + c-electric-flag from electric-indent-mode. + (c-electric-indent-mode-hook, c-electric-indent-local-mode-hook): + New hook functions which propagate electric-indent-mode to CC + Mode. + + * progmodes/cc-cmds.el (c-toggle-electric-state): When C-c C-l is + hit, toggle electric-indent-local-moode. + + * electric.el (electric-indent-mode-has-been-called): New + variable. + 2014-02-17 Juanma Barranquero * frameset.el (frameset-cfg-id): New function. === modified file 'lisp/electric.el' --- lisp/electric.el 2014-02-10 01:34:22 +0000 +++ lisp/electric.el 2014-02-17 18:16:32 +0000 @@ -286,6 +286,9 @@ (let ((electric-indent-mode nil)) (newline arg 'interactive))) +(defvar electric-indent-mode-has-been-called 0 + "How many times has `electric-indent-mode' been called? +It's > 1 if it's been called at least once by the user.") ;;;###autoload (define-minor-mode electric-indent-mode "Toggle on-the-fly reindentation (Electric Indent mode). @@ -299,6 +302,8 @@ :global t :group 'electricity :initialize 'custom-initialize-delay :init-value t + (setq electric-indent-mode-has-been-called + (1+ electric-indent-mode-has-been-called)) (if (not electric-indent-mode) (progn (when (eq (lookup-key global-map [?\C-j]) === modified file 'lisp/progmodes/cc-cmds.el' --- lisp/progmodes/cc-cmds.el 2014-01-01 07:43:34 +0000 +++ lisp/progmodes/cc-cmds.el 2014-02-17 18:16:32 +0000 @@ -356,6 +356,8 @@ (interactive "P") (setq c-electric-flag (c-calculate-state arg c-electric-flag)) (c-update-modeline) + (when (fboundp 'electric-indent-local-mode) ; Emacs 24.4 or later. + (electric-indent-local-mode (if c-electric-flag 1 0))) (c-keep-region-active)) === modified file 'lisp/progmodes/cc-mode.el' --- lisp/progmodes/cc-mode.el 2014-01-31 02:39:40 +0000 +++ lisp/progmodes/cc-mode.el 2014-02-17 18:16:32 +0000 @@ -188,7 +188,13 @@ (setq c-block-comment-prefix (symbol-value 'c-comment-continuation-stars))) (add-hook 'change-major-mode-hook 'c-leave-cc-mode-mode) - (setq c-initialization-ok t)) + (setq c-initialization-ok t) + ;; Connect up with Emacs's electric-indent-mode, for >= Emacs 24.4 + (when (fboundp 'electric-indent-mode) + (add-hook 'electric-indent-mode-hook 'c-electric-indent-mode-hook) + (when (fboundp 'electric-indent-local-mode) + (add-hook 'electric-indent-local-mode-hook + 'c-electric-indent-local-mode-hook)))) ;; Will try initialization hooks again if they failed. (put 'c-initialize-cc-mode initprop c-initialization-ok)))) @@ -578,6 +584,14 @@ ;; setup the comment indent variable in a Emacs version portable way (set (make-local-variable 'comment-indent-function) 'c-comment-indent) + ;; In Emacs 24.4 onwards, prevent Emacs's built in electric indentation from + ;; messing up CC Mode's, and set `c-electric-flag' if `electric-indent-mode' + ;; has been called by the user. + (when (boundp 'electric-indent-inhibit) (setq electric-indent-inhibit t)) + (when (and (boundp 'electric-indent-mode-has-been-called) + (> electric-indent-mode-has-been-called 1)) + (setq c-electric-flag electric-indent-mode)) + ;; ;; Put submode indicators onto minor-mode-alist, but only once. ;; (or (assq 'c-submode-indicators minor-mode-alist) ;; (setq minor-mode-alist @@ -807,7 +821,7 @@ `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks)))) -;;; Change hooks, linking with Font Lock. +;;; Change hooks, linking with Font Lock and electric-indent-mode. ;; Buffer local variables recording Beginning/End-of-Macro position before a ;; change, when a macro straddles, respectively, the BEG or END (or both) of @@ -1238,6 +1252,27 @@ ;; function. (cons c-new-BEG c-new-END)) +;; Connect up to `electric-indent-mode' (Emacs 24.4 and later). +(defun c-electric-indent-mode-hook () + ;; Emacs has en/disabled `electric-indent-mode'. Propagate this through to + ;; each CC Mode buffer. + (when (and (boundp 'electric-indent-mode-has-been-called) + (> electric-indent-mode-has-been-called 1)) + (mapc (lambda (buf) + (with-current-buffer buf + (when c-buffer-is-cc-mode + ;; Don't use `c-toggle-electric-state' here due to recursion. + (setq c-electric-flag electric-indent-mode) + (c-update-modeline)))) + (buffer-list)))) + +(defun c-electric-indent-local-mode-hook () + ;; Emacs has en/disabled `electric-indent-local-mode' for this buffer. + ;; Propagate this through to this buffer's value of `c-electric-flag' + (when c-buffer-is-cc-mode + (setq c-electric-flag electric-indent-mode) + (c-update-modeline))) + ;; Support for C ------------------------------------------------------------ revno: 116460 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2014-02-17 13:04:17 -0500 message: * doc/emacs/killing.texi (CUA Bindings): Document the new relationship between cua-mode and delete-selection mode. (CUA Bindings): Mention that rectangle mode can be used on its own. * doc/emacs/programs.texi (Matching): Fix typo. * doc/lispref/minibuf.texi (Completion Commands): Don't document obsolete `common-substring' arg of display-completion-list. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-14 06:55:59 +0000 +++ doc/emacs/ChangeLog 2014-02-17 18:04:17 +0000 @@ -1,3 +1,11 @@ +2014-02-17 Stefan Monnier + + * programs.texi (Matching): Fix typo. + + * killing.texi (CUA Bindings): Document the new relationship between + cua-mode and delete-selection mode. + (CUA Bindings): Mention that rectangle mode can be used on its own. + 2014-02-14 Glenn Morris * regs.texi (Configuration Registers): Update C-x r f binding. === modified file 'doc/emacs/killing.texi' --- doc/emacs/killing.texi 2014-01-29 08:27:55 +0000 +++ doc/emacs/killing.texi 2014-02-17 18:04:17 +0000 @@ -866,8 +866,9 @@ while retaining the other features of CUA mode described below, set the variable @code{cua-enable-cua-keys} to @code{nil}. - In CUA mode, typed text replaces the active region as in -Delete-Selection mode (@pxref{Mouse Commands}). + CUA mode by default activates Delete-Selection mode (@pxref{Mouse Commands}) +so that typed text replaces the active region. To use CUA without this +behavior, set the variable @code{cua-delete-selection} to @code{nil}. @cindex rectangle highlighting CUA mode provides enhanced rectangle support with visible @@ -878,6 +879,9 @@ any direction. Normal text you type is inserted to the left or right of each line in the rectangle (on the same side as the cursor). + You can use this rectangle support without activating CUA by calling the +@code{cua-rectangle-mark-mode} command. + With CUA you can easily copy text and rectangles into and out of registers by providing a one-digit numeric prefix to the kill, copy, and yank commands, e.g., @kbd{C-1 C-c} copies the region into register === modified file 'doc/emacs/programs.texi' --- doc/emacs/programs.texi 2014-02-09 02:08:17 +0000 +++ doc/emacs/programs.texi 2014-02-17 18:04:17 +0000 @@ -867,7 +867,7 @@ automatically open and extra newline after point. @item -@code{electric-skip-whitespace}, when non-@code{nil}, causes the minor +@code{electric-pair-skip-whitespace}, when non-@code{nil}, causes the minor mode to skip whitespace forward before deciding whether to skip over the closing delimiter. @end itemize === modified file 'doc/lispref/minibuf.texi' --- doc/lispref/minibuf.texi 2014-02-17 02:12:50 +0000 +++ doc/lispref/minibuf.texi 2014-02-17 18:04:17 +0000 @@ -1142,7 +1142,7 @@ @file{*Completions*}. @end deffn -@defun display-completion-list completions &optional common-substring +@defun display-completion-list completions This function displays @var{completions} to the stream in @code{standard-output}, usually a buffer. (@xref{Read and Print}, for more information about streams.) The argument @var{completions} is normally @@ -1153,13 +1153,6 @@ the two strings is the actual completion, the second string serves as annotation. -The argument @var{common-substring} is the prefix that is common to -all the completions. With normal Emacs completion, it is usually the -same as the string that was completed. @code{display-completion-list} -uses this to highlight text in the completion list for better visual -feedback. This is not needed in the minibuffer; for minibuffer -completion, you can pass @code{nil}. - This function is called by @code{minibuffer-completion-help}. A common way to use it is together with @code{with-output-to-temp-buffer}, like this: @@ -1167,8 +1160,7 @@ @example (with-output-to-temp-buffer "*Completions*" (display-completion-list - (all-completions (buffer-string) my-alist) - (buffer-string))) + (all-completions (buffer-string) my-alist))) @end example @end defun === modified file 'etc/NEWS' --- etc/NEWS 2014-02-17 02:12:50 +0000 +++ etc/NEWS 2014-02-17 18:04:17 +0000 @@ -159,6 +159,7 @@ +++ *** The key `?' now describes prefix bindings, like `C-h'. +--- *** The command `describe-function' has been extended for EIEIO. Running it on constructors will show a full description of the generated class. For generic functions, it will show all @@ -244,6 +245,7 @@ This unfinished feature was introduced by accident in Emacs 23.1; simply disabling Transient Mark mode does the same thing. +--- ** The default value of `comment-use-global-state' is now t, and this variable has been marked obsolete. @@ -438,6 +440,7 @@ ** CUA mode ++++ *** CUA mode now uses `delete-selection-mode' and `shift-select-mode'. Hence, you can now enable it independently from those modes, and from `transient-mark-mode'. @@ -446,7 +449,9 @@ *** `cua-highlight-region-shift-only' is now obsolete. You can disable `transient-mark-mode' to get the same result. -*** CUA's rectangles can now be used via `cua-rectangle-mark-mode'. ++++ +*** CUA's rectangles can now be used without CUA by calling the command +`cua-rectangle-mark-mode'. ** CFEngine mode @@ -482,6 +487,7 @@ ** Electric Pair mode ++++ *** New option `electric-pair-preserve-balance', enabled by default. If non-nil, pairing/skipping only kicks in when that help the balance of parentheses and quotes, i.e. the buffer should end up at least as @@ -490,21 +496,25 @@ You can further control this behavior by adjusting the predicates stored in `electric-pair-inhibit-predicate' and `electric-pair-skip-self'. ++++ *** New option `electric-pair-delete-adjacent-pairs', enabled by default. In `electric-pair-mode', the commands `backward-delete-char' and `backward-delete-char-untabify' are now bound to electric variants that delete the closer when invoked between adjacent pairs. ++++ *** New option `electric-pair-open-newline-between-pairs', enabled by default. In `electric-pair-mode', inserting a newline between adjacent pairs opens an extra newline after point, which is indented if `electric-indent-mode' is also set. ++++ *** New option `electric-pair-skip-whitespace', enabled by default. This controls if skipping over closing delimiters should jump over any whitespace slack. Setting it to `chomp' makes it delete this whitespace. See also the variable `electric-pair-skip-whitespace-chars'. +--- *** New variables control the pairing in strings and comments. You can customize `electric-pair-text-pairs' and `electric-pair-text-syntax-table' to tweak pairing behavior inside ------------------------------------------------------------ revno: 116459 committer: Daniel Colascione branch nick: trunk timestamp: Mon 2014-02-17 08:30:09 -0800 message: Fix last dbus change diff: === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2014-02-17 11:41:42 +0000 +++ lisp/net/dbus.el 2014-02-17 16:30:09 +0000 @@ -283,7 +283,9 @@ (let ((event (let ((inhibit-redisplay t) unread-command-events) (read-event nil nil check-interval)))) (when event - (push event unread-command-events)) + (setf unread-command-events + (nconc unread-command-events + (cons event nil)))) (when (< check-interval 1) (setf check-interval (* check-interval 1.05)))))) ------------------------------------------------------------ revno: 116458 fixes bug: http://debbugs.gnu.org/16748 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2014-02-17 17:01:43 +0100 message: lisp/frameset.el: Fix bug#16748. * lisp/frameset.el (frameset-cfg-id): New function. (frameset--reuse-frame, frameset-restore): Use it. (frameset--jump-to-register): Try harder to reuse frames. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-17 15:29:15 +0000 +++ lisp/ChangeLog 2014-02-17 16:01:43 +0000 @@ -1,3 +1,9 @@ +2014-02-17 Juanma Barranquero + + * frameset.el (frameset-cfg-id): New function. + (frameset--reuse-frame, frameset-restore): Use it. + (frameset--jump-to-register): Try harder to reuse frames (bug#16748). + 2014-02-17 Stefan Monnier * ido.el (ido-file-internal): Remove unused var `d'. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2014-02-15 04:16:46 +0000 +++ lisp/frameset.el 2014-02-17 16:01:43 +0000 @@ -682,6 +682,11 @@ (mapconcat (lambda (n) (format "%04X" n)) (cl-loop repeat 4 collect (random 65536)) "-")))) + +(defun frameset-cfg-id (frame-cfg) + "Return the frame id for frame configuration FRAME-CFG." + (cdr (assq 'frameset--id frame-cfg))) + ;;;###autoload (defun frameset-frame-id (frame) "Return the frame id of FRAME, if it has one; else, return nil. @@ -900,7 +905,7 @@ (setq frame (frameset--find-frame-if (lambda (f id) (frameset-frame-id-equal-p f id)) - display (cdr (assq 'frameset--id parameters)))) + display (frameset-cfg-id parameters))) ;; 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 parameters)) 'only)) @@ -921,8 +926,7 @@ (frameset-frame-id-equal-p (window-frame (minibuffer-window f)) mini-id)))) - display - (cdr (assq 'frameset--id parameters)) (cdr mini)))) + display (frameset-cfg-id parameters) (cdr mini)))) (t ;; Default to just finding a frame in the same display. (setq frame (frameset--find-frame-if nil display)))) @@ -1136,7 +1140,7 @@ ;; frameset--id from the non-reusable frame, which is not useful anymore. (when (and other-frames (or (eq reuse-frames :keep) (consp reuse-frames))) - (let ((dup (frameset-frame-with-id (cdr (assq 'frameset--id frame-cfg)) + (let ((dup (frameset-frame-with-id (frameset-cfg-id frame-cfg) other-frames))) (when dup (set-frame-parameter dup 'frameset--id nil)))) @@ -1207,20 +1211,33 @@ (defun frameset--jump-to-register (data) "Restore frameset from DATA stored in register. Called from `jump-to-register'. Internal use only." - (let* ((delete (and current-prefix-arg t)) - (iconify-list (if delete nil (frame-list)))) - (frameset-restore (aref data 0) + (let ((fs (aref data 0)) + reuse-frames iconify-list) + (if current-prefix-arg + ;; Reuse all frames and delete any left unused + (setq reuse-frames t) + ;; Reuse matching frames and leave others to be iconified + (setq iconify-list (frame-list)) + (dolist (state (frameset-states fs)) + (let ((frame (frameset-frame-with-id (frameset-cfg-id (car state)) + iconify-list))) + (when frame + (push frame reuse-frames) + (setq iconify-list (delq frame iconify-list)))))) + (frameset-restore fs :filters frameset-session-filter-alist - :reuse-frames (if delete t :keep)) - (mapc #'iconify-frame iconify-list) - (let ((frame (frameset-frame-with-id (aref data 1))) - buffer window) - (when frame - (select-frame-set-input-focus frame) - (when (and (buffer-live-p (setq buffer (marker-buffer (aref data 2)))) - (window-live-p (setq window (get-buffer-window buffer frame)))) - (set-frame-selected-window frame window) - (with-current-buffer buffer (goto-char (aref data 2)))))))) + :reuse-frames reuse-frames) + (mapc #'iconify-frame iconify-list)) + + ;; Restore selected frame, buffer and point. + (let ((frame (frameset-frame-with-id (aref data 1))) + buffer window) + (when frame + (select-frame-set-input-focus frame) + (when (and (buffer-live-p (setq buffer (marker-buffer (aref data 2)))) + (window-live-p (setq window (get-buffer-window buffer frame)))) + (set-frame-selected-window frame window) + (with-current-buffer buffer (goto-char (aref data 2))))))) ;;;###autoload (defun frameset-to-register (register) ------------------------------------------------------------ revno: 116457 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2014-02-17 10:29:15 -0500 message: * lisp/ido.el (ido-file-internal): Remove unused var `d'. Use \` for to match BoS. Fit within 80n columns. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-17 11:41:42 +0000 +++ lisp/ChangeLog 2014-02-17 15:29:15 +0000 @@ -1,3 +1,8 @@ +2014-02-17 Stefan Monnier + + * ido.el (ido-file-internal): Remove unused var `d'. + Use \` for to match BoS. Fit within 80n columns. + 2014-02-17 Daniel Colascione * net/dbus.el (dbus-call-method): Work around bug#16775 by having @@ -24,8 +29,7 @@ * progmodes/sql.el: Version 3.4 (sql-oracle-options): New default value ("-L"). - (sql-mode-oracle-font-lock-keywords): Added placeholder - highlighting. + (sql-mode-oracle-font-lock-keywords): Add placeholder highlighting. (sql-placeholders-filter): Correct placeholder pattern. (sql-read-table-name): Bug fix. Detect absence of SQLi process. (sql-login-delay): New variable. === modified file 'lisp/ido.el' --- lisp/ido.el 2014-02-16 04:15:47 +0000 +++ lisp/ido.el 2014-02-17 15:29:15 +0000 @@ -430,10 +430,10 @@ ;; (with-current-buffer name ;; (derived-mode-p 'c-mode))) ;; -;;(setq ido-ignore-buffers '("^ " ido-ignore-c-mode)) +;;(setq ido-ignore-buffers '("\\` " ido-ignore-c-mode)) ;; Examples for setting the value of ido-ignore-files -;;(setq ido-ignore-files '("^ " "\\.c\\'" "\\.h\\'")) +;;(setq ido-ignore-files '("\\` " "\\.c\\'" "\\.h\\'")) (defcustom ido-default-file-method 'raise-frame "How to visit a new file when using `ido-find-file'. @@ -2356,8 +2356,8 @@ (ido-directory-too-big-p ido-current-directory)))) (when (and (eq item 'file) - (or ido-use-url-at-point ido-use-filename-at-point)) - (let (fn d) + (or ido-use-url-at-point ido-use-filename-at-point)) + (let (fn) (require 'ffap) ;; Duplicate code from ffap-guesser as we want different ;; behavior for files and URLs. @@ -2375,17 +2375,19 @@ (if (eq ido-use-filename-at-point 'guess) (ffap-guesser) (ffap-string-at-point)))) - (not (string-match "^http:/" fn))) + (not (string-match "\\`http:/" fn))) (let ((absolute-fn (expand-file-name fn))) (cond ((file-directory-p absolute-fn) - (setq ido-current-directory (file-name-as-directory absolute-fn))) + (setq ido-current-directory + (file-name-as-directory absolute-fn))) ((file-directory-p (file-name-directory absolute-fn)) (setq ido-current-directory (file-name-directory absolute-fn)) (setq initial (file-name-nondirectory absolute-fn))))))))) (let (ido-saved-vc-hb - (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) + (vc-handled-backends (and (boundp 'vc-handled-backends) + vc-handled-backends)) (ido-work-directory-index -1) (ido-work-file-index -1) (ido-find-literal nil)) @@ -2393,11 +2395,13 @@ (unless filename (setq ido-saved-vc-hb vc-handled-backends) (let ((minibuffer-completing-file-name t)) - (setq filename (ido-read-internal item - (or prompt "Find file: ") - 'ido-file-history - (and (eq method 'alt-file) buffer-file-name) - (confirm-nonexistent-file-or-buffer) initial)))) + (setq filename + (ido-read-internal item + (or prompt "Find file: ") + 'ido-file-history + (and (eq method 'alt-file) buffer-file-name) + (confirm-nonexistent-file-or-buffer) + initial)))) ;; Choose the file name: either the text typed in, or the head ;; of the list of matches @@ -2414,11 +2418,13 @@ ((eq ido-exit 'switch-to-buffer) (ido-buffer-internal - (if (memq method '(other-window other-frame)) method ido-default-buffer-method) + (if (memq method '(other-window other-frame)) + method ido-default-buffer-method) nil nil nil ido-text)) ((eq ido-exit 'insert-buffer) - (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " nil ido-text 'ido-enter-insert-file)) + (ido-buffer-internal 'insert 'insert-buffer "Insert buffer: " + nil ido-text 'ido-enter-insert-file)) ((eq ido-exit 'dired) (funcall (cond ((eq method 'other-window) 'dired-other-window) @@ -2438,7 +2444,8 @@ ((memq method '(dired list-directory)) (if (equal filename ".") (setq filename "")) - (let* ((dirname (ido-final-slash (concat ido-current-directory filename) t)) + (let* ((dirname (ido-final-slash + (concat ido-current-directory filename) t)) (file (substring dirname 0 -1))) (cond ((file-directory-p dirname) @@ -2459,7 +2466,8 @@ (ido-record-command method dirname) (ido-record-work-directory) (funcall method dirname)) - ((y-or-n-p (format "Directory %s does not exist. Create it? " filename)) + ((y-or-n-p (format "Directory %s does not exist. Create it? " + filename)) (ido-record-command method dirname) (ido-record-work-directory dirname) (make-directory-internal dirname) @@ -2505,7 +2513,8 @@ (ido-record-command 'find-file filename) (add-to-history 'file-name-history filename) (ido-record-work-directory) - (ido-visit-buffer (find-file-noselect filename nil ido-find-literal) method)))))) + (ido-visit-buffer (find-file-noselect filename nil ido-find-literal) + method)))))) (defun ido-existing-item-p () ;; Return non-nil if there is a matching item ------------------------------------------------------------ revno: 116456 committer: Daniel Colascione branch nick: trunk timestamp: Mon 2014-02-17 03:41:42 -0800 message: Improve dbus performance on synchronous calls diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-16 17:23:00 +0000 +++ lisp/ChangeLog 2014-02-17 11:41:42 +0000 @@ -1,3 +1,9 @@ +2014-02-17 Daniel Colascione + + * net/dbus.el (dbus-call-method): Work around bug#16775 by having + dbus-call-method check for completion using a busy-wait loop with + gradual backoff. + 2013-10-02 Michael Albinus Sync with Tramp 2.2.9. === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2014-01-01 07:43:34 +0000 +++ lisp/net/dbus.el 2014-02-17 11:41:42 +0000 @@ -260,6 +260,7 @@ (signal 'wrong-type-argument (list 'stringp method))) (let ((timeout (plist-get args :timeout)) + (check-interval 0.001) (key (apply 'dbus-message-internal dbus-message-type-method-call @@ -270,13 +271,21 @@ ;; default 25". Events which are not from D-Bus must be restored. ;; `read-event' performs a redisplay. This must be suppressed; it ;; hurts when reading D-Bus events asynchronously. + + ;; Work around bug#16775 by busy-waiting with gradual backoff for + ;; dbus calls to complete. A better aproach would involve either + ;; adding arbitrary wait condition support to read-event or + ;; restructuring dbus as a kind of process object. Poll at most + ;; about once per second for completion. + (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) - (let ((event (let ((inhibit-redisplay t) unread-command-events) - (read-event nil nil 0.1)))) - (when (and event (not (ignore-errors (dbus-check-event event)))) - (setq unread-command-events - (append unread-command-events (list event))))))) + (let ((event (let ((inhibit-redisplay t) unread-command-events) + (read-event nil nil check-interval)))) + (when event + (push event unread-command-events)) + (when (< check-interval 1) + (setf check-interval (* check-interval 1.05)))))) ;; Cleanup `dbus-return-values-table'. Return the result. (prog1 ------------------------------------------------------------ revno: 116455 committer: Michael Albinus branch nick: trunk timestamp: Mon 2014-02-17 08:05:44 +0100 message: * automated/tramp-tests.el (tramp-test28-shell-command): Perform an initial `sit-for' prior the while loop. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-02-16 17:23:00 +0000 +++ test/ChangeLog 2014-02-17 07:05:44 +0000 @@ -1,3 +1,8 @@ +2014-02-17 Michael Albinus + + * automated/tramp-tests.el (tramp-test28-shell-command): Perform + an initial `sit-for' prior the while loop. + 2014-02-16 Michael Albinus Sync with Tramp 2.2.9. === modified file 'test/automated/tramp-tests.el' --- test/automated/tramp-tests.el 2014-02-16 17:23:00 +0000 +++ test/automated/tramp-tests.el 2014-02-17 07:05:44 +0000 @@ -1176,6 +1176,7 @@ (should (file-exists-p tmp-name)) (async-shell-command (format "ls %s" (file-name-nondirectory tmp-name)) (current-buffer)) + (sit-for 1 'nodisplay) (while (ignore-errors (memq (process-status (get-buffer-process (current-buffer))) '(run open))) @@ -1193,6 +1194,7 @@ (process-send-string (get-buffer-process (current-buffer)) (format "%s\n" (file-name-nondirectory tmp-name))) + (sit-for 1 'nodisplay) (while (ignore-errors (memq (process-status (get-buffer-process (current-buffer))) '(run open)))