------------------------------------------------------------ revno: 116565 committer: martin rudalics branch nick: trunk timestamp: Wed 2014-02-26 09:07:34 +0100 message: Fixes around Bug#16647. * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER cases. * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER only if the window has no right divider. (Fcoordinates_in_window_p): Fix doc-string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-25 22:51:34 +0000 +++ src/ChangeLog 2014-02-26 08:07:34 +0000 @@ -1,3 +1,12 @@ +2014-02-26 Martin Rudalics + + Fixes around Bug#16647. + * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and + ON_BOTTOM_DIVIDER cases. + * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER + only if the window has no right divider. + (Fcoordinates_in_window_p): Fix doc-string. + 2014-02-25 Juanma Barranquero * lread.c (Funintern): Fix doc to match advertised calling convention. === modified file 'src/window.c' --- src/window.c 2014-02-22 21:49:10 +0000 +++ src/window.c 2014-02-26 08:07:34 +0000 @@ -1269,12 +1269,12 @@ /* On vertical window divider (which prevails horizontal dividers)? */ if (!WINDOW_RIGHTMOST_P (w) - && WINDOW_RIGHT_DIVIDER_WIDTH (w) + && WINDOW_RIGHT_DIVIDER_WIDTH (w) > 0 && x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w) && x <= right_x) return ON_RIGHT_DIVIDER; /* On the horizontal window divider? */ - else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) + else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) > 0 && y >= (bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w)) && y <= bottom_y) return ON_BOTTOM_DIVIDER; @@ -1294,9 +1294,10 @@ resize windows horizontally in case we're using toolkit scroll bars. Note: If scrollbars are on the left, the window that must be eventually resized is that on the left of WINDOW. */ - if ((WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) - && !WINDOW_LEFTMOST_P (w) - && eabs (x - left_x) < grabbable_width) + if ((WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0) + && (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) + && !WINDOW_LEFTMOST_P (w) + && eabs (x - left_x) < grabbable_width) || (!WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) && !WINDOW_RIGHTMOST_P (w) && eabs (x - right_x) < grabbable_width)) @@ -1331,6 +1332,7 @@ if (FRAME_WINDOW_P (f)) { if (!w->pseudo_window_p + && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) && !WINDOW_RIGHTMOST_P (w) && (eabs (x - right_x) < grabbable_width)) @@ -1339,6 +1341,7 @@ /* Need to say "x > right_x" rather than >=, since on character terminals, the vertical line's x coordinate is right_x. */ else if (!w->pseudo_window_p + && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0 && !WINDOW_RIGHTMOST_P (w) /* Why check ux if we are not the rightmost window? Also shouldn't a pseudo window always be rightmost? */ @@ -1352,8 +1355,8 @@ ? (x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w)) : (x < left_x + lmargin_width))) return ON_LEFT_MARGIN; - - return ON_LEFT_FRINGE; + else + return ON_LEFT_FRINGE; } if (x >= text_right) @@ -1363,8 +1366,8 @@ ? (x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w)) : (x >= right_x - rmargin_width))) return ON_RIGHT_MARGIN; - - return ON_RIGHT_FRINGE; + else + return ON_RIGHT_FRINGE; } /* Everything special ruled out - must be on text area */ @@ -1419,8 +1422,10 @@ frame. If COORDINATES are in the text portion of WINDOW, the coordinates relative to the window are returned. +If they are in the bottom divider of WINDOW, `bottom-divider' is returned. +If they are in the right divider of WINDOW, `right-divider' is returned. If they are in the mode line of WINDOW, `mode-line' is returned. -If they are in the top mode line of WINDOW, `header-line' is returned. +If they are in the header line of WINDOW, `header-line' is returned. If they are in the left fringe of WINDOW, `left-fringe' is returned. If they are in the right fringe of WINDOW, `right-fringe' is returned. If they are on the border between WINDOW and its right sibling, === modified file 'src/xdisp.c' --- src/xdisp.c 2014-02-21 07:42:42 +0000 +++ src/xdisp.c 2014-02-26 08:07:34 +0000 @@ -2452,6 +2452,16 @@ ? WINDOW_RIGHT_FRINGE_WIDTH (w) : 0))); width = WINDOW_SCROLL_BAR_AREA_WIDTH (w); + goto row_glyph; + + case ON_RIGHT_DIVIDER: + gx = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w); + width = WINDOW_RIGHT_DIVIDER_WIDTH (w); + goto row_glyph; + + case ON_BOTTOM_DIVIDER: + gx = 0; + width = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w); row_glyph: gr = 0, gy = 0; ------------------------------------------------------------ revno: 116564 fixes bug: http://debbugs.gnu.org/16850 committer: Dmitry Gutov branch nick: trunk timestamp: Wed 2014-02-26 04:31:27 +0200 message: * lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' error from `read-from-string'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-26 02:02:21 +0000 +++ lisp/ChangeLog 2014-02-26 02:31:27 +0000 @@ -1,5 +1,8 @@ 2014-02-26 Dmitry Gutov + * emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file' + error from `read-from-string'. (Bug#16850) + * emacs-lisp/ert.el (ert-run-tests-interactively): `read' the result of `completing-read' in the interactive form. (Bug#16854) === modified file 'lisp/emacs-lisp/lisp.el' --- lisp/emacs-lisp/lisp.el 2014-02-10 05:50:16 +0000 +++ lisp/emacs-lisp/lisp.el 2014-02-26 02:31:27 +0000 @@ -719,8 +719,10 @@ (dolist (p (nth 9 ppss)) (push (cdr (syntax-after p)) closer)) (setq closer (apply #'string closer)) - (let* ((sexp (car (read-from-string - (concat txt "lisp--witness--lisp" closer)))) + (let* ((sexp (condition-case nil + (car (read-from-string + (concat txt "lisp--witness--lisp" closer))) + (end-of-file nil))) (macroexpand-advice (lambda (expander form &rest args) (condition-case nil (apply expander form args) ------------------------------------------------------------ revno: 116563 fixes bug: http://debbugs.gnu.org/16854 committer: Dmitry Gutov branch nick: trunk timestamp: Wed 2014-02-26 04:02:21 +0200 message: * lisp/emacs-lisp/ert.el (ert-run-tests-interactively): `read' the result of `completing-read' in the interactive form. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-25 21:59:14 +0000 +++ lisp/ChangeLog 2014-02-26 02:02:21 +0000 @@ -1,3 +1,8 @@ +2014-02-26 Dmitry Gutov + + * emacs-lisp/ert.el (ert-run-tests-interactively): `read' the + result of `completing-read' in the interactive form. (Bug#16854) + 2014-02-25 Glenn Morris * image.el (image-animate, image-animate-timeout): === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2014-02-04 17:37:08 +0000 +++ lisp/emacs-lisp/ert.el 2014-02-26 02:02:21 +0000 @@ -1882,11 +1882,12 @@ ;; defined without cl. (car ert--selector-history) "t"))) - (completing-read (if (null default) - "Run tests: " - (format "Run tests (default %s): " default)) - obarray #'ert-test-boundp nil nil - 'ert--selector-history default nil)) + (read + (completing-read (if (null default) + "Run tests: " + (format "Run tests (default %s): " default)) + obarray #'ert-test-boundp nil nil + 'ert--selector-history default nil))) nil)) (unless message-fn (setq message-fn 'message)) (let ((output-buffer-name output-buffer-name) ------------------------------------------------------------ revno: 116562 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2014-02-25 23:51:34 +0100 message: src/lread.c (Funintern): Fix doc to match advertised calling convention. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-24 14:27:37 +0000 +++ src/ChangeLog 2014-02-25 22:51:34 +0000 @@ -1,3 +1,7 @@ +2014-02-25 Juanma Barranquero + + * lread.c (Funintern): Fix doc to match advertised calling convention. + 2014-02-24 Daniel Colascione * keyboard.c (read_char): Close race that resulted in lost events. === modified file 'src/lread.c' --- src/lread.c 2014-01-27 05:29:30 +0000 +++ src/lread.c 2014-02-25 22:51:34 +0000 @@ -3868,7 +3868,8 @@ The value is t if a symbol was found and deleted, nil otherwise. NAME may be a string or a symbol. If it is a symbol, that symbol is deleted, if it belongs to OBARRAY--no other symbol is deleted. -OBARRAY defaults to the value of the variable `obarray'. */) +OBARRAY, if nil, defaults to the value of the variable `obarray'. +usage: (unintern NAME OBARRAY) */) (Lisp_Object name, Lisp_Object obarray) { register Lisp_Object string, tem; ------------------------------------------------------------ revno: 116561 fixes bug: http://debbugs.gnu.org/16878 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 16:59:14 -0500 message: * lisp/image.el (image-animate, image-animate-timeout): Stop animating images in dead buffers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-25 21:55:45 +0000 +++ lisp/ChangeLog 2014-02-25 21:59:14 +0000 @@ -1,5 +1,8 @@ 2014-02-25 Glenn Morris + * image.el (image-animate, image-animate-timeout): + Stop animating images in dead buffers. (Bug#16878) + * emacs-lisp/edebug.el (defmacro): Fix debug spec. (Bug#16868) * faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes. === modified file 'lisp/image.el' --- lisp/image.el 2014-02-10 01:34:22 +0000 +++ lisp/image.el 2014-02-25 21:59:14 +0000 @@ -662,6 +662,7 @@ (when animation (if (setq timer (image-animate-timer image)) (cancel-timer timer)) + (plist-put (cdr image) :animate-buffer (current-buffer)) (run-with-timer 0.2 nil 'image-animate-timeout image (or index 0) (car animation) 0 limit)))) @@ -726,30 +727,31 @@ If the image has a non-nil :speed property, it acts as a multiplier for the animation speed. A negative value means to animate in reverse." - (image-show-frame image n t) - (let* ((speed (image-animate-get-speed image)) - (time (float-time)) - (animation (image-multi-frame-p image)) - ;; Subtract off the time we took to load the image from the - ;; stated delay time. - (delay (max (+ (* (or (cdr animation) image-default-frame-delay) - (/ 1 (abs speed))) - time (- (float-time))) - image-minimum-frame-delay)) - done) - (setq n (if (< speed 0) - (1- n) - (1+ n))) - (if limit - (cond ((>= n count) (setq n 0)) - ((< n 0) (setq n (1- count)))) - (and (or (>= n count) (< n 0)) (setq done t))) - (setq time-elapsed (+ delay time-elapsed)) - (if (numberp limit) - (setq done (>= time-elapsed limit))) - (unless done - (run-with-timer delay nil 'image-animate-timeout - image n count time-elapsed limit)))) + (when (buffer-live-p (plist-get (cdr image) :animate-buffer)) + (image-show-frame image n t) + (let* ((speed (image-animate-get-speed image)) + (time (float-time)) + (animation (image-multi-frame-p image)) + ;; Subtract off the time we took to load the image from the + ;; stated delay time. + (delay (max (+ (* (or (cdr animation) image-default-frame-delay) + (/ 1 (abs speed))) + time (- (float-time))) + image-minimum-frame-delay)) + done) + (setq n (if (< speed 0) + (1- n) + (1+ n))) + (if limit + (cond ((>= n count) (setq n 0)) + ((< n 0) (setq n (1- count)))) + (and (or (>= n count) (< n 0)) (setq done t))) + (setq time-elapsed (+ delay time-elapsed)) + (if (numberp limit) + (setq done (>= time-elapsed limit))) + (unless done + (run-with-timer delay nil 'image-animate-timeout + image n count time-elapsed limit))))) (defvar imagemagick-types-inhibit) ------------------------------------------------------------ revno: 116560 fixes bug: http://debbugs.gnu.org/16868 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 16:55:45 -0500 message: * lisp/emacs-lisp/edebug.el (defmacro): Fix debug spec. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-25 08:41:47 +0000 +++ lisp/ChangeLog 2014-02-25 21:55:45 +0000 @@ -1,5 +1,7 @@ 2014-02-25 Glenn Morris + * emacs-lisp/edebug.el (defmacro): Fix debug spec. (Bug#16868) + * faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes. * startup.el (term-setup-hook): Doc fix. Make obsolete. * term/sun.el (sun-raw-prefix-hooks): === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2014-02-10 01:34:22 +0000 +++ lisp/emacs-lisp/edebug.el 2014-02-25 21:55:45 +0000 @@ -1,7 +1,6 @@ ;;; edebug.el --- a source-level debugger for Emacs Lisp -*- lexical-binding: t -*- -;; Copyright (C) 1988-1995, 1997, 1999-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1988-1995, 1997, 1999-2014 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte ;; Maintainer: emacs-devel@gnu.org @@ -1936,11 +1935,11 @@ [&optional stringp] [&optional ("interactive" interactive)] def-body)) -;; FIXME? Isn't this missing the doc-string? Cf defun. (def-edebug-spec defmacro ;; FIXME: Improve `declare' so we can Edebug gv-expander and ;; gv-setter declarations. - (&define name lambda-list [&optional ("declare" &rest sexp)] def-body)) + (&define name lambda-list [&optional stringp] + [&optional ("declare" &rest sexp)] def-body)) (def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list. ------------------------------------------------------------ revno: 116559 fixes bug: http://debbugs.gnu.org/16825 committer: Paul Eggert branch nick: trunk timestamp: Tue 2014-02-25 11:21:05 -0800 message: Merge from gnulib. 2014-02-25 unistd: port readlink to Mac OS X 10.3.9 diff: === modified file 'ChangeLog' --- ChangeLog 2014-02-24 07:12:42 +0000 +++ ChangeLog 2014-02-25 19:21:05 +0000 @@ -1,3 +1,8 @@ +2014-02-25 Paul Eggert + + Merge from gnulib (Bug#16825). + 2014-02-25 unistd: port readlink to Mac OS X 10.3.9 + 2014-02-24 Paul Eggert Merge from gnulib, incorporating: === modified file 'lib/unistd.in.h' --- lib/unistd.in.h 2014-01-01 07:43:34 +0000 +++ lib/unistd.in.h 2014-02-25 19:21:05 +0000 @@ -21,9 +21,23 @@ #endif @PRAGMA_COLUMNS@ +#ifdef _GL_INCLUDING_UNISTD_H +/* Special invocation convention: + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_UNISTD_H@ + +#else +/* Normal invocation convention. */ + /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ +# define _GL_INCLUDING_UNISTD_H # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ +# undef _GL_INCLUDING_UNISTD_H #endif /* Get all possible declarations of gethostname(). */ @@ -1539,4 +1553,5 @@ _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ ------------------------------------------------------------ revno: 116558 fixes bug: http://debbugs.gnu.org/16883 committer: Paul Eggert branch nick: trunk timestamp: Tue 2014-02-25 11:06:53 -0800 message: Fix emacsclient's handling of SIGCONT. * emacsclient.c (handle_sigcont): Cancel the continue only if tty. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-02-13 02:19:48 +0000 +++ lib-src/ChangeLog 2014-02-25 19:06:53 +0000 @@ -1,3 +1,8 @@ +2014-02-25 Andreas Amann (tiny change) + + Fix emacsclient's handling of SIGCONT (Bug#16883). + * emacsclient.c (handle_sigcont): Cancel the continue only if tty. + 2014-01-22 Eli Zaretskii * update-game-score.c (write_scores) [WINDOWSNT]: Use chmod === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2014-01-01 07:43:34 +0000 +++ lib-src/emacsclient.c 2014-02-25 19:06:53 +0000 @@ -1108,12 +1108,12 @@ if (tcgetpgrp (1) == getpgrp ()) { - /* We are in the foreground. */ + /* We are in the foreground. */ send_to_emacs (emacs_socket, "-resume \n"); } - else + else if (tty) { - /* We are in the background; cancel the continue. */ + /* We are in the background; cancel the continue. */ raise (SIGSTOP); } ------------------------------------------------------------ revno: 116557 committer: Paul Eggert branch nick: trunk timestamp: Tue 2014-02-25 10:40:54 -0800 message: Spelling fix. diff: === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2014-02-23 08:26:40 +0000 +++ test/indent/ruby.rb 2014-02-25 18:40:54 +0000 @@ -361,7 +361,7 @@ foo) # FIXME: This is not consistent with the example below it, but this -# ofset only happens if the colon is at eol, which wouldn't be often. +# offset only happens if the colon is at eol, which wouldn't be often. # Tokenizing `bar:' as `:bar =>' would be better, but it's hard to # distinguish from a variable reference inside a ternary operator. foo(bar: ------------------------------------------------------------ revno: 116556 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 13:35:37 -0500 message: * lisp/net/newst-backend.el (newsticker-url-list): Doc whitespace trivia diff: === modified file 'lisp/net/newst-backend.el' --- lisp/net/newst-backend.el 2014-01-01 07:43:34 +0000 +++ lisp/net/newst-backend.el 2014-02-25 18:35:37 +0000 @@ -196,7 +196,7 @@ specify as `newsticker-wget-name'. URL may also be a function which returns news data. In this case -`newsticker-retrieval-method' etc. are ignored for this feed. +`newsticker-retrieval-method' etc. are ignored for this feed. The START-TIME can be either a string, or nil. If it is a string it specifies a fixed time at which this feed shall be retrieved for the ------------------------------------------------------------ revno: 116555 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 13:32:52 -0500 message: Add some Authors: headers based on authors.el. diff: === modified file 'lisp/userlock.el' --- lisp/userlock.el 2014-02-10 01:34:22 +0000 +++ lisp/userlock.el 2014-02-25 18:32:52 +0000 @@ -2,6 +2,8 @@ ;; Copyright (C) 1985-1986, 2001-2014 Free Software Foundation, Inc. +;; Author: Richard King +;; (according to authors.el) ;; Maintainer: emacs-devel@gnu.org ;; Keywords: internal ;; Package: emacs === modified file 'src/filelock.c' --- src/filelock.c 2014-01-01 07:43:34 +0000 +++ src/filelock.c 2014-02-25 18:32:52 +0000 @@ -1,6 +1,10 @@ /* Lock files for editing. - Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2014 Free Software - Foundation, Inc. + +Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2014 + Free Software Foundation, Inc. + +Author: Richard King + (according to authors.el) This file is part of GNU Emacs. ------------------------------------------------------------ revno: 116554 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 13:28:59 -0500 message: * configure.ac: Update comment. diff: === modified file 'configure.ac' --- configure.ac 2014-02-18 01:47:35 +0000 +++ configure.ac 2014-02-25 18:28:59 +0000 @@ -468,14 +468,8 @@ ### If you add support for a new configuration, add code to this ### switch statement to recognize your configuration name and select -### the appropriate operating system file. +### the appropriate opsys. -### You would hope that you could choose an s/*.h -### file based on the operating system portion. However, it turns out -### that each s/*.h file is pretty manufacturer-specific. -### So we basically have to have a special case for each -### configuration name. -### ### As far as handling version numbers on operating systems is ### concerned, make sure things will fail in a fixable way. If ### /etc/MACHINES doesn't say anything about version numbers, be ------------------------------------------------------------ revno: 116553 fixes bug: http://debbugs.gnu.org/16734 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 13:10:52 -0500 message: * org-version.el (org-odt-data-dir): Remove incorrect, duplicate definition. diff: === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2014-02-13 02:19:48 +0000 +++ lisp/org/ChangeLog 2014-02-25 18:10:52 +0000 @@ -1,3 +1,8 @@ +2014-02-25 Glenn Morris + + * org-version.el (org-odt-data-dir): + Remove incorrect, duplicate definition. (Bug#16734) + 2014-01-08 Paul Eggert Spelling fixes. === modified file 'lisp/org/org-version.el' --- lisp/org/org-version.el 2014-01-07 13:22:53 +0000 +++ lisp/org/org-version.el 2014-02-25 18:10:52 +0000 @@ -13,9 +13,6 @@ Inserted by installing org-mode or when a release is made." (let ((org-git-version "release_8.2.5c")) org-git-version)) -;;;###autoload -(defvar org-odt-data-dir "/usr/share/emacs/etc/org" - "The location of ODT styles.") (provide 'org-version) ------------------------------------------------------------ revno: 116552 committer: Julien Danjou branch nick: trunk timestamp: Tue 2014-02-25 18:37:25 +0100 message: erc-network: fix erc-determine-network when no network * erc-networks.el (erc-determine-network): Check that NETWORK as a value, some servers set it to nothing. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2014-01-31 06:39:51 +0000 +++ lisp/erc/ChangeLog 2014-02-25 17:37:25 +0000 @@ -1,3 +1,8 @@ +2014-02-25 Julien Danjou + + * erc-networks.el (erc-determine-network): Check that NETWORK as a + value, some servers set it to nothing. + 2014-01-31 Glenn Morris * erc.el (erc-accidental-paste-threshold-seconds): Doc tweak. === modified file 'lisp/erc/erc-networks.el' --- lisp/erc/erc-networks.el 2014-02-10 01:34:22 +0000 +++ lisp/erc/erc-networks.el 2014-02-25 17:37:25 +0000 @@ -724,16 +724,17 @@ server parameter NETWORK if provided, otherwise parse the server name and search for a match in `erc-networks-alist'." ;; The server made it easy for us and told us the name of the NETWORK - (if (assoc "NETWORK" erc-server-parameters) - (intern (cdr (assoc "NETWORK" erc-server-parameters))) - (or - ;; Loop through `erc-networks-alist' looking for a match. - (let ((server (or erc-server-announced-name erc-session-server))) - (cl-loop for (name matcher) in erc-networks-alist - when (and matcher - (string-match (concat matcher "\\'") server)) - do (cl-return name))) - 'Unknown))) + (let ((network-name (cdr (assoc "NETWORK" erc-server-parameters)))) + (if network-name + (intern network-name) + (or + ;; Loop through `erc-networks-alist' looking for a match. + (let ((server (or erc-server-announced-name erc-session-server))) + (cl-loop for (name matcher) in erc-networks-alist + when (and matcher + (string-match (concat matcher "\\'") server)) + do (cl-return name))) + 'Unknown)))) (defun erc-network () "Return the value of `erc-network' for the current server." ------------------------------------------------------------ revno: 116551 committer: Glenn Morris branch nick: trunk timestamp: Tue 2014-02-25 00:41:47 -0800 message: Doc updates related to tty-setup-hook * doc/emacs/custom.texi (Terminal Init): Replace term-setup-hook with tty-setup-hook. * doc/lispref/display.texi (Window Systems): * doc/lispref/hooks.texi (Standard Hooks): Replace term-setup-hook with tty-setup-hook. * doc/lispref/os.texi (Startup Summary, Init File, Terminal-Specific): Replace term-setup-hook with tty-setup-hook, and update. * doc/misc/edt.texi (Quick start, Starting emulation): * doc/misc/efaq.texi (Fullscreen mode on MS-Windows) (Terminal setup code works after Emacs has begun): Update hook details. * doc/misc/vip.texi (Loading VIP): Fix hook example. * lisp/faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes. * lisp/startup.el (term-setup-hook): Doc fix. Make obsolete. * lisp/emulation/edt.el: Comment update. * lisp/term/sun.el (sun-raw-prefix-hooks): Use tty-setup-hook instead of term-setup-hook. (terminal-init-sun): Construct message from bytecomp plist. * lisp/term/wyse50.el (enable-arrow-keys): Doc fix. * etc/refcards/vipcard.tex: Hook fix. * etc/NEWS: Related edit. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-23 19:23:12 +0000 +++ doc/emacs/ChangeLog 2014-02-25 08:41:47 +0000 @@ -1,3 +1,8 @@ +2014-02-25 Glenn Morris + + * custom.texi (Terminal Init): + Replace term-setup-hook with tty-setup-hook. + 2014-02-23 Glenn Morris * rmail.texi (Rmail Inbox): Mention rmail-mbox-format. === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2014-01-01 07:43:34 +0000 +++ doc/emacs/custom.texi 2014-02-25 08:41:47 +0000 @@ -2474,8 +2474,8 @@ file can prevent the loading of the terminal-specific library by setting @code{term-file-prefix} to @code{nil}. -@vindex term-setup-hook - Emacs runs the hook @code{term-setup-hook} at the end of +@vindex tty-setup-hook + Emacs runs the hook @code{tty-setup-hook} at the end of initialization, after both your @file{.emacs} file and any terminal-specific library have been read in. Add hook functions to this hook if you wish to override part of any of the terminal-specific === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-02-22 03:39:10 +0000 +++ doc/lispref/ChangeLog 2014-02-25 08:41:47 +0000 @@ -1,3 +1,12 @@ +2014-02-25 Glenn Morris + + * display.texi (Window Systems): + Replace term-setup-hook with emacs-startup-hook. + * hooks.texi (Standard Hooks): + Replace term-setup-hook with tty-setup-hook. + * os.texi (Startup Summary, Init File, Terminal-Specific): + Replace term-setup-hook with tty-setup-hook, and update. + 2014-02-22 Stefan Monnier * functions.texi (Declare Form): Document gv-expander, gv-setter, and === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2014-02-09 05:20:54 +0000 +++ doc/lispref/display.texi 2014-02-25 08:41:47 +0000 @@ -6378,7 +6378,7 @@ initialization files. Emacs runs this hook after it has completed loading your init file, the default initialization file (if any), and the terminal-specific Lisp code, and running the hook -@code{term-setup-hook}. +@code{emacs-startup-hook}. This hook is used for internal purposes: setting up communication with the window system, and creating the initial window. Users should not === modified file 'doc/lispref/hooks.texi' --- doc/lispref/hooks.texi 2014-01-01 07:43:34 +0000 +++ doc/lispref/hooks.texi 2014-02-25 08:41:47 +0000 @@ -1,7 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1998, 2001-2014 Free Software Foundation, -@c Inc. +@c Copyright (C) 1990-1993, 1998, 2001-2014 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @node Standard Hooks @appendix Standard Hooks @@ -213,7 +212,7 @@ @itemx temp-buffer-show-hook @xref{Temporary Displays}. -@item term-setup-hook +@item tty-setup-hook @xref{Terminal-Specific}. @item window-configuration-change-hook === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2014-01-01 07:43:34 +0000 +++ doc/lispref/os.texi 2014-02-25 08:41:47 +0000 @@ -175,8 +175,8 @@ @item If started on a text terminal, it loads the terminal-specific -Lisp library, which is specified by the variable -@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done +Lisp library (@pxref{Terminal-Specific}), and runs the hook +@code{tty-setup-hook}. This is not done in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. @c Now command-line calls command-line-1. @@ -210,7 +210,7 @@ @c daemon/session restore step? @item -It runs @code{emacs-startup-hook} and then @code{term-setup-hook}. +It runs @code{emacs-startup-hook}. @item It calls @code{frame-notice-user-settings}, which modifies the @@ -408,8 +408,7 @@ @defvar emacs-startup-hook This normal hook is run, once, just after handling the command line -arguments, just before @code{term-setup-hook}. In batch mode, Emacs -does not run either of these hooks. +arguments. In batch mode, Emacs does not run this hook. @end defvar @defvar user-init-file @@ -440,12 +439,12 @@ The usual role of a terminal-specific library is to enable special keys to send sequences that Emacs can recognize. It may also need to set or add to @code{input-decode-map} if the Termcap or Terminfo entry -does not specify all the terminal's function keys. @xref{Terminal -Input}. +does not specify all the terminal's function keys. @xref{Terminal Input}. - When the name of the terminal type contains a hyphen or underscore, and no library -is found whose name is identical to the terminal's name, Emacs strips -from the terminal's name the last hyphen or underscore and everything that follows + When the name of the terminal type contains a hyphen or underscore, +and no library is found whose name is identical to the terminal's +name, Emacs strips from the terminal's name the last hyphen or +underscore and everything that follows it, and tries again. This process is repeated until Emacs finds a matching library, or until there are no more hyphens or underscores in the name (i.e., there is no terminal-specific library). For example, if the @@ -454,17 +453,13 @@ @file{term/xterm.el}. If necessary, the terminal library can evaluate @code{(getenv "TERM")} to find the full name of the terminal type. - Your init file can prevent the loading of the -terminal-specific library by setting the variable -@code{term-file-prefix} to @code{nil}. This feature is useful when -experimenting with your own peculiar customizations. + Your init file can prevent the loading of the terminal-specific +library by setting the variable @code{term-file-prefix} to @code{nil}. You can also arrange to override some of the actions of the -terminal-specific library by setting the variable -@code{term-setup-hook}. This is a normal hook that Emacs runs -at the end of its initialization, after loading both -your init file and any terminal-specific libraries. You could -use this hook to define initializations for terminals that do not +terminal-specific library by using @code{tty-setup-hook}. This is +a normal hook that Emacs runs after initializing a new text terminal. +You could use this hook to define initializations for terminals that do not have their own libraries. @xref{Hooks}. @defvar term-file-prefix @@ -484,13 +479,13 @@ On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. @end defvar -@defvar term-setup-hook -This variable is a normal hook that Emacs runs after loading your -init file, the default initialization file (if any) and the -terminal-specific Lisp file. - -You can use @code{term-setup-hook} to override the definitions made by a -terminal-specific file. +@defvar tty-setup-hook +This variable is a normal hook that Emacs runs after initializing a +new text terminal. (This applies when Emacs starts up in non-windowed +mode, and when making a tty @command{emacsclient} connection.) The +hook runs after loading your init file (if applicable) and the +terminal-specific Lisp file, so you can use it to adjust the +definitions made by that file. For a related feature, @pxref{Window Systems, window-setup-hook}. @end defvar === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-02-25 03:11:11 +0000 +++ doc/misc/ChangeLog 2014-02-25 08:41:47 +0000 @@ -1,5 +1,10 @@ 2014-02-25 Glenn Morris + * edt.texi (Quick start, Starting emulation): Update hook details. + * efaq.texi (Fullscreen mode on MS-Windows) + (Terminal setup code works after Emacs has begun): Update hook details. + * vip.texi (Loading VIP): Fix hook example. + * efaq-w32.texi (Bash): Don't use setq with hooks. 2014-02-24 Paul Eggert === modified file 'doc/misc/edt.texi' --- doc/misc/edt.texi 2014-01-06 05:25:46 +0000 +++ doc/misc/edt.texi 2014-02-25 08:41:47 +0000 @@ -91,7 +91,7 @@ @file{.emacs} file: @example -(add-hook term-setup-hook 'edt-emulation-on) +(add-hook 'emacs-startup-hook 'edt-emulation-on) @end example @noindent @strong{Important:} Be sure to read the rest of this manual. @@ -295,7 +295,7 @@ @file{.emacs} file: @example -(add-hook term-setup-hook 'edt-emulation-on) +(add-hook 'emacs-startup-hook 'edt-emulation-on) @end example A reference sheet is included (later on) listing the default EDT === modified file 'doc/misc/efaq.texi' --- doc/misc/efaq.texi 2014-01-31 07:28:17 +0000 +++ doc/misc/efaq.texi 2014-02-25 08:41:47 +0000 @@ -2684,8 +2684,8 @@ put the following in your @file{.emacs} file: @lisp -(add-hook 'term-setup-hook - #'(lambda () (w32-send-sys-command ?\xF030))) +(add-hook 'emacs-startup-hook + (lambda () (w32-send-sys-command ?\xF030))) @end lisp To avoid the slightly distracting visual effect of Emacs starting with @@ -3594,12 +3594,12 @@ code/file execution order is not enforced after startup). To postpone the execution of Emacs Lisp code until after terminal or -window-system setup, treat the code as a @dfn{lambda list} and set the -value of either the @code{term-setup-hook} or @code{window-setup-hook} -variable to this lambda function. For example, +window-system setup, treat the code as a @dfn{lambda list} and add it to +@code{emacs-startup-hook} (or @code{tty-setup-hook} in Emacs 24.4 and +newer). For example, @lisp -(add-hook 'term-setup-hook +(add-hook 'emacs-startup-hook (lambda () (when (string-match "\\`vt220" (or (getenv "TERM") "")) ;; Make vt220's "Do" key behave like M-x: === modified file 'doc/misc/vip.texi' --- doc/misc/vip.texi 2014-01-27 02:02:28 +0000 +++ doc/misc/vip.texi 2014-02-25 08:41:47 +0000 @@ -165,7 +165,7 @@ to be in vi mode whenever Emacs starts up, you can include the following line in your @file{.emacs} file instead of the above line: @example -(setq term-setup-hook 'vip-mode) +(add-hook 'emacs-startup-hook 'vip-mode) @end example @noindent (@xref{Vi Mode}, for the explanation of vi mode.) === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-02-23 19:46:38 +0000 +++ etc/ChangeLog 2014-02-25 08:41:47 +0000 @@ -1,3 +1,7 @@ +2014-02-25 Glenn Morris + + * refcards/vipcard.tex: Hook fix. + 2014-02-23 Juanma Barranquero * NEWS: Fix references to ?« and ?» that got mangled somehow. === modified file 'etc/NEWS' --- etc/NEWS 2014-02-23 19:46:38 +0000 +++ etc/NEWS 2014-02-25 08:41:47 +0000 @@ -1202,7 +1202,12 @@ display or frame whenever a mouse is supported on that display or frame. -*** New hook `tty-setup-hook'. ++++ +*** New hook `tty-setup-hook', run at the end of initializing a text terminal. + ++++ +*** The hook `term-setup-hook' is obsolete. It is entirely equivalent +to `emacs-startup-hook'. See also the new `tty-setup-hook'. ** Window Handling === modified file 'etc/refcards/vipcard.tex' --- etc/refcards/vipcard.tex 2014-01-01 07:43:34 +0000 +++ etc/refcards/vipcard.tex 2014-02-25 08:41:47 +0000 @@ -279,7 +279,7 @@ include the line: \hskip 5ex -\kbd{(setq term-setup-hook 'vip-mode)} +\kbd{(add-hook 'emacs-startup-hook 'vip-mode)} in your \kbd{.emacs} file. Or, you can put the following alias in your \kbd{.cshrc} file. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-24 17:24:14 +0000 +++ lisp/ChangeLog 2014-02-25 08:41:47 +0000 @@ -1,3 +1,12 @@ +2014-02-25 Glenn Morris + + * faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes. + * startup.el (term-setup-hook): Doc fix. Make obsolete. + * term/sun.el (sun-raw-prefix-hooks): + Use tty-setup-hook instead of term-setup-hook. + (terminal-init-sun): Construct message from bytecomp plist. + * term/wyse50.el (enable-arrow-keys): Doc fix. + 2014-02-24 Juanma Barranquero * term/sun.el (kill-region-and-unmark, sun-raw-prefix-hooks): === modified file 'lisp/emulation/edt.el' --- lisp/emulation/edt.el 2014-01-01 07:43:34 +0000 +++ lisp/emulation/edt.el 2014-02-25 08:41:47 +0000 @@ -1,7 +1,6 @@ ;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs -;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1986, 1992-1995, 2000-2014 Free Software Foundation, Inc. ;; Author: Kevin Gallagher ;; Maintainer: Kevin Gallagher @@ -51,7 +50,7 @@ ;; you initiate a GNU Emacs session, by adding the following line to ;; your init file: ;; -;; (add-hook term-setup-hook 'edt-emulation-on) +;; (add-hook 'emacs-startup-hook 'edt-emulation-on) ;; IMPORTANT: Be sure to read the Info node `edt' for more details. ;; It contains very helpful user information. === modified file 'lisp/faces.el' --- lisp/faces.el 2014-02-14 06:59:24 +0000 +++ lisp/faces.el 2014-02-25 08:41:47 +0000 @@ -2107,12 +2107,16 @@ (defvar tty-setup-hook nil "Hook run after running the initialization function of a new text terminal. +Specifically, `tty-run-terminal-initialization' runs this. This can be used to fine tune the `input-decode-map', for example.") (defun tty-run-terminal-initialization (frame &optional type) "Run the special initialization code for the terminal type of FRAME. The optional TYPE parameter may be used to override the autodetected -terminal type to a different value." +terminal type to a different value. As a final step, this runs the +hook `tty-setup-hook'. + +If you set `term-file-prefix' to nil, this function does nothing." (setq type (or type (tty-type frame))) ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this. === modified file 'lisp/startup.el' --- lisp/startup.el 2014-02-10 01:34:22 +0000 +++ lisp/startup.el 2014-02-25 08:41:47 +0000 @@ -1,7 +1,6 @@ ;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*- -;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: internal @@ -282,10 +281,15 @@ "Normal hook run after loading init files and handling the command line.") (defvar term-setup-hook nil - "Normal hook run after loading terminal-specific Lisp code. -It also follows `emacs-startup-hook'. This hook exists for users to set, -so as to override the definitions made by the terminal-specific file. -Emacs never sets this variable itself.") + "Normal hook run immediately after `emacs-startup-hook'. +In new code, there is no reason to use this instead of `emacs-startup-hook'. +If you want to execute terminal-specific Lisp code, for example +to override the definitions made by the terminal-specific file, +see `tty-setup-hook'.") + +(make-obsolete-variable 'term-setup-hook + "use either `emacs-startup-hook' or \ +`tty-setup-hook' instead." "24.4") (defvar inhibit-startup-hooks nil "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'. === modified file 'lisp/term/sun.el' --- lisp/term/sun.el 2014-02-24 17:24:14 +0000 +++ lisp/term/sun.el 2014-02-25 08:41:47 +0000 @@ -123,7 +123,8 @@ (defvar sun-raw-prefix-hooks nil "List of forms to evaluate after setting `sun-raw-prefix'.") -(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1") +;; Obsolete since 21.1, but tty-setup-hook only exists since 24.4. +(make-obsolete-variable 'sun-raw-prefix-hooks 'tty-setup-hook "21.1") @@ -149,7 +150,9 @@ (global-set-key [f7] 'enlarge-window) (when sun-raw-prefix-hooks - (message "sun-raw-prefix-hooks is obsolete! Use term-setup-hook instead!") + (message "sun-raw-prefix-hooks is obsolete! Use %s instead!" + (or (car-safe (get 'sun-raw-prefix-hooks 'byte-obsolete-variable)) + "emacs-startup-hook")) (let ((hooks sun-raw-prefix-hooks)) (while hooks (eval (car hooks)) === modified file 'lisp/term/wyse50.el' --- lisp/term/wyse50.el 2014-01-01 07:43:34 +0000 +++ lisp/term/wyse50.el 2014-02-25 08:41:47 +0000 @@ -1,7 +1,6 @@ ;;; wyse50.el --- terminal support code for Wyse 50 -;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1989, 1993-1994, 2001-2014 Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer , ;; Jim Blandy @@ -132,7 +131,7 @@ (concat "\ea23R" (1+ (frame-width)) "C\eG0")))))) (defun enable-arrow-keys () - "To be called by `term-setup-hook'. Overrides 6 Emacs standard keys + "To be called by `tty-setup-hook'. Overrides 6 Emacs standard keys whose functions are then typed as follows: C-a Funct Left-arrow C-h M-?