Now on revision 110917. ------------------------------------------------------------ revno: 110917 fixes bug: http://debbugs.gnu.org/12795 author: Andreas Politz committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-11-17 15:15:23 +0800 message: Fix prefix arg handling in ibuffer marking commands. * ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward) (ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain prefix and negative numeric prefix args. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-17 07:00:35 +0000 +++ lisp/ChangeLog 2012-11-17 07:15:23 +0000 @@ -1,3 +1,9 @@ +2012-11-17 Andreas Politz + + * ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward) + (ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain + prefix and negative numeric prefix args (Bug#12795). + 2012-11-17 Stephen Berman * play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2012-11-11 02:22:26 +0000 +++ lisp/ibuffer.el 2012-11-17 07:15:23 +0000 @@ -1362,24 +1362,27 @@ (defun ibuffer-mark-forward (arg) "Mark the buffer on this line, and move forward ARG lines. If point is on a group name, this function operates on that group." - (interactive "P") - (ibuffer-mark-interactive arg ibuffer-marked-char 1)) + (interactive "p") + (ibuffer-mark-interactive arg ibuffer-marked-char)) (defun ibuffer-unmark-forward (arg) "Unmark the buffer on this line, and move forward ARG lines. If point is on a group name, this function operates on that group." - (interactive "P") - (ibuffer-mark-interactive arg ?\s 1)) + (interactive "p") + (ibuffer-mark-interactive arg ?\s)) (defun ibuffer-unmark-backward (arg) "Unmark the buffer on this line, and move backward ARG lines. If point is on a group name, this function operates on that group." - (interactive "P") - (ibuffer-mark-interactive arg ?\s -1)) + (interactive "p") + (ibuffer-unmark-forward (- arg))) -(defun ibuffer-mark-interactive (arg mark movement) +(defun ibuffer-mark-interactive (arg mark &optional movement) (ibuffer-assert-ibuffer-mode) (or arg (setq arg 1)) + ;; deprecated movement argument + (when (and movement (< movement 0)) + (setq arg (- arg))) (ibuffer-forward-line 0) (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name) (progn @@ -1389,8 +1392,12 @@ (let ((inhibit-read-only t)) (while (> arg 0) (ibuffer-set-mark mark) - (ibuffer-forward-line movement t) - (setq arg (1- arg)))))) + (ibuffer-forward-line 1 t) + (setq arg (1- arg))) + (while (< arg 0) + (ibuffer-forward-line -1 t) + (ibuffer-set-mark mark) + (setq arg (1+ arg)))))) (defun ibuffer-set-mark (mark) (ibuffer-assert-ibuffer-mode) ------------------------------------------------------------ revno: 110916 fixes bug: http://debbugs.gnu.org/12779 author: Stephen Berman committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-11-17 15:00:35 +0800 message: Fix for gamegrid-add-score-with-update-game-score-1. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): Don't signal an error with a score that is too low to add to the list of top scores. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-17 06:48:10 +0000 +++ lisp/ChangeLog 2012-11-17 07:00:35 +0000 @@ -1,3 +1,9 @@ +2012-11-17 Stephen Berman + + * play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): + Don't signal an error with a score that is too low to add to the + list of top scores. (Bug#12779) + 2012-11-17 Chong Yidong * help-mode.el (help-xref-interned): End on point-min (Bug#12737). === modified file 'lisp/play/gamegrid.el' --- lisp/play/gamegrid.el 2012-07-11 23:13:41 +0000 +++ lisp/play/gamegrid.el 2012-11-17 07:00:35 +0000 @@ -560,7 +560,7 @@ (goto-char (point-min)) (search-forward (concat (int-to-string score) " " (user-login-name) " " - marker-string)) + marker-string) nil t) (beginning-of-line))))) (defun gamegrid-add-score-insecure (file score &optional directory) ------------------------------------------------------------ revno: 110915 fixes bug: http://debbugs.gnu.org/12737 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-11-17 14:48:10 +0800 message: * help-mode.el (help-xref-interned): End on point-min. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-17 06:16:46 +0000 +++ lisp/ChangeLog 2012-11-17 06:48:10 +0000 @@ -1,5 +1,7 @@ 2012-11-17 Chong Yidong + * help-mode.el (help-xref-interned): End on point-min (Bug#12737). + * filecache.el (file-cache-add-file): Handle relative file name in the argument (Bug#12694). === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2012-10-12 20:11:50 +0000 +++ lisp/help-mode.el 2012-11-17 06:48:10 +0000 @@ -677,7 +677,8 @@ " is also a " "face." "\n\n" facedoc)) ;; Don't record the `describe-function' item in the stack. (setq help-xref-stack-item nil) - (help-setup-xref (list #'help-xref-interned symbol) nil))))))) + (help-setup-xref (list #'help-xref-interned symbol) nil)))) + (goto-char (point-min))))) ;; Navigation/hyperlinking with xrefs ------------------------------------------------------------ revno: 110914 fixes bug: http://debbugs.gnu.org/12694 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-11-17 14:16:46 +0800 message: * filecache.el (file-cache-add-file): Handle relative file name in the argument. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-16 18:18:07 +0000 +++ lisp/ChangeLog 2012-11-17 06:16:46 +0000 @@ -1,3 +1,8 @@ +2012-11-17 Chong Yidong + + * filecache.el (file-cache-add-file): Handle relative file name in + the argument (Bug#12694). + 2012-11-16 Jürgen Hötzel (tiny change) * eshell/em-unix.el (eshell/mkdir): Handle "--parents" (bug#12897). === modified file 'lisp/filecache.el' --- lisp/filecache.el 2012-11-02 22:44:38 +0000 +++ lisp/filecache.el 2012-11-17 06:16:46 +0000 @@ -310,23 +310,22 @@ (defun file-cache-add-file (file) "Add FILE to the file cache." (interactive "fAdd File: ") - (if (not (file-exists-p file)) - (message "Filecache: file %s does not exist" file) - (let* ((file-name (file-name-nondirectory file)) - (dir-name (file-name-directory file)) - (the-entry (assoc-string - file-name file-cache-alist - file-cache-ignore-case))) - ;; Does the entry exist already? - (if the-entry - (if (or (and (stringp (cdr the-entry)) - (string= dir-name (cdr the-entry))) - (and (listp (cdr the-entry)) - (member dir-name (cdr the-entry)))) - nil - (setcdr the-entry (cons dir-name (cdr the-entry)))) - ;; If not, add it to the cache - (push (list file-name dir-name) file-cache-alist))))) + (setq file (file-truename file)) + (unless (file-exists-p file) + (error "Filecache: file %s does not exist" file)) + (let* ((file-name (file-name-nondirectory file)) + (dir-name (file-name-directory file)) + (the-entry (assoc-string file-name file-cache-alist + file-cache-ignore-case))) + ;; Does the entry exist already? + (if the-entry + (unless (or (and (stringp (cdr the-entry)) + (string= dir-name (cdr the-entry))) + (and (listp (cdr the-entry)) + (member dir-name (cdr the-entry)))) + (setcdr the-entry (cons dir-name (cdr the-entry)))) + ;; If not, add it to the cache + (push (list file-name dir-name) file-cache-alist)))) ;;;###autoload (defun file-cache-add-directory-using-find (directory) ------------------------------------------------------------ revno: 110913 fixes bug: http://debbugs.gnu.org/12908 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2012-11-16 20:54:42 +0200 message: Fix bug #12908 with documentation of emacs_backtrace.txt on MS-Windows. doc/emacs/trouble.texi (Crashing): Add information about MS-Windows and the emacs_backtrace.txt file. etc/NEWS: Mention emacs_backtrace.txt. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-11-13 02:25:59 +0000 +++ doc/emacs/ChangeLog 2012-11-16 18:54:42 +0000 @@ -1,3 +1,8 @@ +2012-11-16 Eli Zaretskii + + * trouble.texi (Crashing): Add information about MS-Windows and + the emacs_backtrace.txt file. (Bug#12908) + 2012-11-13 Chong Yidong * building.texi (Multithreaded Debugging): gdb-stopped-hooks is === modified file 'doc/emacs/trouble.texi' --- doc/emacs/trouble.texi 2012-11-08 10:35:40 +0000 +++ doc/emacs/trouble.texi 2012-11-16 18:54:42 +0000 @@ -282,18 +282,23 @@ @subsection When Emacs Crashes @cindex crash report +@cindex backtrace +@cindex @file{emacs_backtrace.txt} file, MS-Windows Emacs is not supposed to crash, but if it does, it produces a @dfn{crash report} prior to exiting. The crash report is printed to the standard error stream. If Emacs was started from a graphical -desktop, the standard error stream is commonly redirected to a file -such as @file{~/.xsession-errors}, so you can look for the crash -report there. +desktop on a GNU or Unix system, the standard error stream is commonly +redirected to a file such as @file{~/.xsession-errors}, so you can +look for the crash report there. On MS-Windows, the crash report is +written to a file named @file{emacs_backtrace.txt} in the current +directory of the Emacs process, in addition to the standard error +stream. The format of the crash report depends on the platform. On some platforms, such as those using the GNU C Library, the crash report includes a @dfn{backtrace} describing the execution state prior to crashing, which can be used to help debug the crash. Here is an -example: +example for a GNU system: @example Fatal error 11: Segmentation fault @@ -320,22 +325,24 @@ @example sed -n 's/.*\[\(.*\)]$/\1/p' @var{backtrace} | - addr2line -Cfip -e @var{bindir}/emacs + addr2line -Cfip -e @var{bindir}/@var{emacs-binary} @end example @noindent Here, @var{backtrace} is the name of a text file containing a copy of -the backtrace, and @var{bindir} is the name of the directory that -contains the Emacs executable. +the backtrace, @var{bindir} is the name of the directory that +contains the Emacs executable, and @var{emacs-binary} is the name of +the Emacs executable file, normally @file{emacs} on GNU and Unix +systems and @file{emacs.exe} on MS-Windows and MS-DOS. @cindex core dump - Optionally, Emacs can generate a @dfn{core dump} when it crashes. A -core dump is a file containing voluminous data about the state of the -program prior to the crash, usually examined by loading it into a -debugger such as GDB. On many platforms, core dumps are disabled by -default, and you must explicitly enable them by running the shell -command @samp{ulimit -c unlimited} (e.g.@: in your shell startup -script). + Optionally, Emacs can generate a @dfn{core dump} when it crashes, on +systems that support core files. A core dump is a file containing +voluminous data about the state of the program prior to the crash, +usually examined by loading it into a debugger such as GDB. On many +platforms, core dumps are disabled by default, and you must explicitly +enable them by running the shell command @samp{ulimit -c unlimited} +(e.g.@: in your shell startup script). @node After a Crash @subsection Recovery After a Crash === modified file 'etc/NEWS' --- etc/NEWS 2012-11-16 17:20:23 +0000 +++ etc/NEWS 2012-11-16 18:54:42 +0000 @@ -210,7 +210,9 @@ ** Emacs now generates backtraces on fatal errors. On encountering a fatal error, Emacs now outputs a textual description of the fatal signal, and a short backtrace on platforms like glibc -that support backtraces. +that support backtraces, and also on MS-Windows. On Windows, the +backtrace is also written to the 'emacs_backtrace.txt' file in the +directory where Emacs was running. --- ** If your Emacs was built from a bzr checkout, the new variable ------------------------------------------------------------ revno: 110912 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12897 author: Jürgen Hötzel committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-11-16 13:18:07 -0500 message: * lisp/eshell/em-unix.el (eshell/mkdir): Handle "--parents". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-16 18:02:39 +0000 +++ lisp/ChangeLog 2012-11-16 18:18:07 +0000 @@ -1,3 +1,7 @@ +2012-11-16 Jürgen Hötzel (tiny change) + + * eshell/em-unix.el (eshell/mkdir): Handle "--parents" (bug#12897). + 2012-11-16 Stefan Monnier * emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix. === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2012-09-09 21:11:14 +0000 +++ lisp/eshell/em-unix.el 2012-11-16 18:18:07 +0000 @@ -306,12 +306,13 @@ (eshell-eval-using-options "mkdir" args '((?h "help" nil nil "show this usage screen") + (?p "parents" nil em-parents "make parent directories as needed") :external "mkdir" :show-usage :usage "[OPTION] DIRECTORY... Create the DIRECTORY(ies), if they do not already exist.") (while args - (eshell-funcalln 'make-directory (car args)) + (eshell-funcalln 'make-directory (car args) em-parents) (setq args (cdr args))) nil)) ------------------------------------------------------------ revno: 110911 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-11-16 13:02:39 -0500 message: * lisp/emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-16 17:20:23 +0000 +++ lisp/ChangeLog 2012-11-16 18:02:39 +0000 @@ -1,5 +1,7 @@ 2012-11-16 Stefan Monnier + * emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix. + * emacs-lisp/cl-lib.el: Set more meaningful version number. 2012-11-16 Martin Rudalics === modified file 'lisp/emacs-lisp/advice.el' --- lisp/emacs-lisp/advice.el 2012-11-15 04:42:14 +0000 +++ lisp/emacs-lisp/advice.el 2012-11-16 18:02:39 +0000 @@ -2596,7 +2596,9 @@ (ad-has-redefining-advice function)) (let* ((origdef (ad-real-orig-definition function)) ;; Construct the individual pieces that we need for assembly: - (orig-arglist (and origdef (ad-arglist origdef))) + (orig-arglist (let ((args (ad-arglist origdef))) + ;; The arglist may still be unknown. + (if (listp args) args '(&rest args)))) (advised-arglist (or (ad-advised-arglist function) orig-arglist)) (interactive-form (ad-advised-interactive-form function)) === modified file 'test/automated/advice-tests.el' --- test/automated/advice-tests.el 2012-11-13 14:12:46 +0000 +++ test/automated/advice-tests.el 2012-11-16 18:02:39 +0000 @@ -80,6 +80,13 @@ (sm-test5 6) 100.1) ((advice-remove 'sm-test5 (lambda (f y) (* (funcall f y) 5))) (sm-test5 6) 20.1) + + ;; This used to signal an error (bug#12858). + ((autoload 'sm-test6 "foo") + (defadvice sm-test6 (around test activate) + ad-do-it) + t t) + )) (ert-deftest advice-tests () ------------------------------------------------------------ revno: 110910 [merge] committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-11-16 09:20:23 -0800 message: Merge from emacs-24; up to r110887 diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-11-15 14:17:11 +0000 +++ doc/lispref/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,22 @@ +2012-11-16 Martin Rudalics + + * windows.texi (Choosing Window): Rewrite description of + display-buffer-alist (Bug#12167). + (Display Action Functions): Mention inhibit-switch-frame. Fix + description of display-buffer-below-selected. Reorder actions. + Add example (Bug#12848). + +2012-11-16 Glenn Morris + + * display.texi (Face Attributes): Fix :underline COLOR description. + (Attribute Functions): Update for set-face-underline rename. + Tweak descriptions of face-underline-p, face-inverse-video-p. + + * keymaps.texi (Searching Keymaps, Tool Bar): Untabify examples, + so they align better in info. + (Active Keymaps, Searching Keymaps, Controlling Active Maps): + Document set-temporary-overlay-map. + 2012-11-15 Stefan Monnier * keymaps.texi (Translation Keymaps): Add a subsection "Interaction === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2012-10-27 05:03:52 +0000 +++ doc/lispref/display.texi 2012-11-15 07:30:46 +0000 @@ -2009,12 +2009,11 @@ Underline with the foreground color of the face. @item @var{color} -Underline in color @var{color}; which should be either a string -specifying a color, or the symbol @code{foreground-color}, meaning the -foreground color of the face. +Underline in color @var{color}, a string specifying a color. @item @code{(:color @var{color} :style @var{style})} -@var{color} is as described above. Omitting the attribute +@var{color} is either a string, or the symbol @code{foreground-color}, +meaning the foreground color of the face. Omitting the attribute @code{:color} means to use the foreground color of the face. @var{style} should be a symbol @code{line} or @code{wave}, meaning to use a straight or wavy line. Omitting the attribute @code{:style} @@ -2404,7 +2403,7 @@ @var{italic-p} is @code{nil}, and to @var{italic} otherwise. @end defun -@defun set-face-underline-p face underline &optional frame +@defun set-face-underline face underline &optional frame This sets the @code{:underline} attribute of @var{face} to @var{underline}. @end defun @@ -2467,12 +2466,16 @@ @code{nil} otherwise. @end defun +@c Note the weasel words. A face that inherits from an underlined +@c face but does not specify :underline will return nil. @defun face-underline-p face &optional frame -This function returns the @code{:underline} attribute of face @var{face}. +This function returns non-@code{nil} if face @var{face} specifies +a non-@code{nil} @code{:underline} attribute. @end defun @defun face-inverse-video-p face &optional frame -This function returns the @code{:inverse-video} attribute of face @var{face}. +This function returns non-@code{nil} if face @var{face} specifies +a non-@code{nil} @code{:inverse-video} attribute. @end defun @node Displaying Faces === modified file 'doc/lispref/keymaps.texi' --- doc/lispref/keymaps.texi 2012-11-15 14:17:11 +0000 +++ doc/lispref/keymaps.texi 2012-11-16 17:20:23 +0000 @@ -664,7 +664,9 @@ The highest precedence normal keymap comes from the @code{keymap} text or overlay property. If that is non-@code{nil}, it is the first -keymap to be processed, in normal circumstances. +keymap to be processed, in normal circumstances. Next comes +any keymap added by the function @code{set-temporary-overlay-map}. +@xref{Controlling Active Maps}. However, there are also special ways for programs to substitute other keymaps for some of those. The variable @@ -753,12 +755,13 @@ (overriding-local-map (@var{find-in} overriding-local-map)) ((or (@var{find-in} (get-char-property (point) 'keymap)) - (@var{find-in-any} emulation-mode-map-alists) - (@var{find-in-any} minor-mode-overriding-map-alist) - (@var{find-in-any} minor-mode-map-alist) - (if (get-text-property (point) 'local-map) - (@var{find-in} (get-char-property (point) 'local-map)) - (@var{find-in} (current-local-map)))))) + (@var{find-in} @var{temp-map}) + (@var{find-in-any} emulation-mode-map-alists) + (@var{find-in-any} minor-mode-overriding-map-alist) + (@var{find-in-any} minor-mode-map-alist) + (if (get-text-property (point) 'local-map) + (@var{find-in} (get-char-property (point) 'local-map)) + (@var{find-in} (current-local-map)))))) (@var{find-in} (current-global-map))) @end lisp @@ -770,7 +773,8 @@ symbolic prefix event followed by a mouse event, that event's position is used instead of point and the current buffer. Mouse events on an embedded string use non-@code{nil} text properties from that string -instead of the buffer. +instead of the buffer. @var{temp-map} is a pseudo variable that +represents the effect of a @code{set-temporary-overlay-map} call. When a match is found (@pxref{Key Lookup}), if the binding in the keymap is a function, the search is over. However if the keymap entry @@ -950,6 +954,21 @@ @code{minor-mode-overriding-map-alist}. @end defvar +@defun set-temporary-overlay-map keymap &optional keep +This function adds @var{keymap} as a temporary keymap that takes +precedence over most other keymaps. It does not take precedence over +the ``overriding'' maps (see above); and unlike them, if no match for +a key is found in @var{keymap}, the search continues. + +Normally, @var{keymap} is used only once. If the optional argument +@var{pred} is @code{t}, the map stays active if a key from @var{keymap} +is used. @var{pred} can also be a function of no arguments: if it returns +non-@code{nil} then @var{keymap} stays active. + +For a pseudo-Lisp description of exactly how and when this keymap applies, +@pxref{Searching Keymaps}. +@end defun + @node Key Lookup @section Key Lookup @cindex key lookup @@ -2648,8 +2667,8 @@ @example (global-set-key [tool-bar] - `(menu-item ,(purecopy "tool bar") ignore - :filter tool-bar-make-keymap)) + `(menu-item ,(purecopy "tool bar") ignore + :filter tool-bar-make-keymap)) @end example @noindent === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2012-11-14 05:07:33 +0000 +++ doc/lispref/windows.texi 2012-11-16 17:20:23 +0000 @@ -1766,6 +1766,7 @@ unless @var{norecord} is non-@code{nil}. @end deffn + @node Choosing Window @section Choosing a Window for Display @@ -1851,10 +1852,14 @@ @end defvar @defopt display-buffer-alist -The value of this option is an alist mapping regular expressions to -display actions. If the name of the buffer passed to -@code{display-buffer} matches a regular expression in this alist, then -@code{display-buffer} uses the corresponding display action. +The value of this option is an alist mapping conditions to display +actions. Each condition may be either a regular expression matching a +buffer name or a function that takes two arguments - a buffer name and +the @var{action} argument passed to @code{display-buffer}. If the name +of the buffer passed to @code{display-buffer} either matches a regular +expression in this alist or the function specified by a condition +returns non-@code{nil}, then @code{display-buffer} uses the +corresponding display action to display the buffer. @end defopt @defopt display-buffer-base-action @@ -1868,6 +1873,7 @@ @code{display-buffer} if no other display actions are given. @end defvr + @node Display Action Functions @section Action Functions for @code{display-buffer} @@ -1911,8 +1917,9 @@ @code{pop-up-frames} is non-@code{nil}, it searches all frames on the current terminal. @xref{Choosing Window Options}. -If this function chooses a window on another frame, it makes that -frame visible and raises it if necessary. +If this function chooses a window on another frame, it makes that frame +visible and, unless @var{alist} contains an @code{inhibit-switch-frame} +entry (@pxref{Choosing Window Options}), raises that frame if necessary. @end defun @defun display-buffer-pop-up-frame buffer alist @@ -1976,16 +1983,12 @@ @code{unsplittable} frame parameter; @pxref{Buffer Parameters}). @end defun -@defun display-buffer-use-some-window buffer alist -This function tries to display @var{buffer} by choosing an existing -window and displaying the buffer in that window. It can fail if all -windows are dedicated to another buffer (@pxref{Dedicated Windows}). -@end defun - @defun display-buffer-below-selected buffer alist This function tries to display @var{buffer} in a window below the -selected window. This means to either split the selected window or -reuse the window below the selected one. +selected window. This means to either split the selected window or use +the window below the selected one. If it does create a new window, it +will also adjust its size provided @var{alist} contains a suitable +@code{window-height} or @code{window-width} entry, see above. @end defun @defun display-buffer-in-previous-window buffer alist @@ -2001,6 +2004,83 @@ methods above, even if that window never showed @var{buffer} before. @end defun +@defun display-buffer-use-some-window buffer alist +This function tries to display @var{buffer} by choosing an existing +window and displaying the buffer in that window. It can fail if all +windows are dedicated to another buffer (@pxref{Dedicated Windows}). +@end defun + +To illustrate the use of action functions, consider the following +example. + +@example +@group +(display-buffer + (get-buffer-create "*foo*") + '((display-buffer-reuse-window + display-buffer-pop-up-window + display-buffer-pop-up-frame) + (reusable-frames . 0) + (window-height . 10) (window-width . 40))) +@end group +@end example + +@noindent +Evaluating the form above will cause @code{display-buffer} to proceed as +follows: If `*foo*' already appears on a visible or iconified frame, it +will reuse its window. Otherwise, it will try to pop up a new window +or, if that is impossible, a new frame. If all these steps fail, it +will try to use some existing window. + + Furthermore, @code{display-buffer} will try to adjust a reused window +(provided `*foo*' was put by @code{display-buffer} there before) or a +popped-up window as follows: If the window is part of a vertical +combination, it will set its height to ten lines. Note that if, instead +of the number ``10'', we specified the function +@code{fit-window-to-buffer}, @code{display-buffer} would come up with a +one-line window to fit the empty buffer. If the window is part of a +horizontal combination, it sets its width to 40 columns. Whether a new +window is vertically or horizontally combined depends on the shape of +the window split and the values of +@code{split-window-preferred-function}, @code{split-height-threshold} +and @code{split-width-threshold} (@pxref{Choosing Window Options}). + + Now suppose we combine this call with a preexisting setup for +`display-buffer-alist' as follows. + +@example +@group +(let ((display-buffer-alist + (cons + '("\\*foo\\*" + (display-buffer-reuse-window display-buffer-below-selected) + (reusable-frames) + (window-height . 5)) + display-buffer-alist))) + (display-buffer + (get-buffer-create "*foo*") + '((display-buffer-reuse-window + display-buffer-pop-up-window + display-buffer-pop-up-frame) + (reusable-frames . 0) + (window-height . 10) (window-width . 40)))) +@end group +@end example + +@noindent +Evaluating this form will cause @code{display-buffer} to first try +reusing a window showing @code{*foo*} on the selected frame. +If no such window exists, it will try to split the selected window or, +if that is impossible, use the window below the selected window. + + If there's no window below the selected one, or the window below the +selected one is dedicated to its buffer, @code{display-buffer} will +proceed as described in the previous example. Note, however, that when +it tries to adjust the height of any reused or popped-up window, it will +in any case try to set its number of lines to ``5'' since that value +overrides the corresponding specification in the @var{action} argument +of @code{display-buffer}. + @node Choosing Window Options @section Additional Options for Displaying Buffers === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-11-13 02:25:59 +0000 +++ doc/misc/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,14 @@ +2012-11-16 Glenn Morris + + * cl.texi (Function Bindings): Clarify that cl-flet is lexical. + (Obsolete Macros): Move example here from Function Bindings. + + * erc.texi: Use @code{nil} rather than just "nil". + (Modules): Undocument obsolete "hecomplete". + Add "notifications". + (Connecting): Add brief section on passwords. + (Options): Make a start by adding erc-hide-list, erc-lurker-hide-list. + 2012-11-13 Glenn Morris * flymake.texi (Customizable variables) === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2012-11-07 22:23:34 +0000 +++ doc/misc/cl.texi 2012-11-16 07:43:24 +0000 @@ -1292,28 +1292,14 @@ accordingly for the duration of the body of the @code{cl-flet}; then the old function definition, or lack thereof, is restored. -You can use @code{cl-flet} to disable or modify the behavior of a -function in a temporary fashion. (Compare this with the idea -of advising functions. +You can use @code{cl-flet} to disable or modify the behavior of +functions (including Emacs primitives) in a temporary, localized fashion. +(Compare this with the idea of advising functions. @xref{Advising Functions,,,elisp,GNU Emacs Lisp Reference Manual}.) -This will even work on Emacs primitives, although note that some calls -to primitive functions internal to Emacs are made without going -through the symbol's function cell, and so will not be affected by -@code{cl-flet}. For example, - -@example -(cl-flet ((message (&rest args) (push args saved-msgs))) - (do-something)) -@end example - -This code attempts to replace the built-in function @code{message} -with a function that simply saves the messages in a list rather -than displaying them. The original definition of @code{message} -will be restored after @code{do-something} exits. This code will -work fine on messages generated by other Lisp code, but messages -generated directly inside Emacs will not be caught since they make -direct C-language calls to the message routines rather than going -through the Lisp @code{message} function. + +The bindings are lexical in scope. This means that all references to +the named functions must appear physically within the body of the +@code{cl-flet} form. Functions defined by @code{cl-flet} may use the full Common Lisp argument notation supported by @code{cl-defun}; also, the function @@ -1321,7 +1307,8 @@ @xref{Program Structure}. Note that the @file{cl.el} version of this macro behaves slightly -differently. @xref{Obsolete Macros}. +differently. In particular, its binding is dynamic rather than +lexical. @xref{Obsolete Macros}. @end defmac @defmac cl-labels (bindings@dots{}) forms@dots{} @@ -4863,6 +4850,25 @@ that @code{flet} affects indirect calls to a function as well as calls directly inside the @code{flet} form itself. +This will even work on Emacs primitives, although note that some calls +to primitive functions internal to Emacs are made without going +through the symbol's function cell, and so will not be affected by +@code{flet}. For example, + +@example +(flet ((message (&rest args) (push args saved-msgs))) + (do-something)) +@end example + +This code attempts to replace the built-in function @code{message} +with a function that simply saves the messages in a list rather +than displaying them. The original definition of @code{message} +will be restored after @code{do-something} exits. This code will +work fine on messages generated by other Lisp code, but messages +generated directly inside Emacs will not be caught since they make +direct C-language calls to the message routines rather than going +through the Lisp @code{message} function. + @c Bug#411. Note that many primitives (e.g.@: @code{+}) have special byte-compile handling. Attempts to redefine such functions using @code{flet} will === modified file 'doc/misc/erc.texi' --- doc/misc/erc.texi 2012-10-06 01:42:02 +0000 +++ doc/misc/erc.texi 2012-11-13 08:16:58 +0000 @@ -390,11 +390,6 @@ @item fill Wrap long lines -@cindex modules, hecomplete -@item hecomplete -Complete nicknames and commands (old). This is the old module---you -might prefer the ``completion'' module instead. - @cindex modules, identd @item identd Launch an identd server on port 8113 @@ -427,6 +422,11 @@ @item notify Notify when the online status of certain users changes +@cindex modules, notifications +@item notifications +Send you a notification when you get a private message, +or your nickname is mentioned + @cindex modules, page @item page Process CTCP PAGE requests from IRC @@ -530,7 +530,7 @@ @defun erc-compute-server &optional server Return an IRC server name. -This tries a number of increasingly more default methods until a non-nil +This tries a number of increasingly more default methods until a non-@code{nil} value is found. @itemize @bullet @@ -542,7 +542,7 @@ @end defun -@defopt erc-server nil +@defopt erc-server IRC server to use if one is not provided. @end defopt @@ -551,7 +551,7 @@ @defun erc-compute-port &optional port Return a port for an IRC server. -This tries a number of increasingly more default methods until a non-nil +This tries a number of increasingly more default methods until a non-@code{nil} value is found. @itemize @bullet @@ -574,7 +574,7 @@ Return user's IRC nick. This tries a number of increasingly more default methods until a -non-nil value is found. +non-@code{nil} value is found. @itemize @item @var{nick} (the argument passed to this function) @@ -598,19 +598,43 @@ @end defopt @defopt erc-try-new-nick-p -If the nickname you chose isn't available, and this option is non-nil, +If the nickname you chose isn't available, and this option is non-@code{nil}, ERC should automatically attempt to connect with another nickname. You can manually set another nickname with the /NICK command. @end defopt +@subheading Password +@cindex password + +@defopt erc-prompt-for-password +If non-@code{nil} (the default), @kbd{M-x erc} prompts for a password. +@end defopt + +If you prefer, you can set this option to @code{nil} and use the +@code{auth-source} mechanism to store your password. For instance, if +you use @file{~/.authinfo} as your auth-source backend, then put +something like the following in that file: + +@example +machine irc.example.net login "#fsf" password sEcReT +@end example + +@noindent +ERC also consults @code{auth-source} to find any channel keys required +for the channels that you wish to autojoin, as specified by the +variable @code{erc-autojoin-channels-alist}. + +For more details, @pxref{Top,,auth-source, auth, Emacs auth-source Library}. + + @subheading Full name @defun erc-compute-full-name &optional full-name Return user's full name. This tries a number of increasingly more default methods until a -non-nil value is found. +non-@code{nil} value is found. @itemize @bullet @item @var{full-name} (the argument passed to this function) @@ -713,10 +737,24 @@ @c PRE5_4: (Node) Document every ERC option (module options go in @c previous chapter) -This section has not yet been written. For now, the easiest way to -check out the available options for ERC is to do +This section is extremely incomplete. For now, the easiest way to +check out all the available options for ERC is to do @kbd{M-x customize-group erc RET}. +@defopt erc-hide-list +If non, @code{nil}, this is a list of IRC message types to hide, e.g. + +@example +(setq erc-hide-list '("JOIN" "PART" "QUIT")) +@end example +@end defopt + +@defopt erc-lurker-hide-list +Like @code{erc-hide-list}, but only applies to messages sent by +lurkers. The function @code{erc-lurker-p} determines whether a given +nickname is considerd a lurker. +@end defopt + @node Getting Help and Reporting Bugs @chapter Getting Help and Reporting Bugs === modified file 'etc/NEWS' --- etc/NEWS 2012-11-13 14:12:46 +0000 +++ etc/NEWS 2012-11-16 17:20:23 +0000 @@ -361,6 +361,8 @@ +++ *** `cl-flet' is not like `flet' (which is deprecated). Instead it obeys the behavior of Common-Lisp's `flet'. +In particular, in cl-flet function definitions are lexically scoped, +whereas in flet the scoping is dynamic. +++ *** `cl-labels' is slightly different from `labels'. @@ -475,13 +477,19 @@ ** ERC -*** New package `erc-desktop-notifications.el', which can send a notification -when you receive a private message or your nickname is mentioned. ++++ +*** New module "notifications", which can send a notification when you +receive a private message or your nickname is mentioned. ++++ *** ERC will look up server/channel names via auth-source and use any channel keys found. +++ +*** New option `erc-lurker-hide-list', similar to `erc-hide-list', but +only applies to messages sent by lurkers. + ++++ ** Flymake uses fringe bitmaps to indicate errors and warnings. See `flymake-fringe-indicator-position', `flymake-error-bitmap' and `flymake-warning-bitmap'. @@ -668,8 +676,7 @@ ** winner-mode-hook now runs when the mode is disabled, as well as when it is enabled. -** FIXME something happened to ses.el, 2012-04-17. - ++++ ** Hooks renamed to avoid obsolete "-hooks" suffix: *** semantic-lex-reset-hooks -> semantic-lex-reset-functions *** semantic-change-hooks -> semantic-change-functions @@ -849,6 +856,12 @@ *** New function `completion-table-subvert' to use an existing completion table, but with a different prefix. +FIXME? +*** There are several other completion-table- functions that never got +added to NEWS or documented: completion-table-case-fold (24.1), +completion-table-with-context (23,1), completion-table-with-terminator (23.1), +completion-table-with-predicate (23.1), completion-table-in-turn (23.1) + ** Debugger changes +++ @@ -879,8 +892,12 @@ *** `temp-buffer-resize-mode' no longer resizes windows that have been reused. -*** New function `fit-frame-to-buffer' and new options -`fit-frame-to-buffer' and `fit-frame-to-buffer-bottom-margin'. +*** New command `fit-frame-to-buffer' adjusts the frame height to +fit the contents. + +*** The command `fit-window-to-buffer' can adjust the frame height +if the new option `fit-frame-to-buffer' is non-nil. + +++ *** New option switch-to-buffer-preserve-window-point to restore a window's point when switching buffers. @@ -968,7 +985,9 @@ *** `function-get' fetches a function property, following aliases. +++ *** `posnp' tests if an object is a `posn'. -*** `set-temporary-overlay-map' sets up a temporary overlay map. ++++ +*** `set-temporary-overlay-map' sets up a temporary keymap that +takes precedence over most other maps for a short while (normally one key). +++ *** `system-users' returns the user names on the system. +++ @@ -982,8 +1001,8 @@ +++ ** New fringe bitmap `exclamation-mark'. ++++ ** Face underlining can now use a wave. -See the "Face Attributes" section of the Elisp manual. ** The following functions and variables are obsolete: --- === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-15 23:31:37 +0000 +++ lisp/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,65 @@ +2012-11-16 Stefan Monnier + + * emacs-lisp/cl-lib.el: Set more meaningful version number. + +2012-11-16 Martin Rudalics + + * window.el (enlarge-window, shrink-window): Don't mention return + value in doc-string (Bug#12896). + (window--display-buffer): Don't resize frames - it won't work + with all window managers and defeat pop-up-frame-alist. + (display-buffer-alist): In doc-string explain that CONDITION can + be a function and which arguments are passed to it (Bug#12854). + (display-buffer-assq-regexp): New argument ACTION. Handle lambda + expressions (Bug#12854). + (display-buffer): Pass ACTION argument to + display-buffer-assq-regexp. + +2012-11-16 Glenn Morris + + * window.el (fit-frame-to-buffer-bottom-margin) + (fit-frame-to-buffer, fit-window-to-buffer): Doc fixes. + + * faces.el (face-underline-p): Use face-attribute-specified-or. + +2012-11-16 Juanma Barranquero + + * emacs-lisp/cl-macs.el (cl-loop, cl-do, cl-do*): Doc fixes. + +2012-11-16 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl-flet, cl-flet*): Fix docstring (bug#12895). + +2012-11-16 Glenn Morris + + * eshell/em-cmpl.el (eshell-pcomplete): New command. (Bug#12838) + (eshell-cmpl-initialize): Bind eshell-pcomplete to TAB, C-i. + + * faces.el (face-underline-p): Doc fix. Handle :underline being + things other than `t' (a string, a list). + (face-inverse-video-p): Doc fix. + (set-face-underline): Rename it back from set-face-underline-p. + Doc fix. Allow interactive input of values other than t. + (read-face-attribute): Apply formatting to :underline, + since like :box and :stipple it can take list values. + + * term.el (ansi-term): Don't let C-x escape-char binding + clobber the more standard C-c binding. (Bug#12842) + + * subr.el (set-temporary-overlay-map): Doc fix. + +2012-11-16 Martin Rudalics + + * window.el (record-window-buffer) + (display-buffer-record-window): When copying the markers to + window-point preserve window-point-insertion-type. (Bug#12588) + +2012-11-16 Glenn Morris + + * emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke): + * net/tramp-gvfs.el (tramp-gvfs-dbus-event-error): + Use new names for hooks rather than obsolete aliases. + 2012-11-15 Daniel Colascione * term/w32-win.el (w32-handle-dropped-file): Use a "file://" === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2012-10-23 15:06:07 +0000 +++ lisp/arc-mode.el 2012-11-13 03:11:46 +0000 @@ -96,7 +96,7 @@ ;; ;; archive-mode-hook ;; archive-foo-mode-hook -;; archive-extract-hooks +;; archive-extract-hook ;;; Code: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-11-13 02:25:59 +0000 +++ lisp/cedet/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,24 @@ +2012-11-16 David Engster + + * semantic/symref/list.el (semantic-symref-symbol): Use + `semantic-complete-read-tag-project' instead of + `semantic-complete-read-tag-buffer-deep', since the latter is not + working correctly. + + * semantic/symref.el (semantic-symref-result-get-tags): Use + `find-buffer-visiting' to follow symbolic links. + + * semantic/fw.el (semantic-find-file-noselect): Always set + `enable-local-variables' to `:safe' when loading files. + +2012-11-16 Glenn Morris + + * semantic/lex-spp.el (semantic-lex-spp-lex-text-string): + * semantic/util.el (semantic-describe-buffer): + * semantic/bovine/c.el (semantic-c-parse-lexical-token) + (semantic-default-c-setup): + Use new names for hooks rather than obsolete aliases. + 2012-11-13 Stefan Monnier * semantic/mru-bookmark.el (semantic-mru-bookmark-mode): === modified file 'lisp/cedet/semantic/bovine/c.el' --- lisp/cedet/semantic/bovine/c.el 2012-10-05 05:57:24 +0000 +++ lisp/cedet/semantic/bovine/c.el 2012-11-13 03:11:46 +0000 @@ -931,8 +931,8 @@ (setq semantic-new-buffer-fcn-was-run t) (semantic-lex-init) (semantic-clear-toplevel-cache) - (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook - t) + (remove-hook 'semantic-lex-reset-functions + 'semantic-lex-spp-reset-hook t) ) ;; Get the macro symbol table right. (setq semantic-lex-spp-dynamic-macro-symbol-obarray spp-syms) @@ -2073,7 +2073,7 @@ ) (setq semantic-lex-analyzer #'semantic-c-lexer) - (add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t) + (add-hook 'semantic-lex-reset-functions 'semantic-lex-spp-reset-hook nil t) (when (eq major-mode 'c++-mode) (add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__cplusplus" . ""))) ) === modified file 'lisp/cedet/semantic/fw.el' --- lisp/cedet/semantic/fw.el 2012-10-05 05:57:24 +0000 +++ lisp/cedet/semantic/fw.el 2012-11-14 20:20:20 +0000 @@ -421,14 +421,7 @@ ;; Don't prompt to insert a template if we visit an empty file (auto-insert nil) ;; We don't want emacs to query about unsafe local variables - (enable-local-variables - (if (featurep 'xemacs) - ;; XEmacs only has nil as an option? - nil - ;; Emacs 23 has the spiffy :safe option, nil otherwise. - (if (>= emacs-major-version 22) - nil - :safe))) + (enable-local-variables :safe) ;; ... or eval variables (enable-local-eval nil) ) === modified file 'lisp/cedet/semantic/lex-spp.el' --- lisp/cedet/semantic/lex-spp.el 2012-10-05 05:57:24 +0000 +++ lisp/cedet/semantic/lex-spp.el 2012-11-13 03:11:46 +0000 @@ -30,7 +30,7 @@ ;; If you use SPP in your language, be sure to specify this in your ;; semantic language setup function: ;; -;; (add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t) +;; (add-hook 'semantic-lex-reset-functions 'semantic-lex-spp-reset-hook nil t) ;; ;; ;; Special Lexical Tokens: @@ -947,8 +947,8 @@ (setq semantic-new-buffer-fcn-was-run t) (semantic-lex-init) (semantic-clear-toplevel-cache) - (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook - t) + (remove-hook 'semantic-lex-reset-functions + 'semantic-lex-spp-reset-hook t) )) ;; Second Cheat: copy key variables regarding macro state from the === modified file 'lisp/cedet/semantic/symref.el' --- lisp/cedet/semantic/symref.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/symref.el 2012-11-14 20:20:20 +0000 @@ -356,7 +356,7 @@ (lambda (hit) (let* ((line (car hit)) (file (cdr hit)) - (buff (get-file-buffer file)) + (buff (find-buffer-visiting file)) (tag nil) ) (cond === modified file 'lisp/cedet/semantic/symref/list.el' --- lisp/cedet/semantic/symref/list.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/symref/list.el 2012-11-14 20:20:20 +0000 @@ -69,7 +69,7 @@ references are organized by file and the name of the function they are used in. Display the references in `semantic-symref-results-mode'." - (interactive (list (semantic-tag-name (semantic-complete-read-tag-buffer-deep + (interactive (list (semantic-tag-name (semantic-complete-read-tag-project "Symrefs for: ")))) (semantic-fetch-tags) (let ((res nil) === modified file 'lisp/cedet/semantic/util.el' --- lisp/cedet/semantic/util.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/util.el 2012-11-13 03:11:46 +0000 @@ -280,7 +280,7 @@ semantic-parser-name semantic-parse-tree-state semantic-lex-analyzer - semantic-lex-reset-hooks + semantic-lex-reset-functions semantic-lex-syntax-modifications ))) (dolist (V vars) === modified file 'lisp/emacs-lisp/checkdoc.el' --- lisp/emacs-lisp/checkdoc.el 2012-10-23 17:09:22 +0000 +++ lisp/emacs-lisp/checkdoc.el 2012-11-13 03:11:46 +0000 @@ -124,7 +124,7 @@ ;; Adding your own checks: ;; ;; You can experiment with adding your own checks by setting the -;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'. +;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-functions'. ;; Return a string which is the error you wish to report. The cursor ;; position should be preserved. ;; === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-11-10 23:13:33 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-11-16 17:20:23 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc. ;; Author: Dave Gillespie -;; Version: 2.02 +;; Version: 1.0 ;; Keywords: extensions ;; This file is part of GNU Emacs. === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2012-11-15 01:26:52 +0000 +++ lisp/emacs-lisp/cl-macs.el 2012-11-16 17:20:23 +0000 @@ -758,7 +758,7 @@ ;;;###autoload (defmacro cl-loop (&rest loop-args) - "The Common Lisp `cl-loop' macro. + "The Common Lisp `loop' macro. Valid clauses are: for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, @@ -1503,7 +1503,7 @@ ;;;###autoload (defmacro cl-do (steps endtest &rest body) - "The Common Lisp `cl-do' loop. + "The Common Lisp `do' loop. \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" (declare (indent 2) @@ -1515,7 +1515,7 @@ ;;;###autoload (defmacro cl-do* (steps endtest &rest body) - "The Common Lisp `cl-do*' loop. + "The Common Lisp `do*' loop. \(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" (declare (indent 2) (debug cl-do)) @@ -1650,7 +1650,7 @@ ;;;###autoload (defmacro cl-flet (bindings &rest body) - "Make temporary function definitions. + "Make local function definitions. Like `cl-labels' but the definitions are not recursive. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" @@ -1674,7 +1674,7 @@ ;;;###autoload (defmacro cl-flet* (bindings &rest body) - "Make temporary function definitions. + "Make local function definitions. Like `cl-flet' but the definitions can refer to previous ones. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" === modified file 'lisp/emacs-lisp/eieio-datadebug.el' --- lisp/emacs-lisp/eieio-datadebug.el 2012-10-01 18:10:29 +0000 +++ lisp/emacs-lisp/eieio-datadebug.el 2012-11-13 03:11:46 +0000 @@ -131,7 +131,7 @@ (defun eieio-debug-methodinvoke (method class) "Show the method invocation order for METHOD with CLASS object." (interactive "aMethod: \nXClass Expression: ") - (let* ((eieio-pre-method-execution-hooks + (let* ((eieio-pre-method-execution-functions (lambda (l) (throw 'moose l) )) (data (catch 'moose (eieio-generic-call === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2012-10-28 15:34:52 +0000 +++ lisp/erc/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,7 @@ +2012-11-16 Glenn Morris + + * erc.el (erc-modules): Add "notifications". Tweak "hecomplete" doc. + 2012-10-28 Stefan Monnier * erc-backend.el: Only require `erc' during compilation (bug#12740). === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2012-10-15 16:49:57 +0000 +++ lisp/erc/erc.el 2012-11-13 03:40:44 +0000 @@ -1843,7 +1843,7 @@ capab-identify) (const :tag "completion: Complete nicknames and commands (programmable)" completion) - (const :tag "hecomplete: Complete nicknames and commands (old)" hecomplete) + (const :tag "hecomplete: Complete nicknames and commands (obsolete, use \"completion\")" hecomplete) (const :tag "dcc: Provide Direct Client-to-Client support" dcc) (const :tag "fill: Wrap long lines" fill) (const :tag "identd: Launch an identd server on port 8113" identd) @@ -1863,6 +1863,8 @@ (const :tag "notify: Notify when the online status of certain users changes" notify) + (const :tag "notifications: Send notifications on PRIVMSG or nickname mentions" + notifications) (const :tag "page: Process CTCP PAGE requests from IRC" page) (const :tag "readonly: Make displayed lines read-only" readonly) (const :tag "replace: Replace text in messages" replace) === modified file 'lisp/eshell/em-cmpl.el' --- lisp/eshell/em-cmpl.el 2012-07-11 23:13:41 +0000 +++ lisp/eshell/em-cmpl.el 2012-11-15 07:59:46 +0000 @@ -295,8 +295,8 @@ 'pcomplete-expand-and-complete) (define-key eshell-command-map [space] 'pcomplete-expand) (define-key eshell-command-map [? ] 'pcomplete-expand) - (define-key eshell-mode-map [tab] 'pcomplete) - (define-key eshell-mode-map [(control ?i)] 'pcomplete) + (define-key eshell-mode-map [tab] 'eshell-pcomplete) + (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete) ;; jww (1999-10-19): Will this work on anything but X? (if (featurep 'xemacs) (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse) @@ -449,6 +449,13 @@ (all-completions filename obarray 'functionp)) completions))))))) +(defun eshell-pcomplete () + "Eshell wrapper for `pcomplete'." + (interactive) + (if eshell-cmpl-ignore-case + (pcomplete-expand-and-complete) ; hack workaround for bug#12838 + (pcomplete))) + (provide 'em-cmpl) ;; Local Variables: === modified file 'lisp/faces.el' --- lisp/faces.el 2012-10-23 02:39:13 +0000 +++ lisp/faces.el 2012-11-16 02:44:02 +0000 @@ -487,16 +487,21 @@ (defalias 'face-background-pixmap 'face-stipple) +;; FIXME all of these -p functions ignore inheritance (cf face-stipple). +;; Ie, a face that inherits from an underlined face but does not +;; specify :underline will return nil. +;; So these functions don't actually tell you anything about how the +;; face will _appear_. So not very useful IMO. (defun face-underline-p (face &optional frame) - "Return non-nil if FACE is underlined. + "Return non-nil if FACE specifies a non-nil underlining. If the optional argument FRAME is given, report on face FACE in that frame. If FRAME is t, report on the defaults for face FACE (for new frames). If FRAME is omitted or nil, use the selected frame." - (eq (face-attribute face :underline frame) t)) + (face-attribute-specified-or (face-attribute face :underline frame) nil)) (defun face-inverse-video-p (face &optional frame) - "Return non-nil if FACE is in inverse video on FRAME. + "Return non-nil if FACE specifies a non-nil inverse-video. If the optional argument FRAME is given, report on face FACE in that frame. If FRAME is t, report on the defaults for face FACE (for new frames). If FRAME is omitted or nil, use the selected frame." @@ -837,21 +842,24 @@ (set-face-attribute face frame :stipple (or stipple 'unspecified))) -(defun set-face-underline-p (face underline &optional frame) +(defun set-face-underline (face underline &optional frame) "Specify whether face FACE is underlined. UNDERLINE nil means FACE explicitly doesn't underline. -UNDERLINE non-nil means FACE explicitly does underlining -with the same of the foreground color. -If UNDERLINE is a string, underline with the color named UNDERLINE. +UNDERLINE t means FACE underlines with its foreground color. +If UNDERLINE is a string, underline with that color. + +UNDERLINE may also be a list of the form (:color COLOR :style STYLE), +where COLOR is a string or `foreground-color', and STYLE is either +`line' or `wave'. :color may be omitted, which means to use the +foreground color. :style may be omitted, which means to use a line. + FRAME nil or not specified means change face on all frames. Use `set-face-attribute' to ``unspecify'' underlining." - (interactive - (let ((list (read-face-and-attribute :underline))) - (list (car list) (eq (car (cdr list)) t)))) + (interactive (read-face-and-attribute :underline)) (set-face-attribute face frame :underline underline)) -(define-obsolete-function-alias 'set-face-underline - 'set-face-underline-p "22.1") +(define-obsolete-function-alias 'set-face-underline-p + 'set-face-underline "24.3") (defun set-face-inverse-video-p (face inverse-video-p &optional frame) @@ -866,6 +874,9 @@ (set-face-attribute face frame :inverse-video inverse-video-p)) +;; The -p suffix is a hostage to fortune. What if we want to extend +;; this to allow more than boolean options? Exactly this happened +;; to set-face-underline-p. (defun set-face-bold-p (face bold-p &optional frame) "Specify whether face FACE is bold. BOLD-P non-nil means FACE should explicitly display bold. @@ -1114,6 +1125,9 @@ (string-to-number new-value))))) +;; FIXME this does allow you to enter the list forms of :box, +;; :stipple, or :underline, because face-valid-attribute-values does +;; not return those forms. (defun read-face-attribute (face attribute &optional frame) "Interactively read a new value for FACE's ATTRIBUTE. Optional argument FRAME nil or unspecified means read an attribute value @@ -1125,12 +1139,11 @@ ;; Represent complex attribute values as strings by printing them ;; out. Stipple can be a vector; (WIDTH HEIGHT DATA). Box can be ;; a list `(:width WIDTH :color COLOR)' or `(:width WIDTH :shadow - ;; SHADOW)'. - (when (and (or (eq attribute :stipple) - (eq attribute :box)) - (or (consp old-value) - (vectorp old-value))) - (setq old-value (prin1-to-string old-value))) + ;; SHADOW)'. Underline can be `(:color COLOR :style STYLE)'. + (and (memq attribute '(:box :stipple :underline)) + (or (consp old-value) + (vectorp old-value)) + (setq old-value (prin1-to-string old-value))) (cond ((listp valid) (let ((default (or (car (rassoc old-value valid)) @@ -1160,11 +1173,10 @@ ;; Convert stipple and box value text we read back to a list or ;; vector if it looks like one. This makes the assumption that a ;; pixmap file name won't start with an open-paren. - (when (and (or (eq attribute :stipple) - (eq attribute :box)) - (stringp new-value) - (string-match "^[[(]" new-value)) - (setq new-value (read new-value))) + (and (memq attribute '(:stipple :box :underline)) + (stringp new-value) + (string-match "^[[(]" new-value) + (setq new-value (read new-value))) new-value)) (declare-function fontset-list "fontset.c" ()) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-11-08 23:49:58 +0000 +++ lisp/gnus/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,17 @@ +2012-11-16 Jan Tatarik + + * gnus-score.el (gnus-score-body): + * gnus-logic.el (gnus-advanced-body): Don't score by headers when + scoring by body. + +2012-11-16 Glenn Morris + + * gnus-diary.el (nndiary-request-create-group-functions) + (nndiary-request-update-info-functions) + (gnus-subscribe-newsgroup-functions) + (nndiary-request-accept-article-functions): + Use new names for hooks rather than obsolete aliases. + 2012-11-08 Katsumi Yamaoka * gnus-art.el (gnus-article-browse-html-parts): Always replace charset === modified file 'lisp/gnus/gnus-diary.el' --- lisp/gnus/gnus-diary.el 2012-01-19 07:21:25 +0000 +++ lisp/gnus/gnus-diary.el 2012-11-13 03:11:46 +0000 @@ -277,18 +277,18 @@ ;; Called when a group is subscribed. This is needed because groups created ;; because of mail splitting are *not* created with the back end function. -;; Thus, `nndiary-request-create-group-hooks' is inoperative. +;; Thus, `nndiary-request-create-group-functions' is inoperative. (defun gnus-diary-maybe-update-group-parameters (group) (when (eq (car (gnus-find-method-for-group group)) 'nndiary) (gnus-diary-update-group-parameters group))) -(add-hook 'nndiary-request-create-group-hooks +(add-hook 'nndiary-request-create-group-functions 'gnus-diary-update-group-parameters) -;; Now that we have `gnus-subscribe-newsgroup-hooks', this is not needed +;; Now that we have `gnus-subscribe-newsgroup-functions', this is not needed ;; anymore. Maybe I should remove this completely. -(add-hook 'nndiary-request-update-info-hooks +(add-hook 'nndiary-request-update-info-functions 'gnus-diary-update-group-parameters) -(add-hook 'gnus-subscribe-newsgroup-hooks +(add-hook 'gnus-subscribe-newsgroup-functions 'gnus-diary-maybe-update-group-parameters) @@ -384,7 +384,7 @@ nndiary-headers) )) -(add-hook 'nndiary-request-accept-article-hooks +(add-hook 'nndiary-request-accept-article-functions (lambda () (gnus-diary-check-message nil))) (define-key message-mode-map "\C-c\C-fd" 'gnus-diary-check-message) === modified file 'lisp/gnus/gnus-logic.el' --- lisp/gnus/gnus-logic.el 2012-09-05 22:35:32 +0000 +++ lisp/gnus/gnus-logic.el 2012-11-16 09:44:35 +0000 @@ -181,17 +181,18 @@ (with-current-buffer nntp-server-buffer (let* ((request-func (cond ((string= "head" header) 'gnus-request-head) - ;; We need to peek at the headers to detect the - ;; content encoding ((string= "body" header) - 'gnus-request-article) + 'gnus-request-body) (t 'gnus-request-article))) ofunc article handles) ;; Not all backends support partial fetching. In that case, we ;; just fetch the entire article. - (unless (gnus-check-backend-function - (intern (concat "request-" header)) - gnus-newsgroup-name) + ;; When scoring by body, we need to peek at the headers to detect the + ;; content encoding + (unless (or (gnus-check-backend-function + (intern (concat "request-" header)) + gnus-newsgroup-name) + (string= "body" header)) (setq ofunc request-func) (setq request-func 'gnus-request-article)) (setq article (mail-header-number gnus-advanced-headers)) === modified file 'lisp/gnus/gnus-score.el' --- lisp/gnus/gnus-score.el 2012-09-06 02:20:21 +0000 +++ lisp/gnus/gnus-score.el 2012-11-16 09:44:35 +0000 @@ -1762,21 +1762,22 @@ (all-scores scores) (request-func (cond ((string= "head" header) 'gnus-request-head) - ;; We need to peek at the headers to detect - ;; the content encoding ((string= "body" header) - 'gnus-request-article) + 'gnus-request-body) (t 'gnus-request-article))) entries alist ofunc article last) (when articles (setq last (mail-header-number (caar (last articles)))) ;; Not all backends support partial fetching. In that case, ;; we just fetch the entire article. - (unless (gnus-check-backend-function - (and (string-match "^gnus-" (symbol-name request-func)) - (intern (substring (symbol-name request-func) - (match-end 0)))) - gnus-newsgroup-name) + ;; When scoring by body, we need to peek at the headers to detect + ;; the content encoding + (unless (or (gnus-check-backend-function + (and (string-match "^gnus-" (symbol-name request-func)) + (intern (substring (symbol-name request-func) + (match-end 0)))) + gnus-newsgroup-name) + (string= "body" header)) (setq ofunc request-func) (setq request-func 'gnus-request-article)) (while articles === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2012-10-09 12:49:02 +0000 +++ lisp/net/tramp-gvfs.el 2012-11-13 03:11:46 +0000 @@ -521,12 +521,12 @@ is no information where to trace the message.") (defun tramp-gvfs-dbus-event-error (event err) - "Called when a D-Bus error message arrives, see `dbus-event-error-hooks'." + "Called when a D-Bus error message arrives, see `dbus-event-error-functions'." (when tramp-gvfs-dbus-event-vector (tramp-message tramp-gvfs-dbus-event-vector 10 "%S" event) (tramp-error tramp-gvfs-dbus-event-vector 'file-error "%s" (cadr err)))) -(add-hook 'dbus-event-error-hooks 'tramp-gvfs-dbus-event-error) +(add-hook 'dbus-event-error-functions 'tramp-gvfs-dbus-event-error) ;; File name primitives. === modified file 'lisp/subr.el' --- lisp/subr.el 2012-11-13 03:00:09 +0000 +++ lisp/subr.el 2012-11-16 17:20:23 +0000 @@ -3961,11 +3961,16 @@ (put symbol 'hookvar (or hookvar 'mail-send-hook))) (defun set-temporary-overlay-map (map &optional keep-pred) - "Set MAP as a temporary overlay map. -When KEEP-PRED is `t', using a key from the temporary keymap -leaves this keymap activated. KEEP-PRED can also be a function, -which will have the same effect when it returns `t'. -When KEEP-PRED is nil, the temporary keymap is used only once." + "Set MAP as a temporary keymap taking precedence over most other keymaps. +Note that this does NOT take precedence over the \"overriding\" maps +`overriding-terminal-local-map' and `overriding-local-map' (or the +`keymap' text property). Unlike those maps, if no match for a key is +found in MAP, the normal key lookup sequence then continues. + +Normally, MAP is used only once. If the optional argument +KEEP-PRED is t, MAP stays active if a key from MAP is used. +KEEP-PRED can also be a function of no arguments: if it returns +non-nil then MAP stays active." (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map")) (overlaysym (make-symbol "t")) (alist (list (cons overlaysym map))) === modified file 'lisp/term.el' --- lisp/term.el 2012-11-10 01:48:44 +0000 +++ lisp/term.el 2012-11-15 06:17:56 +0000 @@ -4178,11 +4178,16 @@ (term-mode) (term-char-mode) - ;; I wanna have find-file on C-x C-f -mm - ;; your mileage may definitely vary, maybe it's better to put this in your - ;; .emacs ... - - (term-set-escape-char ?\C-x) + ;; Historical baggage. A call to term-set-escape-char used to not + ;; undo any previous call to t-s-e-c. Because of this, ansi-term + ;; ended up with both C-x and C-c as escape chars. Who knows what + ;; the original intention was, but people could have become used to + ;; either. (Bug#12842) + (let (term-escape-char) + ;; I wanna have find-file on C-x C-f -mm + ;; your mileage may definitely vary, maybe it's better to put this in your + ;; .emacs ... + (term-set-escape-char ?\C-x)) (switch-to-buffer term-ansi-buffer-name)) === modified file 'lisp/window.el' --- lisp/window.el 2012-11-11 01:47:56 +0000 +++ lisp/window.el 2012-11-16 10:29:48 +0000 @@ -2571,8 +2571,7 @@ Interactively, if no argument is given, make the selected window one line taller. If optional argument HORIZONTAL is non-nil, make selected window wider by DELTA columns. If DELTA is -negative, shrink selected window by -DELTA lines or columns. -Return nil." +negative, shrink selected window by -DELTA lines or columns." (interactive "p") (let ((minibuffer-window (minibuffer-window))) (cond @@ -2605,8 +2604,7 @@ one line smaller. If optional argument HORIZONTAL is non-nil, make selected window narrower by DELTA columns. If DELTA is negative, enlarge selected window by -DELTA lines or columns. -Also see the `window-min-height' variable. -Return nil." +Also see the `window-min-height' variable." (interactive "p") (let ((minibuffer-window (minibuffer-window))) (cond @@ -3049,8 +3047,10 @@ (set-marker (nth 2 entry) point)) ;; Make new markers. (list (copy-marker start) - (copy-marker point))))) - + (copy-marker + ;; Preserve window-point-insertion-type + ;; (Bug#12588). + point window-point-insertion-type))))) (set-window-prev-buffers window (cons entry (window-prev-buffers window)))))))) @@ -4555,13 +4555,17 @@ ;; If WINDOW has a quit-restore parameter, reset its car. (setcar (window-parameter window 'quit-restore) 'same)) ;; WINDOW shows another buffer. - (set-window-parameter - window 'quit-restore - (list 'other - ;; A quadruple of WINDOW's buffer, start, point and height. - (list (window-buffer window) (window-start window) - (window-point window) (window-total-size window)) - (selected-window) buffer)))) + (with-current-buffer (window-buffer window) + (set-window-parameter + window 'quit-restore + (list 'other + ;; A quadruple of WINDOW's buffer, start, point and height. + (list (current-buffer) (window-start window) + ;; Preserve window-point-insertion-type (Bug#12588). + (copy-marker + (window-point window) window-point-insertion-type) + (window-total-size window)) + (selected-window) buffer))))) ((eq type 'window) ;; WINDOW has been created on an existing frame. (set-window-parameter @@ -5170,11 +5174,12 @@ (error nil)))) (defun window--display-buffer (buffer window type &optional alist dedicated) - "Display BUFFER in WINDOW and make its frame visible. + "Display BUFFER in WINDOW. TYPE must be one of the symbols `reuse', `window' or `frame' and -is passed unaltered to `display-buffer-record-window'. Set -`window-dedicated-p' to DEDICATED if non-nil. Return WINDOW if -BUFFER and WINDOW are live." +is passed unaltered to `display-buffer-record-window'. ALIST is +the alist argument of `display-buffer'. Set `window-dedicated-p' +to DEDICATED if non-nil. Return WINDOW if BUFFER and WINDOW are +live." (when (and (buffer-live-p buffer) (window-live-p window)) (display-buffer-record-window type window buffer) (unless (eq buffer (window-buffer window)) @@ -5187,10 +5192,10 @@ (let ((parameter (window-parameter window 'quit-restore)) (height (cdr (assq 'window-height alist))) (width (cdr (assq 'window-width alist)))) - (when (or (memq type '(window frame)) + (when (or (eq type 'window) (and (eq (car parameter) 'same) - (memq (nth 1 parameter) '(window frame)))) - ;; Adjust height of new window or frame. + (eq (nth 1 parameter) 'window))) + ;; Adjust height of window if asked for. (cond ((not height)) ((numberp height) @@ -5201,19 +5206,12 @@ (* (window-total-size (frame-root-window window)) height)))) (delta (- new-height (window-total-size window)))) - (cond - ((and (window--resizable-p window delta nil 'safe) - (window-combined-p window)) - (window-resize window delta nil 'safe)) - ((or (eq type 'frame) - (and (eq (car parameter) 'same) - (eq (nth 1 parameter) 'frame))) - (set-frame-height - (window-frame window) - (+ (frame-height (window-frame window)) delta)))))) + (when (and (window--resizable-p window delta nil 'safe) + (window-combined-p window)) + (window-resize window delta nil 'safe)))) ((functionp height) (ignore-errors (funcall height window)))) - ;; Adjust width of a window or frame. + ;; Adjust width of window if asked for. (cond ((not width)) ((numberp width) @@ -5224,18 +5222,12 @@ (* (window-total-size (frame-root-window window) t) width)))) (delta (- new-width (window-total-size window t)))) - (cond - ((and (window--resizable-p window delta t 'safe) - (window-combined-p window t)) - (window-resize window delta t 'safe)) - ((or (eq type 'frame) - (and (eq (car parameter) 'same) - (eq (nth 1 parameter) 'frame))) - (set-frame-width - (window-frame window) - (+ (frame-width (window-frame window)) delta)))))) + (when (and (window--resizable-p window delta t 'safe) + (window-combined-p window t)) + (window-resize window delta t 'safe)))) ((functionp width) (ignore-errors (funcall width window)))))) + window)) (defun window--maybe-raise-frame (frame) @@ -5295,13 +5287,19 @@ "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: - CONDITION is either a regexp matching buffer names, or a function - that takes a buffer and returns a boolean. + CONDITION is either a regexp matching buffer names, or a + function that takes two arguments - a buffer name and the + ACTION argument of `display-buffer' - and returns a boolean. ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an alist of the - same form as ALIST. See `display-buffer' for details." + same form as ALIST. See `display-buffer' for details. + +`display-buffer' scans this alist until it either finds a +matching regular expression or the function specified by a +condition returns non-nil. In any of these cases, it adds the +associated action to the list of actions it will try." :type `(alist :key-type (choice :tag "Condition" regexp @@ -5335,15 +5333,16 @@ `display-buffer-base-action'. See `display-buffer'.") (put 'display-buffer-fallback-action 'risky-local-variable t) -(defun display-buffer-assq-regexp (buffer-name alist) - "Retrieve ALIST entry corresponding to BUFFER-NAME." +(defun display-buffer-assq-regexp (buffer-name alist action) + "Retrieve ALIST entry corresponding to BUFFER-NAME. +ACTION is the action argument passed to `display-buffer'." (catch 'match (dolist (entry alist) (let ((key (car entry))) (when (or (and (stringp key) (string-match-p key buffer-name)) - (and (symbolp key) (functionp key) - (funcall key buffer-name alist))) + (and (functionp key) + (funcall key buffer-name action))) (throw 'match (cdr entry))))))) (defvar display-buffer--same-window-action @@ -5453,8 +5452,8 @@ (funcall display-buffer-function buffer inhibit-same-window) ;; Otherwise, use the defined actions. (let* ((user-action - (display-buffer-assq-regexp (buffer-name buffer) - display-buffer-alist)) + (display-buffer-assq-regexp + (buffer-name buffer) display-buffer-alist action)) (special-action (display-buffer--special-action buffer)) ;; Extra actions from the arguments to this function: (extra-action @@ -6068,22 +6067,26 @@ :group 'help) (defcustom fit-frame-to-buffer-bottom-margin 4 - "Bottom margin for `fit-frame-to-buffer'. -This is the number of lines `fit-frame-to-buffer' leaves free at the -bottom of the display in order to not obscure the system task bar." + "Bottom margin for the command `fit-frame-to-buffer'. +This is the number of lines that function leaves free at the bottom of +the display, in order to not obscure any system task bar or panel. +If you do not have one (or if it is vertical) you might want to +reduce this. If it is thicker, you might want to increase this." + ;; If you set this too small, fit-frame-to-buffer can shift the + ;; frame up to avoid the panel. :type 'integer :version "24.3" :group 'windows) (defun fit-frame-to-buffer (&optional frame max-height min-height) - "Adjust height of FRAME to display its buffer's contents exactly. + "Adjust height of FRAME to display its buffer contents exactly. FRAME can be any live frame and defaults to the selected one. -Optional argument MAX-HEIGHT specifies the maximum height of -FRAME and defaults to the height of the display below the current -top line of FRAME minus FIT-FRAME-TO-BUFFER-BOTTOM-MARGIN. -Optional argument MIN-HEIGHT specifies the minimum height of -FRAME." +Optional argument MAX-HEIGHT specifies the maximum height of FRAME. +It defaults to the height of the display below the current +top line of FRAME, minus `fit-frame-to-buffer-bottom-margin'. +Optional argument MIN-HEIGHT specifies the minimum height of FRAME. +The default corresponds to `window-min-height'." (interactive) (setq frame (window-normalize-frame frame)) (let* ((root (frame-root-window frame)) @@ -6160,6 +6163,10 @@ are specified in lines and include the mode line and header line, if any. +If WINDOW is a full height window, then if the option +`fit-frame-to-buffer' is non-nil, this calls the function +`fit-frame-to-buffer' to adjust the frame height. + Return the number of lines by which WINDOW was enlarged or shrunk. If an error occurs during resizing, return nil but don't signal an error. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-16 15:29:22 +0000 +++ src/ChangeLog 2012-11-16 17:20:23 +0000 @@ -1,3 +1,28 @@ +2012-11-16 Glenn Morris + + * editfns.c (Fmessage): Mention message-log-max. (Bug#12849) + +2012-11-16 Stefan Monnier + + * eval.c (Finteractive_p): Revert lexbind-merge mishap. + +2012-11-16 Eli Zaretskii + + * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread + use the same value of thread handle. + (start_timer_thread): If the timer thread exited (due to error), + clean up by closing the two handles it used. Duplicate the caller + thread's handle here, so it gets duplicated only once, when + launching the timer thread. Set priority of the timer thread, not + the caller thread. + (getitimer): Don't duplicate the caller thread's handle here. + (Bug#12832) + +2012-11-16 Jan Djärv + + * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is + called (Bug#12834). + 2012-11-16 Paul Eggert Remove no-longer-used pty_max_bytes variable. === modified file 'src/editfns.c' --- src/editfns.c 2012-10-16 02:22:25 +0000 +++ src/editfns.c 2012-11-16 02:40:54 +0000 @@ -3434,8 +3434,8 @@ DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Display a message at the bottom of the screen. -The message also goes into the `*Messages*' buffer. -\(In keyboard macros, that's all it does.) +The message also goes into the `*Messages*' buffer, if `message-log-max' +is non-nil. (In keyboard macros, that's all it does.) Return the message. The first argument is a format control string, and the rest are data === modified file 'src/eval.c' --- src/eval.c 2012-11-15 00:41:32 +0000 +++ src/eval.c 2012-11-16 17:20:23 +0000 @@ -508,7 +508,7 @@ use `called-interactively-p'. */) (void) { - return interactive_p () ? Qt : Qnil; + return (INTERACTIVE && interactive_p ()) ? Qt : Qnil; } === modified file 'src/nsterm.m' --- src/nsterm.m 2012-11-14 04:55:41 +0000 +++ src/nsterm.m 2012-11-16 17:20:23 +0000 @@ -330,6 +330,8 @@ } hold_event_q.q[hold_event_q.nr++] = *event; + /* Make sure ns_read_socket is called, i.e. we have input. */ + kill (0, SIGIO); } static Lisp_Object === modified file 'src/w32proc.c' --- src/w32proc.c 2012-11-05 03:18:32 +0000 +++ src/w32proc.c 2012-11-16 17:20:23 +0000 @@ -431,13 +431,14 @@ /* Simulate a signal delivered to the thread which installed the timer, by suspending that thread while the handler runs. */ - DWORD result = SuspendThread (itimer->caller_thread); + HANDLE th = itimer->caller_thread; + DWORD result = SuspendThread (th); if (result == (DWORD)-1) return 2; handler (sig); - ResumeThread (itimer->caller_thread); + ResumeThread (th); } /* Update expiration time and loop. */ @@ -562,6 +563,7 @@ start_timer_thread (int which) { DWORD exit_code; + HANDLE th; struct itimer_data *itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; @@ -570,9 +572,29 @@ && exit_code == STILL_ACTIVE) return 0; + /* Clean up after possibly exited thread. */ + if (itimer->timer_thread) + { + CloseHandle (itimer->timer_thread); + itimer->timer_thread = NULL; + } + if (itimer->caller_thread) + { + CloseHandle (itimer->caller_thread); + itimer->caller_thread = NULL; + } + /* Start a new thread. */ + if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), + GetCurrentProcess (), &th, 0, FALSE, + DUPLICATE_SAME_ACCESS)) + { + errno = ESRCH; + return -1; + } itimer->terminate = 0; itimer->type = which; + itimer->caller_thread = th; /* Request that no more than 64KB of stack be reserved for this thread, to avoid reserving too much memory, which would get in the way of threads we start to wait for subprocesses. See also @@ -591,7 +613,7 @@ /* This is needed to make sure that the timer thread running for profiling gets CPU as soon as the Sleep call terminates. */ if (which == ITIMER_PROF) - SetThreadPriority (itimer->caller_thread, THREAD_PRIORITY_TIME_CRITICAL); + SetThreadPriority (itimer->timer_thread, THREAD_PRIORITY_TIME_CRITICAL); return 0; } @@ -626,17 +648,9 @@ itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; - if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), - GetCurrentProcess (), &itimer->caller_thread, 0, - FALSE, DUPLICATE_SAME_ACCESS)) - { - errno = ESRCH; - return -1; - } - ticks_now = w32_get_timer_time ((which == ITIMER_REAL) ? NULL - : itimer->caller_thread); + : GetCurrentThread ()); t_expire = &itimer->expire; t_reload = &itimer->reload; === modified file 'src/xfaces.c' --- src/xfaces.c 2012-11-12 04:00:55 +0000 +++ src/xfaces.c 2012-11-16 17:20:23 +0000 @@ -2870,6 +2870,12 @@ Lisp_Object key, val, list; list = value; + /* FIXME? This errs on the side of acceptance. Eg it accepts: + (defface foo '((t :underline 'foo) "doc") + Maybe this is intentional, maybe it isn't. + Non-nil symbols other than t are not documented as being valid. + Eg compare with inverse-video, which explicitly rejects them. + */ valid_p = 1; while (!NILP (CAR_SAFE(list))) @@ -5660,6 +5666,8 @@ face->underline_defaulted_p = 1; face->underline_type = FACE_UNDER_LINE; + /* FIXME? This is also not robust about checking the precise form. + See comments in Finternal_set_lisp_face_attribute. */ while (CONSP (underline)) { Lisp_Object keyword, value; ------------------------------------------------------------ revno: 110909 committer: Paul Eggert branch nick: trunk timestamp: Fri 2012-11-16 07:29:22 -0800 message: Remove no-longer-used pty_max_bytes variable. * configure.ac (fpathconf): Remove unnecessary check. * admin/CPP-DEFINES (HAVE_FPATHCONF): Remove. * src/process.c (pty_max_bytes): Remove; unused. (send_process): Do not set it. diff: === modified file 'ChangeLog' --- ChangeLog 2012-11-14 04:55:41 +0000 +++ ChangeLog 2012-11-16 15:29:22 +0000 @@ -1,3 +1,8 @@ +2012-11-16 Paul Eggert + + Remove no-longer-used pty_max_bytes variable. + * configure.ac (fpathconf): Remove unnecessary check. + 2012-11-14 Paul Eggert Use faccessat, not access, when checking file permissions (Bug#12632). === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-11-05 03:18:32 +0000 +++ admin/CPP-DEFINES 2012-11-16 15:29:22 +0000 @@ -152,7 +152,6 @@ HAVE_EUIDACCESS HAVE_FCNTL_H HAVE_FORK -HAVE_FPATHCONF HAVE_FREEIFADDRS HAVE_FREETYPE HAVE_FSEEKO === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-11-14 04:55:41 +0000 +++ admin/ChangeLog 2012-11-16 15:29:22 +0000 @@ -1,3 +1,8 @@ +2012-11-16 Paul Eggert + + Remove no-longer-used pty_max_bytes variable. + * CPP-DEFINES (HAVE_FPATHCONF): Remove. + 2012-11-14 Paul Eggert Use faccessat, not access, when checking file permissions (Bug#12632). === modified file 'configure.ac' --- configure.ac 2012-11-14 04:55:41 +0000 +++ configure.ac 2012-11-16 15:29:22 +0000 @@ -2874,7 +2874,7 @@ AC_CHECK_FUNCS(gethostname \ closedir getrusage get_current_dir_name \ lrand48 \ -fpathconf select getpagesize setlocale \ +select getpagesize setlocale \ utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-11-15 16:21:50 +0000 +++ src/ChangeLog 2012-11-16 15:29:22 +0000 @@ -1,3 +1,9 @@ +2012-11-16 Paul Eggert + + Remove no-longer-used pty_max_bytes variable. + * process.c (pty_max_bytes): Remove; unused. + (send_process): Do not set it. + 2012-11-15 Juanma Barranquero * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)): === modified file 'src/process.c' --- src/process.c 2012-11-14 04:55:41 +0000 +++ src/process.c 2012-11-16 15:29:22 +0000 @@ -340,9 +340,6 @@ #define DATAGRAM_CONN_P(proc) (0) #endif -/* Maximum number of bytes to send to a pty without an eof. */ -static int pty_max_bytes; - /* These setters are used only in this file, so they can be private. */ static void pset_buffer (struct Lisp_Process *p, Lisp_Object val) @@ -5532,19 +5529,6 @@ buf = SSDATA (object); } - if (pty_max_bytes == 0) - { -#if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON) - pty_max_bytes = fpathconf (p->outfd, _PC_MAX_CANON); - if (pty_max_bytes < 0) - pty_max_bytes = 250; -#else - pty_max_bytes = 250; -#endif - /* Deduct one, to leave space for the eof. */ - pty_max_bytes--; - } - /* If there is already data in the write_queue, put the new data in the back of queue. Otherwise, ignore it. */ if (!NILP (p->write_queue)) ------------------------------------------------------------ revno: 110908 [merge] committer: Daniel Colascione branch nick: trunk timestamp: Thu 2012-11-15 15:31:37 -0800 message: Merge from cygw32 branch diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-11-15 04:42:14 +0000 +++ lisp/ChangeLog 2012-11-15 23:31:37 +0000 @@ -1,3 +1,10 @@ +2012-11-15 Daniel Colascione + + * term/w32-win.el (w32-handle-dropped-file): Use a "file://" + prefix instead of "file:" so that when FILE-NAME begins with "//", + as it does when the target file is on a network share, url-handler + isn't confused. + 2012-11-15 Stefan Monnier * emacs-lisp/advice.el (ad-definition-type): Make sure we don't use === modified file 'lisp/term/w32-win.el' --- lisp/term/w32-win.el 2012-10-09 07:08:26 +0000 +++ lisp/term/w32-win.el 2012-11-15 23:28:27 +0000 @@ -116,7 +116,7 @@ "/") "/"))) (dnd-handle-one-url window 'private - (concat "file:" file-name))) + (concat "file://" file-name))) (defun w32-drag-n-drop (event &optional new-frame) "Edit the files listed in the drag-n-drop EVENT. ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.