changeset 108407:955ed37b44ca

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 01 Feb 2010 14:11:30 +0000
parents 2fe02d61c7cb (current diff) 8d8e02bbef81 (diff)
children 3a905f16bc97
files
diffstat 5 files changed, 75 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/.bzrignore	Sun Jan 31 11:34:12 2010 +0000
+++ b/.bzrignore	Mon Feb 01 14:11:30 2010 +0000
@@ -20,6 +20,7 @@
 stamp_BLD
 subdirs.el
 TAGS
+TAGS-LISP
 info/*
 leim/leim-list.el
 leim/quail/*.el
--- a/ChangeLog	Sun Jan 31 11:34:12 2010 +0000
+++ b/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
@@ -1,3 +1,7 @@
+2010-01-31  Juri Linkov  <juri@jurta.org>
+
+	* .bzrignore: Add TAGS-LISP.
+
 2010-01-23  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
 
 	* configure.in: Check for utmp.h availability (FreeBSD 9.x lacks
--- a/lisp/ChangeLog	Sun Jan 31 11:34:12 2010 +0000
+++ b/lisp/ChangeLog	Mon Feb 01 14:11:30 2010 +0000
@@ -1,3 +1,14 @@
+2010-02-01  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc-bzr.el (vc-bzr-dir-extra-headers): Add a header when a
+	pending merge is detected.
+
+2010-01-31  Juri Linkov  <juri@jurta.org>
+
+	* progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the
+	beginning of interactive spec like all other grep commands do.
+	Put "all" in front of "gz".  (Bug#5260)
+
 2010-01-29  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc-bzr.el (vc-bzr-after-dir-status): Match another renaming indicator.
--- a/lisp/progmodes/grep.el	Sun Jan 31 11:34:12 2010 +0000
+++ b/lisp/progmodes/grep.el	Mon Feb 01 14:11:30 2010 +0000
@@ -996,26 +996,34 @@
 Like `rgrep' but uses `zgrep' for `grep-program', sets the default
 file name to `*.gz', and sets `grep-highlight-matches' to `always'."
   (interactive
-   (let ((grep-program "zgrep")
-	 (grep-find-template nil)  ; output of `grep-compute-defaults'
-	 (grep-find-command nil)
-	 (grep-host-defaults-alist nil)
-	 (grep-files-aliases '(("*.gz" . "*.gz") ; for `grep-read-files'
-			       ("all" . "* .*"))))
-     ;; Recompute defaults using let-bound values above.
+   (progn
+     ;; Compute standard default values.
      (grep-compute-defaults)
-     (cond
-      ((and grep-find-command (equal current-prefix-arg '(16)))
-       (list (read-from-minibuffer "Run: " grep-find-command
-				   nil nil 'grep-find-history)))
-      ((not grep-find-template)
-       (error "grep.el: No `grep-find-template' available"))
-      (t (let* ((regexp (grep-read-regexp))
-		(files (grep-read-files regexp))
-		(dir (read-directory-name "Base directory: "
-					  nil default-directory t))
-		(confirm (equal current-prefix-arg '(4))))
-	   (list regexp files dir confirm grep-find-template))))))
+     ;; Compute the default zrgrep command by running `grep-compute-defaults'
+     ;; for grep program "zgrep", but not changing global values.
+     (let ((grep-program "zgrep")
+	   ;; Don't change global values for variables computed
+	   ;; by `grep-compute-defaults'.
+	   (grep-find-template nil)
+	   (grep-find-command nil)
+	   (grep-host-defaults-alist nil)
+	   ;; Use for `grep-read-files'
+	   (grep-files-aliases '(("all" . "* .*")
+				 ("gz"  . "*.gz"))))
+       ;; Recompute defaults using let-bound values above.
+       (grep-compute-defaults)
+       (cond
+	((and grep-find-command (equal current-prefix-arg '(16)))
+	 (list (read-from-minibuffer "Run: " grep-find-command
+				     nil nil 'grep-find-history)))
+	((not grep-find-template)
+	 (error "grep.el: No `grep-find-template' available"))
+	(t (let* ((regexp (grep-read-regexp))
+		  (files (grep-read-files regexp))
+		  (dir (read-directory-name "Base directory: "
+					    nil default-directory t))
+		  (confirm (equal current-prefix-arg '(4))))
+	     (list regexp files dir confirm grep-find-template)))))))
   ;; Set `grep-highlight-matches' to `always'
   ;; since `zgrep' puts filters in the grep output.
   (let ((grep-highlight-matches 'always))
--- a/lisp/vc-bzr.el	Sun Jan 31 11:34:12 2010 +0000
+++ b/lisp/vc-bzr.el	Mon Feb 01 14:11:30 2010 +0000
@@ -794,6 +794,12 @@
 	      (buffer-string)))
        (shelve (vc-bzr-shelve-list))
        (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves")
+       (root-dir (vc-bzr-root dir))
+       (pending-merge
+	(file-exists-p
+	 (expand-file-name ".bzr/checkout/merge-hashes" root-dir)))
+       (pending-merge-help-echo
+	(format "A merge has been performed.\nA commit from the top-level directory (%s)\nis required before being able to check in anything else" root-dir))
        (light-checkout
 	(when (string-match ".+light checkout root: \\(.+\\)$" str)
 	  (match-string 1 str)))
@@ -819,24 +825,32 @@
 	 (propertize "Checkout of branch : " 'face 'font-lock-type-face)
 	 (propertize light-checkout-branch 'face 'font-lock-variable-name-face)
 	 "\n"))
-     (if shelve
-	 (concat
-	  (propertize "Shelves            :\n" 'face 'font-lock-type-face
-		      'help-echo shelve-help-echo)
-	  (mapconcat
-	   (lambda (x)
-	     (propertize x
-			 'face 'font-lock-variable-name-face
-			 'mouse-face 'highlight
-			 'help-echo "mouse-3: Show shelve menu\nP: Apply and remove shelf (pop)\nC-k: Delete shelf"
-			 'keymap vc-bzr-shelve-map))
-	   shelve "\n"))
-       (concat
-	(propertize "Shelves            : " 'face 'font-lock-type-face
-		    'help-echo shelve-help-echo)
-	(propertize "No shelved changes"
-		    'help-echo shelve-help-echo
-		    'face 'font-lock-variable-name-face))))))
+      (when pending-merge
+	(concat
+	 (propertize "Warning            : " 'face 'font-lock-warning-face
+		     'help-echo pending-merge-help-echo)
+	 (propertize "Pending merges, commit recommended before any other action"
+		     'help-echo pending-merge-help-echo
+		     'face 'font-lock-warning-face)
+	 "\n"))
+      (if shelve
+	  (concat
+	   (propertize "Shelves            :\n" 'face 'font-lock-type-face
+		       'help-echo shelve-help-echo)
+	   (mapconcat
+	    (lambda (x)
+	      (propertize x
+			  'face 'font-lock-variable-name-face
+			  'mouse-face 'highlight
+			  'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: Delete shelf"
+			  'keymap vc-bzr-shelve-map))
+	    shelve "\n"))
+	(concat
+	 (propertize "Shelves            : " 'face 'font-lock-type-face
+		     'help-echo shelve-help-echo)
+	 (propertize "No shelved changes"
+		     'help-echo shelve-help-echo
+		     'face 'font-lock-variable-name-face))))))
 
 (defun vc-bzr-shelve (name)
   "Create a shelve."