Now on revision 113712. ------------------------------------------------------------ revno: 113712 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-06 09:30:18 +0400 message: Invalidate region caches only if buffer text is going to be changed. * lisp.h (modify_region_1): Remove 3rd arg and rename to... (modify_text): ...new prototype. (prepare_to_modify_buffer_1): New prototype. * textprop.c (modify_region): Rename to... (modify_text_properties): ...new function. (add_text_properties_1, set_text_properties, Fremove_text_properties) (Fremove_list_of_text_properties): Adjust users. * insdel.c (modify_region_1): Remove 3rd arg and reimplement as... (modify_text): ...new function. (prepare_to_modify_buffer): Reimplement mostly as a wrapper for... (prepare_to_modify_buffer_1): ...new function. * casefiddle.c (casify_region): * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal) (Ftranspose_regions): Use modify_text. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-05 18:05:46 +0000 +++ src/ChangeLog 2013-08-06 05:30:18 +0000 @@ -1,3 +1,21 @@ +2013-08-06 Dmitry Antipov + + Invalidate region caches only if buffer text is going to be changed. + * lisp.h (modify_region_1): Remove 3rd arg and rename to... + (modify_text): ...new prototype. + (prepare_to_modify_buffer_1): New prototype. + * textprop.c (modify_region): Rename to... + (modify_text_properties): ...new function. + (add_text_properties_1, set_text_properties, Fremove_text_properties) + (Fremove_list_of_text_properties): Adjust users. + * insdel.c (modify_region_1): Remove 3rd arg and reimplement as... + (modify_text): ...new function. + (prepare_to_modify_buffer): Reimplement mostly as a wrapper for... + (prepare_to_modify_buffer_1): ...new function. + * casefiddle.c (casify_region): + * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal) + (Ftranspose_regions): Use modify_text. + 2013-08-05 Stefan Monnier * lisp.mk (lisp): Add nadvice.elc. === modified file 'src/casefiddle.c' --- src/casefiddle.c 2013-01-02 16:13:04 +0000 +++ src/casefiddle.c 2013-08-06 05:30:18 +0000 @@ -214,7 +214,7 @@ validate_region (&b, &e); start = XFASTINT (b); end = XFASTINT (e); - modify_region_1 (start, end, false); + modify_text (start, end); record_change (start, end - start); start_byte = CHAR_TO_BYTE (start); === modified file 'src/editfns.c' --- src/editfns.c 2013-07-19 01:24:35 +0000 +++ src/editfns.c 2013-08-06 05:30:18 +0000 @@ -2928,7 +2928,7 @@ else if (!changed) { changed = -1; - modify_region_1 (pos, XINT (end), false); + modify_text (pos, XINT (end)); if (! NILP (noundo)) { @@ -3104,7 +3104,7 @@ pos = XINT (start); pos_byte = CHAR_TO_BYTE (pos); end_pos = XINT (end); - modify_region_1 (pos, end_pos, false); + modify_text (pos, end_pos); cnt = 0; for (; pos < end_pos; ) @@ -4615,7 +4615,7 @@ if (end1 == start2) /* adjacent regions */ { - modify_region_1 (start1, end2, false); + modify_text (start1, end2); record_change (start1, len1 + len2); tmp_interval1 = copy_intervals (cur_intv, start1, len1); @@ -4674,8 +4674,8 @@ { USE_SAFE_ALLOCA; - modify_region_1 (start1, end1, false); - modify_region_1 (start2, end2, false); + modify_text (start1, end1); + modify_text (start2, end2); record_change (start1, len1); record_change (start2, len2); tmp_interval1 = copy_intervals (cur_intv, start1, len1); @@ -4708,7 +4708,7 @@ { USE_SAFE_ALLOCA; - modify_region_1 (start1, end2, false); + modify_text (start1, end2); record_change (start1, (end2 - start1)); tmp_interval1 = copy_intervals (cur_intv, start1, len1); tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); @@ -4741,7 +4741,7 @@ USE_SAFE_ALLOCA; record_change (start1, (end2 - start1)); - modify_region_1 (start1, end2, false); + modify_text (start1, end2); tmp_interval1 = copy_intervals (cur_intv, start1, len1); tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); === modified file 'src/insdel.c' --- src/insdel.c 2013-08-02 08:32:32 +0000 +++ src/insdel.c 2013-08-06 05:30:18 +0000 @@ -1756,27 +1756,22 @@ return deletion; } -/* Call this if you're about to change the region of current buffer +/* Call this if you're about to change the text of current buffer from character positions START to END. This checks the read-only properties of the region, calls the necessary modification hooks, and warns the next redisplay that it should pay attention to that - area. - - If PRESERVE_CHARS_MODIFF, do not update CHARS_MODIFF. - Otherwise set CHARS_MODIFF to the new value of MODIFF. */ + area. */ void -modify_region_1 (ptrdiff_t start, ptrdiff_t end, bool preserve_chars_modiff) +modify_text (ptrdiff_t start, ptrdiff_t end) { prepare_to_modify_buffer (start, end, NULL); BUF_COMPUTE_UNCHANGED (current_buffer, start - 1, end); - if (MODIFF <= SAVE_MODIFF) record_first_change (); MODIFF++; - if (! preserve_chars_modiff) - CHARS_MODIFF = MODIFF; + CHARS_MODIFF = MODIFF; bset_point_before_scroll (current_buffer, Qnil); } @@ -1792,8 +1787,8 @@ by holding its value temporarily in a marker. */ void -prepare_to_modify_buffer (ptrdiff_t start, ptrdiff_t end, - ptrdiff_t *preserve_ptr) +prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, + ptrdiff_t *preserve_ptr) { struct buffer *base_buffer; @@ -1864,6 +1859,17 @@ } signal_before_change (start, end, preserve_ptr); + Vdeactivate_mark = Qt; +} + +/* Like above, but called when we know that the buffer text + will be modified and region caches should be invalidated. */ + +void +prepare_to_modify_buffer (ptrdiff_t start, ptrdiff_t end, + ptrdiff_t *preserve_ptr) +{ + prepare_to_modify_buffer_1 (start, end, preserve_ptr); if (current_buffer->newline_cache) invalidate_region_cache (current_buffer, @@ -1873,10 +1879,8 @@ invalidate_region_cache (current_buffer, current_buffer->width_run_cache, start - BEG, Z - end); +} - Vdeactivate_mark = Qt; -} - /* These macros work with an argument named `preserve_ptr' and a local variable named `preserve_marker'. */ === modified file 'src/lisp.h' --- src/lisp.h 2013-08-05 04:14:43 +0000 +++ src/lisp.h 2013-08-06 05:30:18 +0000 @@ -3370,8 +3370,9 @@ extern void del_range_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); extern Lisp_Object del_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); -extern void modify_region_1 (ptrdiff_t, ptrdiff_t, bool); +extern void modify_text (ptrdiff_t, ptrdiff_t); extern void prepare_to_modify_buffer (ptrdiff_t, ptrdiff_t, ptrdiff_t *); +extern void prepare_to_modify_buffer_1 (ptrdiff_t, ptrdiff_t, ptrdiff_t *); extern void signal_after_change (ptrdiff_t, ptrdiff_t, ptrdiff_t); extern void adjust_after_insert (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t); === modified file 'src/textprop.c' --- src/textprop.c 2013-07-16 06:39:49 +0000 +++ src/textprop.c 2013-08-06 05:30:18 +0000 @@ -93,15 +93,25 @@ xsignal0 (Qtext_read_only); } -/* Prepare to modify the region of BUFFER from START to END. */ +/* Prepare to modify the text properties of BUFFER from START to END. */ static void -modify_region (Lisp_Object buffer, Lisp_Object start, Lisp_Object end) +modify_text_properties (Lisp_Object buffer, Lisp_Object start, Lisp_Object end) { + ptrdiff_t b = XINT (start), e = XINT (end); struct buffer *buf = XBUFFER (buffer), *old = current_buffer; set_buffer_internal (buf); - modify_region_1 (XINT (start), XINT (end), true); + + prepare_to_modify_buffer_1 (b, e, NULL); + + BUF_COMPUTE_UNCHANGED (buf, b - 1, e); + if (MODIFF <= SAVE_MODIFF) + record_first_change (); + MODIFF++; + + bset_point_before_scroll (current_buffer, Qnil); + set_buffer_internal (old); } @@ -1213,9 +1223,9 @@ ptrdiff_t prev_total_length = TOTAL_LENGTH (i); ptrdiff_t prev_pos = i->position; - modify_region (object, start, end); + modify_text_properties (object, start, end); /* If someone called us recursively as a side effect of - modify_region, and changed the intervals behind our back + modify_text_properties, and changed the intervals behind our back (could happen if lock_file, called by prepare_to_modify_buffer, triggers redisplay, and that calls add-text-properties again in the same buffer), we cannot continue with I, because its @@ -1357,7 +1367,8 @@ otherwise. */ Lisp_Object -set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties, Lisp_Object object, Lisp_Object coherent_change_p) +set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties, + Lisp_Object object, Lisp_Object coherent_change_p) { register INTERVAL i; Lisp_Object ostart, oend; @@ -1403,7 +1414,7 @@ } if (BUFFERP (object) && !NILP (coherent_change_p)) - modify_region (object, start, end); + modify_text_properties (object, start, end); set_text_properties_1 (start, end, properties, object, i); @@ -1558,9 +1569,9 @@ ptrdiff_t prev_total_length = TOTAL_LENGTH (i); ptrdiff_t prev_pos = i->position; - modify_region (object, start, end); + modify_text_properties (object, start, end); /* If someone called us recursively as a side effect of - modify_region, and changed the intervals behind our back + modify_text_properties, and changed the intervals behind our back (could happen if lock_file, called by prepare_to_modify_buffer, triggers redisplay, and that calls add-text-properties again in the same buffer), we cannot continue with I, because its @@ -1667,9 +1678,9 @@ /* We are at the beginning of an interval, with len to scan. The flag `modified' records if changes have been made. - When object is a buffer, we must call modify_region before changes are - made and signal_after_change when we are done. - We call modify_region before calling remove_properties if modified == 0, + When object is a buffer, we must call modify_text_properties + before changes are made and signal_after_change when we are done. + We call modify_text_properties before calling remove_properties if modified == 0, and we call signal_after_change before returning if modified != 0. */ for (;;) { @@ -1693,7 +1704,7 @@ else if (LENGTH (i) == len) { if (!modified && BUFFERP (object)) - modify_region (object, start, end); + modify_text_properties (object, start, end); remove_properties (Qnil, properties, i, object); if (BUFFERP (object)) signal_after_change (XINT (start), XINT (end) - XINT (start), @@ -1706,7 +1717,7 @@ i = split_interval_left (i, len); copy_properties (unchanged, i); if (!modified && BUFFERP (object)) - modify_region (object, start, end); + modify_text_properties (object, start, end); remove_properties (Qnil, properties, i, object); if (BUFFERP (object)) signal_after_change (XINT (start), XINT (end) - XINT (start), @@ -1717,7 +1728,7 @@ if (interval_has_some_properties_list (properties, i)) { if (!modified && BUFFERP (object)) - modify_region (object, start, end); + modify_text_properties (object, start, end); remove_properties (Qnil, properties, i, object); modified = 1; } ------------------------------------------------------------ revno: 113711 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2013-08-06 03:26:29 +0200 message: lisp/frameset.el: Various fixes. (frameset-p): Don't check non-nullness of the `properties' slot , which can indeed be nil. (frameset-live-filter-alist, frameset-persistent-filter-alist): Move entry for `left' from persistent to live filter alist. (frameset-filter-alist, frameset--minibufferless-last-p, frameset-save): Doc fixes. (frameset-filter-params): When restoring a frame, copy items added to `filtered', to avoid unwittingly modifying the original parameters. (frameset-move-onscreen): Rename from frameset--move-onscreen. Doc fix. (frameset--restore-frame): Fix reference to frameset-move-onscreen. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-06 01:03:08 +0000 +++ lisp/ChangeLog 2013-08-06 01:26:29 +0000 @@ -1,5 +1,16 @@ 2013-08-06 Juanma Barranquero + * frameset.el (frameset-p): Don't check non-nullness of the `properties' + slot , which can indeed be nil. + (frameset-live-filter-alist, frameset-persistent-filter-alist): + Move entry for `left' from persistent to live filter alist. + (frameset-filter-alist, frameset--minibufferless-last-p, frameset-save): + Doc fixes. + (frameset-filter-params): When restoring a frame, copy items added to + `filtered', to avoid unwittingly modifying the original parameters. + (frameset-move-onscreen): Rename from frameset--move-onscreen. Doc fix. + (frameset--restore-frame): Fix reference to frameset-move-onscreen. + * dired.el (dired-insert-directory): Revert change in revno:113117 to use looking-at-p instead of looking-at. (Bug#15028) === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-05 13:06:29 +0000 +++ lisp/frameset.el 2013-08-06 01:26:29 +0000 @@ -103,7 +103,6 @@ Else return nil." (and (eq (car-safe frameset) 'frameset) ; is a list (integerp (nth 1 frameset)) ; version is an int - (nth 2 frameset) ; properties is non-null (nth 3 frameset) ; states is non-null (nth 1 frameset))) ; return version @@ -129,6 +128,7 @@ ;;;###autoload (defvar frameset-live-filter-alist '((name . :never) + (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "Minimum set of parameters to filter for live (on-session) framesets. @@ -149,7 +149,6 @@ (GUI:height . frameset-filter-restore-param) (GUI:width . frameset-filter-restore-param) (height . frameset-filter-save-param) - (left . frameset-filter-iconified) (outer-window-id . :never) (parent-id . :never) (tty . frameset-filter-tty-to-GUI) @@ -194,7 +193,8 @@ SAVING Non-nil if filtering before saving state, nil if filtering before restoring it. -FILTER-FUN must return: +FILTER-FUN is allowed to modify items in FILTERED, but no other arguments. +It must return: nil Skip CURRENT (do not add it to FILTERED). t Add CURRENT to FILTERED as is. (NEW-PARAM . NEW-VALUE) Add this to FILTERED instead of CURRENT. @@ -315,19 +315,24 @@ nil while the filtering is done to restore it." (let ((filtered nil)) (dolist (current parameters) + ;; When saving, the parameter list is temporary, so modifying it + ;; is not a problem. When restoring, the parameter list is part + ;; of a frameset, so we must copy parameters to avoid inadvertent + ;; modifications. (pcase (cdr (assq (car current) filter-alist)) (`nil - (push current filtered)) + (push (if saving current (copy-tree current)) filtered)) (:never nil) (:restore - (unless saving (push current filtered))) + (unless saving (push (copy-tree current) filtered))) (:save (when saving (push current filtered))) ((or `(,fun . ,args) (and fun (pred fboundp))) - (let ((this (apply fun current filtered parameters saving args))) - (when this - (push (if (eq this t) current this) filtered)))) + (let* ((this (apply fun current filtered parameters saving args)) + (val (if (eq this t) current this))) + (when val + (push (if saving val (copy-tree val)) filtered)))) (other (delay-warning 'frameset (format "Unknown filter %S" other) :error)))) ;; Set the display parameter after filtering, so that filter functions @@ -410,7 +415,8 @@ ;;;###autoload (cl-defun frameset-save (frame-list &key filters predicate properties) "Return the frameset of FRAME-LIST, a list of frames. -If nil, FRAME-LIST defaults to all live frames. +Dead frames and non-frame objects are silently removed from the list. +If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames). FILTERS is an alist of parameter filters; defaults to `frameset-filter-alist'. PREDICATE is a predicate function, which must return non-nil for frames that should be saved; it defaults to saving all frames from FRAME-LIST. @@ -445,12 +451,12 @@ (`(- ,val) (+ right/bottom val)) (val val))) -(defun frameset--move-onscreen (frame force-onscreen) +(defun frameset-move-onscreen (frame force-onscreen) "If FRAME is offscreen, move it back onscreen and, if necessary, resize it. For the description of FORCE-ONSCREEN, see `frameset-restore'. When forced onscreen, frames wider than the monitor's workarea are converted to fullwidth, and frames taller than the workarea are converted to fullheight. -NOTE: This only works for non-iconified frames. Internal use only." +NOTE: This only works for non-iconified frames." (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) (right (+ left width -1)) (bottom (+ top height -1)) @@ -642,7 +648,7 @@ ;; FIXME: iconified frames should be checked too, ;; but it is impossible without deiconifying them. (not (eq (frame-parameter frame 'visibility) 'icon))) - (frameset--move-onscreen frame force-onscreen)) + (frameset-move-onscreen frame force-onscreen)) ;; Let's give the finishing touches (visibility, tool-bar, maximization). (when lines (push lines alt-cfg)) @@ -652,7 +658,7 @@ frame)) (defun frameset--minibufferless-last-p (state1 state2) - "Predicate to sort frame states in a suitable order to be created. + "Predicate to sort frame states in an order suitable for creating frames. It sorts minibuffer-owning frames before minibufferless ones." (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1))) (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2)))) @@ -665,7 +671,7 @@ (defun frameset-keep-original-display-p (force-display) "True if saved frames' displays should be honored." (cond ((daemonp) t) - ((eq system-type 'windows-nt) nil) + ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? (t (not force-display)))) (defun frameset-minibufferless-first-p (frame1 _frame2) ------------------------------------------------------------ revno: 113710 fixes bug: http://debbugs.gnu.org/15028 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2013-08-06 03:03:08 +0200 message: lisp/dired.el (dired-insert-directory): Revert change in revno:113117. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 18:05:46 +0000 +++ lisp/ChangeLog 2013-08-06 01:03:08 +0000 @@ -1,3 +1,8 @@ +2013-08-06 Juanma Barranquero + + * dired.el (dired-insert-directory): Revert change in revno:113117 + to use looking-at-p instead of looking-at. (Bug#15028) + 2013-08-05 Stefan Monnier Revert introduction of isearch-filter-predicates (bug#14714). === modified file 'lisp/dired.el' --- lisp/dired.el 2013-08-05 18:05:46 +0000 +++ lisp/dired.el 2013-08-06 01:03:08 +0000 @@ -1225,7 +1225,7 @@ (save-excursion (goto-char opoint) (when (and (or hdr wildcard) - (not (and (looking-at-p "^ \\(.*\\):$") + (not (and (looking-at "^ \\(.*\\):$") (file-name-absolute-p (match-string 1))))) ;; Note that dired-build-subdir-alist will replace the name ;; by its expansion, so it does not matter whether what we insert ------------------------------------------------------------ revno: 113709 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14714 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-08-05 14:05:46 -0400 message: Revert introduction of isearch-filter-predicates. Rely on add-function instead. * lisp/loadup.el: Preload nadvice. * lisp/isearch.el (isearch-filter-predicates): Rename it back to isearch-filter-predicate. (isearch-message-prefix): Use advice-function-mapc and advice properties to get the isearch-message-prefix. (isearch-search, isearch-lazy-highlight-search): Revert to funcall instead of run-hook-with-args-until-failure. (isearch-filter-visible): Not obsolete any more. * lisp/replace.el (perform-replace): Revert to funcall instead of run-hook-with-args-until-failure. * lisp/wdired.el (wdired-change-to-wdired-mode): Use add-function. * lisp/dired-aux.el (dired-isearch-filenames-mode): Rename from dired-isearch-filenames-toggle; make it into a proper minor mode. Use add/remove-function. (dired-isearch-filenames-setup, dired-isearch-filenames-end): Call the minor-mode rather than add/remove-hook. (dired-isearch-filter-filenames): Remove isearch-message-prefix property. * lisp/info.el (Info--search-loop): New function, extracted from Info-search. Funcall isearch-filter-predicate instead of run-hook-with-args-until-failure isearch-filter-predicates. (Info-search): Use it. (Info-mode): Use isearch-filter-predicate instead of isearch-filter-predicates. * src/lisp.mk (lisp): Add nadvice.elc. * lib-src/makefile.w32-in (lisp2): Add nadvice.elc. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-08-05 17:09:28 +0000 +++ lib-src/ChangeLog 2013-08-05 18:05:46 +0000 @@ -1,3 +1,7 @@ +2013-08-05 Stefan Monnier + + * makefile.w32-in (lisp2): Add nadvice.elc. + 2013-08-05 Eli Zaretskii * update-game-score.c (read_score): Try reading a character before === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2013-05-15 20:12:53 +0000 +++ lib-src/makefile.w32-in 2013-08-05 18:05:46 +0000 @@ -251,6 +251,7 @@ $(lispsource)register.elc \ $(lispsource)replace.elc \ $(lispsource)simple.elc \ + $(lispsource)emacs-lisp/nadvice.elc \ $(lispsource)minibuffer.elc \ $(lispsource)startup.elc \ $(lispsource)subr.elc \ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 14:26:57 +0000 +++ lisp/ChangeLog 2013-08-05 18:05:46 +0000 @@ -1,3 +1,32 @@ +2013-08-05 Stefan Monnier + + Revert introduction of isearch-filter-predicates (bug#14714). + Rely on add-function instead. + * isearch.el (isearch-filter-predicates): Rename it back to + isearch-filter-predicate. + (isearch-message-prefix): Use advice-function-mapc and advice + properties to get the isearch-message-prefix. + (isearch-search, isearch-lazy-highlight-search): Revert to funcall + instead of run-hook-with-args-until-failure. + (isearch-filter-visible): Not obsolete any more. + * loadup.el: Preload nadvice. + * replace.el (perform-replace): Revert to funcall + instead of run-hook-with-args-until-failure. + * wdired.el (wdired-change-to-wdired-mode): Use add-function. + * dired-aux.el (dired-isearch-filenames-mode): Rename from + dired-isearch-filenames-toggle; make it into a proper minor mode. + Use add/remove-function. + (dired-isearch-filenames-setup, dired-isearch-filenames-end): + Call the minor-mode rather than add/remove-hook. + (dired-isearch-filter-filenames): + Remove isearch-message-prefix property. + * info.el (Info--search-loop): New function, extracted from Info-search. + Funcall isearch-filter-predicate instead of + run-hook-with-args-until-failure isearch-filter-predicates. + (Info-search): Use it. + (Info-mode): Use isearch-filter-predicate instead of + isearch-filter-predicates. + 2013-08-05 Dmitry Antipov Do not call to `selected-window' where it is assumed by default. === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2013-05-27 22:42:11 +0000 +++ lisp/dired-aux.el 2013-08-05 18:05:46 +0000 @@ -2491,18 +2491,21 @@ :group 'dired :version "23.1") -(defun dired-isearch-filenames-toggle () +(define-minor-mode dired-isearch-filenames-mode "Toggle file names searching on or off. When on, Isearch skips matches outside file names using the predicate `dired-isearch-filter-filenames' that matches only at file names. When off, it uses the original predicate." - (interactive) - (setq isearch-filter-predicates - (if (memq 'dired-isearch-filter-filenames isearch-filter-predicates) - (delq 'dired-isearch-filter-filenames isearch-filter-predicates) - (cons 'dired-isearch-filter-filenames isearch-filter-predicates))) - (setq isearch-success t isearch-adjusted t) - (isearch-update)) + nil nil nil + (if dired-isearch-filenames-mode + (add-function :before-while (local 'isearch-filter-predicate) + #'dired-isearch-filter-filenames + '((isearch-message-prefix . "filename "))) + (remove-function (local 'isearch-filter-predicate) + #'dired-isearch-filter-filenames)) + (when isearch-mode + (setq isearch-success t isearch-adjusted t) + (isearch-update))) ;;;###autoload (defun dired-isearch-filenames-setup () @@ -2511,15 +2514,14 @@ (when (or (eq dired-isearch-filenames t) (and (eq dired-isearch-filenames 'dwim) (get-text-property (point) 'dired-filename))) - (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-toggle) - (add-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames nil t) + (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-mode) + (dired-isearch-filenames-mode 1) (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t))) (defun dired-isearch-filenames-end () "Clean up the Dired file name search after terminating isearch." - (setq isearch-message-prefix-add nil) (define-key isearch-mode-map "\M-sff" nil) - (remove-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames t) + (dired-isearch-filenames-mode -1) (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) (defun dired-isearch-filter-filenames (beg end) @@ -2531,8 +2533,6 @@ 'dired-filename nil) t)) -(put 'dired-isearch-filter-filenames 'isearch-message-prefix "filename ") - ;;;###autoload (defun dired-isearch-filenames () "Search for a string using Isearch only in file names in the Dired buffer." === modified file 'lisp/dired.el' --- lisp/dired.el 2013-07-25 10:18:09 +0000 +++ lisp/dired.el 2013-08-05 18:05:46 +0000 @@ -3849,22 +3849,7 @@ ;;; Start of automatically extracted autoloads. -;;;### (autoloads (dired-show-file-type dired-do-query-replace-regexp -;;;;;; dired-do-search dired-do-isearch-regexp dired-do-isearch -;;;;;; dired-isearch-filenames-regexp dired-isearch-filenames dired-isearch-filenames-setup -;;;;;; dired-hide-all dired-hide-subdir dired-tree-down dired-tree-up -;;;;;; dired-kill-subdir dired-mark-subdir-files dired-goto-subdir -;;;;;; dired-prev-subdir dired-insert-subdir dired-maybe-insert-subdir -;;;;;; dired-downcase dired-upcase dired-do-symlink-regexp dired-do-hardlink-regexp -;;;;;; dired-do-copy-regexp dired-do-rename-regexp dired-do-rename -;;;;;; dired-do-hardlink dired-do-symlink dired-do-copy dired-create-directory -;;;;;; dired-rename-file dired-copy-file dired-relist-file dired-remove-file -;;;;;; dired-add-file dired-do-redisplay dired-do-load dired-do-byte-compile -;;;;;; dired-do-compress dired-query dired-compress-file dired-do-kill-lines -;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command -;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown -;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "8f5af3aa4eee1b3448525896fa6f39a3") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "555c067fcab27f5a377536db407803ab") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/info.el' --- lisp/info.el 2013-07-03 03:09:38 +0000 +++ lisp/info.el 2013-08-05 18:05:46 +0000 @@ -1905,6 +1905,30 @@ (defvar Info-search-case-fold nil "The value of `case-fold-search' from previous `Info-search' command.") +(defun Info--search-loop (regexp bound backward) + (when backward + ;; Hide Info file header for backward search. + (narrow-to-region (save-excursion + (goto-char (point-min)) + (search-forward "\n\^_") + (1- (point))) + (point-max))) + (let ((give-up nil) + (found nil) + (beg-found nil)) + (while (not (or give-up + (and found + (funcall isearch-filter-predicate + beg-found found)))) + (let ((search-spaces-regexp Info-search-whitespace-regexp)) + (if (funcall + (if backward #'re-search-backward #'re-search-forward) + regexp bound t) + (setq found (point) beg-found (if backward (match-end 0) + (match-beginning 0))) + (setq give-up t found nil)))) + found)) + (defun Info-search (regexp &optional bound _noerror _count direction) "Search for REGEXP, starting from point, and select node it's found in. If DIRECTION is `backward', search in the reverse direction." @@ -1920,55 +1944,35 @@ (when (equal regexp "") (setq regexp (car Info-search-history))) (when regexp - (let (found beg-found give-up - (backward (eq direction 'backward)) - (onode Info-current-node) - (ofile Info-current-file) - (opoint (point)) - (opoint-min (point-min)) - (opoint-max (point-max)) - (ostart (window-start)) - (osubfile Info-current-subfile)) - (setq Info-search-case-fold case-fold-search) - (save-excursion - (save-restriction - (widen) - (when backward - ;; Hide Info file header for backward search - (narrow-to-region (save-excursion - (goto-char (point-min)) - (search-forward "\n\^_") - (1- (point))) - (point-max))) - (while (and (not give-up) - (or (null found) - (not (run-hook-with-args-until-failure - 'isearch-filter-predicates beg-found found)))) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) - (if (if backward - (re-search-backward regexp bound t) - (re-search-forward regexp bound t)) - (setq found (point) beg-found (if backward (match-end 0) - (match-beginning 0))) - (setq give-up t)))))) + (setq Info-search-case-fold case-fold-search) + (let* ((backward (eq direction 'backward)) + (onode Info-current-node) + (ofile Info-current-file) + (opoint (point)) + (opoint-min (point-min)) + (opoint-max (point-max)) + (ostart (window-start)) + (osubfile Info-current-subfile) + (found + (save-excursion + (save-restriction + (widen) + (Info--search-loop regexp bound backward))))) - (when (and isearch-mode Info-isearch-search - (not Info-isearch-initial-node) - (not bound) - (or give-up (and found (not (and (> found opoint-min) - (< found opoint-max)))))) + (unless (or (not isearch-mode) (not Info-isearch-search) + Info-isearch-initial-node + bound + (and found (> found opoint-min) (< found opoint-max))) (signal 'search-failed (list regexp "end of node"))) ;; If no subfiles, give error now. - (if give-up - (if (null Info-current-subfile) - (if isearch-mode - (signal 'search-failed (list regexp "end of manual")) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) - (if backward - (re-search-backward regexp) - (re-search-forward regexp)))) - (setq found nil))) + (unless (or found Info-current-subfile) + (if isearch-mode + (signal 'search-failed (list regexp "end of manual")) + (let ((search-spaces-regexp Info-search-whitespace-regexp)) + (if backward + (re-search-backward regexp) + (re-search-forward regexp))))) (if (and bound (not found)) (signal 'search-failed (list regexp))) @@ -2009,29 +2013,9 @@ (while list (message "Searching subfile %s..." (cdr (car list))) (Info-read-subfile (car (car list))) - (when backward - ;; Hide Info file header for backward search - (narrow-to-region (save-excursion - (goto-char (point-min)) - (search-forward "\n\^_") - (1- (point))) - (point-max)) - (goto-char (point-max))) + (when backward (goto-char (point-max))) (setq list (cdr list)) - (setq give-up nil found nil) - (while (and (not give-up) - (or (null found) - (not (run-hook-with-args-until-failure - 'isearch-filter-predicates beg-found found)))) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) - (if (if backward - (re-search-backward regexp nil t) - (re-search-forward regexp nil t)) - (setq found (point) beg-found (if backward (match-end 0) - (match-beginning 0))) - (setq give-up t)))) - (if give-up - (setq found nil)) + (setq found (Info--search-loop regexp nil backward)) (if found (setq list nil))) (if found @@ -4288,8 +4272,7 @@ 'Info-isearch-wrap) (set (make-local-variable 'isearch-push-state-function) 'Info-isearch-push-state) - (set (make-local-variable 'isearch-filter-predicates) - '(Info-isearch-filter)) + (set (make-local-variable 'isearch-filter-predicate) #'Info-isearch-filter) (set (make-local-variable 'revert-buffer-function) 'Info-revert-buffer-function) (Info-set-mode-line) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-08-05 14:26:57 +0000 +++ lisp/isearch.el 2013-08-05 18:05:46 +0000 @@ -187,21 +187,15 @@ "Function to save a function restoring the mode-specific Isearch state to the search status stack.") -(defvar isearch-filter-predicates nil - "Predicates that filter the search hits that would normally be available. -Search hits that dissatisfy the list of predicates are skipped. -Each function in this list has two arguments: the positions of -start and end of text matched by the search. -The search loop uses `run-hook-with-args-until-failure' to call -each predicate in order, and when one of the predicates returns nil, -skips this match and continues searching for the next match. -When the list of predicates is empty, `run-hook-with-args-until-failure' -returns non-nil that means that the found match is accepted. -The property `isearch-message-prefix' put on the predicate's symbol -specifies the prefix string displayed in the search message.") -(define-obsolete-variable-alias 'isearch-filter-predicate - 'isearch-filter-predicates - "24.4") +(defvar isearch-filter-predicate #'isearch-filter-visible + "Predicate that filter the search hits that would normally be available. +Search hits that dissatisfy the predicate are skipped. The function +has two arguments: the positions of start and end of text matched by +the search. If this function returns nil, continue searching without +stopping at this match. +If you use `add-function' to modify this variable, you can use the +`isearch-message-prefix' advice property to specify the prefix string +displayed in the search message.") ;; Search ring. @@ -2614,13 +2608,13 @@ (< (point) isearch-opoint))) "over") (if isearch-wrapped "wrapped ") - (mapconcat (lambda (s) - (and (symbolp s) - (get s 'isearch-message-prefix))) - (if (consp isearch-filter-predicates) - isearch-filter-predicates - (list isearch-filter-predicates)) - "") + (let ((prefix "")) + (advice-function-mapc + (lambda (_ props) + (let ((np (cdr (assq 'isearch-message-prefix props)))) + (if np (setq prefix (concat np prefix))))) + isearch-filter-predicate) + prefix) (if isearch-word (or (and (symbolp isearch-word) (get isearch-word 'isearch-message-prefix)) @@ -2766,15 +2760,8 @@ (if (or (not isearch-success) (bobp) (eobp) (= (match-beginning 0) (match-end 0)) - ;; When one of filter predicates returns nil, - ;; retry the search. Otherwise, act according - ;; to search-invisible (open overlays, etc.) - (and (run-hook-with-args-until-failure - 'isearch-filter-predicates - (match-beginning 0) (match-end 0)) - (or (eq search-invisible t) - (not (isearch-range-invisible - (match-beginning 0) (match-end 0)))))) + (funcall isearch-filter-predicate + (match-beginning 0) (match-end 0))) (setq retry nil))) (setq isearch-just-started nil) (if isearch-success @@ -2951,7 +2938,6 @@ searched too when `search-invisible' is t." (or (eq search-invisible t) (not (isearch-range-invisible beg end)))) -(make-obsolete 'isearch-filter-visible 'isearch-invisible "24.4") ;; General utilities @@ -3177,11 +3163,8 @@ (if (or (not success) (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. (= (match-beginning 0) (match-end 0)) - (and (run-hook-with-args-until-failure - 'isearch-filter-predicates - (match-beginning 0) (match-end 0)) - (not (isearch-range-invisible - (match-beginning 0) (match-end 0))))) + (funcall isearch-filter-predicate + (match-beginning 0) (match-end 0))) (setq retry nil))) success) (error nil))) === modified file 'lisp/loadup.el' --- lisp/loadup.el 2013-06-05 18:10:27 +0000 +++ lisp/loadup.el 2013-08-05 18:05:46 +0000 @@ -139,6 +139,7 @@ ;; In case loaddefs hasn't been generated yet. (file-error (load "ldefs-boot.el"))) +(load "emacs-lisp/nadvice") (load "minibuffer") (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. (load "simple") === modified file 'lisp/replace.el' --- lisp/replace.el 2013-06-13 22:08:45 +0000 +++ lisp/replace.el 2013-08-05 18:05:46 +0000 @@ -252,7 +252,7 @@ Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more -matches using a non-nil `isearch-filter-predicates'. +matches using `isearch-filter-predicate'. If `replace-lax-whitespace' is non-nil, a space or spaces in the string to be replaced will match a sequence of whitespace chars defined by the @@ -306,7 +306,7 @@ Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more -matches using a non-nil `isearch-filter-predicates'. +matches using `isearch-filter-predicate'. If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the @@ -390,7 +390,7 @@ Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more -matches using a non-nil `isearch-filter-predicates'. +matches using `isearch-filter-predicate'. If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the @@ -484,7 +484,7 @@ Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more -matches using a non-nil `isearch-filter-predicates'. +matches using `isearch-filter-predicate'. If `replace-lax-whitespace' is non-nil, a space or spaces in the string to be replaced will match a sequence of whitespace chars defined by the @@ -530,7 +530,7 @@ Ignore read-only matches if `query-replace-skip-read-only' is non-nil, ignore hidden matches if `search-invisible' is nil, and ignore more -matches using a non-nil `isearch-filter-predicates'. +matches using `isearch-filter-predicate'. If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp to be replaced will match a sequence of whitespace chars defined by the @@ -2087,9 +2087,8 @@ 'read-only nil)))) (setq skip-read-only-count (1+ skip-read-only-count))) ;; Optionally filter out matches. - ((not (run-hook-with-args-until-failure - 'isearch-filter-predicates - (nth 0 real-match-data) (nth 1 real-match-data))) + ((not (funcall isearch-filter-predicate + (nth 0 real-match-data) (nth 1 real-match-data))) (setq skip-filtered-count (1+ skip-filtered-count))) ;; Optionally ignore invisible matches. ((not (or (eq search-invisible t) === modified file 'lisp/wdired.el' --- lisp/wdired.el 2013-05-27 22:42:11 +0000 +++ lisp/wdired.el 2013-08-05 18:05:46 +0000 @@ -239,7 +239,8 @@ (dired-remember-marks (point-min) (point-max))) (set (make-local-variable 'wdired-old-point) (point)) (set (make-local-variable 'query-replace-skip-read-only) t) - (add-hook 'isearch-filter-predicates 'wdired-isearch-filter-read-only nil t) + (add-function :after-while (local 'isearch-filter-predicate) + #'wdired-isearch-filter-read-only) (use-local-map wdired-mode-map) (force-mode-line-update) (setq buffer-read-only nil) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-05 04:14:43 +0000 +++ src/ChangeLog 2013-08-05 18:05:46 +0000 @@ -1,3 +1,7 @@ +2013-08-05 Stefan Monnier + + * lisp.mk (lisp): Add nadvice.elc. + 2013-08-05 Dmitry Antipov New macro to iterate over live buffers similar to frames. === modified file 'src/frame.c' --- src/frame.c 2013-08-03 03:29:03 +0000 +++ src/frame.c 2013-08-05 18:05:46 +0000 @@ -710,7 +710,7 @@ type[SBYTES (tty_type)] = 0; } - t = init_tty (name, type, 0); /* Errors are not fatal. */ + t = init_tty (name, type, 0); /* Errors are not fatal. */ } f = make_terminal_frame (t); === modified file 'src/lisp.mk' --- src/lisp.mk 2013-06-05 18:10:27 +0000 +++ src/lisp.mk 2013-08-05 18:05:46 +0000 @@ -71,6 +71,7 @@ $(lispsource)/faces.elc \ $(lispsource)/button.elc \ $(lispsource)/startup.elc \ + $(lispsource)/emacs-lisp/nadvice.elc \ $(lispsource)/minibuffer.elc \ $(lispsource)/abbrev.elc \ $(lispsource)/simple.elc \ ------------------------------------------------------------ revno: 113708 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-08-05 20:09:28 +0300 message: Fix bugs in update-game-score, on MS-Windows and elsewhere. lib-src/update-game-score.c (read_score): Try reading a character before probing the stream for EOF. Initialize score->score to zero, before reading and accumulating the score. (read_scores): Fix logic that determines which value to return. Close the input stream when finished reading the scores (avoids failures in overwriting the file with a new one on MS-Windows, since a file that is open cannot be deleted). lib-src/ntlib.h (rename): Don't undefine. lib-src/ntlib.c (sys_rename): New function, needed for update-game-score. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-08-04 17:52:25 +0000 +++ lib-src/ChangeLog 2013-08-05 17:09:28 +0000 @@ -1,3 +1,18 @@ +2013-08-05 Eli Zaretskii + + * update-game-score.c (read_score): Try reading a character before + probing the stream for EOF. Initialize score->score to zero, + before reading and accumulating the score. + (read_scores): Fix logic that determines which value to return. + Close the input stream when finished reading the scores (avoids + failures in overwriting the file with a new one on MS-Windows, + since a file that is open cannot be deleted). + + * ntlib.h (rename): Don't undefine. + + * ntlib.c (sys_rename): New function, needed for + update-game-score. + 2013-08-04 Eli Zaretskii * ntlib.h: Include fcntl.h. === modified file 'lib-src/ntlib.c' --- lib-src/ntlib.c 2013-08-04 17:52:25 +0000 +++ lib-src/ntlib.c 2013-08-05 17:09:28 +0000 @@ -424,14 +424,14 @@ } /* Implementation of mkostemp for MS-Windows, to avoid race conditions - when using mktemp. + when using mktemp. Copied from w32.c. - Standard algorithm for generating a temporary file name seems to be - use pid or tid with a letter on the front (in place of the 6 X's) - and cycle through the letters to find a unique name. We extend - that to allow any reasonable character as the first of the 6 X's, - so that the number of simultaneously used temporary files will be - greater. */ + This is used only in update-game-score.c. It is overkill for that + use case, since update-game-score renames the temporary file into + the game score file, which isn't atomic on MS-Windows anyway, when + the game score already existed before running the program, which it + almost always does. But using a simpler implementation just to + make a point is uneconomical... */ int mkostemp (char * template, int flags) @@ -477,3 +477,17 @@ /* Template is badly formed or else we can't generate a unique name. */ return -1; } + +/* On Windows, you cannot rename into an existing file. */ +int +sys_rename (const char *from, const char *to) +{ + int retval = rename (from, to); + + if (retval < 0 && errno == EEXIST) + { + if (unlink (to) == 0) + retval = rename (from, to); + } + return retval; +} === modified file 'lib-src/ntlib.h' --- lib-src/ntlib.h 2013-08-04 17:52:25 +0000 +++ lib-src/ntlib.h 2013-08-05 17:09:28 +0000 @@ -69,7 +69,6 @@ #define pipe _pipe #undef read #define read _read -#undef rename #undef rmdir #define rmdir _rmdir #undef unlink === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2013-08-04 16:56:56 +0000 +++ lib-src/update-game-score.c 2013-08-05 17:09:28 +0000 @@ -228,10 +228,11 @@ read_score (FILE *f, struct score_entry *score) { int c; + if ((c = getc (f)) != EOF) + ungetc (c, f); if (feof (f)) return 1; - while ((c = getc (f)) != EOF - && isdigit (c)) + for (score->score = 0; (c = getc (f)) != EOF && isdigit (c); ) { score->score *= 10; score->score += (c-48); @@ -311,34 +312,38 @@ static int read_scores (const char *filename, struct score_entry **scores, int *count) { - int readval, scorecount, cursize; + int readval = -1, scorecount, cursize; struct score_entry *ret; FILE *f = fopen (filename, "r"); + int retval = -1; if (!f) return -1; scorecount = 0; cursize = 16; ret = (struct score_entry *) malloc (sizeof (struct score_entry) * cursize); - if (!ret) - return -1; - while ((readval = read_score (f, &ret[scorecount])) == 0) + if (ret) { - /* We encountered an error. */ - if (readval < 0) - return -1; - scorecount++; - if (scorecount >= cursize) + while ((readval = read_score (f, &ret[scorecount])) == 0) { - cursize *= 2; - ret = (struct score_entry *) - realloc (ret, (sizeof (struct score_entry) * cursize)); - if (!ret) - return -1; + scorecount++; + if (scorecount >= cursize) + { + cursize *= 2; + ret = (struct score_entry *) + realloc (ret, (sizeof (struct score_entry) * cursize)); + if (!ret) + break; + } } } - *count = scorecount; - *scores = ret; - return 0; + if (readval > 0) + { + *count = scorecount; + *scores = ret; + retval = 0; + } + fclose (f); + return retval; } static int @@ -461,5 +466,4 @@ return ret; } - /* update-game-score.c ends here */ ------------------------------------------------------------ revno: 113707 fixes bug: http://debbugs.gnu.org/15027 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-08-05 18:29:09 +0200 message: etc/tutorials/TUTORIAL.es: Fix typo (bug#15027). diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-03 15:10:13 +0000 +++ etc/ChangeLog 2013-08-05 16:29:09 +0000 @@ -1,3 +1,7 @@ +2013-08-05 Juanma Barranquero + + * tutorials/TUTORIAL.es: Fix typo (bug#15027). + 2013-08-03 Juanma Barranquero * NEWS: Document new package frameset.el. === modified file 'etc/tutorials/TUTORIAL.es' --- etc/tutorials/TUTORIAL.es 2013-08-02 03:44:59 +0000 +++ etc/tutorials/TUTORIAL.es 2013-08-05 16:29:09 +0000 @@ -974,7 +974,7 @@ >> Teclee C-x 4 C-f seguido del nombre de uno de sus archivos. Finalice con . Vea que el archivo especificado aparece en - la ventana inferior. El cursor vá allá también. + la ventana inferior. El cursor va allá también. >> Teclee C-x o para regresar a la ventana superior, y C-x 1 para borrar la ventana inferior. ------------------------------------------------------------ revno: 113706 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-08-05 09:18:57 -0700 message: admin/make-tarball.txt: mention platform-testers mailing list diff: === modified file 'admin/make-tarball.txt' --- admin/make-tarball.txt 2013-03-10 02:15:08 +0000 +++ admin/make-tarball.txt 2013-08-05 16:18:57 +0000 @@ -144,6 +144,8 @@ Download them and check the signatures. Check they build. 12. For a pretest, announce it on emacs-devel and info-gnu-emacs@gnu.org. + Probably should also include the platform-testers list: + https://lists.gnu.org/mailman/listinfo/platform-testers For a release, also announce it on info-gnu@gnu.org. (Probably bcc the info- addresses to make it less likely that people will followup on those lists.) ------------------------------------------------------------ revno: 113705 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-05 18:26:57 +0400 message: Do not call to `selected-window' where it is assumed by default. Affected functions are `window-minibuffer-p', `window-dedicated-p', `window-hscroll', `window-width', `window-height', `window-buffer', `window-frame', `window-start', `window-point', `next-window' and `window-display-table'. * abbrev.el (abbrev--default-expand): * bs.el (bs--show-with-configuration): * buff-menu.el (Buffer-menu-mouse-select): * calc/calc.el (calc): * calendar/calendar.el (calendar-generate-window): * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries) (diary-make-entry): * comint.el (send-invisible, comint-dynamic-complete-filename) (comint-dynamic-simple-complete, comint-dynamic-list-completions): * completion.el (complete): * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list): * disp-table.el (describe-current-display-table): * doc-view.el (doc-view-insert-image): * ebuff-menu.el (Electric-buffer-menu-mouse-select): * ehelp.el (with-electric-help): * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer): * emacs-lisp/helper.el (Helper-help-scroller): * emulation/cua-base.el (cua--post-command-handler-1): * eshell/esh-mode.el (eshell-output-filter): * ffap.el (ffap-gnus-wrapper): * help-macro.el (make-help-screen): * hilit-chg.el (highlight-compare-buffers): * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible): * hl-line.el (global-hl-line-highlight): * icomplete.el (icomplete-simple-completing-p): * isearch.el (isearch-done): * jit-lock.el (jit-lock-stealth-fontify): * mail/rmailsum.el (rmail-summary-scroll-msg-up): * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling): * mpc.el (mpc-tagbrowser, mpc): * net/rcirc.el (rcirc-any-buffer): * play/gomoku.el (gomoku-max-width, gomoku-max-height): * play/landmark.el (landmark-max-width, landmark-max-height): * play/zone.el (zone): * progmodes/compile.el (compilation-goto-locus): * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern): * progmodes/etags.el (find-tag-other-window): * progmodes/fortran.el (fortran-column-ruler): * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): * progmodes/verilog-mode.el (verilog-point-text): * reposition.el (reposition-window): * rot13.el (toggle-rot13-mode): * server.el (server-switch-buffer): * shell.el (shell-dynamic-complete-command) (shell-dynamic-complete-environment-variable): * simple.el (insert-buffer, set-selective-display) (delete-completion-window): * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly) (speedbar-recenter): * startup.el (fancy-splash-head): * textmodes/ispell.el (ispell-command-loop): * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region): * tutorial.el (help-with-tutorial): * vc/add-log.el (add-change-log-entry): * vc/compare-w.el (compare-windows): * vc/ediff-help.el (ediff-indent-help-message): * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region): * vc/ediff-wind.el (ediff-skip-unsuitable-frames) (ediff-setup-control-frame): * vc/emerge.el (emerge-position-region): * vc/pcvs-util.el (cvs-bury-buffer): * window.el (walk-windows, mouse-autoselect-window-select): * winner.el (winner-set-conf, winner-undo): Related users changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 13:06:29 +0000 +++ lisp/ChangeLog 2013-08-05 14:26:57 +0000 @@ -1,3 +1,75 @@ +2013-08-05 Dmitry Antipov + + Do not call to `selected-window' where it is assumed by default. + Affected functions are `window-minibuffer-p', `window-dedicated-p', + `window-hscroll', `window-width', `window-height', `window-buffer', + `window-frame', `window-start', `window-point', `next-window' + and `window-display-table'. + * abbrev.el (abbrev--default-expand): + * bs.el (bs--show-with-configuration): + * buff-menu.el (Buffer-menu-mouse-select): + * calc/calc.el (calc): + * calendar/calendar.el (calendar-generate-window): + * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries) + (diary-make-entry): + * comint.el (send-invisible, comint-dynamic-complete-filename) + (comint-dynamic-simple-complete, comint-dynamic-list-completions): + * completion.el (complete): + * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list): + * disp-table.el (describe-current-display-table): + * doc-view.el (doc-view-insert-image): + * ebuff-menu.el (Electric-buffer-menu-mouse-select): + * ehelp.el (with-electric-help): + * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): + * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer): + * emacs-lisp/helper.el (Helper-help-scroller): + * emulation/cua-base.el (cua--post-command-handler-1): + * eshell/esh-mode.el (eshell-output-filter): + * ffap.el (ffap-gnus-wrapper): + * help-macro.el (make-help-screen): + * hilit-chg.el (highlight-compare-buffers): + * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible): + * hl-line.el (global-hl-line-highlight): + * icomplete.el (icomplete-simple-completing-p): + * isearch.el (isearch-done): + * jit-lock.el (jit-lock-stealth-fontify): + * mail/rmailsum.el (rmail-summary-scroll-msg-up): + * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling): + * mpc.el (mpc-tagbrowser, mpc): + * net/rcirc.el (rcirc-any-buffer): + * play/gomoku.el (gomoku-max-width, gomoku-max-height): + * play/landmark.el (landmark-max-width, landmark-max-height): + * play/zone.el (zone): + * progmodes/compile.el (compilation-goto-locus): + * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern): + * progmodes/etags.el (find-tag-other-window): + * progmodes/fortran.el (fortran-column-ruler): + * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): + * progmodes/verilog-mode.el (verilog-point-text): + * reposition.el (reposition-window): + * rot13.el (toggle-rot13-mode): + * server.el (server-switch-buffer): + * shell.el (shell-dynamic-complete-command) + (shell-dynamic-complete-environment-variable): + * simple.el (insert-buffer, set-selective-display) + (delete-completion-window): + * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly) + (speedbar-recenter): + * startup.el (fancy-splash-head): + * textmodes/ispell.el (ispell-command-loop): + * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region): + * tutorial.el (help-with-tutorial): + * vc/add-log.el (add-change-log-entry): + * vc/compare-w.el (compare-windows): + * vc/ediff-help.el (ediff-indent-help-message): + * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region): + * vc/ediff-wind.el (ediff-skip-unsuitable-frames) + (ediff-setup-control-frame): + * vc/emerge.el (emerge-position-region): + * vc/pcvs-util.el (cvs-bury-buffer): + * window.el (walk-windows, mouse-autoselect-window-select): + * winner.el (winner-set-conf, winner-undo): Related users changed. + 2013-08-05 Juanma Barranquero * frameset.el (frameset--set-id): Doc fix. === modified file 'lisp/abbrev.el' --- lisp/abbrev.el 2013-04-18 00:12:33 +0000 +++ lisp/abbrev.el 2013-08-05 14:26:57 +0000 @@ -856,7 +856,7 @@ (endmark (copy-marker wordend t))) (unless (or ;; executing-kbd-macro noninteractive - (window-minibuffer-p (selected-window))) + (window-minibuffer-p)) ;; Add an undo boundary, in case we are doing this for ;; a self-inserting command which has avoided making one so far. (undo-boundary)) === modified file 'lisp/bs.el' --- lisp/bs.el 2013-06-22 02:33:33 +0000 +++ lisp/bs.el 2013-08-05 14:26:57 +0000 @@ -1406,7 +1406,7 @@ (select-window active-window) (bs--restore-window-config) (setq bs--window-config-coming-from (current-window-configuration)) - (when (> (window-height (selected-window)) 7) + (when (> (window-height) 7) ;; Errors would mess with the window configuration (bug#10882). (ignore-errors (select-window (split-window-below))))) (bs-show-in-buffer liste) === modified file 'lisp/buff-menu.el' --- lisp/buff-menu.el 2013-07-03 23:11:58 +0000 +++ lisp/buff-menu.el 2013-08-05 14:26:57 +0000 @@ -591,7 +591,7 @@ (select-window (posn-window (event-end event))) (let ((buffer (tabulated-list-get-id (posn-point (event-end event))))) (when (buffer-live-p buffer) - (if (and (window-dedicated-p (selected-window)) + (if (and (window-dedicated-p) (eq (selected-window) (frame-root-window))) (switch-to-buffer-other-frame buffer) (switch-to-buffer buffer))))) === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2013-06-20 14:15:42 +0000 +++ lisp/calc/calc.el 2013-08-05 14:26:57 +0000 @@ -1441,7 +1441,7 @@ (calc-keypad)))) (when (get-buffer-window "*Calc Keypad*") (calc-keypad) - (set-buffer (window-buffer (selected-window)))) + (set-buffer (window-buffer))) (if (eq major-mode 'calc-mode) (calc-quit) (let ((oldbuf (current-buffer))) === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2013-08-05 06:54:30 +0000 +++ lisp/calendar/calendar.el 2013-08-05 14:26:57 +0000 @@ -1422,7 +1422,7 @@ (year (calendar-extract-year today)) (today-visible (or (not mon) (<= (abs (calendar-interval mon yr month year)) 1))) - (in-calendar-window (eq (window-buffer (selected-window)) + (in-calendar-window (eq (window-buffer) (get-buffer calendar-buffer)))) (calendar-generate (or mon month) (or yr year)) (calendar-update-mode-line) === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2013-06-18 16:05:01 +0000 +++ lisp/calendar/diary-lib.el 2013-08-05 14:26:57 +0000 @@ -1011,8 +1011,7 @@ in the mode line. This is an option for `diary-display-function'." ;; If selected window is dedicated (to the calendar), need a new one ;; to display the diary. - (let* ((pop-up-frames (or pop-up-frames - (window-dedicated-p (selected-window)))) + (let* ((pop-up-frames (or pop-up-frames (window-dedicated-p))) (dbuff (find-buffer-visiting diary-file)) (empty (diary-display-no-entries))) ;; This may be too wide, but when simple diary is used there is @@ -1216,8 +1215,7 @@ is created." (interactive) (let* ((d-file (diary-check-diary-file)) - (pop-up-frames (or pop-up-frames - (window-dedicated-p (selected-window)))) + (pop-up-frames (or pop-up-frames (window-dedicated-p))) (win (selected-window)) (height (window-height))) (with-current-buffer (or (find-buffer-visiting d-file) @@ -2116,8 +2114,7 @@ "Insert a diary entry STRING which may be NONMARKING in FILE. If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'." - (let ((pop-up-frames (or pop-up-frames - (window-dedicated-p (selected-window))))) + (let ((pop-up-frames (or pop-up-frames (window-dedicated-p)))) (find-file-other-window (or file diary-file))) (when (eq major-mode (default-value 'major-mode)) (diary-mode)) (widen) === modified file 'lisp/comint.el' --- lisp/comint.el 2013-06-21 09:37:04 +0000 +++ lisp/comint.el 2013-08-05 14:26:57 +0000 @@ -2296,7 +2296,7 @@ (interactive "P") ; Defeat snooping via C-x ESC ESC (let ((proc (get-buffer-process (current-buffer))) (prefix - (if (eq (window-buffer (selected-window)) (current-buffer)) + (if (eq (window-buffer) (current-buffer)) "" (format "(In buffer %s) " (current-buffer))))) @@ -3108,7 +3108,7 @@ Returns t if successful." (interactive) (when (comint--match-partial-filename) - (unless (window-minibuffer-p (selected-window)) + (unless (window-minibuffer-p) (message "Completing file name...")) (let ((data (comint--complete-file-name-data))) (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))) @@ -3211,7 +3211,7 @@ See also `comint-dynamic-complete-filename'." (declare (obsolete completion-in-region "24.1")) (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) - (minibuffer-p (window-minibuffer-p (selected-window))) + (minibuffer-p (window-minibuffer-p)) (suffix (cond ((not comint-completion-addsuffix) "") ((not (consp comint-completion-addsuffix)) " ") (t (cdr comint-completion-addsuffix)))) @@ -3308,7 +3308,7 @@ (current-window-configuration)) (with-output-to-temp-buffer "*Completions*" (display-completion-list completions common-substring)) - (if (window-minibuffer-p (selected-window)) + (if (window-minibuffer-p) (minibuffer-message "Type space to flush; repeat completion command to scroll") (message "Type space to flush; repeat completion command to scroll"))) === modified file 'lisp/completion.el' --- lisp/completion.el 2013-05-15 23:55:41 +0000 +++ lisp/completion.el 2013-08-05 14:26:57 +0000 @@ -1626,7 +1626,7 @@ ;; Get the next completion (let* ((print-status-p (and (>= baud-rate completion-prompt-speed-threshold) - (not (window-minibuffer-p (selected-window))))) + (not (window-minibuffer-p)))) (insert-point (point)) (entry (completion-search-next cmpl-current-index)) string) === modified file 'lisp/dabbrev.el' --- lisp/dabbrev.el 2013-01-01 09:11:05 +0000 +++ lisp/dabbrev.el 2013-08-05 14:26:57 +0000 @@ -457,7 +457,7 @@ (markerp dabbrev--last-abbrev-location) (marker-position dabbrev--last-abbrev-location) (or (eq last-command this-command) - (and (window-minibuffer-p (selected-window)) + (and (window-minibuffer-p) (= dabbrev--last-abbrev-location (point))))) ;; Find a different expansion for the same abbrev as last time. @@ -793,7 +793,7 @@ ;; In a minibuffer, search the buffer it was activated from, ;; first after the minibuffer itself. Unless we aren't supposed ;; to search the current buffer either. - (if (and (window-minibuffer-p (selected-window)) + (if (and (window-minibuffer-p) (not dabbrev-search-these-buffers-only)) (setq list (cons (dabbrev--minibuffer-origin) === modified file 'lisp/disp-table.el' --- lisp/disp-table.el 2013-01-01 09:11:05 +0000 +++ lisp/disp-table.el 2013-08-05 14:26:57 +0000 @@ -119,7 +119,7 @@ (defun describe-current-display-table () "Describe the display table in use in the selected window and buffer." (interactive) - (let ((disptab (or (window-display-table (selected-window)) + (let ((disptab (or (window-display-table) buffer-display-table standard-display-table))) (if disptab === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-07-12 03:54:57 +0000 +++ lisp/doc-view.el 2013-08-05 14:26:57 +0000 @@ -1262,7 +1262,7 @@ (car (image-size image 'pixels))) img-width) img-width)) - (window-width (window-width (selected-window)))) + (window-width (window-width))) (setf (doc-view-current-image) image) (move-overlay ol (point-min) (point-max)) ;; In case the window is wider than the image, center the image === modified file 'lisp/ebuff-menu.el' --- lisp/ebuff-menu.el 2013-01-01 09:11:05 +0000 +++ lisp/ebuff-menu.el 2013-08-05 14:26:57 +0000 @@ -227,7 +227,7 @@ (defun Electric-buffer-menu-mouse-select (event) (interactive "e") (select-window (posn-window (event-end event))) - (set-buffer (window-buffer (selected-window))) + (set-buffer (window-buffer)) (goto-char (posn-point (event-end event))) (throw 'electric-buffer-menu-select (point))) === modified file 'lisp/ehelp.el' --- lisp/ehelp.el 2013-02-12 04:46:18 +0000 +++ lisp/ehelp.el 2013-08-05 14:26:57 +0000 @@ -146,7 +146,7 @@ (unwind-protect (save-excursion (when one - (goto-char (window-start (selected-window)))) + (goto-char (window-start))) (let ((pop-up-windows t)) (pop-to-buffer buffer)) (with-current-buffer buffer === modified file 'lisp/emacs-lisp/easy-mmode.el' --- lisp/emacs-lisp/easy-mmode.el 2013-08-02 21:23:07 +0000 +++ lisp/emacs-lisp/easy-mmode.el 2013-08-05 14:26:57 +0000 @@ -604,7 +604,7 @@ (goto-char (or ,(if endfun `(funcall #',endfun)) (point-max))) (user-error "No next %s" ,name)) (goto-char (match-beginning 0)) - (when (and (eq (current-buffer) (window-buffer (selected-window))) + (when (and (eq (current-buffer) (window-buffer)) (called-interactively-p 'interactive)) (let ((endpt (or (save-excursion ,(if endfun `(funcall #',endfun) === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-08-04 20:18:11 +0000 +++ lisp/emacs-lisp/edebug.el 2013-08-05 14:26:57 +0000 @@ -293,7 +293,7 @@ "Return t if there are two windows." (and (not (one-window-p)) (eq (selected-window) - (next-window (next-window (selected-window)))))) + (next-window (next-window))))) (defun edebug-sort-alist (alist function) ;; Return the ALIST sorted with comparison function FUNCTION. @@ -334,7 +334,7 @@ ((and (edebug-window-live-p window) (eq (window-buffer window) buffer)) window) - ((eq (window-buffer (selected-window)) buffer) + ((eq (window-buffer) buffer) ;; Selected window already displays BUFFER. (selected-window)) ((get-buffer-window buffer 0)) === modified file 'lisp/emacs-lisp/helper.el' --- lisp/emacs-lisp/helper.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/helper.el 2013-08-05 14:26:57 +0000 @@ -59,7 +59,7 @@ Helper-return-blurb) "return"))) (save-window-excursion - (goto-char (window-start (selected-window))) + (goto-char (window-start)) (if (get-buffer-window "*Help*") (pop-to-buffer "*Help*") (switch-to-buffer "*Help*")) === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2013-01-01 09:11:05 +0000 +++ lisp/emulation/cua-base.el 2013-08-05 14:26:57 +0000 @@ -1298,7 +1298,7 @@ (mark t) (point) cua--explicit-region-start)))) ;; Disable transient-mark-mode if rectangle active in current buffer. - (if (not (window-minibuffer-p (selected-window))) + (if (not (window-minibuffer-p)) (setq transient-mark-mode (and (not cua--rectangle) (if cua-highlight-region-shift-only (not cua--explicit-region-start) === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2013-06-05 01:19:33 +0000 +++ lisp/eshell/esh-mode.el 2013-08-05 14:26:57 +0000 @@ -740,7 +740,7 @@ (if (<= (point) oend) (setq oend (+ oend nchars))) (insert-before-markers string) - (if (= (window-start (selected-window)) (point)) + (if (= (window-start) (point)) (set-window-start (selected-window) (- (point) nchars))) (if (= (point) eshell-last-input-end) === modified file 'lisp/ffap.el' --- lisp/ffap.el 2013-07-24 15:56:24 +0000 +++ lisp/ffap.el 2013-08-05 14:26:57 +0000 @@ -1736,7 +1736,7 @@ ;; Preserve selected buffer, but do not do save-window-excursion, ;; since we want to see any window created by the form. Temporarily ;; select the article buffer, so we can see any point movement. - (let ((sb (window-buffer (selected-window)))) + (let ((sb (window-buffer))) (gnus-configure-windows 'article) (pop-to-buffer gnus-article-buffer) (widen) === modified file 'lisp/help-macro.el' --- lisp/help-macro.el 2013-01-02 16:13:04 +0000 +++ lisp/help-macro.el 2013-08-05 14:26:57 +0000 @@ -136,9 +136,9 @@ (setq config (current-window-configuration)) (pop-to-buffer " *Metahelp*" nil t) (and (fboundp 'make-frame) - (not (eq (window-frame (selected-window)) + (not (eq (window-frame) prev-frame)) - (setq new-frame (window-frame (selected-window)) + (setq new-frame (window-frame) config nil)) (setq buffer-read-only nil) (let ((inhibit-read-only t)) === modified file 'lisp/hilit-chg.el' --- lisp/hilit-chg.el 2013-01-02 16:13:04 +0000 +++ lisp/hilit-chg.el 2013-08-05 14:26:57 +0000 @@ -860,7 +860,7 @@ (get-buffer (read-buffer "buffer-a " (current-buffer) t)) (get-buffer (read-buffer "buffer-b " - (window-buffer (next-window (selected-window))) t)))) + (window-buffer (next-window)) t)))) (let ((file-a (buffer-file-name buf-a)) (file-b (buffer-file-name buf-b))) (highlight-markup-buffers buf-a file-a buf-b file-b) === modified file 'lisp/hippie-exp.el' --- lisp/hippie-exp.el 2013-01-01 09:11:05 +0000 +++ lisp/hippie-exp.el 2013-08-05 14:26:57 +0000 @@ -296,7 +296,7 @@ (message "No further expansions found")) (ding)) (if (and hippie-expand-verbose - (not (window-minibuffer-p (selected-window)))) + (not (window-minibuffer-p))) (message "Using %s" (nth he-num hippie-expand-try-functions-list))))) (if (and (>= he-num 0) @@ -305,7 +305,7 @@ (setq he-num -1) (he-reset-string) (if (and hippie-expand-verbose - (not (window-minibuffer-p (selected-window)))) + (not (window-minibuffer-p))) (message "Undoing expansions")))))) ;; Initializes the region to expand (to between BEG and END). @@ -978,7 +978,7 @@ for subsequent calls (for further possible expansions of the same string). It returns t if a new expansion is found, nil otherwise." (let ((expansion ()) - (flag (if (frame-visible-p (window-frame (selected-window))) + (flag (if (frame-visible-p (window-frame)) 'visible t))) (unless old (he-init-string (he-dabbrev-beg) (point)) === modified file 'lisp/hl-line.el' --- lisp/hl-line.el 2013-01-01 09:11:05 +0000 +++ lisp/hl-line.el 2013-08-05 14:26:57 +0000 @@ -198,7 +198,7 @@ (defun global-hl-line-highlight () "Highlight the current line in the current window." (when global-hl-line-mode ; Might be changed outside the mode function. - (unless (window-minibuffer-p (selected-window)) + (unless (window-minibuffer-p) (unless global-hl-line-overlay (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved (overlay-put global-hl-line-overlay 'face hl-line-face)) === modified file 'lisp/icomplete.el' --- lisp/icomplete.el 2013-02-15 19:19:29 +0000 +++ lisp/icomplete.el 2013-08-05 14:26:57 +0000 @@ -221,7 +221,7 @@ indicate some non-standard, non-simple completion mechanism, like file-name and other custom-func completions)." - (and (window-minibuffer-p (selected-window)) + (and (window-minibuffer-p) (not executing-kbd-macro) minibuffer-completion-table (or (not (functionp minibuffer-completion-table)) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-06-13 22:08:45 +0000 +++ lisp/isearch.el 2013-08-05 14:26:57 +0000 @@ -1015,7 +1015,7 @@ (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout) (isearch-dehighlight) (lazy-highlight-cleanup lazy-highlight-cleanup) - (let ((found-start (window-start (selected-window))) + (let ((found-start (window-start)) (found-point (point))) (when isearch-window-configuration (set-window-configuration isearch-window-configuration) === modified file 'lisp/jit-lock.el' --- lisp/jit-lock.el 2013-05-15 23:55:41 +0000 +++ lisp/jit-lock.el 2013-08-05 14:26:57 +0000 @@ -482,7 +482,7 @@ (cancel-timer jit-lock-stealth-repeat-timer)) (unless (or executing-kbd-macro memory-full - (window-minibuffer-p (selected-window)) + (window-minibuffer-p) ;; For first invocation set up `jit-lock-stealth-buffers'. ;; In repeated invocations it's already been set up. (null (if repeat === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-08-05 10:35:55 +0000 +++ lisp/mail/rmail.el 2013-08-05 14:26:57 +0000 @@ -4768,9 +4768,7 @@ ;;;*** -;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic -;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "61e7ad0931be1e07034dd57825ff326a") +;;;### (autoloads nil "rmailsum" "rmailsum.el" "a9b3bbd9b82dd566524a1209b5cdb7dd") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ === modified file 'lisp/mail/rmailsum.el' --- lisp/mail/rmailsum.el 2013-05-05 14:08:50 +0000 +++ lisp/mail/rmailsum.el 2013-08-05 14:26:57 +0000 @@ -1288,7 +1288,7 @@ (prog1 ;; Is EOB visible in the buffer? (save-excursion - (let ((ht (window-height (selected-window)))) + (let ((ht (window-height))) (move-to-window-line (- ht 2)) (end-of-line) (eobp))) === modified file 'lisp/mouse-drag.el' --- lisp/mouse-drag.el 2013-01-01 09:11:05 +0000 +++ lisp/mouse-drag.el 2013-08-05 14:26:57 +0000 @@ -156,7 +156,7 @@ "Determine if it's wise to enable col-scrolling for the current window. Basically, we check for existing horizontal scrolling." (or truncate-lines - (> (window-hscroll (selected-window)) 0) + (> (window-hscroll) 0) (not (window-full-width-p)) (and mouse-drag-electric-col-scrolling === modified file 'lisp/mpc.el' --- lisp/mpc.el 2013-04-10 13:17:27 +0000 +++ lisp/mpc.el 2013-08-05 14:26:57 +0000 @@ -1513,7 +1513,7 @@ (let* ((newbuf (mpc-tagbrowser-buf tag)) (win (get-buffer-window newbuf 0))) (if win (select-window win) - (if (with-current-buffer (window-buffer (selected-window)) + (if (with-current-buffer (window-buffer) (derived-mode-p 'mpc-tagbrowser-mode)) (setq win (selected-window)) ;; Find a tagbrowser-mode buffer. @@ -2618,8 +2618,7 @@ (song-win (get-buffer-window song-buf 0))) (if song-win (select-window song-win) - (if (or (window-dedicated-p (selected-window)) - (window-minibuffer-p)) + (if (or (window-dedicated-p) (window-minibuffer-p)) (ignore-errors (select-frame (make-frame mpc-frame-alist))) (with-current-buffer song-buf (setq-local mpc-previous-window-config === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2013-02-17 16:26:38 +0000 +++ lisp/net/rcirc.el 2013-08-05 14:26:57 +0000 @@ -1331,7 +1331,7 @@ "Return a buffer for PROCESS, either the one selected or the process buffer." (if rcirc-always-use-server-buffer-flag (process-buffer process) - (let ((buffer (window-buffer (selected-window)))) + (let ((buffer (window-buffer))) (if (and buffer (with-current-buffer buffer (and (eq major-mode 'rcirc-mode) === modified file 'lisp/play/gomoku.el' --- lisp/play/gomoku.el 2013-01-01 09:11:05 +0000 +++ lisp/play/gomoku.el 2013-08-05 14:26:57 +0000 @@ -948,13 +948,13 @@ (defun gomoku-max-width () "Largest possible board width for the current window." - (1+ (/ (- (window-width (selected-window)) + (1+ (/ (- (window-width) gomoku-x-offset gomoku-x-offset 1) gomoku-square-width))) (defun gomoku-max-height () "Largest possible board height for the current window." - (1+ (/ (- (window-height (selected-window)) + (1+ (/ (- (window-height) gomoku-y-offset gomoku-y-offset 2) ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! gomoku-square-height))) === modified file 'lisp/play/landmark.el' --- lisp/play/landmark.el 2013-01-01 09:11:05 +0000 +++ lisp/play/landmark.el 2013-08-05 14:26:57 +0000 @@ -843,13 +843,13 @@ (defun landmark-max-width () "Largest possible board width for the current window." - (1+ (/ (- (window-width (selected-window)) + (1+ (/ (- (window-width) landmark-x-offset landmark-x-offset 1) landmark-square-width))) (defun landmark-max-height () "Largest possible board height for the current window." - (1+ (/ (- (window-height (selected-window)) + (1+ (/ (- (window-height) landmark-y-offset landmark-y-offset 2) ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! landmark-square-height))) === modified file 'lisp/play/zone.el' --- lisp/play/zone.el 2013-01-01 09:11:05 +0000 +++ lisp/play/zone.el 2013-08-05 14:26:57 +0000 @@ -110,7 +110,7 @@ (let ((f (selected-frame)) (outbuf (get-buffer-create "*zone*")) (text (buffer-substring (window-start) (window-end))) - (wp (1+ (- (window-point (selected-window)) + (wp (1+ (- (window-point) (window-start))))) (put 'zone 'orig-buffer (current-buffer)) (switch-to-buffer outbuf) === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2013-06-04 23:52:06 +0000 +++ lisp/progmodes/compile.el 2013-08-05 14:26:57 +0000 @@ -2492,7 +2492,7 @@ All arguments are markers. If END-MK is non-nil, mark is set there and overlay is highlighted between MK and END-MK." ;; Show compilation buffer in other window, scrolled to this error. - (let* ((from-compilation-buffer (eq (window-buffer (selected-window)) + (let* ((from-compilation-buffer (eq (window-buffer) (marker-buffer msg))) ;; Use an existing window if it is in a visible frame. (pre-existing (get-buffer-window (marker-buffer msg) 0)) === modified file 'lisp/progmodes/ebrowse.el' --- lisp/progmodes/ebrowse.el 2013-07-12 03:54:57 +0000 +++ lisp/progmodes/ebrowse.el 2013-08-05 14:26:57 +0000 @@ -1605,7 +1605,7 @@ ;; Get the source file to view or find. (setf file (ebrowse-find-source-file file tags-file)) ;; If current window is dedicated, use another frame. - (when (window-dedicated-p (selected-window)) + (when (window-dedicated-p) (setf where 'other-window)) (cond (view (setf ebrowse-temp-position-to-view struc === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2013-01-19 20:38:13 +0000 +++ lisp/progmodes/etags.el 2013-08-05 14:26:57 +0000 @@ -982,7 +982,7 @@ ;; selected window's buffer; without the hair, point is moved in both ;; windows. To prevent this, we save the selected window's point before ;; doing find-tag-noselect, and restore it after. - (let* ((window-point (window-point (selected-window))) + (let* ((window-point (window-point)) (tagbuf (find-tag-noselect tagname next-p regexp-p)) (tagpoint (progn (set-buffer tagbuf) (point)))) (set-window-point (prog1 === modified file 'lisp/progmodes/fortran.el' --- lisp/progmodes/fortran.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/fortran.el 2013-08-05 14:26:57 +0000 @@ -1080,8 +1080,7 @@ fortran-column-ruler-fixed) (save-excursion (beginning-of-line) - (if (eq (window-start (selected-window)) - (window-point (selected-window))) + (if (eq (window-start) (window-point)) (line-beginning-position 2) (point))) nil "Type SPC or any command to erase ruler.")) === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2013-07-20 19:25:05 +0000 +++ lisp/progmodes/gdb-mi.el 2013-08-05 14:26:57 +0000 @@ -2951,7 +2951,7 @@ obj) (when (numberp pos) (with-selected-window (posn-window posn) - (with-current-buffer (window-buffer (selected-window)) + (with-current-buffer (window-buffer) (goto-char pos) (dolist (overlay (overlays-in pos pos)) (when (overlay-get overlay 'put-break) === modified file 'lisp/progmodes/verilog-mode.el' --- lisp/progmodes/verilog-mode.el 2013-05-16 16:11:38 +0000 +++ lisp/progmodes/verilog-mode.el 2013-08-05 14:26:57 +0000 @@ -3256,7 +3256,7 @@ (defun verilog-point-text (&optional pointnum) "Return text describing where POINTNUM or current point is (for errors). Use filename, if current buffer being edited shorten to just buffer name." - (concat (or (and (equal (window-buffer (selected-window)) (current-buffer)) + (concat (or (and (equal (window-buffer) (current-buffer)) (buffer-name)) buffer-file-name (buffer-name)) === modified file 'lisp/reposition.el' --- lisp/reposition.el 2013-01-01 09:11:05 +0000 +++ lisp/reposition.el 2013-08-05 14:26:57 +0000 @@ -61,7 +61,7 @@ (here (point)) ;; change this name once I've gotten rid of references to ht. ;; this is actually the number of the last screen line - (ht (- (window-height (selected-window)) 2)) + (ht (- (window-height) 2)) (line (repos-count-screen-lines (window-start) (point))) (comment-height ;; The call to max deals with the case of cursor between defuns. === modified file 'lisp/rot13.el' --- lisp/rot13.el 2013-01-01 09:11:05 +0000 +++ lisp/rot13.el 2013-08-05 14:26:57 +0000 @@ -101,9 +101,9 @@ (defun toggle-rot13-mode () "Toggle the use of ROT13 encoding for the current window." (interactive) - (if (eq (window-display-table (selected-window)) rot13-display-table) + (if (eq (window-display-table) rot13-display-table) (set-window-display-table (selected-window) nil) - (if (null (window-display-table (selected-window))) + (if (null (window-display-table)) (set-window-display-table (selected-window) rot13-display-table)))) (provide 'rot13) === modified file 'lisp/server.el' --- lisp/server.el 2013-08-05 10:35:55 +0000 +++ lisp/server.el 2013-08-05 14:26:57 +0000 @@ -1557,7 +1557,7 @@ (setq next-buffer (car (process-get proc 'buffers)))) (setq rest (cdr rest))))) (and next-buffer (server-switch-buffer next-buffer killed-one)) - (unless (or next-buffer killed-one (window-dedicated-p (selected-window))) + (unless (or next-buffer killed-one (window-dedicated-p)) ;; (switch-to-buffer (other-buffer)) (message "No server buffers remain to edit"))) (if (not (buffer-live-p next-buffer)) @@ -1584,10 +1584,10 @@ (unless (frame-live-p server-window) (setq server-window (make-frame))) (select-window (frame-selected-window server-window)))) - (when (window-minibuffer-p (selected-window)) + (when (window-minibuffer-p) (select-window (next-window nil 'nomini 0))) ;; Move to a non-dedicated window, if we have one. - (when (window-dedicated-p (selected-window)) + (when (window-dedicated-p) (select-window (get-window-with-predicate (lambda (w) @@ -1601,7 +1601,7 @@ ;; a minibuffer/dedicated-window (if there's no other). (error (pop-to-buffer next-buffer))))))) (when server-raise-frame - (select-frame-set-input-focus (window-frame (selected-window)))))) + (select-frame-set-input-focus (window-frame))))) ;;;###autoload (defun server-save-buffers-kill-terminal (arg) === modified file 'lisp/shell.el' --- lisp/shell.el 2013-07-15 02:33:54 +0000 +++ lisp/shell.el 2013-08-05 14:26:57 +0000 @@ -1122,7 +1122,7 @@ (interactive) (let ((data (shell-command-completion))) (if data - (prog2 (unless (window-minibuffer-p (selected-window)) + (prog2 (unless (window-minibuffer-p) (message "Completing command name...")) (apply #'completion-in-region data))))) @@ -1232,7 +1232,7 @@ (interactive) (let ((data (shell-environment-variable-completion))) (if data - (prog2 (unless (window-minibuffer-p (selected-window)) + (prog2 (unless (window-minibuffer-p) (message "Completing variable name...")) (apply #'completion-in-region data))))) === modified file 'lisp/simple.el' --- lisp/simple.el 2013-08-05 10:35:55 +0000 +++ lisp/simple.el 2013-08-05 14:26:57 +0000 @@ -4098,9 +4098,9 @@ (progn (barf-if-buffer-read-only) (read-buffer "Insert buffer: " - (if (eq (selected-window) (next-window (selected-window))) + (if (eq (selected-window) (next-window)) (other-buffer (current-buffer)) - (window-buffer (next-window (selected-window)))) + (window-buffer (next-window))) t)))) (push-mark (save-excursion @@ -5965,7 +5965,7 @@ (setq selective-display (and arg (prefix-numeric-value arg))) (recenter current-vpos)) - (set-window-start (selected-window) (window-start (selected-window))) + (set-window-start (selected-window) (window-start)) (princ "selective-display set to " t) (prin1 selective-display t) (princ "." t)) @@ -6629,8 +6629,7 @@ (interactive) (let ((buf completion-reference-buffer)) (if (one-window-p t) - (if (window-dedicated-p (selected-window)) - (delete-frame)) + (if (window-dedicated-p) (delete-frame)) (delete-window (selected-window)) (if (get-buffer-window buf) (select-window (get-buffer-window buf)))))) === modified file 'lisp/speedbar.el' --- lisp/speedbar.el 2013-08-01 18:46:10 +0000 +++ lisp/speedbar.el 2013-08-05 14:26:57 +0000 @@ -2648,7 +2648,7 @@ (dframe-select-attached-frame speedbar-frame) ;; make sure we at least choose a window to ;; get a good directory from - (if (window-minibuffer-p (selected-window)) + (if (window-minibuffer-p) nil ;; Check for special modes (speedbar-maybe-add-localized-support (current-buffer)) @@ -3512,7 +3512,7 @@ (set-buffer speedbar-buffer) (if (<= (count-lines (point-min) (point-max)) - (1- (window-height (selected-window)))) + (1- (window-height))) ;; whole buffer fits (let ((cp (point))) @@ -3545,7 +3545,7 @@ (setq end (point-max))))) ;; Now work out the details of centering (let ((nl (count-lines start end)) - (wl (1- (window-height (selected-window)))) + (wl (1- (window-height))) (cp (point))) (if (> nl wl) ;; We can't fit it all, so just center on cursor @@ -3558,12 +3558,12 @@ nil ;; we need to do something... (goto-char start) - (let ((newcent (/ (- (window-height (selected-window)) nl) 2)) + (let ((newcent (/ (- (window-height) nl) 2)) (lte (count-lines start (point-max)))) - (if (and (< (+ newcent lte) (window-height (selected-window))) - (> (- (window-height (selected-window)) lte 1) + (if (and (< (+ newcent lte) (window-height)) + (> (- (window-height) lte 1) newcent)) - (setq newcent (- (window-height (selected-window)) + (setq newcent (- (window-height) lte 1))) (recenter newcent)))) (goto-char cp)))))) @@ -3997,7 +3997,7 @@ (defun speedbar-recenter () "Recenter the current buffer so point is in the center of the window." - (recenter (/ (window-height (selected-window)) 2))) + (recenter (/ (window-height) 2))) ;;; Color loading section. === modified file 'lisp/startup.el' --- lisp/startup.el 2013-06-30 22:29:23 +0000 +++ lisp/startup.el 2013-08-05 14:26:57 +0000 @@ -1541,7 +1541,7 @@ (t "splash.pbm"))) (img (create-image image-file)) (image-width (and img (car (image-size img)))) - (window-width (window-width (selected-window)))) + (window-width (window-width))) (when img (when (> window-width image-width) ;; Center the image in the window. === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2013-04-17 17:48:10 +0000 +++ lisp/textmodes/ispell.el 2013-08-05 14:26:57 +0000 @@ -2218,7 +2218,7 @@ (window-min-height (min window-min-height ispell-choices-win-default-height)) (command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m )) - (dedicated (window-dedicated-p (selected-window))) + (dedicated (window-dedicated-p)) (skipped 0) char num result textwin dedicated-win) === modified file 'lisp/textmodes/makeinfo.el' --- lisp/textmodes/makeinfo.el 2013-01-01 09:11:05 +0000 +++ lisp/textmodes/makeinfo.el 2013-08-05 14:26:57 +0000 @@ -211,7 +211,7 @@ (with-current-buffer buffer (revert-buffer t t)) (setq buffer (find-file-noselect makeinfo-output-file-name))) - (if (window-dedicated-p (selected-window)) + (if (window-dedicated-p) (switch-to-buffer-other-window buffer) (switch-to-buffer buffer))) (goto-char (point-min)))) === modified file 'lisp/tutorial.el' --- lisp/tutorial.el 2013-02-11 01:50:45 +0000 +++ lisp/tutorial.el 2013-08-05 14:26:57 +0000 @@ -896,7 +896,7 @@ ;; inserted at the start of the buffer, the "type C-v to ;; move to the next screen" might not be visible on the ;; first screen (n < 0). How will the novice know what to do? - (let ((n (- (window-height (selected-window)) + (let ((n (- (window-height) (count-lines (point-min) (point)) 6))) (if (< n 8) === modified file 'lisp/vc/add-log.el' --- lisp/vc/add-log.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/add-log.el 2013-08-05 14:26:57 +0000 @@ -813,12 +813,12 @@ (unless (equal file-name buffer-file-name) (cond - ((equal file-name (buffer-file-name (window-buffer (selected-window)))) + ((equal file-name (buffer-file-name (window-buffer))) ;; If the selected window already shows the desired buffer don't show ;; it again (particularly important if other-window is true). ;; This is important for diff-add-change-log-entries-other-window. - (set-buffer (window-buffer (selected-window)))) - ((or other-window (window-dedicated-p (selected-window))) + (set-buffer (window-buffer))) + ((or other-window (window-dedicated-p)) (find-file-other-window file-name)) (t (find-file file-name)))) (or (derived-mode-p 'change-log-mode) === modified file 'lisp/vc/compare-w.el' --- lisp/vc/compare-w.el 2013-05-06 07:10:31 +0000 +++ lisp/vc/compare-w.el 2013-08-05 14:26:57 +0000 @@ -179,7 +179,7 @@ 'compare-windows-sync-regexp compare-windows-sync))) (setq p1 (point) b1 (current-buffer)) - (setq w2 (next-window (selected-window))) + (setq w2 (next-window)) (if (eq w2 (selected-window)) (setq w2 (next-window (selected-window) nil 'visible))) (if (eq w2 (selected-window)) === modified file 'lisp/vc/ediff-help.el' --- lisp/vc/ediff-help.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/ediff-help.el 2013-08-05 14:26:57 +0000 @@ -253,7 +253,7 @@ (defun ediff-indent-help-message () - (let* ((shift (/ (max 0 (- (window-width (selected-window)) + (let* ((shift (/ (max 0 (- (window-width) (ediff-help-message-line-length))) 2)) (str (make-string shift ?\ ))) === modified file 'lisp/vc/ediff-util.el' --- lisp/vc/ediff-util.el 2013-08-05 10:35:55 +0000 +++ lisp/vc/ediff-util.el 2013-08-05 14:26:57 +0000 @@ -537,7 +537,7 @@ ;; to reside. (defun ediff-setup-control-buffer (ctl-buf) "Set up window for control buffer." - (if (window-dedicated-p (selected-window)) + (if (window-dedicated-p) (set-buffer ctl-buf) ; we are in control frame but just in case (switch-to-buffer ctl-buf)) (let ((window-min-height 2)) @@ -1629,7 +1629,7 @@ (setq lines (1+ lines))) ;; And position the beginning on the right line (goto-char beg) - (recenter (/ (1+ (max (- (1- (window-height (selected-window))) + (recenter (/ (1+ (max (- (1- (window-height)) lines) 1) ) === modified file 'lisp/vc/ediff-wind.el' --- lisp/vc/ediff-wind.el 2013-05-23 07:10:05 +0000 +++ lisp/vc/ediff-wind.el 2013-08-05 14:26:57 +0000 @@ -861,7 +861,7 @@ ;; create a new splittable frame if none is found (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable) (if (ediff-window-display-p) - (let ((wind-frame (window-frame (selected-window))) + (let ((wind-frame (window-frame)) seen-windows) (while (and (not (memq (selected-window) seen-windows)) (or @@ -877,7 +877,7 @@ (setq seen-windows (cons (selected-window) seen-windows)) ;; try new window (other-window 1 t) - (setq wind-frame (window-frame (selected-window))) + (setq wind-frame (window-frame)) ) (if (memq (selected-window) seen-windows) ;; fed up, no appropriate frames @@ -939,7 +939,7 @@ (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame)) (select-frame ctl-frame) - (if (window-dedicated-p (selected-window)) + (if (window-dedicated-p) () (delete-other-windows) (switch-to-buffer ctl-buffer)) === modified file 'lisp/vc/emerge.el' --- lisp/vc/emerge.el 2012-09-24 12:23:25 +0000 +++ lisp/vc/emerge.el 2013-08-05 14:26:57 +0000 @@ -1770,7 +1770,7 @@ (setq lines (1+ lines))) ;; And position the beginning on the right line (goto-char beg) - (recenter (/ (1+ (- (1- (window-height (selected-window))) + (recenter (/ (1+ (- (1- (window-height)) lines)) 2)))))) (goto-char pos)) === modified file 'lisp/vc/pcvs-util.el' --- lisp/vc/pcvs-util.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/pcvs-util.el 2013-08-05 14:26:57 +0000 @@ -97,7 +97,7 @@ BUF is assumed to be a temporary buffer used from the buffer MAINBUF." (interactive (list (current-buffer))) (save-current-buffer - (let ((win (if (eq buf (window-buffer (selected-window))) (selected-window) + (let ((win (if (eq buf (window-buffer)) (selected-window) (get-buffer-window buf t)))) (when win (if (window-dedicated-p win) @@ -111,8 +111,8 @@ ;;; ) ))) (with-current-buffer buf - (bury-buffer (unless (and (eq buf (window-buffer (selected-window))) - (not (window-dedicated-p (selected-window)))) + (bury-buffer (unless (and (eq buf (window-buffer)) + (not (window-dedicated-p))) buf))) (when mainbuf (let ((mainwin (or (get-buffer-window mainbuf) === modified file 'lisp/window.el' --- lisp/window.el 2013-07-25 09:58:27 +0000 +++ lisp/window.el 2013-08-05 14:26:57 +0000 @@ -1486,7 +1486,7 @@ windows nor the buffer list." ;; If we start from the minibuffer window, don't fail to come ;; back to it. - (when (window-minibuffer-p (selected-window)) + (when (window-minibuffer-p) (setq minibuf t)) ;; Make sure to not mess up the order of recently selected ;; windows. Use `save-selected-window' and `select-window' @@ -6676,7 +6676,7 @@ ;; minibuffer. Use `unread-command-events' in order to execute pre- ;; and post-command hooks and trigger idle timers. To avoid delaying ;; autoselection again, set `mouse-autoselect-window-state'." - (unless (window-minibuffer-p (selected-window)) + (unless (window-minibuffer-p) (setq mouse-autoselect-window-state 'select) (setq unread-command-events (cons (list 'select-window (list window)) @@ -6702,7 +6702,7 @@ ;; minibuffer gets unselected unexpectedly, and where ;; you then have to move your mouse all the way down to ;; the minibuffer to select it. - (window-minibuffer-p (selected-window)) + (window-minibuffer-p) ;; Don't switch to minibuffer window unless it's active. (and (window-minibuffer-p window) (not (minibuffer-window-active-p window))) === modified file 'lisp/winner.el' --- lisp/winner.el 2013-07-22 22:51:29 +0000 +++ lisp/winner.el 2013-08-05 14:26:57 +0000 @@ -227,8 +227,7 @@ (set-window-configuration winconf)) (cond ((window-live-p chosen) (select-window chosen)) - ((window-minibuffer-p (selected-window)) - (other-window 1))) + ((window-minibuffer-p) (other-window 1))) (when (/= minisize (window-height miniwin)) (with-selected-window miniwin (setf (window-height) minisize))))) @@ -381,7 +380,7 @@ (setq winner-undone-data (list (winner-win-data)))) (cl-incf winner-undo-counter) ; starting at 1 (when (and (winner-undo-this) - (not (window-minibuffer-p (selected-window)))) + (not (window-minibuffer-p))) (message "Winner undo (%d / %d)" winner-undo-counter (1- (ring-length winner-pending-undo-ring))))))) ------------------------------------------------------------ revno: 113704 author: Dave Abrahams committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-08-05 14:15:37 +0000 message: gnus-int.el (gnus-warp-to-article): Allow warping in all groups so that we can create nndoc groups that excerpt other groups diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-08-02 13:34:22 +0000 +++ lisp/gnus/ChangeLog 2013-08-05 14:15:37 +0000 @@ -1,3 +1,8 @@ +2013-08-05 Dave Abrahams + + * gnus-int.el (gnus-warp-to-article): Allow warping in all groups so + that we can create nndoc groups that excerpt other groups. + 2013-08-02 Lars Magne Ingebrigtsen * gnus-delay.el (gnus-delay-article): Fix typo. === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2013-08-01 22:58:40 +0000 +++ lisp/gnus/gnus-int.el 2013-08-05 14:15:37 +0000 @@ -582,18 +582,18 @@ (gnus-group-method group))) (defun gnus-warp-to-article () - "Jump from an article in a virtual group to the article in its real group. -Does nothing in a real group." + "Look up the current article in the group where it originated. +This command only makes sense for groups shows articles gathered +from other groups -- for instance, search results and the like." (interactive) - (when (gnus-virtual-group-p gnus-newsgroup-name) - (let ((gnus-command-method - (gnus-find-method-for-group gnus-newsgroup-name))) - (or - (when (gnus-check-backend-function - 'warp-to-article (car gnus-command-method)) - (funcall (gnus-get-function gnus-command-method 'warp-to-article))) - (and (bound-and-true-p gnus-registry-enabled) - (gnus-try-warping-via-registry)))))) + (let ((gnus-command-method + (gnus-find-method-for-group gnus-newsgroup-name))) + (or + (when (gnus-check-backend-function + 'warp-to-article (car gnus-command-method)) + (funcall (gnus-get-function gnus-command-method 'warp-to-article))) + (and (bound-and-true-p gnus-registry-enabled) + (gnus-try-warping-via-registry))))) (defun gnus-request-head (article group) "Request the head of ARTICLE in GROUP." ------------------------------------------------------------ revno: 113703 committer: Xue Fuqiao branch nick: trunk timestamp: Mon 2013-08-05 21:28:29 +0800 message: * doc/misc/cl.texi (Blocks and Exits): Add an index. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-08-04 21:27:49 +0000 +++ doc/misc/ChangeLog 2013-08-05 13:28:29 +0000 @@ -1,3 +1,7 @@ +2013-08-05 Xue Fuqiao + + * cl.texi (Blocks and Exits): Add an index. + 2013-08-04 Stephen Berman * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add todo-mode. === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2013-05-04 19:49:23 +0000 +++ doc/misc/cl.texi 2013-08-05 13:28:29 +0000 @@ -1492,6 +1492,7 @@ @node Blocks and Exits @section Blocks and Exits +@cindex block @noindent Common Lisp @dfn{blocks} provide a non-local exit mechanism very ------------------------------------------------------------ revno: 113702 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2013-08-05 15:06:29 +0200 message: lisp/frameset.el: New frame-id functions. (frameset--set-id): Doc fix. (frameset-frame-id, frameset-frame-id-equal-p) (frameset-locate-frame-id): New functions. (frameset--process-minibuffer-frames, frameset--reuse-frame) (frameset-restore): Use them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 10:35:55 +0000 +++ lisp/ChangeLog 2013-08-05 13:06:29 +0000 @@ -1,3 +1,11 @@ +2013-08-05 Juanma Barranquero + + * frameset.el (frameset--set-id): Doc fix. + (frameset-frame-id, frameset-frame-id-equal-p) + (frameset-locate-frame-id): New functions. + (frameset--process-minibuffer-frames, frameset--reuse-frame) + (frameset-restore): Use them. + 2013-08-05 Dmitry Antipov Do not call to `selected-frame' where it is assumed by default. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-05 04:45:17 +0000 +++ lisp/frameset.el 2013-08-05 13:06:29 +0000 @@ -340,10 +340,10 @@ filtered)) -;; Saving framesets +;; Frame ids (defun frameset--set-id (frame) - "Set FRAME's `frameset--id' if not yet set. + "Set FRAME's id if not yet set. Internal use only." (unless (frame-parameter frame 'frameset--id) (set-frame-parameter frame @@ -351,6 +351,33 @@ (mapconcat (lambda (n) (format "%04X" n)) (cl-loop repeat 4 collect (random 65536)) "-")))) +;;;###autoload +(defun frameset-frame-id (frame) + "Return the frame id of FRAME, if it has one; else, return nil. +A frame id is a string that uniquely identifies a frame. +It is persistent across `frameset-save' / `frameset-restore' +invocations, and once assigned is never changed unless the same +frame is duplicated (via `frameset-restore'), in which case the +newest frame keeps the id and the old frame's is set to nil." + (frame-parameter frame 'frameset--id)) + +;;;###autoload +(defun frameset-frame-id-equal-p (frame id) + "Return non-nil if FRAME's id matches ID." + (string= (frameset-frame-id frame) id)) + +;;;###autoload +(defun frameset-locate-frame-id (id &optional frame-list) + "Return the live frame with id ID, if exists; else nil. +If FRAME-LIST is a list of frames, check these frames only. +If nil, check all live frames." + (cl-find-if (lambda (f) + (and (frame-live-p f) + (frameset-frame-id-equal-p f id))) + (or frame-list (frame-list)))) + + +;; Saving framesets (defun frameset--process-minibuffer-frames (frame-list) "Process FRAME-LIST and record minibuffer relationships. @@ -370,7 +397,7 @@ (unless (frame-parameter frame 'frameset--mini) (frameset--set-id frame) (let* ((mb-frame (window-frame (minibuffer-window frame))) - (id (and mb-frame (frame-parameter mb-frame 'frameset--id)))) + (id (and mb-frame (frameset-frame-id mb-frame)))) (if (null id) (error "Minibuffer frame %S for %S is not being saved" mb-frame frame) ;; For minibufferless frames, frameset--mini is a cons @@ -516,7 +543,7 @@ ;; M-x desktop-read). (setq frame (frameset--find-frame (lambda (f id) - (string= (frame-parameter f 'frameset--id) id)) + (frameset-frame-id-equal-p f id)) display (cdr (assq 'frameset--id frame-cfg)))) ;; If it has not been loaded, and it is not a minibuffer-only frame, ;; let's look for an existing non-minibuffer-only frame to reuse. @@ -533,10 +560,10 @@ ;; and that they are linked to the right minibuffer frame. (setq frame (frameset--find-frame (lambda (f id mini-id) - (and (string= (frame-parameter f 'frameset--id) id) - (string= (frame-parameter (window-frame (minibuffer-window f)) - 'frameset--id) - mini-id))) + (and (frameset-frame-id-equal-p f id) + (frameset-frame-id-equal-p (window-frame + (minibuffer-window f)) + mini-id))) display (cdr (assq 'frameset--id frame-cfg)) (cdr mini)))) (t ;; Default to just finding a frame in the same display. @@ -740,11 +767,8 @@ ;; frameset--id from the non-reusable frame, which is not useful anymore. (when (and other-frames (or (eq reuse-frames :keep) (consp reuse-frames))) - (let ((dup (cl-find (cdr (assq 'frameset--id frame-cfg)) - other-frames - :key (lambda (frame) - (frame-parameter frame 'frameset--id)) - :test #'string=))) + (let ((dup (frameset-locate-frame-id (cdr (assq 'frameset--id frame-cfg)) + other-frames))) (when dup (set-frame-parameter dup 'frameset--id nil)))) ;; Restore minibuffers. Some of this stuff could be done in a filter @@ -759,11 +783,7 @@ (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) frame-cfg)))) (t ;; Frame depends on other frame's minibuffer window. - (let* ((mb-frame (or (cl-find-if - (lambda (f) - (string= (frame-parameter f 'frameset--id) - mb-id)) - (frame-list)) + (let* ((mb-frame (or (frameset-locate-frame-id mb-id) (error "Minibuffer frame %S not found" mb-id))) (mb-param (assq 'minibuffer frame-cfg)) (mb-window (minibuffer-window mb-frame))) ------------------------------------------------------------ revno: 113701 committer: Xue Fuqiao branch nick: trunk timestamp: Mon 2013-08-05 19:37:47 +0800 message: * doc/lispref/windows.texi (Window Start and End): Add an index. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-02 13:52:10 +0000 +++ doc/lispref/ChangeLog 2013-08-05 11:37:47 +0000 @@ -1,3 +1,7 @@ +2013-08-05 Xue Fuqiao + + * windows.texi (Window Start and End): Add an index. + 2013-08-02 Xue Fuqiao * display.texi (Face Functions): Add an index. === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2013-07-30 13:53:28 +0000 +++ doc/lispref/windows.texi 2013-08-05 11:37:47 +0000 @@ -2569,6 +2569,7 @@ @node Window Start and End @section The Window Start and End Positions @cindex window start position +@cindex display-start position Each window maintains a marker used to keep track of a buffer position that specifies where in the buffer display should start. This position @@ -3194,6 +3195,7 @@ Here is how you can determine whether a given position @var{position} is off the screen due to horizontal scrolling: +@c FIXME: Maybe hscroll-on-screen-p is a better name? @example @group (defun hscroll-on-screen (window position) ------------------------------------------------------------ revno: 113700 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-05 14:35:55 +0400 message: Do not call to `selected-frame' where it is assumed by default. Affected functions are `raise-frame', `redraw-frame', `frame-first-window', `frame-terminal' and `delete-frame'. * lisp/calendar/appt.el (appt-disp-window): * lisp/epg.el (epg-wait-for-completion): * lisp/follow.el (follow-delete-other-windows-and-split) (follow-avoid-tail-recenter): * lisp/international/mule.el (set-terminal-coding-system): * lisp/mail/rmail.el (rmail-mail-return): * lisp/net/newst-plainview.el (newsticker--buffer-set-uptodate): * lisp/progmodes/f90.el (f90-add-imenu-menu): * lisp/progmodes/idlw-toolbar.el (idlwave-toolbar-toggle): * lisp/server.el (server-switch-buffer): * lisp/simple.el (delete-completion-window): * lisp/talk.el (talk): * lisp/term/xterm.el (terminal-init-xterm-modify-other-keys) (xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys): * lisp/vc/ediff-util.el (ediff-status-info, ediff-show-diff-output): * lisp/vc/ediff.el (ediff-documentation): Related users changed. * lisp/frame.el (selected-terminal): Remove the leftover. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 06:54:30 +0000 +++ lisp/ChangeLog 2013-08-05 10:35:55 +0000 @@ -1,3 +1,26 @@ +2013-08-05 Dmitry Antipov + + Do not call to `selected-frame' where it is assumed by default. + Affected functions are `raise-frame', `redraw-frame', + `frame-first-window', `frame-terminal' and `delete-frame'. + * calendar/appt.el (appt-disp-window): + * epg.el (epg-wait-for-completion): + * follow.el (follow-delete-other-windows-and-split) + (follow-avoid-tail-recenter): + * international/mule.el (set-terminal-coding-system): + * mail/rmail.el (rmail-mail-return): + * net/newst-plainview.el (newsticker--buffer-set-uptodate): + * progmodes/f90.el (f90-add-imenu-menu): + * progmodes/idlw-toolbar.el (idlwave-toolbar-toggle): + * server.el (server-switch-buffer): + * simple.el (delete-completion-window): + * talk.el (talk): + * term/xterm.el (terminal-init-xterm-modify-other-keys) + (xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys): + * vc/ediff-util.el (ediff-status-info, ediff-show-diff-output): + * vc/ediff.el (ediff-documentation): Related users changed. + * frame.el (selected-terminal): Remove the leftover. + 2013-08-05 Glenn Morris * calendar/calendar.el (calendar-generate-month): === modified file 'lisp/calendar/appt.el' --- lisp/calendar/appt.el 2013-01-01 09:11:05 +0000 +++ lisp/calendar/appt.el 2013-08-05 10:35:55 +0000 @@ -472,7 +472,7 @@ (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) (set-buffer-modified-p nil) (setq buffer-read-only t) - (raise-frame (selected-frame)) + (raise-frame) (select-window this-window))) (defun appt-delete-window () === modified file 'lisp/epg.el' --- lisp/epg.el 2013-06-24 07:07:08 +0000 +++ lisp/epg.el 2013-08-05 10:35:55 +0000 @@ -1346,7 +1346,7 @@ (> (float-time (or (nth 5 (file-attributes epg-agent-file)) '(0 0 0 0))) (float-time epg-agent-mtime)))) - (redraw-frame (selected-frame))) + (redraw-frame)) (epg-context-set-result-for context 'error (nreverse (epg-context-result-for context 'error)))) === modified file 'lisp/follow.el' --- lisp/follow.el 2013-01-01 09:11:05 +0000 +++ lisp/follow.el 2013-08-05 10:35:55 +0000 @@ -572,7 +572,7 @@ (interactive "P") (let ((other (or (and (null arg) (not (eq (selected-window) - (frame-first-window (selected-frame))))) + (frame-first-window)))) (and arg (< (prefix-numeric-value arg) 0)))) (start (window-start))) @@ -1083,7 +1083,7 @@ This is done by reading and rewriting the start position of non-first windows in Follow mode." (let* ((orig-buffer (current-buffer)) - (top (frame-first-window (selected-frame))) + (top (frame-first-window)) (win top) who) ; list of (buffer . frame) ;; If the only window in the frame is a minibuffer === modified file 'lisp/frame.el' --- lisp/frame.el 2013-07-29 16:34:53 +0000 +++ lisp/frame.el 2013-08-05 10:35:55 +0000 @@ -1278,9 +1278,6 @@ ;;;; Frame/display capabilities. -(defun selected-terminal () - "Return the terminal that is now selected." - (frame-terminal (selected-frame))) (declare-function msdos-mouse-p "dosfns.c") === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2013-07-20 15:41:38 +0000 +++ lisp/international/mule.el 2013-08-05 10:35:55 +0000 @@ -1346,7 +1346,7 @@ (if coding-system (setq default-terminal-coding-system coding-system)) (set-terminal-coding-system-internal coding-system terminal) - (redraw-frame (selected-frame))) + (redraw-frame)) (defvar default-keyboard-coding-system nil "Default value of the keyboard coding system. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-05-22 03:13:56 +0000 +++ lisp/mail/rmail.el 2013-08-05 10:35:55 +0000 @@ -3725,7 +3725,7 @@ ;; If the frame was probably made for this buffer, the user ;; probably wants to delete it now. ((display-multi-frame-p) - (delete-frame (selected-frame))) + (delete-frame)) ;; The previous frame is where normally they have the Rmail buffer ;; displayed. (t (other-frame -1)))) === modified file 'lisp/net/newst-plainview.el' --- lisp/net/newst-plainview.el 2013-02-12 04:46:18 +0000 +++ lisp/net/newst-plainview.el 2013-08-05 10:35:55 +0000 @@ -1188,7 +1188,7 @@ "Redraw the newsticker window." (if (fboundp 'force-window-update) (force-window-update (current-buffer)) - (redraw-frame (selected-frame))) + (redraw-frame)) (run-hooks 'newsticker-buffer-change-hook) (sit-for 0)) === modified file 'lisp/progmodes/f90.el' --- lisp/progmodes/f90.el 2013-05-17 00:36:33 +0000 +++ lisp/progmodes/f90.el 2013-08-05 10:35:55 +0000 @@ -1026,7 +1026,7 @@ (if (lookup-key (current-local-map) [menu-bar index]) (message "%s" "F90-imenu already exists.") (imenu-add-to-menubar "F90-imenu") - (redraw-frame (selected-frame)))) + (redraw-frame))) ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. === modified file 'lisp/progmodes/idlw-toolbar.el' --- lisp/progmodes/idlw-toolbar.el 2013-06-25 16:13:49 +0000 +++ lisp/progmodes/idlw-toolbar.el 2013-08-05 10:35:55 +0000 @@ -962,7 +962,7 @@ (if (featurep 'xemacs) nil ; no action necessary, toolbar gets updated automatically ;; On Emacs, redraw the frame to make sure the Toolbar is updated. - (redraw-frame (selected-frame)))) + (redraw-frame))) (provide 'idlw-toolbar) (provide 'idlwave-toolbar) === modified file 'lisp/server.el' --- lisp/server.el 2013-07-31 06:52:26 +0000 +++ lisp/server.el 2013-08-05 10:35:55 +0000 @@ -1593,7 +1593,7 @@ (lambda (w) (and (not (window-dedicated-p w)) (equal (frame-terminal (window-frame w)) - (frame-terminal (selected-frame))))) + (frame-terminal)))) 'nomini 'visible (selected-window)))) (condition-case nil (switch-to-buffer next-buffer) === modified file 'lisp/simple.el' --- lisp/simple.el 2013-07-26 18:48:05 +0000 +++ lisp/simple.el 2013-08-05 10:35:55 +0000 @@ -6630,7 +6630,7 @@ (let ((buf completion-reference-buffer)) (if (one-window-p t) (if (window-dedicated-p (selected-window)) - (delete-frame (selected-frame))) + (delete-frame)) (delete-window (selected-window)) (if (get-buffer-window buf) (select-window (get-buffer-window buf)))))) === modified file 'lisp/talk.el' --- lisp/talk.el 2013-01-01 09:11:05 +0000 +++ lisp/talk.el 2013-08-05 10:35:55 +0000 @@ -50,7 +50,7 @@ (let ((type (frame-live-p (selected-frame)))) (if (or (eq type t) (eq type 'x)) (talk-add-display - (terminal-name (frame-terminal (selected-frame)))) + (terminal-name (frame-terminal))) (error "Unknown frame type"))) (talk-update-buffers)) === modified file 'lisp/term/xterm.el' --- lisp/term/xterm.el 2013-06-14 18:37:38 +0000 +++ lisp/term/xterm.el 2013-08-05 10:35:55 +0000 @@ -606,7 +606,7 @@ (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) ;; Add the selected frame to the list of frames that ;; need to deal with modify-other-keys. - (push (frame-terminal (selected-frame)) + (push (frame-terminal) xterm-modify-other-keys-terminal-list) (xterm-turn-on-modify-other-keys)) @@ -728,7 +728,7 @@ (defun xterm-turn-on-modify-other-keys () "Turn the modifyOtherKeys feature of xterm back on." - (let ((terminal (frame-terminal (selected-frame)))) + (let ((terminal (frame-terminal))) (when (and (terminal-live-p terminal) (memq terminal xterm-modify-other-keys-terminal-list)) (send-string-to-terminal "\e[>4;1m" terminal)))) @@ -742,7 +742,7 @@ (defun xterm-remove-modify-other-keys (&optional terminal) "Turn off the modifyOtherKeys feature of xterm for good." - (setq terminal (or terminal (frame-terminal (selected-frame)))) + (setq terminal (or terminal (frame-terminal))) (when (and (terminal-live-p terminal) (memq terminal xterm-modify-other-keys-terminal-list)) (setq xterm-modify-other-keys-terminal-list === modified file 'lisp/vc/ediff-util.el' --- lisp/vc/ediff-util.el 2013-05-23 07:10:05 +0000 +++ lisp/vc/ediff-util.el 2013-08-05 10:35:55 +0000 @@ -2818,7 +2818,7 @@ (with-output-to-temp-buffer ediff-msg-buffer (ediff-with-current-buffer standard-output (fundamental-mode)) - (raise-frame (selected-frame)) + (raise-frame) (princ (ediff-version)) (princ "\n\n") (ediff-with-current-buffer ediff-buffer-A @@ -3468,7 +3468,7 @@ (ediff-with-current-buffer buf (goto-char (point-min))) (switch-to-buffer buf) - (raise-frame (selected-frame))))) + (raise-frame)))) (if (frame-live-p ediff-control-frame) (ediff-reset-mouse ediff-control-frame)) (if (window-live-p ediff-control-window) === modified file 'lisp/vc/ediff.el' --- lisp/vc/ediff.el 2013-07-07 19:35:54 +0000 +++ lisp/vc/ediff.el 2013-08-05 10:35:55 +0000 @@ -1499,7 +1499,7 @@ (if node (Info-goto-node node) (message "Type `i' to search for a specific topic")) - (raise-frame (selected-frame))) + (raise-frame)) (error (beep 1) (with-output-to-temp-buffer ediff-msg-buffer (ediff-with-current-buffer standard-output ------------------------------------------------------------ revno: 113699 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-08-05 06:17:40 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-07-10 10:17:38 +0000 +++ autogen/Makefile.in 2013-08-05 10:17:40 +0000 @@ -59,7 +59,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -202,14 +202,14 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt_int.h gettimeofday.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ group-member.c intprops.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ inttypes.in.h lstat.c memrchr.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ mktime-internal.h mktime.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ openat.h pathmax.h pselect.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ pthread_sigmask.c putenv.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ acl-internal.h acl.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ mkostemp.c mktime-internal.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ mktime.c openat.h pathmax.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ pselect.c pthread_sigmask.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ putenv.c acl-internal.h acl.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ acl_entries.c readlink.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c readlinkat.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ root-uid.h sig2str.c sig2str.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ signal.in.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ root-uid.h secure_getenv.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ sig2str.c sig2str.h signal.in.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ $(top_srcdir)/build-aux/snippet/_Noreturn.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ $(top_srcdir)/build-aux/snippet/c++defs.h \ @@ -224,12 +224,13 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ strtoimax.c strtoumax.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ symlink.c sys_select.in.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ sys_stat.in.h sys_time.in.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ time.in.h time_r.c timespec.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ u64.h unistd.in.h unsetenv.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ utimens.h verify.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ tempname.h time.in.h time_r.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ timespec.h u64.h unistd.in.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ unsetenv.c utimens.h verify.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ xalloc-oversized.h @BUILDING_FOR_WINDOWSNT_FALSE@@gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE@am__append_10 = gettext.h @BUILDING_FOR_WINDOWSNT_FALSE@am__append_11 = sys sys +@BUILDING_FOR_WINDOWSNT_FALSE@@gl_GNULIB_ENABLED_tempname_TRUE@am__append_12 = tempname.c subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ @@ -255,33 +256,35 @@ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memrchr.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/pipe2.m4 \ - $(top_srcdir)/m4/pselect.m4 \ + $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mktime.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/pselect.m4 \ $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/readlinkat.m4 \ - $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/sha1.m4 \ - $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \ - $(top_srcdir)/m4/sig2str.m4 $(top_srcdir)/m4/signal_h.m4 \ - $(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/ssize_t.m4 \ - $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-time.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdalign.m4 \ - $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ - $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ - $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ - $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ - $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ - $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_select_h.m4 \ + $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \ + $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sha256.m4 \ + $(top_srcdir)/m4/sha512.m4 $(top_srcdir)/m4/sig2str.m4 \ + $(top_srcdir)/m4/signal_h.m4 $(top_srcdir)/m4/socklen.m4 \ + $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ + $(top_srcdir)/m4/stat-time.m4 $(top_srcdir)/m4/stat.m4 \ + $(top_srcdir)/m4/stdalign.m4 $(top_srcdir)/m4/stdarg.m4 \ + $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ + $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ + $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strtoimax.m4 \ + $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \ + $(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \ + $(top_srcdir)/m4/sys_select_h.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ - $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ - $(top_srcdir)/m4/timer_time.m4 $(top_srcdir)/m4/timespec.m4 \ - $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utimens.m4 \ - $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/warnings.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/time_h.m4 \ + $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timer_time.m4 \ + $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ + $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/utimbuf.m4 \ + $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -296,10 +299,11 @@ careadlinkat.c close-stream.c md5.c sha1.c sha256.c sha512.c \ dtoastr.c dtotimespec.c filemode.c gettext.h gettime.c pipe2.c \ acl-errno-valid.c file-has-acl.c qcopy-acl.c qset-acl.c \ - stat-time.c strftime.c timespec.c timespec-add.c \ + stat-time.c strftime.c tempname.c timespec.c timespec-add.c \ timespec-sub.c u64.c unistd.c utimens.c openat-die.c \ save-cwd.c am__objects_1 = +@BUILDING_FOR_WINDOWSNT_FALSE@@gl_GNULIB_ENABLED_tempname_TRUE@am__objects_2 = tempname.$(OBJEXT) @BUILDING_FOR_WINDOWSNT_FALSE@am_libgnu_a_OBJECTS = \ @BUILDING_FOR_WINDOWSNT_FALSE@ allocator.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ binary-io.$(OBJEXT) \ @@ -323,6 +327,7 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ qset-acl.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ stat-time.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ strftime.$(OBJEXT) \ +@BUILDING_FOR_WINDOWSNT_FALSE@ $(am__objects_2) \ @BUILDING_FOR_WINDOWSNT_FALSE@ timespec.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ timespec-add.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ timespec-sub.$(OBJEXT) \ @@ -350,15 +355,16 @@ @BUILDING_FOR_WINDOWSNT_TRUE@ timespec-add.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_TRUE@ timespec-sub.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_TRUE@ u64.$(OBJEXT) utimens.$(OBJEXT) \ -@BUILDING_FOR_WINDOWSNT_TRUE@ $(am__objects_1) +@BUILDING_FOR_WINDOWSNT_TRUE@ $(am__objects_1) $(am__objects_2) am__EXTRA_libgnu_a_SOURCES_DIST = openat-proc.c ftoastr.c dup2.c \ euidaccess.c execinfo.c at-func.c faccessat.c fcntl.c \ fdatasync.c fdopendir.c fpending.c fstatat.c fsync.c \ getdtablesize.c getgroups.c getloadavg.c getopt.c getopt1.c \ - gettimeofday.c group-member.c lstat.c memrchr.c mktime.c \ - pselect.c pthread_sigmask.c putenv.c acl_entries.c readlink.c \ - readlinkat.c sig2str.c stat.c strtoimax.c strtol.c strtoll.c \ - strtoul.c strtoull.c strtoumax.c symlink.c time_r.c unsetenv.c + gettimeofday.c group-member.c lstat.c memrchr.c mkostemp.c \ + mktime.c pselect.c pthread_sigmask.c putenv.c acl_entries.c \ + readlink.c readlinkat.c secure_getenv.c sig2str.c stat.c \ + strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ + strtoumax.c symlink.c time_r.c unsetenv.c libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -1248,10 +1254,10 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ acl-errno-valid.c file-has-acl.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ qcopy-acl.c qset-acl.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ stat-time.c strftime.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ timespec.c timespec-add.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-sub.c u64.c unistd.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ utimens.c openat-die.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ save-cwd.c +@BUILDING_FOR_WINDOWSNT_FALSE@ $(am__append_12) timespec.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-add.c timespec-sub.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ u64.c unistd.c utimens.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ openat-die.c save-cwd.c @BUILDING_FOR_WINDOWSNT_TRUE@libgnu_a_SOURCES = c-ctype.h c-ctype.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ c-strcase.h c-strcasecmp.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ c-strncasecmp.c close-stream.c \ @@ -1262,7 +1268,8 @@ @BUILDING_FOR_WINDOWSNT_TRUE@ file-has-acl.c qcopy-acl.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ stat-time.c strftime.c timespec.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ timespec-add.c timespec-sub.c \ -@BUILDING_FOR_WINDOWSNT_TRUE@ u64.c utimens.c $(am__append_10) +@BUILDING_FOR_WINDOWSNT_TRUE@ u64.c utimens.c $(am__append_10) \ +@BUILDING_FOR_WINDOWSNT_TRUE@ $(am__append_12) @BUILDING_FOR_WINDOWSNT_FALSE@libgnu_a_LIBADD = $(gl_LIBOBJS) @BUILDING_FOR_WINDOWSNT_TRUE@libgnu_a_LIBADD = $(gl_LIBOBJS) @BUILDING_FOR_WINDOWSNT_FALSE@libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @@ -1276,11 +1283,12 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ getgroups.c getloadavg.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt.c getopt1.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ gettimeofday.c group-member.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ lstat.c memrchr.c mktime.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ pselect.c pthread_sigmask.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ putenv.c acl_entries.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ readlink.c at-func.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ readlinkat.c sig2str.c stat.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ lstat.c memrchr.c mkostemp.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ mktime.c pselect.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ pthread_sigmask.c putenv.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ acl_entries.c readlink.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c readlinkat.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ secure_getenv.c sig2str.c stat.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ strtoimax.c strtol.c strtoll.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ strtol.c strtoul.c strtoull.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ strtoimax.c strtoumax.c \ @@ -1402,6 +1410,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkostemp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ @@ -1414,6 +1423,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure_getenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Po@am__quote@ @@ -1428,6 +1438,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec-add.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec-sub.Po@am__quote@ === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2013-07-08 10:17:45 +0000 +++ autogen/aclocal.m4 2013-08-05 10:17:40 +0000 @@ -1024,6 +1024,7 @@ m4_include([m4/manywarnings.m4]) m4_include([m4/md5.m4]) m4_include([m4/memrchr.m4]) +m4_include([m4/mkostemp.m4]) m4_include([m4/mktime.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/nocrash.m4]) @@ -1035,6 +1036,7 @@ m4_include([m4/putenv.m4]) m4_include([m4/readlink.m4]) m4_include([m4/readlinkat.m4]) +m4_include([m4/secure_getenv.m4]) m4_include([m4/setenv.m4]) m4_include([m4/sha1.m4]) m4_include([m4/sha256.m4]) @@ -1064,6 +1066,7 @@ m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_stat_h.m4]) m4_include([m4/sys_time_h.m4]) +m4_include([m4/tempname.m4]) m4_include([m4/time_h.m4]) m4_include([m4/time_r.m4]) m4_include([m4/timer_time.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2013-07-23 10:17:48 +0000 +++ autogen/config.in 2013-08-05 10:17:40 +0000 @@ -192,6 +192,10 @@ whether the gnulib module fscanf shall be considered present. */ #undef GNULIB_FSCANF +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module mkostemp shall be considered present. */ +#undef GNULIB_MKOSTEMP + /* enable some gnulib portability checks */ #undef GNULIB_PORTCHECK @@ -625,6 +629,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `issetugid' function. */ +#undef HAVE_ISSETUGID + /* Define to 1 if you have the jpeg library (-ljpeg). */ #undef HAVE_JPEG @@ -753,9 +760,6 @@ /* Define to 1 if you have the `mkostemp' function. */ #undef HAVE_MKOSTEMP -/* Define to 1 if you have the `mkstemp' function. */ -#undef HAVE_MKSTEMP - /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP @@ -847,6 +851,9 @@ /* Define to 1 if using librsvg. */ #undef HAVE_RSVG +/* Define to 1 if you have the `secure_getenv' function. */ +#undef HAVE_SECURE_GETENV + /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT @@ -1201,6 +1208,9 @@ /* Define to 1 if you have the `__fpending' function. */ #undef HAVE___FPENDING +/* Define to 1 if you have the `__secure_getenv' function. */ +#undef HAVE___SECURE_GETENV + /* Define to support using a Hesiod database to find the POP server. */ #undef HESIOD === modified file 'autogen/configure' --- autogen/configure 2013-07-27 10:17:30 +0000 +++ autogen/configure 2013-08-05 10:17:40 +0000 @@ -614,12 +614,16 @@ gltests_WITNESS gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE +gl_GNULIB_ENABLED_tempname_FALSE +gl_GNULIB_ENABLED_tempname_TRUE gl_GNULIB_ENABLED_strtoull_FALSE gl_GNULIB_ENABLED_strtoull_TRUE gl_GNULIB_ENABLED_strtoll_FALSE gl_GNULIB_ENABLED_strtoll_TRUE gl_GNULIB_ENABLED_stat_FALSE gl_GNULIB_ENABLED_stat_TRUE +gl_GNULIB_ENABLED_secure_getenv_FALSE +gl_GNULIB_ENABLED_secure_getenv_TRUE gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE gl_GNULIB_ENABLED_pathmax_FALSE @@ -3390,6 +3394,7 @@ as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " lstat" +as_fn_append ac_func_list " mkostemp" as_fn_append ac_func_list " pipe2" as_fn_append ac_header_list " sys/select.h" as_fn_append ac_func_list " pselect" @@ -3407,6 +3412,7 @@ as_fn_append ac_func_list " utimensat" as_fn_append ac_func_list " lutimes" as_fn_append ac_func_list " getdtablesize" +as_fn_append ac_func_list " secure_getenv" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -7286,6 +7292,7 @@ # Code from module lstat: # Code from module manywarnings: # Code from module memrchr: + # Code from module mkostemp: # Code from module mktime: # Code from module multiarch: # Code from module nocrash: @@ -7299,6 +7306,7 @@ # Code from module readlink: # Code from module readlinkat: # Code from module root-uid: + # Code from module secure_getenv: # Code from module sig2str: # Code from module signal-h: # Code from module snippet/_Noreturn: @@ -7329,6 +7337,7 @@ # Code from module sys_select: # Code from module sys_stat: # Code from module sys_time: + # Code from module tempname: # Code from module time: # Code from module time_r: # Code from module timer-time: @@ -14692,7 +14701,7 @@ getrlimit setrlimit shutdown getaddrinfo \ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ -gai_strerror mkostemp mkstemp getline getdelim sync \ +gai_strerror getline getdelim sync \ difftime posix_memalign \ getpwent endpwent getgrent endgrent \ touchlock \ @@ -20703,6 +20712,8 @@ _ACEOF + + GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; @@ -21932,6 +21943,8 @@ + + if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' @@ -24090,6 +24103,48 @@ + if test $ac_cv_func_mkostemp != yes; then + HAVE_MKOSTEMP=0 + fi + + if test $HAVE_MKOSTEMP = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext" + + + + fi + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_MKOSTEMP 1 +_ACEOF + + + + + + + + GNULIB_MKOSTEMP=1 + + + + + + + + + + + if test $APPLE_UNIVERSAL_BUILD = 1; then # A universal build on Apple Mac OS X platforms. # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. @@ -27493,9 +27548,11 @@ gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false gl_gnulib_enabled_pathmax=false gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false + gl_gnulib_enabled_secure_getenv=false gl_gnulib_enabled_stat=false gl_gnulib_enabled_strtoll=false gl_gnulib_enabled_strtoull=false + gl_gnulib_enabled_tempname=false gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b () { @@ -28096,6 +28153,70 @@ gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true fi } + func_gl_gnulib_m4code_secure_getenv () + { + if ! $gl_gnulib_enabled_secure_getenv; then + + + + + + if test $ac_cv_func_secure_getenv = no; then + HAVE_SECURE_GETENV=0 + fi + + if test $HAVE_SECURE_GETENV = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext" + + + for ac_func in __secure_getenv +do : + ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" +if test "x$ac_cv_func___secure_getenv" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE___SECURE_GETENV 1 +_ACEOF + +fi +done + + if test $ac_cv_func___secure_getenv = no; then + for ac_func in issetugid +do : + ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" +if test "x$ac_cv_func_issetugid" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISSETUGID 1 +_ACEOF + +fi +done + + fi + + fi + + + + + + GNULIB_SECURE_GETENV=1 + + + + + + gl_gnulib_enabled_secure_getenv=true + fi + } func_gl_gnulib_m4code_stat () { if ! $gl_gnulib_enabled_stat; then @@ -28340,6 +28461,18 @@ gl_gnulib_enabled_strtoull=true fi } + func_gl_gnulib_m4code_tempname () + { + if ! $gl_gnulib_enabled_tempname; then + + + : + + + gl_gnulib_enabled_tempname=true + func_gl_gnulib_m4code_secure_getenv + fi + } func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec () { if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then @@ -28382,6 +28515,9 @@ if test $REPLACE_LSTAT = 1; then func_gl_gnulib_m4code_stat fi + if test $HAVE_MKOSTEMP = 0; then + func_gl_gnulib_m4code_tempname + fi if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then func_gl_gnulib_m4code_stat fi @@ -28481,6 +28617,14 @@ gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE= fi + if $gl_gnulib_enabled_secure_getenv; then + gl_GNULIB_ENABLED_secure_getenv_TRUE= + gl_GNULIB_ENABLED_secure_getenv_FALSE='#' +else + gl_GNULIB_ENABLED_secure_getenv_TRUE='#' + gl_GNULIB_ENABLED_secure_getenv_FALSE= +fi + if $gl_gnulib_enabled_stat; then gl_GNULIB_ENABLED_stat_TRUE= gl_GNULIB_ENABLED_stat_FALSE='#' @@ -28505,6 +28649,14 @@ gl_GNULIB_ENABLED_strtoull_FALSE= fi + if $gl_gnulib_enabled_tempname; then + gl_GNULIB_ENABLED_tempname_TRUE= + gl_GNULIB_ENABLED_tempname_FALSE='#' +else + gl_GNULIB_ENABLED_tempname_TRUE='#' + gl_GNULIB_ENABLED_tempname_FALSE= +fi + if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE= gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#' @@ -28993,6 +29145,10 @@ as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then + as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -29005,6 +29161,10 @@ as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then + as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ revno: 113698 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-08-04 23:54:30 -0700 message: * calendar/calendar.el (calendar-generate-month, calendar-font-lock-keywords): Fix for calendar-day-header-width > length of any day name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-05 06:49:37 +0000 +++ lisp/ChangeLog 2013-08-05 06:54:30 +0000 @@ -2,6 +2,8 @@ * calendar/calendar.el (calendar-generate-month): Fix for calendar-column-width != 1 + calendar-day-digit-width. + (calendar-generate-month, calendar-font-lock-keywords): + Fix for calendar-day-header-width > length of any day name. 2013-08-05 Juanma Barranquero === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2013-08-05 06:49:37 +0000 +++ lisp/calendar/calendar.el 2013-08-05 06:54:30 +0000 @@ -1532,9 +1532,7 @@ (progn (setq string (calendar-day-name (mod (+ calendar-week-start-day i) 7) nil t)) - (if enable-multibyte-characters - (truncate-string-to-width string calendar-day-header-width) - (substring string 0 calendar-day-header-width))) + (truncate-string-to-width string calendar-day-header-width nil ?\s)) (make-string (- calendar-column-width calendar-day-header-width) ?\s))) (calendar-ensure-newline) (calendar-insert-at-column indent calendar-intermonth-text trunc) @@ -1548,9 +1546,8 @@ (format (format "%%%dd" calendar-day-digit-width) day) 'mouse-face 'highlight 'help-echo (eval calendar-date-echo-text) - ;; 'date property prevents intermonth text confusing - ;; re-searches. (Tried intangible, it did not - ;; really work.) + ;; 'date property prevents intermonth text confusing re-searches. + ;; (Tried intangible, it did not really work.) 'date t) (make-string (- calendar-column-width calendar-day-digit-width) ?\s)) @@ -2292,14 +2289,15 @@ " -?[0-9]+") . font-lock-function-name-face) (,(regexp-opt - (list (substring (aref calendar-day-name-array 6) - 0 calendar-day-header-width) - (substring (aref calendar-day-name-array 0) - 0 calendar-day-header-width))) + (list (truncate-string-to-width (aref calendar-day-name-array 6) + calendar-day-header-width) + (truncate-string-to-width (aref calendar-day-name-array 0) + calendar-day-header-width))) ;; Saturdays and Sundays are highlighted differently. . font-lock-comment-face) ;; First two chars of each day are used in the calendar. - (,(regexp-opt (mapcar (lambda (x) (substring x 0 calendar-day-header-width)) + (,(regexp-opt (mapcar (lambda (x) (truncate-string-to-width + x calendar-day-header-width)) calendar-day-name-array)) . font-lock-constant-face)) "Default keywords to highlight in Calendar mode.")