------------------------------------------------------------ revno: 115590 fixes bug: http://debbugs.gnu.org/14348 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 16:58:22 +0800 message: * cus-edit.el (custom-magic-alist): Fix "themed" description. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 08:53:22 +0000 +++ lisp/ChangeLog 2013-12-18 08:58:22 +0000 @@ -1,5 +1,8 @@ 2013-12-18 Chong Yidong + * cus-edit.el (custom-magic-alist): Fix "themed" description + (Bug#14348). + * custom.el (custom-push-theme): If custom--inhibit-theme-enable is non-nil, do not create a new entry in the symbol's theme-value or theme-face property; update theme-settings only (Bug#14664). === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2013-08-29 19:55:58 +0000 +++ lisp/cus-edit.el 2013-12-18 08:58:22 +0000 @@ -1931,7 +1931,7 @@ something in this group has been set and saved.") (themed "o" custom-themed "\ THEMED." "\ -visible group members are all at standard values.") +visible group members are set by enabled themes.") (rogue "@" custom-rogue "\ NO CUSTOMIZATION DATA; not intended to be customized." "\ something in this group is not prepared for customization.") @@ -1961,6 +1961,8 @@ This item is marked for saving. `rogue' This item has no customization information. +`themed' + This item was set by an enabled Custom theme. `standard' This item is unchanged from the standard setting. ------------------------------------------------------------ revno: 115589 fixes bug: http://debbugs.gnu.org/14664 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 16:53:22 +0800 message: Fix loading of themes when NO-ENABLE is t. * lisp/custom.el (custom-push-theme): If custom--inhibit-theme-enable is non-nil, do not create a new entry in the symbol's theme-value or theme-face property; update theme-settings only. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 07:54:20 +0000 +++ lisp/ChangeLog 2013-12-18 08:53:22 +0000 @@ -1,5 +1,9 @@ 2013-12-18 Chong Yidong + * custom.el (custom-push-theme): If custom--inhibit-theme-enable + is non-nil, do not create a new entry in the symbol's theme-value + or theme-face property; update theme-settings only (Bug#14664). + * cus-theme.el (custom-new-theme-mode-map): Add bindings (Bug#15674). === modified file 'lisp/custom.el' --- lisp/custom.el 2013-10-30 02:14:16 +0000 +++ lisp/custom.el 2013-12-18 08:53:22 +0000 @@ -869,20 +869,21 @@ (setcar (cdr setting) value))) ;; Add a new setting: (t - (unless old - ;; If the user changed a variable outside of Customize, save - ;; the value to a fake theme, `changed'. If the theme is - ;; later disabled, we use this to bring back the old value. - ;; - ;; For faces, we just use `face-new-frame-defaults' to - ;; recompute when the theme is disabled. - (when (and (eq prop 'theme-value) - (boundp symbol)) - (let ((sv (get symbol 'standard-value)) - (val (symbol-value symbol))) - (unless (and sv (equal (eval (car sv)) val)) - (setq old `((changed ,(custom-quote val)))))))) - (put symbol prop (cons (list theme value) old)) + (unless custom--inhibit-theme-enable + (unless old + ;; If the user changed a variable outside of Customize, save + ;; the value to a fake theme, `changed'. If the theme is + ;; later disabled, we use this to bring back the old value. + ;; + ;; For faces, we just use `face-new-frame-defaults' to + ;; recompute when the theme is disabled. + (when (and (eq prop 'theme-value) + (boundp symbol)) + (let ((sv (get symbol 'standard-value)) + (val (symbol-value symbol))) + (unless (and sv (equal (eval (car sv)) val)) + (setq old `((changed ,(custom-quote val)))))))) + (put symbol prop (cons (list theme value) old))) (put theme 'theme-settings (cons (list prop symbol theme value) theme-settings)))))) ------------------------------------------------------------ revno: 115588 fixes bug: http://debbugs.gnu.org/15674 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 15:54:20 +0800 message: * cus-theme.el (custom-new-theme-mode-map): Add bindings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 05:10:58 +0000 +++ lisp/ChangeLog 2013-12-18 07:54:20 +0000 @@ -1,5 +1,8 @@ 2013-12-18 Chong Yidong + * cus-theme.el (custom-new-theme-mode-map): Add bindings + (Bug#15674). + * replace.el (occur-engine): Avoid infloop (Bug#7593). 2013-12-18 Kazuhiro Ito (tiny change) === modified file 'lisp/cus-theme.el' --- lisp/cus-theme.el 2013-04-13 01:10:09 +0000 +++ lisp/cus-theme.el 2013-12-18 07:54:20 +0000 @@ -32,9 +32,11 @@ (defvar custom-new-theme-mode-map (let ((map (make-keymap))) - (set-keymap-parent map widget-keymap) + (set-keymap-parent map (make-composed-keymap widget-keymap + special-mode-map)) (suppress-keymap map) (define-key map "\C-x\C-s" 'custom-theme-write) + (define-key map "q" 'Custom-buffer-done) (define-key map "n" 'widget-forward) (define-key map "p" 'widget-backward) map) ------------------------------------------------------------ revno: 115587 fixes bugs: http://debbugs.gnu.org/11522 http://debbugs.gnu.org/14874 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 13:31:11 +0800 message: Minor fixes for Lispref's modes.texi * modes.texi (Defining Minor Modes): Fix typo. (Keymaps and Minor Modes): Fix binding convention. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-12-13 18:25:30 +0000 +++ doc/lispref/ChangeLog 2013-12-18 05:31:11 +0000 @@ -1,3 +1,8 @@ +2013-12-18 Chong Yidong + + * modes.texi (Defining Minor Modes): Fix typo (Bug#14874). + (Keymaps and Minor Modes): Fix binding convention (Bug#11522). + 2013-12-13 Glenn Morris * internals.texi (Building Emacs): === modified file 'doc/lispref/modes.texi' --- doc/lispref/modes.texi 2013-11-29 03:38:20 +0000 +++ doc/lispref/modes.texi 2013-12-18 05:31:11 +0000 @@ -1506,9 +1506,11 @@ own definition of @code{self-insert-command} for the standard one. The editor command loop handles this function specially.) -The key sequences bound in a minor mode should consist of @kbd{C-c} -followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other -punctuation characters are reserved for major modes.) +Minor modes may bind commands to key sequences consisting of @kbd{C-c} +followed by a punctuation character. However, sequences consisting of +@kbd{C-c} followed by one of @kbd{@{@}<>:;}, or a control character or +digit, are reserved for major modes. Also, @kbd{C-c @var{letter}} is +reserved for users. @xref{Key Binding Conventions}. @node Defining Minor Modes @subsection Defining Minor Modes @@ -1683,7 +1685,7 @@ This defines a global toggle named @var{global-mode} whose meaning is to enable or disable the buffer-local minor mode @var{mode} in all buffers. To turn on the minor mode in a buffer, it uses the function -@var{turn-on}; to turn off the minor mode, it calls @code{mode} with +@var{turn-on}; to turn off the minor mode, it calls @var{mode} with @minus{}1 as argument. Globally enabling the mode also affects buffers subsequently created ------------------------------------------------------------ revno: 115586 fixes bug: http://debbugs.gnu.org/7593 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 13:10:58 +0800 message: * replace.el (occur-engine): Avoid infloop. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 05:01:30 +0000 +++ lisp/ChangeLog 2013-12-18 05:10:58 +0000 @@ -1,3 +1,7 @@ +2013-12-18 Chong Yidong + + * replace.el (occur-engine): Avoid infloop (Bug#7593). + 2013-12-18 Kazuhiro Ito (tiny change) * progmodes/make-mode.el (makefile-fill-paragraph): Fix infloop === modified file 'lisp/replace.el' --- lisp/replace.el 2013-11-30 08:42:28 +0000 +++ lisp/replace.el 2013-12-18 05:10:58 +0000 @@ -1457,7 +1457,9 @@ ;; so as to override faces copied from the buffer. `(face ,match-face))) curstring) - (setq start (match-end 0)))) + ;; Avoid infloop (Bug#7593). + (let ((end (match-end 0))) + (setq start (if (= start end) (1+ start) end))))) ;; Generate the string to insert for this match (let* ((match-prefix ;; Using 7 digits aligns tabs properly. ------------------------------------------------------------ revno: 115585 fixes bug: http://debbugs.gnu.org/13914 author: Kazuhiro Ito committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 13:01:30 +0800 message: make-mode.el (makefile-fill-paragraph): Fix infloop. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 04:46:49 +0000 +++ lisp/ChangeLog 2013-12-18 05:01:30 +0000 @@ -1,3 +1,8 @@ +2013-12-18 Kazuhiro Ito (tiny change) + + * progmodes/make-mode.el (makefile-fill-paragraph): Fix infloop + (Bug#13914). + 2013-12-18 Shigeru Fukaya * apropos.el (apropos-words-to-regexp): Fix algorithm (Bug#13946). === modified file 'lisp/progmodes/make-mode.el' --- lisp/progmodes/make-mode.el 2013-06-15 02:25:00 +0000 +++ lisp/progmodes/make-mode.el 2013-12-18 05:01:30 +0000 @@ -1300,7 +1300,8 @@ (point)))) (end (save-excursion - (while (= (preceding-char) ?\\) + (while (and (= (preceding-char) ?\\) + (not (eobp))) (end-of-line 2)) (point)))) (save-restriction ------------------------------------------------------------ revno: 115584 fixes bug: http://debbugs.gnu.org/13946 author: Shigeru Fukaya committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 12:46:49 +0800 message: apropos.el (apropos-words-to-regexp): Fix algorithm. * apropos.el (apropos-words-to-regexp): Fix algorithm. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 03:25:52 +0000 +++ lisp/ChangeLog 2013-12-18 04:46:49 +0000 @@ -1,3 +1,7 @@ +2013-12-18 Shigeru Fukaya + + * apropos.el (apropos-words-to-regexp): Fix algorithm (Bug#13946). + 2013-12-18 Glenn Morris * Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. === modified file 'lisp/apropos.el' --- lisp/apropos.el 2013-08-04 20:18:11 +0000 +++ lisp/apropos.el 2013-12-18 04:46:49 +0000 @@ -341,16 +341,21 @@ (defun apropos-words-to-regexp (words wild) - "Make regexp matching any two of the words in WORDS." - (concat "\\(" - (mapconcat 'identity words "\\|") - "\\)" - (if (cdr words) - (concat wild - "\\(" - (mapconcat 'identity words "\\|") - "\\)") - ""))) + "Make regexp matching any two of the words in WORDS. +WILD should be a subexpression matching wildcards between matches." + (setq words (delete-dups (copy-sequence words))) + (if (null (cdr words)) + (car words) + (mapconcat + (lambda (w) + (concat "\\(?:" w "\\)" ;; parens for synonyms + wild "\\(?:" + (mapconcat 'identity + (delq w (copy-sequence words)) + "\\|") + "\\)")) + words + "\\|"))) ;;;###autoload (defun apropos-read-pattern (subject) ------------------------------------------------------------ revno: 115583 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 20:19:08 -0800 message: * src/lread.c (openp): Further fix for previous. diff: === modified file 'src/lread.c' --- src/lread.c 2013-12-18 04:05:57 +0000 +++ src/lread.c 2013-12-18 04:19:08 +0000 @@ -1450,7 +1450,8 @@ but store the found remote file name in *STOREPTR. If NEWER is true, try all SUFFIXes and return the result for the - newest file that exists. Does not apply to remote files. */ + newest file that exists. Does not apply to remote files, + or if PREDICATE is specified. */ int openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, @@ -1623,7 +1624,7 @@ if (fd >= 0) { - if (newer) + if (newer && !NATNUMP (predicate)) { struct timespec mtime = get_stat_mtime (&st); ------------------------------------------------------------ revno: 115582 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 20:05:57 -0800 message: * src/lread.c (openp): Fix previous change (don't leak file descriptors) diff: === modified file 'src/lread.c' --- src/lread.c 2013-12-18 03:21:48 +0000 +++ src/lread.c 2013-12-18 04:05:57 +0000 @@ -1634,6 +1634,7 @@ save_mtime = mtime; save_string = string; } + else emacs_close (fd); } else { ------------------------------------------------------------ revno: 115581 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 19:25:52 -0800 message: ChangeLog tweak diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 03:21:48 +0000 +++ lisp/ChangeLog 2013-12-18 03:25:52 +0000 @@ -1,6 +1,7 @@ 2013-12-18 Glenn Morris * Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. + * cus-start.el (load-prefer-newer): New option. 2013-12-18 Le Wang @@ -13,8 +14,6 @@ 2013-12-18 Glenn Morris - * cus-start.el (load-prefer-newer): New option. - * mail/emacsbug.el (report-emacs-bug): Only mention enable-multibyte-characters if non-standard. ------------------------------------------------------------ revno: 115580 fixes bug: http://debbugs.gnu.org/2061 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 19:21:48 -0800 message: Add load-prefer-newer option, to load .el if newer than .elc * src/lread.c (Fload): Pass load_prefer_newer to openp. Don't bother checking mtime if openp already did it. (openp): Add `newer' argument, to check all suffixes and find the newest file. (syms_of_lread) : New option. * src/callproc.c (call_process): * src/charset.c (load_charset_map_from_file): * src/emacs.c (init_cmdargs): * src/image.c (x_create_bitmap_from_file, x_find_image_file): * src/lisp.h (openp): * lread.c (Flocate_file_internal): * src/process.c (Fformat_network_address): * src/sound.c (Fplay_sound_internal): * src/w32.c (check_windows_init_file): * src/w32proc.c (sys_spawnve): Update for new arg spec of openp. * lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. * etc/NEWS: Mention this. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-12-16 21:48:51 +0000 +++ etc/NEWS 2013-12-18 03:21:48 +0000 @@ -807,6 +807,11 @@ * Lisp Changes in Emacs 24.4 +** New option `load-prefer-newer', if non-nil, means that when both +.el and .elc versions of a file exist, rather than `load' always +choosing the .elc version, it will choose whichever is newer +(unless you explicitly specify one or the other). + ** New function get-pos-property. ** New hook `pre-redisplay-function'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 03:02:39 +0000 +++ lisp/ChangeLog 2013-12-18 03:21:48 +0000 @@ -1,3 +1,7 @@ +2013-12-18 Glenn Morris + + * Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t. + 2013-12-18 Le Wang * comint.el (comint-previous-matching-input-from-input): Retain @@ -9,6 +13,8 @@ 2013-12-18 Glenn Morris + * cus-start.el (load-prefer-newer): New option. + * mail/emacsbug.el (report-emacs-bug): Only mention enable-multibyte-characters if non-standard. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2013-12-16 22:35:57 +0000 +++ lisp/Makefile.in 2013-12-18 03:21:48 +0000 @@ -88,7 +88,8 @@ BIG_STACK_DEPTH = 2200 BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))" -BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS) +# Set load-prefer-newer for the benefit of the non-bootstrappers. +BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) --eval '(setq load-prefer-newer t)' $(BYTE_COMPILE_EXTRA_FLAGS) # Files to compile before others during a bootstrap. This is done to # speed up the bootstrap process. They're ordered by size, so we use === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2013-11-30 09:25:31 +0000 +++ lisp/cus-start.el 2013-12-18 03:21:48 +0000 @@ -312,6 +312,7 @@ ;; :format "%[Current dir?%] %v" ;; (const :tag " current dir" nil) ;; (directory :format "%v")))) + (load-prefer-newer lisp boolean "24.4") ;; minibuf.c (enable-recursive-minibuffers minibuffer boolean) (history-length minibuffer === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-18 01:06:16 +0000 +++ src/ChangeLog 2013-12-18 03:21:48 +0000 @@ -1,5 +1,21 @@ 2013-12-18 Glenn Morris + * lread.c (Fload): Pass load_prefer_newer to openp. + Don't bother checking mtime if openp already did it. + (openp): Add `newer' argument, to check all suffixes + and find the newest file. + (syms_of_lread) : New option. (Bug#2061) + * callproc.c (call_process): + * charset.c (load_charset_map_from_file): + * emacs.c (init_cmdargs): + * image.c (x_create_bitmap_from_file, x_find_image_file): + * lisp.h (openp): + * lread.c (Flocate_file_internal): + * process.c (Fformat_network_address): + * sound.c (Fplay_sound_internal): + * w32.c (check_windows_init_file): + * w32proc.c (sys_spawnve): Update for new arg spec of openp. + * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend. 2013-12-17 Eli Zaretskii === modified file 'src/callproc.c' --- src/callproc.c 2013-12-07 17:21:57 +0000 +++ src/callproc.c 2013-12-18 03:21:48 +0000 @@ -465,7 +465,7 @@ int ok; GCPRO3 (buffer, current_dir, error_file); - ok = openp (Vexec_path, args[0], Vexec_suffixes, &path, make_number (X_OK)); + ok = openp (Vexec_path, args[0], Vexec_suffixes, &path, make_number (X_OK), 0); UNGCPRO; if (ok < 0) report_file_error ("Searching for program", args[0]); === modified file 'src/charset.c' --- src/charset.c 2013-11-19 08:57:22 +0000 +++ src/charset.c 2013-12-18 03:21:48 +0000 @@ -1,13 +1,15 @@ /* Basic character set support. - Copyright (C) 2001-2013 Free Software Foundation, Inc. - Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 - National Institute of Advanced Industrial Science and Technology (AIST) - Registration Number H14PRO021 - - Copyright (C) 2003, 2004 - National Institute of Advanced Industrial Science and Technology (AIST) - Registration Number H13PRO009 + +Copyright (C) 2001-2013 Free Software Foundation, Inc. + +Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005, 2006, 2007, 2008, 2009, 2010, 2011 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H14PRO021 + +Copyright (C) 2003, 2004 + National Institute of Advanced Industrial Science and Technology (AIST) + Registration Number H13PRO009 This file is part of GNU Emacs. @@ -493,7 +495,7 @@ count = SPECPDL_INDEX (); record_unwind_protect_nothing (); specbind (Qfile_name_handler_alist, Qnil); - fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); + fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil, 0); fp = fd < 0 ? 0 : fdopen (fd, "r"); if (!fp) { === modified file 'src/emacs.c' --- src/emacs.c 2013-12-18 01:06:16 +0000 +++ src/emacs.c 2013-12-18 03:21:48 +0000 @@ -424,7 +424,7 @@ { Lisp_Object found; int yes = openp (Vexec_path, Vinvocation_name, - Vexec_suffixes, &found, make_number (X_OK)); + Vexec_suffixes, &found, make_number (X_OK), 0); if (yes == 1) { /* Add /: to the front of the name === modified file 'src/image.c' --- src/image.c 2013-12-14 21:36:44 +0000 +++ src/image.c 2013-12-18 03:21:48 +0000 @@ -327,7 +327,7 @@ } /* Search bitmap-file-path for the file, if appropriate. */ - if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK)) < 0) + if (openp (Vx_bitmap_file_path, file, Qnil, &found, make_number (R_OK), 0) < 0) return -1; filename = SSDATA (found); @@ -2242,7 +2242,7 @@ Vx_bitmap_file_path); /* Try to find FILE in data-directory/images, then x-bitmap-file-path. */ - fd = openp (search_path, file, Qnil, &file_found, Qnil); + fd = openp (search_path, file, Qnil, &file_found, Qnil, 0); if (fd == -1) file_found = Qnil; === modified file 'src/lisp.h' --- src/lisp.h 2013-12-14 21:36:44 +0000 +++ src/lisp.h 2013-12-18 03:21:48 +0000 @@ -3791,7 +3791,7 @@ Vcurrent_load_list = Fcons (x, Vcurrent_load_list); } extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, - Lisp_Object *, Lisp_Object); + Lisp_Object *, Lisp_Object, int); extern Lisp_Object string_to_number (char const *, int, bool); extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object), Lisp_Object); === modified file 'src/lread.c' --- src/lread.c 2013-12-16 22:35:57 +0000 +++ src/lread.c 2013-12-18 03:21:48 +0000 @@ -1129,7 +1129,7 @@ } } - fd = openp (Vload_path, file, suffixes, &found, Qnil); + fd = openp (Vload_path, file, suffixes, &found, Qnil, load_prefer_newer); UNGCPRO; } @@ -1252,29 +1252,36 @@ #ifdef DOS_NT fmode = "rb"; #endif /* DOS_NT */ - result = stat (SSDATA (efound), &s1); - if (result == 0) - { - SSET (efound, SBYTES (efound) - 1, 0); - result = stat (SSDATA (efound), &s2); - SSET (efound, SBYTES (efound) - 1, 'c'); - } - - if (result == 0 - && timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0) - { - /* Make the progress messages mention that source is newer. */ - newer = 1; - - /* If we won't print another message, mention this anyway. */ - if (!NILP (nomessage) && !force_load_messages) - { - Lisp_Object msg_file; - msg_file = Fsubstring (found, make_number (0), make_number (-1)); - message_with_string ("Source file `%s' newer than byte-compiled file", - msg_file, 1); - } - } + + /* openp already checked for newness, no point doing it again. + FIXME would be nice to get a message when openp + ignores suffix order due to load_prefer_newer. */ + if (!load_prefer_newer) + { + result = stat (SSDATA (efound), &s1); + if (result == 0) + { + SSET (efound, SBYTES (efound) - 1, 0); + result = stat (SSDATA (efound), &s2); + SSET (efound, SBYTES (efound) - 1, 'c'); + } + + if (result == 0 + && timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0) + { + /* Make the progress messages mention that source is newer. */ + newer = 1; + + /* If we won't print another message, mention this anyway. */ + if (!NILP (nomessage) && !force_load_messages) + { + Lisp_Object msg_file; + msg_file = Fsubstring (found, make_number (0), make_number (-1)); + message_with_string ("Source file `%s' newer than byte-compiled file", + msg_file, 1); + } + } + } /* !load_prefer_newer */ UNGCPRO; } } @@ -1413,7 +1420,7 @@ (Lisp_Object filename, Lisp_Object path, Lisp_Object suffixes, Lisp_Object predicate) { Lisp_Object file; - int fd = openp (path, filename, suffixes, &file, predicate); + int fd = openp (path, filename, suffixes, &file, predicate, 0); if (NILP (predicate) && fd >= 0) emacs_close (fd); return file; @@ -1440,11 +1447,14 @@ nil is stored there on failure. If the file we find is remote, return -2 - but store the found remote file name in *STOREPTR. */ + but store the found remote file name in *STOREPTR. + + If NEWER is true, try all SUFFIXes and return the result for the + newest file that exists. Does not apply to remote files. */ int openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, - Lisp_Object *storeptr, Lisp_Object predicate) + Lisp_Object *storeptr, Lisp_Object predicate, int newer) { ptrdiff_t fn_size = 100; char buf[100]; @@ -1453,9 +1463,11 @@ ptrdiff_t want_length; Lisp_Object filename; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; - Lisp_Object string, tail, encoded_fn; + Lisp_Object string, tail, encoded_fn, save_string; ptrdiff_t max_suffix_len = 0; int last_errno = ENOENT; + struct timespec save_mtime; + int save_fd = 0; CHECK_STRING (str); @@ -1556,17 +1568,18 @@ if (exists) { - /* We succeeded; return this descriptor and filename. */ - if (storeptr) - *storeptr = string; - UNGCPRO; - return -2; + /* We succeeded; return this descriptor and filename. */ + if (storeptr) + *storeptr = string; + UNGCPRO; + return -2; } } else { int fd; const char *pfn; + struct stat st; encoded_fn = ENCODE_FILE (string); pfn = SSDATA (encoded_fn); @@ -1597,7 +1610,6 @@ } else { - struct stat st; int err = (fstat (fd, &st) != 0 ? errno : S_ISDIR (st.st_mode) ? EISDIR : 0); if (err) @@ -1611,12 +1623,36 @@ if (fd >= 0) { - /* We succeeded; return this descriptor and filename. */ - if (storeptr) - *storeptr = string; - UNGCPRO; - return fd; + if (newer) + { + struct timespec mtime = get_stat_mtime (&st); + + if (!save_fd || timespec_cmp (save_mtime, mtime) < 0) + { + if (save_fd) emacs_close (save_fd); + save_fd = fd; + save_mtime = mtime; + save_string = string; + } + } + else + { + /* We succeeded; return this descriptor and filename. */ + if (storeptr) + *storeptr = string; + UNGCPRO; + return fd; + } } + + /* No more suffixes. Return the newest. */ + if (newer && save_fd && ! CONSP (XCDR (tail))) + { + if (storeptr) + *storeptr = save_string; + UNGCPRO; + return save_fd; + } } } if (absolute) @@ -4632,6 +4668,17 @@ Vold_style_backquotes = Qnil; DEFSYM (Qold_style_backquotes, "old-style-backquotes"); + DEFVAR_BOOL ("load-prefer-newer", load_prefer_newer, + doc: /* Non-nil means `load' prefers the newest version of a file. +This applies when a filename suffix is not explicitly specified and +`load' is trying various possible suffixes (see `load-suffixes' and +`load-file-rep-suffixes'). Normally, it stops at the first file +that exists. If this option is non-nil, it checks all suffixes and +uses whichever file is newest. +Note that if you customize this, obviously it will not affect files +that are loaded before your customizations are read! */); + load_prefer_newer = 0; + /* Vsource_directory was initialized in init_lread. */ DEFSYM (Qcurrent_load_list, "current-load-list"); === modified file 'src/process.c' --- src/process.c 2013-12-15 18:37:48 +0000 +++ src/process.c 2013-12-18 03:21:48 +0000 @@ -1530,7 +1530,7 @@ tem = Qnil; GCPRO4 (name, program, buffer, current_dir); - openp (Vexec_path, program, Vexec_suffixes, &tem, make_number (X_OK)); + openp (Vexec_path, program, Vexec_suffixes, &tem, make_number (X_OK), 0); UNGCPRO; if (NILP (tem)) report_file_error ("Searching for program", program); === modified file 'src/sound.c' --- src/sound.c 2013-10-04 07:36:22 +0000 +++ src/sound.c 2013-12-18 03:21:48 +0000 @@ -1332,7 +1332,7 @@ { /* Open the sound file. */ current_sound->fd = openp (list1 (Vdata_directory), - attrs[SOUND_FILE], Qnil, &file, Qnil); + attrs[SOUND_FILE], Qnil, &file, Qnil, 0); if (current_sound->fd < 0) sound_perror ("Could not open sound file"); === modified file 'src/w32.c' --- src/w32.c 2013-12-17 18:00:25 +0000 +++ src/w32.c 2013-12-18 03:21:48 +0000 @@ -1,5 +1,6 @@ /* Utility and Unix shadow routines for GNU Emacs on the Microsoft Windows API. - Copyright (C) 1994-1995, 2000-2013 Free Software Foundation, Inc. + +Copyright (C) 1994-1995, 2000-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -8602,7 +8603,7 @@ need to ENCODE_FILE here, but we do need to convert the file names from UTF-8 to ANSI. */ init_file = build_string ("term/w32-win"); - fd = openp (Vload_path, init_file, Fget_load_suffixes (), NULL, Qnil); + fd = openp (Vload_path, init_file, Fget_load_suffixes (), NULL, Qnil, 0); if (fd < 0) { Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil); === modified file 'src/w32proc.c' --- src/w32proc.c 2013-12-07 17:21:57 +0000 +++ src/w32proc.c 2013-12-18 03:21:48 +0000 @@ -1,5 +1,6 @@ /* Process support for GNU Emacs on the Microsoft Windows API. - Copyright (C) 1992, 1995, 1999-2013 Free Software Foundation, Inc. + +Copyright (C) 1992, 1995, 1999-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1592,7 +1593,7 @@ program = build_string (cmdname); full = Qnil; GCPRO1 (program); - openp (Vexec_path, program, Vexec_suffixes, &full, make_number (X_OK)); + openp (Vexec_path, program, Vexec_suffixes, &full, make_number (X_OK), 0); UNGCPRO; if (NILP (full)) { ------------------------------------------------------------ revno: 115579 fixes bug: http://debbugs.gnu.org/13404 author: Le Wang committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 11:02:39 +0800 message: * comint.el (comint-previous-matching-input-from-input): Retain point. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 02:43:47 +0000 +++ lisp/ChangeLog 2013-12-18 03:02:39 +0000 @@ -1,3 +1,8 @@ +2013-12-18 Le Wang + + * comint.el (comint-previous-matching-input-from-input): Retain + point (Bug#13404). + 2013-12-18 Chong Yidong * simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016). === modified file 'lisp/comint.el' --- lisp/comint.el 2013-12-13 00:47:18 +0000 +++ lisp/comint.el 2013-12-18 03:02:39 +0000 @@ -1210,8 +1210,9 @@ With prefix argument N, search for Nth previous match. If N is negative, search forwards for the -Nth following match." (interactive "p") - (if (not (memq last-command '(comint-previous-matching-input-from-input - comint-next-matching-input-from-input))) + (let ((opoint (point))) + (unless (memq last-command '(comint-previous-matching-input-from-input + comint-next-matching-input-from-input)) ;; Starting a new search (setq comint-matching-input-from-input-string (buffer-substring @@ -1219,9 +1220,10 @@ (process-mark (get-buffer-process (current-buffer)))) (point)) comint-input-ring-index nil)) - (comint-previous-matching-input - (concat "^" (regexp-quote comint-matching-input-from-input-string)) - n)) + (comint-previous-matching-input + (concat "^" (regexp-quote comint-matching-input-from-input-string)) + n) + (goto-char opoint))) (defun comint-next-matching-input-from-input (n) "Search forwards through input history for match for current input. ------------------------------------------------------------ revno: 115578 committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 10:43:47 +0800 message: * simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-18 01:03:07 +0000 +++ lisp/ChangeLog 2013-12-18 02:43:47 +0000 @@ -1,3 +1,7 @@ +2013-12-18 Chong Yidong + + * simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016). + 2013-12-18 Glenn Morris * mail/emacsbug.el (report-emacs-bug): === modified file 'lisp/simple.el' --- lisp/simple.el 2013-12-17 15:48:26 +0000 +++ lisp/simple.el 2013-12-18 02:43:47 +0000 @@ -3764,7 +3764,17 @@ (buffer-substring-no-properties mark (+ mark len)))))))) (defun append-next-kill (&optional interactive) - "Cause following command, if it kills, to append to previous kill. + "Cause following command, if it kills, to add to previous kill. +If the next command kills forward from point, the kill is +appended to the previous killed text. If the command kills +backward, the kill is prepended. Kill commands that act on the +region, such as `kill-region', are regarded as killing forward if +point is after mark, and killing backward if point is before +mark. + +If the next command is not a kill command, `append-next-kill' has +no effect. + The argument is used for internal purposes; do not supply one." (interactive "p") ;; We don't use (interactive-p), since that breaks kbd macros. ------------------------------------------------------------ revno: 115577 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 20:06:16 -0500 message: * src/emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-17 18:00:25 +0000 +++ src/ChangeLog 2013-12-18 01:06:16 +0000 @@ -1,3 +1,7 @@ +2013-12-18 Glenn Morris + + * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend. + 2013-12-17 Eli Zaretskii * w32.c (getloadavg): Don't index samples[] array with negative === modified file 'src/emacs.c' --- src/emacs.c 2013-12-15 17:52:14 +0000 +++ src/emacs.c 2013-12-18 01:06:16 +0000 @@ -1714,7 +1714,6 @@ #ifdef HAVE_NS { "-NSAutoLaunch", 0, 5, 1 }, { "-NXAutoLaunch", 0, 5, 1 }, - { "-disable-font-backend", "--disable-font-backend", 65, 0 }, { "-_NSMachLaunch", 0, 85, 1 }, { "-MachLaunch", 0, 85, 1 }, { "-macosx", 0, 85, 0 }, ------------------------------------------------------------ revno: 115576 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-12-17 20:03:07 -0500 message: * lisp/mail/emacsbug.el (report-emacs-bug): Only mention enable-multibyte-characters if non-standard. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 21:39:15 +0000 +++ lisp/ChangeLog 2013-12-18 01:03:07 +0000 @@ -1,3 +1,8 @@ +2013-12-18 Glenn Morris + + * mail/emacsbug.el (report-emacs-bug): + Only mention enable-multibyte-characters if non-standard. + 2013-12-17 Juri Linkov * arc-mode.el (archive-extract-by-file): Check if directory exists === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2013-09-17 07:39:54 +0000 +++ lisp/mail/emacsbug.el 2013-12-18 01:03:07 +0000 @@ -260,8 +260,11 @@ "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES" "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG" "XMODIFIERS")) (insert (format " locale-coding-system: %s\n" locale-coding-system)) - (insert (format " default enable-multibyte-characters: %s\n" - (default-value 'enable-multibyte-characters))) + ;; Only ~ 0.2% of people from a sample of 3200 changed this from + ;; the default, t. + (or (default-value 'enable-multibyte-characters) + (insert (format " default enable-multibyte-characters: %s\n" + (default-value 'enable-multibyte-characters)))) (insert "\n") (insert (format "Major mode: %s\n" (format-mode-line ------------------------------------------------------------ revno: 115575 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-12-17 23:39:15 +0200 message: * lisp/arc-mode.el (archive-extract-by-file): Check if directory exists before deletion to not show irrelevant errors if it doesn't exist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 21:17:05 +0000 +++ lisp/ChangeLog 2013-12-17 21:39:15 +0000 @@ -1,5 +1,10 @@ 2013-12-17 Juri Linkov + * arc-mode.el (archive-extract-by-file): Check if directory exists + before deletion to not show irrelevant errors if it doesn't exist. + +2013-12-17 Juri Linkov + * menu-bar.el (menu-bar-tools-menu): Add `browse-web'. (Bug#14751) === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2013-11-13 20:40:12 +0000 +++ lisp/arc-mode.el 2013-12-17 21:39:15 +0000 @@ -1164,8 +1164,10 @@ (delete-file (expand-file-name name dest))) (while (file-name-directory name) (setq name (directory-file-name (file-name-directory name))) - (delete-directory (expand-file-name name dest))) - (delete-directory dest)))) + (when (file-directory-p (expand-file-name name dest)) + (delete-directory (expand-file-name name dest)))) + (when (file-directory-p dest) + (delete-directory dest))))) (defun archive-extract-other-window () "In archive mode, find this member in another window." ------------------------------------------------------------ revno: 115574 fixes bug: http://debbugs.gnu.org/16178 committer: Juri Linkov branch nick: trunk timestamp: Tue 2013-12-17 23:17:05 +0200 message: * lisp/menu-bar.el (menu-bar-tools-menu): Add `browse-web'. * lisp/startup.el (fancy-startup-screen, fancy-about-screen): Set browse-url-browser-function to eww-browse-url locally. (Bug#14751) * lisp/net/browse-url.el (browse-url-browser-function): Move `eww' closer to similar functions. * lisp/net/eww.el (browse-web): Add alias to `eww'. (eww-mode-map): Bind "r" to `eww-forward-url' like in Info. Bind "S-SPC" to `scroll-down-command'. (Bug#16178) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 18:11:37 +0000 +++ lisp/ChangeLog 2013-12-17 21:17:05 +0000 @@ -1,3 +1,19 @@ +2013-12-17 Juri Linkov + + * menu-bar.el (menu-bar-tools-menu): Add `browse-web'. + (Bug#14751) + + * net/eww.el (browse-web): Add alias to `eww'. + (eww-mode-map): Bind "r" to `eww-forward-url' like in Info. + Bind "S-SPC" to `scroll-down-command'. (Bug#16178) + + * net/browse-url.el (browse-url-browser-function): Move `eww' + closer to similar functions. + + * startup.el (fancy-startup-screen, fancy-about-screen): + Set browse-url-browser-function to eww-browse-url locally. + (Bug#14751) + 2013-12-17 Stefan Monnier * window.el (window--pixel-to-total): Remove unused `mini' var. === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-12-12 00:42:16 +0000 +++ lisp/menu-bar.el 2013-12-17 21:17:05 +0000 @@ -1418,6 +1418,8 @@ (bindings--define-key menu [separator-net] menu-bar-separator) + (bindings--define-key menu [browse-web] + '(menu-item "Browse the Web..." browse-web)) (bindings--define-key menu [directory-search] '(menu-item "Directory Search" eudc-tools-menu)) (bindings--define-key menu [compose-mail] === modified file 'lisp/net/browse-url.el' --- lisp/net/browse-url.el 2013-12-03 12:21:13 +0000 +++ lisp/net/browse-url.el 2013-12-17 21:17:05 +0000 @@ -227,13 +227,13 @@ (function-item :tag "Emacs W3" :value browse-url-w3) (function-item :tag "W3 in another Emacs via `gnudoit'" :value browse-url-w3-gnudoit) + (function-item :tag "eww" :value eww-browse-url) (function-item :tag "Mozilla" :value browse-url-mozilla) (function-item :tag "Firefox" :value browse-url-firefox) (function-item :tag "Chromium" :value browse-url-chromium) (function-item :tag "Galeon" :value browse-url-galeon) (function-item :tag "Epiphany" :value browse-url-epiphany) (function-item :tag "Netscape" :value browse-url-netscape) - (function-item :tag "eww" :value eww-browse-url) (function-item :tag "Mosaic" :value browse-url-mosaic) (function-item :tag "Mosaic using CCI" :value browse-url-cci) (function-item :tag "Text browser in an xterm window" === modified file 'lisp/net/eww.el' --- lisp/net/eww.el 2013-12-16 23:40:17 +0000 +++ lisp/net/eww.el 2013-12-17 21:17:05 +0000 @@ -159,6 +159,8 @@ (replace-regexp-in-string " " "+" url)))))) (url-retrieve url 'eww-render (list url))) +;;;###autoload (defalias 'browse-web 'eww) + ;;;###autoload (defun eww-open-file (file) "Render a file using EWW." @@ -399,10 +401,11 @@ (define-key map [tab] 'shr-next-link) (define-key map [backtab] 'shr-previous-link) (define-key map [delete] 'scroll-down-command) + (define-key map [?\S-\ ] 'scroll-down-command) (define-key map "\177" 'scroll-down-command) (define-key map " " 'scroll-up-command) (define-key map "l" 'eww-back-url) - (define-key map "f" 'eww-forward-url) + (define-key map "r" 'eww-forward-url) (define-key map "n" 'eww-next-url) (define-key map "p" 'eww-previous-url) (define-key map "u" 'eww-up-url) === modified file 'lisp/startup.el' --- lisp/startup.el 2013-12-09 17:33:01 +0000 +++ lisp/startup.el 2013-12-17 21:17:05 +0000 @@ -1742,6 +1742,7 @@ (insert "\n") (fancy-startup-tail concise)) (use-local-map splash-screen-keymap) + (setq-local browse-url-browser-function 'eww-browse-url) (setq tab-width 22 buffer-read-only t) (set-buffer-modified-p nil) @@ -1779,6 +1780,7 @@ (goto-char (point-min)) (force-mode-line-update)) (use-local-map splash-screen-keymap) + (setq-local browse-url-browser-function 'eww-browse-url) (setq tab-width 22) (setq buffer-read-only t) (goto-char (point-min)) ------------------------------------------------------------ revno: 115573 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-12-17 12:43:43 -0800 message: Merge from gnulib, incorporating: 2013-12-17 gettimeofday: port recent C++ fix to Emacs 2013-12-17 gettimeofday: fix C++ crosscompilation 2013-12-17 qacl: port to Windows better * lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4: Update from gnulib. * lib/gnulib.mk: Regenerate. diff: === modified file 'ChangeLog' --- ChangeLog 2013-12-16 17:58:25 +0000 +++ ChangeLog 2013-12-17 20:43:43 +0000 @@ -1,3 +1,13 @@ +2013-12-17 Paul Eggert + + Merge from gnulib, incorporating: + 2013-12-17 gettimeofday: port recent C++ fix to Emacs + 2013-12-17 gettimeofday: fix C++ crosscompilation + 2013-12-17 qacl: port to Windows better + * lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4: + Update from gnulib. + * lib/gnulib.mk: Regenerate. + 2013-12-16 Paul Eggert * INSTALL: Clarify treatment of image libraries. === modified file 'lib/file-has-acl.c' --- lib/file-has-acl.c 2013-05-07 21:34:03 +0000 +++ lib/file-has-acl.c 2013-12-17 20:43:43 +0000 @@ -75,8 +75,7 @@ } return got_one; -# else /* IRIX, Tru64 */ -# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */ +# elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */ /* Don't use acl_get_entry: it is undocumented. */ int count = acl->acl_cnt; @@ -93,8 +92,7 @@ } return 0; -# endif -# if HAVE_ACL_FREE_TEXT /* Tru64 */ +# elif HAVE_ACL_FREE_TEXT /* Tru64 */ /* Don't use acl_get_entry: it takes only one argument and does not work. */ int count = acl->acl_num; @@ -117,7 +115,10 @@ } return 0; -# endif +# else + + errno = ENOSYS; + return -1; # endif } === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2013-12-08 08:05:36 +0000 +++ lib/gnulib.mk 2013-12-17 20:43:43 +0000 @@ -1573,6 +1573,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ @@ -1582,6 +1583,8 @@ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ === modified file 'lib/time.in.h' --- lib/time.in.h 2013-01-01 09:11:05 +0000 +++ lib/time.in.h 2013-12-17 20:43:43 +0000 @@ -187,6 +187,39 @@ # endif # endif +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + and + . */ +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_LOCALTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime +# define localtime rpl_localtime +# endif +_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (localtime); +# endif + +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GMTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime +# define gmtime rpl_gmtime +# endif +_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (gmtime); +# endif + /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ === modified file 'm4/gettimeofday.m4' --- m4/gettimeofday.m4 2013-01-01 09:11:05 +0000 +++ m4/gettimeofday.m4 2013-12-17 20:43:43 +0000 @@ -1,4 +1,4 @@ -# serial 20 +# serial 21 # Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -127,10 +127,8 @@ ]) AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ - AC_DEFINE([gmtime], [rpl_gmtime], - [Define to rpl_gmtime if the replacement function should be used.]) - AC_DEFINE([localtime], [rpl_localtime], - [Define to rpl_localtime if the replacement function should be used.]) + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 ]) # Prerequisites of lib/gettimeofday.c. === modified file 'm4/time_h.m4' --- m4/time_h.m4 2013-01-01 09:11:05 +0000 +++ m4/time_h.m4 2013-12-17 20:43:43 +0000 @@ -2,7 +2,7 @@ # Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc. -# serial 7 +# serial 8 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -106,4 +106,13 @@ REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) + + dnl Hack so that the time module doesn't depend on the sys_time module. + dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. + : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME + dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier + dnl is no longer a big deal. + REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) + REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) ]) ------------------------------------------------------------ revno: 115572 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-12-17 13:11:37 -0500 message: * lisp/window.el (window--pixel-to-total): Remove unused `mini' var. (maximize-window, minimize-window): Remove unused `pixelwise' arg. (split-window): Remove unused `new' var. (window--display-buffer): Remove unused `frame' and `delta' vars. (fit-window-to-buffer): Remove unused vars `frame', `display-height', and display-width'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 17:29:11 +0000 +++ lisp/ChangeLog 2013-12-17 18:11:37 +0000 @@ -1,3 +1,12 @@ +2013-12-17 Stefan Monnier + + * window.el (window--pixel-to-total): Remove unused `mini' var. + (maximize-window, minimize-window): Remove unused `pixelwise' arg. + (split-window): Remove unused `new' var. + (window--display-buffer): Remove unused `frame' and `delta' vars. + (fit-window-to-buffer): Remove unused vars `frame', `display-height', + and display-width'. + 2013-12-17 Martin Rudalics * dired.el (dired-mark-pop-up): === modified file 'lisp/window.el' --- lisp/window.el 2013-12-16 09:58:44 +0000 +++ lisp/window.el 2013-12-17 18:11:37 +0000 @@ -2143,8 +2143,7 @@ window widths from pixel widths." (setq frame (window-normalize-frame frame)) (let ((root (frame-root-window)) - (char-size (frame-char-size frame horizontal)) - (mini (minibuffer-window frame))) + (char-size (frame-char-size frame horizontal))) (set-window-new-total root (window--pixel-to-size root (window-size root horizontal t) horizontal)) @@ -3040,7 +3039,7 @@ (window-max-delta nil horizontal)) horizontal))))) -(defun maximize-window (&optional window pixelwise) +(defun maximize-window (&optional window) "Maximize WINDOW. Make WINDOW as large as possible without deleting any windows. WINDOW must be a valid window and defaults to the selected one. @@ -3056,7 +3055,7 @@ window (window-max-delta window t nil nil nil nil window-resize-pixelwise) t nil window-resize-pixelwise)) -(defun minimize-window (&optional window pixelwise) +(defun minimize-window (&optional window) "Minimize WINDOW. Make WINDOW as small as possible without deleting any windows. WINDOW must be a valid window and defaults to the selected one. @@ -4230,7 +4229,7 @@ (old-pixel-size (window-size window horizontal t)) ;; `new-size' is the specified or calculated size of the ;; new window. - new-pixel-size new new-parent new-normal) + new-pixel-size new-parent new-normal) (cond ((not pixel-size) (setq new-pixel-size @@ -5758,8 +5757,7 @@ (set-window-dedicated-p window dedicated)) (when (memq type '(window frame)) (set-window-prev-buffers window nil))) - (let ((frame (window-frame window)) - (parameter (window-parameter window 'quit-restore)) + (let ((parameter (window-parameter window 'quit-restore)) (height (cdr (assq 'window-height alist))) (width (cdr (assq 'window-width alist))) (size (cdr (assq 'window-size alist)))) @@ -5773,8 +5771,7 @@ ((consp size) (let ((width (car size)) (height (cdr size)) - (frame (window-frame window)) - delta) + (frame (window-frame window))) (when (and (numberp width) (numberp height)) (set-frame-height frame (+ (frame-height frame) @@ -6379,7 +6376,7 @@ (unless (cdr (assq 'inhibit-switch-frame alist)) (window--maybe-raise-frame (window-frame window))))))) -(defun display-buffer-no-window (buffer alist) +(defun display-buffer-no-window (_buffer alist) "Display BUFFER in no window. If ALIST has a non-nil `allow-no-window' entry, then don't display a window at all. This makes possible to override the default action @@ -7073,10 +7070,8 @@ max-height min-height max-width min-width)) (with-selected-window window (let* ((pixelwise window-resize-pixelwise) - (frame (window-frame)) (char-height (frame-char-height)) (char-width (frame-char-width)) - (display-height (display-pixel-height)) (total-height (window-size window nil pixelwise)) (body-height (window-body-height window pixelwise)) (body-width (window-body-width window pixelwise)) @@ -7131,8 +7126,7 @@ ((and fit-window-to-buffer-horizontally (not (window-size-fixed-p window t)) (window-combined-p nil t)) - (let* ((display-width (display-pixel-width)) - (total-width (window-size window nil pixelwise)) + (let* ((total-width (window-size window nil pixelwise)) (min-width ;; Sanitize MIN-WIDTH. (if (numberp min-width) ------------------------------------------------------------ revno: 115571 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-12-17 20:00:25 +0200 message: Fix minor problems in Windows emulation of getloadavg. src/w32.c (getloadavg): Don't index samples[] array with negative indices. Recover from wall-clock time being set backwards. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-17 17:46:31 +0000 +++ src/ChangeLog 2013-12-17 18:00:25 +0000 @@ -1,5 +1,8 @@ 2013-12-17 Eli Zaretskii + * w32.c (getloadavg): Don't index samples[] array with negative + indices. Recover from wall-clock time being set backwards. + * w32term.c (w32_initialize): Declare the argument of set_user_model as const. === modified file 'src/w32.c' --- src/w32.c 2013-12-14 08:29:42 +0000 +++ src/w32.c 2013-12-17 18:00:25 +0000 @@ -1732,9 +1732,28 @@ ULONGLONG idle, kernel, user; time_t now = time (NULL); + /* If system time jumped back for some reason, delete all samples + whose time is later than the current wall-clock time. This + prevents load average figures from becoming frozen for prolonged + periods of time, when system time is reset backwards. */ + if (last_idx >= 0) + { + while (difftime (now, samples[last_idx].sample_time) < -1.0) + { + if (last_idx == first_idx) + { + first_idx = last_idx = -1; + break; + } + last_idx = buf_prev (last_idx); + } + } + /* Store another sample. We ignore samples that are less than 1 sec apart. */ - if (difftime (now, samples[last_idx].sample_time) >= 1.0 - 2*DBL_EPSILON*now) + if (last_idx < 0 + || (difftime (now, samples[last_idx].sample_time) + >= 1.0 - 2*DBL_EPSILON*now)) { sample_system_load (&idle, &kernel, &user); last_idx = buf_next (last_idx); ------------------------------------------------------------ revno: 115570 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-12-17 19:46:31 +0200 message: Fix some warnings in w32 specific code. src/w32term.c (w32_initialize): Declare the argument of set_user_model as const. src/w32menu.c : Fix argument declarations. (w32_menu_show): Constify some arguments passed to MessageBox. src/w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to initialize Lisp objects. src/frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and use variables used only on X under that condition. src/fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows variables not used there. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-16 22:35:57 +0000 +++ src/ChangeLog 2013-12-17 17:46:31 +0000 @@ -1,3 +1,23 @@ +2013-12-17 Eli Zaretskii + + * w32term.c (w32_initialize): Declare the argument of + set_user_model as const. + + * w32menu.c : Fix argument declarations. + (w32_menu_show): Constify some arguments passed to MessageBox. + + * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO + to initialize Lisp objects. + + * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to + initialize Lisp objects. + + * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and + use variables used only on X under that condition. + + * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows + variables not used there. + 2013-12-16 Paul Eggert Fix problems with CANNOT_DUMP and EMACSLOADPATH. === modified file 'src/fileio.c' --- src/fileio.c 2013-12-15 20:39:36 +0000 +++ src/fileio.c 2013-12-17 17:46:31 +0000 @@ -1942,20 +1942,22 @@ entries (depending on how Emacs was built). */) (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists, Lisp_Object keep_time, Lisp_Object preserve_uid_gid, Lisp_Object preserve_extended_attributes) { + struct stat out_st; + Lisp_Object handler; + struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; + ptrdiff_t count = SPECPDL_INDEX (); + Lisp_Object encoded_file, encoded_newname; +#if HAVE_LIBSELINUX + security_context_t con; + int conlength = 0; +#endif +#ifdef WINDOWSNT + int result; +#else int ifd, ofd; int n; char buf[16 * 1024]; - struct stat st, out_st; - Lisp_Object handler; - struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; - ptrdiff_t count = SPECPDL_INDEX (); - Lisp_Object encoded_file, encoded_newname; -#if HAVE_LIBSELINUX - security_context_t con; - int conlength = 0; -#endif -#ifdef WINDOWSNT - int result; + struct stat st; #endif encoded_file = encoded_newname = Qnil; === modified file 'src/frame.c' --- src/frame.c 2013-12-09 20:46:07 +0000 +++ src/frame.c 2013-12-17 17:46:31 +0000 @@ -2807,7 +2807,9 @@ Lisp_Object *values; ptrdiff_t i, p; bool left_no_change = 0, top_no_change = 0; +#ifdef HAVE_X_WINDOWS bool icon_left_no_change = 0, icon_top_no_change = 0; +#endif bool size_changed = 0; struct gcpro gcpro1, gcpro2; @@ -2954,14 +2956,18 @@ /* If one of the icon positions was not set, preserve or default it. */ if (! TYPE_RANGED_INTEGERP (int, icon_left)) { +#ifdef HAVE_X_WINDOWS icon_left_no_change = 1; +#endif icon_left = Fcdr (Fassq (Qicon_left, f->param_alist)); if (NILP (icon_left)) XSETINT (icon_left, 0); } if (! TYPE_RANGED_INTEGERP (int, icon_top)) { +#ifdef HAVE_X_WINDOWS icon_top_no_change = 1; +#endif icon_top = Fcdr (Fassq (Qicon_top, f->param_alist)); if (NILP (icon_top)) XSETINT (icon_top, 0); === modified file 'src/w32font.c' --- src/w32font.c 2013-12-13 15:55:23 +0000 +++ src/w32font.c 2013-12-17 17:46:31 +0000 @@ -2562,7 +2562,7 @@ struct font_driver w32font_driver = { - 0, /* Qgdi */ + LISP_INITIALLY_ZERO, /* Qgdi */ 0, /* case insensitive */ w32font_get_cache, w32font_list, === modified file 'src/w32menu.c' --- src/w32menu.c 2013-11-30 09:25:31 +0000 +++ src/w32menu.c 2013-12-17 17:46:31 +0000 @@ -82,8 +82,8 @@ IN LPCMENUITEMINFOA); typedef int (WINAPI * MessageBoxW_Proc) ( IN HWND window, - IN WCHAR *text, - IN WCHAR *caption, + IN const WCHAR *text, + IN const WCHAR *caption, IN UINT type); #ifdef NTGUI_UNICODE @@ -629,7 +629,7 @@ { /* Create a new pane. */ Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); @@ -1145,7 +1145,8 @@ /* Use Unicode if possible, so any language can be displayed. */ if (unicode_message_box) { - WCHAR *text, *title; + WCHAR *text; + const WCHAR *title; USE_SAFE_ALLOCA; if (STRINGP (temp)) @@ -1180,7 +1181,7 @@ } else { - char *text, *title; + const char *text, *title; /* Fall back on ANSI message box, but at least use system encoding so questions representable by the system codepage === modified file 'src/w32term.c' --- src/w32term.c 2013-12-16 09:58:44 +0000 +++ src/w32term.c 2013-12-17 17:46:31 +0000 @@ -6468,7 +6468,7 @@ w32_initialize (void) { HANDLE shell; - HRESULT (WINAPI * set_user_model) (wchar_t * id); + HRESULT (WINAPI * set_user_model) (const wchar_t * id); baud_rate = 19200; === modified file 'src/w32uniscribe.c' --- src/w32uniscribe.c 2013-10-25 09:52:37 +0000 +++ src/w32uniscribe.c 2013-12-17 17:46:31 +0000 @@ -964,7 +964,7 @@ struct font_driver uniscribe_font_driver = { - 0, /* Quniscribe */ + LISP_INITIALLY_ZERO, /* Quniscribe */ 0, /* case insensitive */ w32font_get_cache, uniscribe_list, ------------------------------------------------------------ revno: 115569 committer: martin rudalics branch nick: trunk timestamp: Tue 2013-12-17 18:29:11 +0100 message: Remove no more needed bindings of split-height-threshold. * dired.el (dired-mark-pop-up): * register.el (register-preview): Don't bind split-height-threshold here since it's now done in display-buffer-below-selected. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 16:03:23 +0000 +++ lisp/ChangeLog 2013-12-17 17:29:11 +0000 @@ -1,3 +1,10 @@ +2013-12-17 Martin Rudalics + + * dired.el (dired-mark-pop-up): + * register.el (register-preview): Don't bind + split-height-threshold here since it's now done in + display-buffer-below-selected. + 2013-12-17 oblique (tiny change) * term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with === modified file 'lisp/dired.el' --- lisp/dired.el 2013-12-11 00:11:26 +0000 +++ lisp/dired.el 2013-12-17 17:29:11 +0000 @@ -3079,24 +3079,23 @@ (apply function args) (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))) (with-current-buffer buffer - (let ((split-height-threshold 0)) - (with-temp-buffer-window - buffer - (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) - #'(lambda (window _value) - (with-selected-window window - (unwind-protect - (apply function args) - (when (window-live-p window) - (quit-restore-window window 'kill))))) - ;; Handle (t FILE) just like (FILE), here. That value is - ;; used (only in some cases), to mean just one file that was - ;; marked, rather than the current line file. - (dired-format-columns-of-files - (if (eq (car files) t) (cdr files) files)) - (remove-text-properties (point-min) (point-max) - '(mouse-face nil help-echo nil)))))))) + (with-temp-buffer-window + buffer + (cons 'display-buffer-below-selected + '((window-height . fit-window-to-buffer))) + #'(lambda (window _value) + (with-selected-window window + (unwind-protect + (apply function args) + (when (window-live-p window) + (quit-restore-window window 'kill))))) + ;; Handle (t FILE) just like (FILE), here. That value is + ;; used (only in some cases), to mean just one file that was + ;; marked, rather than the current line file. + (dired-format-columns-of-files + (if (eq (car files) t) (cdr files) files)) + (remove-text-properties (point-min) (point-max) + '(mouse-face nil help-echo nil))))))) (defun dired-format-columns-of-files (files) (let ((beg (point))) === modified file 'lisp/register.el' --- lisp/register.el 2013-12-08 04:20:50 +0000 +++ lisp/register.el 2013-12-17 17:29:11 +0000 @@ -122,22 +122,21 @@ "Pop up a window to show register preview in BUFFER. If SHOW-EMPTY is non-nil show the window even if no registers." (when (or show-empty (consp register-alist)) - (let ((split-height-threshold 0)) - (with-temp-buffer-window - buffer - (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) - nil - (with-current-buffer standard-output - (setq cursor-in-non-selected-windows nil) - (mapc - (lambda (r) - (insert (or (run-hook-with-args-until-success - 'register-preview-functions r) - (format "%s %s\n" - (concat (single-key-description (car r)) ":") - (register-describe-oneline (car r)))))) - register-alist)))))) + (with-temp-buffer-window + buffer + (cons 'display-buffer-below-selected + '((window-height . fit-window-to-buffer))) + nil + (with-current-buffer standard-output + (setq cursor-in-non-selected-windows nil) + (mapc + (lambda (r) + (insert (or (run-hook-with-args-until-success + 'register-preview-functions r) + (format "%s %s\n" + (concat (single-key-description (car r)) ":") + (register-describe-oneline (car r)))))) + register-alist))))) (defun register-read-with-preview (prompt) "Read an event with register preview using PROMPT. ------------------------------------------------------------ revno: 115568 fixes bug: http://debbugs.gnu.org/14078 author: oblique committer: Chong Yidong branch nick: trunk timestamp: Wed 2013-12-18 00:03:23 +0800 message: Fix 256 color mapping in rxvt.el * term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with xterm-rgb-convert-to-16bit. (rxvt-register-default-colors): Standardize with xterm-register-default-colors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 15:48:26 +0000 +++ lisp/ChangeLog 2013-12-17 16:03:23 +0000 @@ -1,3 +1,10 @@ +2013-12-17 oblique (tiny change) + + * term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with + xterm-rgb-convert-to-16bit. + (rxvt-register-default-colors): Standardize with + xterm-register-default-colors (Bug#14078). + 2013-12-17 Dima Kogan (tiny change) * simple.el (kill-region): Pass mark first, then point, so that === modified file 'lisp/term/rxvt.el' --- lisp/term/rxvt.el 2013-01-01 09:11:05 +0000 +++ lisp/term/rxvt.el 2013-12-17 16:03:23 +0000 @@ -201,7 +201,7 @@ (defun rxvt-rgb-convert-to-16bit (prim) "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value." - (min 65535 (round (* (/ prim 255.0) 65535.0)))) + (logior prim (lsh prim 8))) (defun rxvt-register-default-colors () "Register the default set of colors for rxvt or compatible emulator. @@ -233,9 +233,9 @@ (tty-color-define (format "color-%d" (- 256 ncolors)) (- 256 ncolors) (mapcar 'rxvt-rgb-convert-to-16bit - (list (round (* r 42.5)) - (round (* g 42.5)) - (round (* b 42.5))))) + (list (if (zerop r) 0 (+ (* r 40) 55)) + (if (zerop g) 0 (+ (* g 40) 55)) + (if (zerop b) 0 (+ (* b 40) 55))))) (setq b (1+ b)) (if (> b 5) (setq g (1+ g) ------------------------------------------------------------ revno: 115567 committer: Chong Yidong branch nick: trunk timestamp: Tue 2013-12-17 23:57:38 +0800 message: * killing.texi (Appending Kills): Note that append-next-kill can prepend the kill. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-12-12 18:19:10 +0000 +++ doc/emacs/ChangeLog 2013-12-17 15:57:38 +0000 @@ -1,3 +1,8 @@ +2013-12-17 Chong Yidong + + * killing.texi (Appending Kills): Note that append-next-kill can + prepend the kill. + 2013-12-12 Eli Zaretskii * mule.texi (File Name Coding): Document file-name encoding === modified file 'doc/emacs/killing.texi' --- doc/emacs/killing.texi 2013-10-23 17:20:09 +0000 +++ doc/emacs/killing.texi 2013-12-17 15:57:38 +0000 @@ -417,13 +417,15 @@ @kindex C-M-w @findex append-next-kill If a kill command is separated from the last kill command by other -commands (not just numeric arguments), it starts a new entry on the kill -ring. But you can force it to append by first typing the command -@kbd{C-M-w} (@code{append-next-kill}) right before it. The @kbd{C-M-w} -tells the following command, if it is a kill command, to append the text -it kills to the last killed text, instead of starting a new entry. With -@kbd{C-M-w}, you can kill several separated pieces of text and -accumulate them to be yanked back in one place. +commands (not just numeric arguments), it starts a new entry on the +kill ring. But you can force it to combine with the last killed text, +by typing @kbd{C-M-w} (@code{append-next-kill}) right beforehand. The +@kbd{C-M-w} tells its following command, if it is a kill command, to +treat the kill as part of the sequence of previous kills. As usual, +the kill is appended to the previous killed text if the command kills +forward, and prepended if the command kills backward. In this way, +you can kill several separated pieces of text and accumulate them to +be yanked back in one place. A kill command following @kbd{M-w} (@code{kill-ring-save}) does not append to the text that @kbd{M-w} copied into the kill ring. ------------------------------------------------------------ revno: 115566 fixes bug: http://debbugs.gnu.org/12819 author: Dima Kogan committer: Chong Yidong branch nick: trunk timestamp: Tue 2013-12-17 23:48:26 +0800 message: * simple.el (kill-region): Pass mark first then point, so kill-append works right. (copy-region-as-kill, kill-ring-save): Likewise. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 15:15:00 +0000 +++ lisp/ChangeLog 2013-12-17 15:48:26 +0000 @@ -1,3 +1,9 @@ +2013-12-17 Dima Kogan (tiny change) + + * simple.el (kill-region): Pass mark first, then point, so that + kill-append works right (Bug#12819). + (copy-region-as-kill, kill-ring-save): Likewise. + 2013-12-17 Leo Liu * net/rcirc.el (rcirc-add-face): === modified file 'lisp/simple.el' --- lisp/simple.el 2013-12-13 04:14:17 +0000 +++ lisp/simple.el 2013-12-17 15:48:26 +0000 @@ -3638,9 +3638,9 @@ The optional argument REGION if non-nil, indicates that we're not just killing some text between BEG and END, but we're killing the region." - ;; Pass point first, then mark, because the order matters - ;; when calling kill-append. - (interactive (list (point) (mark) 'region)) + ;; Pass mark first, then point, because the order matters when + ;; calling `kill-append'. + (interactive (list (mark) (point) 'region)) (unless (and beg end) (error "The mark is not set now, so there is no region")) (condition-case nil @@ -3686,7 +3686,10 @@ some text between BEG and END, but we're copying the region. This command's old key binding has been given to `kill-ring-save'." - (interactive "r\np") + ;; Pass mark first, then point, because the order matters when + ;; calling `kill-append'. + (interactive (list (mark) (point) + (prefix-numeric-value current-prefix-arg))) (let ((str (if region (funcall region-extract-function nil) (filter-buffer-substring beg end)))) @@ -3710,7 +3713,10 @@ This command is similar to `copy-region-as-kill', except that it gives visual feedback indicating the extent of the region being copied." - (interactive "r\np") + ;; Pass mark first, then point, because the order matters when + ;; calling `kill-append'. + (interactive (list (mark) (point) + (prefix-numeric-value current-prefix-arg))) (copy-region-as-kill beg end region) ;; This use of called-interactively-p is correct because the code it ;; controls just gives the user visual feedback. ------------------------------------------------------------ revno: 115565 fixes bug: http://debbugs.gnu.org/16167 committer: Leo Liu branch nick: trunk timestamp: Tue 2013-12-17 23:15:00 +0800 message: * net/rcirc.el (rcirc-add-face): * eshell/em-prompt.el (eshell-emit-prompt): * eshell/em-ls.el (eshell-ls-decorated-name): Use font-lock-face. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 15:09:13 +0000 +++ lisp/ChangeLog 2013-12-17 15:15:00 +0000 @@ -1,3 +1,10 @@ +2013-12-17 Leo Liu + + * net/rcirc.el (rcirc-add-face): + * eshell/em-prompt.el (eshell-emit-prompt): + * eshell/em-ls.el (eshell-ls-decorated-name): Use font-lock-face. + (Bug#16167) + 2013-12-17 Chong Yidong * files.el (break-hardlink-on-save): Doc fix (Bug#13801). === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2013-10-30 06:29:22 +0000 +++ lisp/eshell/em-ls.el 2013-12-17 15:15:00 +0000 @@ -919,7 +919,7 @@ value))))) (if face (add-text-properties 0 (length (car file)) - (list 'face face) + (list 'font-lock-face face) (car file))))) (car file)) === modified file 'lisp/eshell/em-prompt.el' --- lisp/eshell/em-prompt.el 2013-09-13 07:07:07 +0000 +++ lisp/eshell/em-prompt.el 2013-12-17 15:15:00 +0000 @@ -124,7 +124,7 @@ (and eshell-highlight-prompt (add-text-properties 0 (length prompt) '(read-only t - face eshell-prompt + font-lock-face eshell-prompt front-sticky (face read-only) rear-nonsticky (face read-only)) prompt)) === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2013-11-05 14:32:01 +0000 +++ lisp/net/rcirc.el 2013-12-17 15:15:00 +0000 @@ -2361,10 +2361,11 @@ (let ((pos start) next prop) (while (< pos end) - (setq prop (get-text-property pos 'face object) - next (next-single-property-change pos 'face object end)) - (unless (member name (get-text-property pos 'face object)) - (add-text-properties pos next (list 'face (cons name prop)) object)) + (setq prop (get-text-property pos 'font-lock-face object) + next (next-single-property-change pos 'font-lock-face object end)) + (unless (member name (get-text-property pos 'font-lock-face object)) + (add-text-properties pos next + (list 'font-lock-face (cons name prop)) object)) (setq pos next))))) (defun rcirc-facify (string face) ------------------------------------------------------------ revno: 115564 fixes bug: http://debbugs.gnu.org/13801 committer: Chong Yidong branch nick: trunk timestamp: Tue 2013-12-17 23:09:13 +0800 message: * files.el (break-hardlink-on-save): Doc fix. Suggested by Xue Fuqiao. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 12:04:23 +0000 +++ lisp/ChangeLog 2013-12-17 15:09:13 +0000 @@ -1,3 +1,8 @@ +2013-12-17 Chong Yidong + + * files.el (break-hardlink-on-save): Doc fix (Bug#13801). + Suggested by Xue Fuqiao. + 2013-12-17 Dmitry Gutov * progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. === modified file 'lisp/files.el' --- lisp/files.el 2013-11-30 08:42:28 +0000 +++ lisp/files.el 2013-12-17 15:09:13 +0000 @@ -248,10 +248,12 @@ :group 'backup) (defcustom break-hardlink-on-save nil - "Non-nil means when saving a file that exists under several names -\(i.e., has multiple hardlinks), break the hardlink associated with -`buffer-file-name' and write to a new file, so that the other -instances of the file are not affected by the save. + "Whether to allow breaking hardlinks when saving files. +If non-nil, then when saving a file that exists under several +names \(i.e., has multiple hardlinks), break the hardlink +associated with `buffer-file-name' and write to a new file, so +that the other instances of the file are not affected by the +save. If `buffer-file-name' refers to a symlink, do not break the symlink. ------------------------------------------------------------ revno: 115563 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-12-17 14:04:23 +0200 message: * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 02:48:06 +0000 +++ lisp/ChangeLog 2013-12-17 12:04:23 +0000 @@ -1,3 +1,7 @@ +2013-12-17 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. + 2013-12-17 Stefan Monnier * net/shr.el (shr-insert-document): Remove unused var === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-12-14 13:57:58 +0000 +++ lisp/progmodes/ruby-mode.el 2013-12-17 12:04:23 +0000 @@ -577,6 +577,7 @@ "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^=" "|" "<<=" ">>=" "&&=" "||=" "and" "or")) (if (smie-rule-parent-p ";" nil) ruby-indent-level)) + (`(:after . ,(or "?" ":")) ruby-indent-level) (`(:before . "begin") (unless (save-excursion (skip-chars-backward " \t") (bolp)) (smie-rule-parent))) === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-12-17 01:31:55 +0000 +++ test/indent/ruby.rb 2013-12-17 12:04:23 +0000 @@ -330,3 +330,7 @@ %^abc^ ddd + +qux = foo ? + bar : + tee ------------------------------------------------------------ revno: 115562 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-12-17 10:12:07 +0000 message: lisp/gnus/mm-util.el (mm-make-temp-file): Alias to make-temp-file for modern Emacsen diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-12-08 23:11:14 +0000 +++ lisp/gnus/ChangeLog 2013-12-17 10:12:07 +0000 @@ -1,3 +1,8 @@ +2013-12-17 Katsumi Yamaoka + + * mm-util.el (mm-make-temp-file): + Alias to make-temp-file for modern Emacsen. + 2013-12-08 Katsumi Yamaoka * gnus-msg.el (gnus-setup-message): Fix the type of argument passed to === modified file 'lisp/gnus/mm-util.el' --- lisp/gnus/mm-util.el 2013-09-17 23:49:48 +0000 +++ lisp/gnus/mm-util.el 2013-12-17 10:12:07 +0000 @@ -1382,13 +1382,12 @@ ;; It is not a MIME function, but some MIME functions use it. (if (and (fboundp 'make-temp-file) (ignore-errors - (let ((def (symbol-function 'make-temp-file))) - (and (byte-code-function-p def) - (setq def (if (fboundp 'compiled-function-arglist) - ;; XEmacs - (eval (list 'compiled-function-arglist def)) - (aref def 0))) - (>= (length def) 4) + (let ((def (if (fboundp 'compiled-function-arglist) ;; XEmacs + (eval (list 'compiled-function-arglist + (symbol-function 'make-temp-file))) + (require 'help-fns) + (help-function-arglist 'make-temp-file t)))) + (and (>= (length def) 4) (eq (nth 3 def) 'suffix))))) (defalias 'mm-make-temp-file 'make-temp-file) ;; Stolen (and modified for XEmacs) from Emacs 22. ------------------------------------------------------------ revno: 115561 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-12-16 21:48:06 -0500 message: * lisp/net/shr.el (shr-insert-document): Remove unused var `shr-preliminary-table-render'. (shr-rescale-image): Remove unused arg `force'. (shr-put-image): Update calls accordingly. (shr-tag-a): Use `cont' rather than dyn-bound `dom'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-17 01:31:55 +0000 +++ lisp/ChangeLog 2013-12-17 02:48:06 +0000 @@ -1,3 +1,11 @@ +2013-12-17 Stefan Monnier + + * net/shr.el (shr-insert-document): Remove unused var + `shr-preliminary-table-render'. + (shr-rescale-image): Remove unused arg `force'. + (shr-put-image): Update calls accordingly. + (shr-tag-a): Use `cont' rather than dyn-bound `dom'. + 2013-12-17 Dmitry Gutov * emacs-lisp/smie.el (smie-indent--rule): Extract `smie-indent--rule-1'. === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-12-16 23:40:17 +0000 +++ lisp/net/shr.el 2013-12-17 02:48:06 +0000 @@ -196,7 +196,6 @@ (shr-state nil) (shr-start nil) (shr-base nil) - (shr-preliminary-table-render 0) (shr-width (or shr-width (1- (window-width))))) (shr-descend (shr-transform-dom dom)) (shr-remove-trailing-whitespace start (point)))) @@ -380,8 +379,7 @@ (setq shr-stylesheet (nconc (shr-parse-style style) shr-stylesheet)) (setq style nil))) - ;; If we have a display:none, then just ignore this part of the - ;; DOM. + ;; If we have a display:none, then just ignore this part of the DOM. (unless (equal (cdr (assq 'display shr-stylesheet)) "none") (if (fboundp function) (funcall function (cdr dom)) @@ -754,10 +752,10 @@ :format content-type)) ((eq size 'full) (ignore-errors - (shr-rescale-image data t content-type))) + (shr-rescale-image data content-type))) (t (ignore-errors - (shr-rescale-image data nil content-type)))))) + (shr-rescale-image data content-type)))))) (when image ;; When inserting big-ish pictures, put them at the ;; beginning of the line. @@ -779,11 +777,10 @@ image) (insert alt))) -(defun shr-rescale-image (data &optional force content-type) - "Rescale DATA, if too big, to fit the current buffer. -If FORCE, rescale the image anyway." - (if (or (not (fboundp 'imagemagick-types)) - (not (get-buffer-window (current-buffer)))) +(defun shr-rescale-image (data &optional content-type) + "Rescale DATA, if too big, to fit the current buffer." + (if (not (and (fboundp 'imagemagick-types) + (get-buffer-window (current-buffer)))) (create-image data nil t :ascent 100) (let ((edges (window-inside-pixel-edges (get-buffer-window (current-buffer))))) @@ -964,13 +961,13 @@ (shr-generic cont) (shr-colorize-region start (point) fgcolor bgcolor))) -(defun shr-tag-style (cont) - ) - -(defun shr-tag-script (cont) - ) - -(defun shr-tag-comment (cont) +(defun shr-tag-style (_cont) + ) + +(defun shr-tag-script (_cont) + ) + +(defun shr-tag-comment (_cont) ) (defun shr-dom-to-xml (dom) @@ -1079,7 +1076,7 @@ shr-start) (shr-generic cont) (when (and shr-target-id - (equal (cdr (assq :name (cdr dom))) shr-target-id)) + (equal (cdr (assq :name cont)) shr-target-id)) ;; We have a zero-length element, so just ;; insert... something. (when (= start (point)) @@ -1326,7 +1323,7 @@ (defun shr-tag-h6 (cont) (shr-heading cont)) -(defun shr-tag-hr (cont) +(defun shr-tag-hr (_cont) (shr-ensure-newline) (insert (make-string shr-width shr-hr-line) "\n"))