Now on revision 105686. ------------------------------------------------------------ revno: 105686 fixes bug(s): http://debbugs.gnu.org/8340 committer: Juri Linkov branch nick: trunk timestamp: Thu 2011-09-08 15:12:18 +0300 message: * lisp/progmodes/compile.el (compilation-environment): Make it a defcustom. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-08 06:28:37 +0000 +++ lisp/ChangeLog 2011-09-08 12:12:18 +0000 @@ -1,3 +1,8 @@ +2011-09-08 Juri Linkov + + * progmodes/compile.el (compilation-environment): Make it + a defcustom (bug#8340). + 2011-09-08 Martin Rudalics * window.el (frame-auto-delete): Rename to window-auto-delete. === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-09-07 12:17:54 +0000 +++ lisp/progmodes/compile.el 2011-09-08 12:12:18 +0000 @@ -637,11 +637,15 @@ and exit message; it returns a cons (MESSAGE . MODELINE) of the strings to write into the compilation buffer, and to put in its mode line.") -(defvar compilation-environment nil - "*List of environment variables for compilation to inherit. +(defcustom compilation-environment nil + "List of environment variables for compilation to inherit. Each element should be a string of the form ENVVARNAME=VALUE. This list is temporarily prepended to `process-environment' prior to -starting the compilation process.") +starting the compilation process." + :type '(repeat (string :tag "ENVVARNAME=VALUE")) + :options '(("LANG=C")) + :group 'compilation + :version "24.1") ;; History of compile commands. (defvar compile-history nil) ------------------------------------------------------------ revno: 105685 committer: Juri Linkov branch nick: trunk timestamp: Thu 2011-09-08 15:07:52 +0300 message: (grep-regexp-alist): Move dangling comment to the previous rule. diff: === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2011-09-07 12:00:52 +0000 +++ lisp/progmodes/grep.el 2011-09-08 12:07:52 +0000 @@ -343,7 +343,16 @@ ;;;###autoload (defconst grep-regexp-alist - '(("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2" + '( + ;; Rule to match column numbers is commented out since no known grep + ;; produces them + ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2\\(?:\\([1-9][0-9]*\\)\\(?:-\\([1-9][0-9]*\\)\\)?\\2\\)?" + ;; 1 3 (4 . 5)) + ;; Note that we want to use as tight a regexp as we can to try and + ;; handle weird file names (with colons in them) as well as possible. + ;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:" + ;; in file names. + ("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2" 1 3 ;; Calculate column positions (col . end-col) of first grep match on a line ((lambda () @@ -362,14 +371,6 @@ (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg))))))) - ;; Rule to match column numbers is commented out since no known grep - ;; produces them - ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\2\\)?" - ;; 1 3 (4 . 5)) - ;; Note that we want to use as tight a regexp as we can to try and - ;; handle weird file names (with colons in them) as well as possible. - ;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:" in - ;; file names. ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") ------------------------------------------------------------ revno: 105684 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-09-08 12:59:22 +0200 message: src/emacs.c (my_heap_start): #ifdef to avoid warnings when unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-07 18:14:26 +0000 +++ src/ChangeLog 2011-09-08 10:59:22 +0000 @@ -1,3 +1,7 @@ +2011-09-08 Juanma Barranquero + + * emacs.c (my_heap_start): #ifdef to avoid warnings when unused. + 2011-09-07 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it === modified file 'src/emacs.c' --- src/emacs.c 2011-09-04 19:18:28 +0000 +++ src/emacs.c 2011-09-08 10:59:22 +0000 @@ -171,8 +171,10 @@ Tells GC how to save a copy of the stack. */ char *stack_bottom; +#if defined (DOUG_LEA_MALLOC) || defined (GNU_LINUX) /* The address where the heap starts (from the first sbrk (0) call). */ static void *my_heap_start; +#endif #ifdef GNU_LINUX /* The gap between BSS end and heap start as far as we can tell. */ ------------------------------------------------------------ revno: 105683 committer: martin rudalics branch nick: trunk timestamp: Thu 2011-09-08 08:28:37 +0200 message: Rewrite window/frame auto-deletion code. (Bug#9419) and (Bug#9456) * window.el (frame-auto-delete): Rename to window-auto-delete. Make it control auto-deletion of windows and/or frames. (window-deletable-p): New argument FORCE. Rewrite conditions for deleting window/frame. (Bug#9419) (switch-to-prev-buffer, replace-buffer-in-windows, quit-window): Rewrite handling of case when window/frame can be deleted. (delete-windows-on): Call window-deletable-p with new FORCE argument t. (Bug#9456) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-07 14:40:27 +0000 +++ lisp/ChangeLog 2011-09-08 06:28:37 +0000 @@ -1,3 +1,14 @@ +2011-09-08 Martin Rudalics + + * window.el (frame-auto-delete): Rename to window-auto-delete. + Make it control auto-deletion of windows and/or frames. + (window-deletable-p): New argument FORCE. Rewrite conditions + for deleting window/frame. (Bug#9419) + (switch-to-prev-buffer, replace-buffer-in-windows, quit-window): + Rewrite handling of case when window/frame can be deleted. + (delete-windows-on): Call window-deletable-p with new FORCE + argument t. (Bug#9456) + 2011-09-07 Chong Yidong * help-mode.el (help-mode): Restore autoload. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-03 10:55:37 +0000 +++ lisp/window.el 2011-09-08 06:28:37 +0000 @@ -2258,77 +2258,75 @@ (next-window base-window (if nomini 'arg) all-frames)))) ;;; Deleting windows. -(defcustom frame-auto-delete 'automatic - "If non-nil, quitting a window can delete its frame. -If this variable is nil, functions that quit a window never -delete the associated frame. If this variable's value is the -symbol `automatic', a frame is deleted only if the window is -dedicated or was created by `display-buffer'. If this variable -is t, a frame can be always deleted, even if it was created by -`make-frame-command'. Other values should not be used. +(defcustom window-auto-delete t + "If non-nil, quitting a window can delete the window. +If this variable is t, functions that quit a window can delete +the window and, if applicable, the corresponding frame. If it is +'frame, these functions can delete a window and its frame, +provided there are no other windows on the frame. If it is +'window, these functions can delete the window, provided there +are other windows on the corresponding frame. If this variable +is nil, functions that quit a window never delete the window or +the associated frame. -Note that a frame will be effectively deleted if and only if +Note that a frame can be effectively deleted if and only if another frame still exists. Functions quitting a window and consequently affected by this -variable are `switch-to-prev-buffer', `delete-windows-on', -`replace-buffer-in-windows' and `quit-window'." +variable are `switch-to-prev-buffer' including its callers like +`bury-buffer', `replace-buffer-in-windows' and its callers like +`kill-buffer', and `quit-window'." :type '(choice - (const :tag "Never" nil) - (const :tag "Automatic" automatic) - (const :tag "Always" t)) - :group 'windows - :group 'frames) + (const :tag "Always" t) + (const :tag "Window" window) + (const :tag "Frame" frame) + (const :tag "Never" nil)) + :group 'windows) -(defun window-deletable-p (&optional window) +(defun window-deletable-p (&optional window force) "Return t if WINDOW can be safely deleted from its frame. Return `frame' if deleting WINDOW should also delete its -frame." +frame. + +Optional argument FORCE non-nil means return non-nil unless +WINDOW is the root window of the only visible frame. FORCE nil +or omitted means return nil unless WINDOW is either dedicated to +its buffer or has no previous buffer to show instead." (setq window (window-normalize-any-window window)) + (unless ignore-window-parameters ;; Handle atomicity. (when (window-parameter window 'window-atom) (setq window (window-atom-root window)))) - (let ((parent (window-parent window)) - (frame (window-frame window)) - (buffer (window-buffer window)) - (dedicated (and (window-buffer window) (window-dedicated-p window))) - (quit-restore (window-parameter window 'quit-restore))) + + (let* ((parent (window-parent window)) + (frame (window-frame window)) + (buffer (window-buffer window)) + (dedicated (and (window-buffer window) (window-dedicated-p window))) + ;; prev non-nil means there is another buffer we can show + ;; in WINDOW instead. + (prev (and (window-prev-buffers window) + (or (cdr (window-prev-buffers window)) + (not (eq (caar (window-prev-buffers window)) + buffer)))))) (cond ((frame-root-window-p window) - ;; Don't delete FRAME if `frame-auto-delete' is nil. - (when (and (or (eq frame-auto-delete t) - (and (eq frame-auto-delete 'automatic) - ;; Delete FRAME only if it's either dedicated - ;; or quit-restore's car is `new-frame' and - ;; WINDOW still displays the same buffer - (or dedicated - (and (eq (car-safe quit-restore) 'new-frame) - (eq (nth 1 quit-restore) - (window-buffer window)))))) - ;; Don't delete FRAME if we have another buffer in - ;; WINDOW's previous buffers. Bug#9419. - (or (not (window-prev-buffers window)) - (eq (caar (window-prev-buffers window)) buffer)) - ;; Don't try to delete FRAME when there are no other - ;; visible frames left. + (when (and (or force dedicated + (and (not prev) (memq window-auto-delete '(t frame)))) (other-visible-frames-p frame)) + ;; We can delete WINDOW's frame if (1) either FORCE is non-nil, + ;; WINDOW is dedicated to its buffer, or there are no previous + ;; buffers to show and (2) there are other visible frames left. 'frame)) - ;; Don't delete WINDOW if we find another buffer in WINDOW's - ;; previous buffers. - ((and (or (not (window-prev-buffers window)) - (eq (caar (window-prev-buffers window)) buffer)) - ;; Delete WINDOW only if it's dedicated or quit-restore's car - ;; is `new-frame' or `new-window' and it still displays the - ;; same buffer. - (or dedicated - (and (memq (car-safe quit-restore) '(new-window new-frame)) - (eq (nth 1 quit-restore) (window-buffer window)))) - ;; Don't delete the last main window. + ((and (or force dedicated + (and (not prev) (memq window-auto-delete '(t window)))) (or ignore-window-parameters (not (eq (window-parameter window 'window-side) 'none)) (and parent (eq (window-parameter parent 'window-side) 'none)))) + ;; We can delete WINDOW if (1) either FORCE is non-nil, WINDOW is + ;; dedicated to its buffer, or there are no previous buffers to + ;; show and (2) WINDOW is not the main window of its frame. t)))) (defun window-or-subwindow-p (subwindow window) @@ -2601,11 +2599,7 @@ ;; When BURY-OR-KILL is non-nil, there's no previous buffer for ;; this window, and we can delete the window (or the frame) do ;; that. - ((and bury-or-kill - (or (not (window-prev-buffers window)) - (and (eq (caar (window-prev-buffers window)) old-buffer) - (not (cdr (car (window-prev-buffers window)))))) - (setq deletable (window-deletable-p window))) + ((and bury-or-kill (setq deletable (window-deletable-p window))) (if (eq deletable 'frame) (delete-frame (window-frame window)) (delete-window window))) @@ -2877,7 +2871,7 @@ (all-frames (cond ((not frame) t) ((eq frame t) nil) (t frame)))) (dolist (window (window-list-1 nil nil all-frames)) (if (eq (window-buffer window) buffer) - (let ((deletable (window-deletable-p window))) + (let ((deletable (window-deletable-p window t))) (cond ((eq deletable 'frame) ;; Delete frame. @@ -2913,7 +2907,7 @@ ((eq deletable 'frame) ;; Delete frame. (delete-frame (window-frame window))) - ((and (window-dedicated-p window) deletable) + (deletable ;; Delete window. (delete-window window)) (t @@ -2939,11 +2933,7 @@ (quit-restore (window-parameter window 'quit-restore)) deletable resize) (cond - ((and (or (and (memq (car-safe quit-restore) '(new-window new-frame)) - ;; Check that WINDOW's buffer is still the same. - (eq (window-buffer window) (nth 1 quit-restore))) - (window-dedicated-p window)) - (setq deletable (window-deletable-p window))) + ((setq deletable (window-deletable-p window)) ;; Check if WINDOW's frame can be deleted. (if (eq deletable 'frame) (delete-frame (window-frame window)) ------------------------------------------------------------ revno: 105682 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-09-07 11:26:41 -0700 message: Fix move-if-change permissions. These were inadvertenly changed to 644 in the previous revision; the file should be executable, so change it back to 755. diff: === modified file 'build-aux/move-if-change' (properties changed: -x to +x) ------------------------------------------------------------ revno: 105681 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-09-07 21:14:26 +0300 message: Fix a crash in vertical-motion. src/xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it only under bidi iteration. diff: === modified file 'build-aux/move-if-change' (properties changed: +x to -x) === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-07 17:25:24 +0000 +++ src/ChangeLog 2011-09-07 18:14:26 +0000 @@ -1,3 +1,8 @@ +2011-09-07 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it + only under bidi iteration. + 2011-09-07 Jan Djärv * gtkutil.c (xg_make_tool_item): Insert comment about eventbox. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-04 18:48:35 +0000 +++ src/xdisp.c 2011-09-07 18:14:26 +0000 @@ -8116,7 +8116,8 @@ && !saw_smaller_pos && IT_CHARPOS (*it) > to_charpos)) { - if (!at_eob_p && IT_CHARPOS (ppos_it) < ZV) + if (it->bidi_p + && !at_eob_p && IT_CHARPOS (ppos_it) < ZV) RESTORE_IT (it, &ppos_it, ppos_data); result = MOVE_POS_MATCH_OR_ZV; break; ------------------------------------------------------------ revno: 105680 committer: Jan D. branch nick: trunk timestamp: Wed 2011-09-07 19:25:24 +0200 message: (xg_make_tool_item): Insert comment about eventbox. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-06 20:47:45 +0000 +++ src/ChangeLog 2011-09-07 17:25:24 +0000 @@ -1,3 +1,7 @@ +2011-09-07 Jan Djärv + + * gtkutil.c (xg_make_tool_item): Insert comment about eventbox. + 2011-09-06 Paul Eggert isnan: Fix porting problem to Solaris 10 with bundled gcc. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2011-08-29 20:57:42 +0000 +++ src/gtkutil.c 2011-09-07 17:25:24 +0000 @@ -4219,6 +4219,7 @@ GtkToolItem *ti = gtk_tool_item_new (); GtkWidget *vb = horiz ? gtk_hbox_new (FALSE, 0) : gtk_vbox_new (FALSE, 0); GtkWidget *wb = gtk_button_new (); + /* The eventbox is here so we can have tooltips on disabled items. */ GtkWidget *weventbox = gtk_event_box_new (); if (wimage && !text_image) ------------------------------------------------------------ revno: 105679 committer: Chong Yidong branch nick: trunk timestamp: Wed 2011-09-07 10:40:27 -0400 message: * lisp/help-mode.el (help-mode): Restore autoload. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-07 12:17:54 +0000 +++ lisp/ChangeLog 2011-09-07 14:40:27 +0000 @@ -1,3 +1,7 @@ +2011-09-07 Chong Yidong + + * help-mode.el (help-mode): Restore autoload. + 2011-09-07 Juri Linkov * progmodes/compile.el (compilation-start): Let-bind `thisenv' to === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2011-08-28 18:58:16 +0000 +++ lisp/help-mode.el 2011-09-07 14:40:27 +0000 @@ -265,6 +265,7 @@ 'help-function 'customize-create-theme 'help-echo (purecopy "mouse-2, RET: edit this theme file")) +;;;###autoload (define-derived-mode help-mode special-mode "Help" "Major mode for viewing help text and navigating references in it. Entry to this mode runs the normal hook `help-mode-hook'. ------------------------------------------------------------ revno: 105678 fixes bug(s): http://debbugs.gnu.org/8340 committer: Juri Linkov branch nick: trunk timestamp: Wed 2011-09-07 15:17:54 +0300 message: * lisp/progmodes/compile.el (compilation-start): Let-bind `thisenv' to `compilation-environment'. Set buffer-local `compilation-environment' to `thisenv' later after (funcall mode). (Bug#8340) * lisp/vc/vc-git.el (vc-git-grep): Remove --no-color. (Bug#9408) (vc-git-grep): Prepend "PAGER=" to `compilation-environment' instead of replacing its value. (Bug#8340) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-07 12:00:52 +0000 +++ lisp/ChangeLog 2011-09-07 12:17:54 +0000 @@ -1,5 +1,16 @@ 2011-09-07 Juri Linkov + * progmodes/compile.el (compilation-start): Let-bind `thisenv' to + `compilation-environment'. Set buffer-local + `compilation-environment' to `thisenv' later after (funcall mode). + (Bug#8340) + + * vc/vc-git.el (vc-git-grep): Remove --no-color. (Bug#9408) + (vc-git-grep): Prepend "PAGER=" to `compilation-environment' + instead of replacing its value. (Bug#8340) + +2011-09-07 Juri Linkov + * progmodes/grep.el (grep-regexp-alist): Calculate column positions based on text properties put by `grep-filter' instead of matching escape sequences. === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-09-02 16:38:40 +0000 +++ lisp/progmodes/compile.el 2011-09-07 12:17:54 +0000 @@ -1482,6 +1482,7 @@ "compilation" (replace-regexp-in-string "-mode\\'" "" (symbol-name mode)))) (thisdir default-directory) + (thisenv compilation-environment) outwin outbuf) (with-current-buffer (setq outbuf @@ -1528,8 +1529,9 @@ ;; Remember the original dir, so we can use it when we recompile. ;; default-directory' can't be used reliably for that because it may be ;; affected by the special handling of "cd ...;". - ;; NB: must be fone after (funcall mode) as that resets local variables + ;; NB: must be done after (funcall mode) as that resets local variables (set (make-local-variable 'compilation-directory) thisdir) + (set (make-local-variable 'compilation-environment) thisenv) (if highlight-regexp (set (make-local-variable 'compilation-highlight-regexp) highlight-regexp)) === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2011-09-01 07:29:56 +0000 +++ lisp/vc/vc-git.el 2011-09-07 12:17:54 +0000 @@ -988,7 +988,7 @@ (setq command nil)) (setq dir (file-name-as-directory (expand-file-name dir))) (setq command - (grep-expand-template "git grep --no-color -n -e -- " + (grep-expand-template "git grep -n -e -- " regexp files)) (when command (if (equal current-prefix-arg '(4)) @@ -998,7 +998,7 @@ (add-to-history 'grep-history command)))) (when command (let ((default-directory dir) - (compilation-environment '("PAGER="))) + (compilation-environment (cons "PAGER=" compilation-environment))) ;; Setting process-setup-function makes exit-message-function work ;; even when async processes aren't supported. (compilation-start command 'grep-mode))