diff options
| author | Xue Fuqiao | 2013-07-30 11:46:06 +0800 |
|---|---|---|
| committer | Xue Fuqiao | 2013-07-30 11:46:06 +0800 |
| commit | 5c09de04ca053874f37281e22ea5556590875be2 (patch) | |
| tree | 02378b2c0b95e0b9fc02c455bdcedb71ea6f038a | |
| parent | d2067333246b676fcf98567d34eec79ed4648d5f (diff) | |
| download | emacs-5c09de04ca053874f37281e22ea5556590875be2.tar.gz emacs-5c09de04ca053874f37281e22ea5556590875be2.zip | |
vc-ignore fixes.
* vc/vc-svn.el (vc-svn-ignore): Remove `interactive'. Use `*vc*'
buffer for output.
* vc/vc-hg.el (vc-hg-ignore): Remove `interactive'; do not assume
point-min==1; fix search string; fix parentheses missing.
* vc/vc-git.el (vc-git-ignore): Remove `interactive'; do not
assume point-min==1; fix search string; fix parentheses missing.
* vc/vc-cvs.el (vc-cvs-ignore): Remove `interactive'.
* vc/vc-bzr.el (vc-bzr-ignore): Remove `interactive'. Use `*vc*'
buffer for output.
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/vc/vc-bzr.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 1 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 4 |
6 files changed, 26 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f27a6fa1945..082dd75439e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2013-07-30 Xue Fuqiao <xfq.free@gmail.com> | ||
| 2 | |||
| 3 | * vc/vc-svn.el (vc-svn-ignore): Remove `interactive'. Use `*vc*' | ||
| 4 | buffer for output. | ||
| 5 | |||
| 6 | * vc/vc-hg.el (vc-hg-ignore): Remove `interactive'; do not assume | ||
| 7 | point-min==1; fix search string; fix parentheses missing. | ||
| 8 | |||
| 9 | * vc/vc-git.el (vc-git-ignore): Remove `interactive'; do not | ||
| 10 | assume point-min==1; fix search string; fix parentheses missing. | ||
| 11 | |||
| 12 | * vc/vc-cvs.el (vc-cvs-ignore): Remove `interactive'. | ||
| 13 | |||
| 14 | * vc/vc-bzr.el (vc-bzr-ignore): Remove `interactive'. Use `*vc*' | ||
| 15 | buffer for output. | ||
| 16 | |||
| 1 | 2013-07-29 Eli Zaretskii <eliz@gnu.org> | 17 | 2013-07-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 18 | ||
| 3 | * frame.el (frame-notice-user-settings): Avoid inflooping when the | 19 | * frame.el (frame-notice-user-settings): Avoid inflooping when the |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5f026a2ecd9..9d2adde8554 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -653,9 +653,7 @@ REV non-nil gets an error." | |||
| 653 | 653 | ||
| 654 | (defun vc-bzr-ignore (file) | 654 | (defun vc-bzr-ignore (file) |
| 655 | "Ignore FILE under Bazaar." | 655 | "Ignore FILE under Bazaar." |
| 656 | (interactive) | 656 | (vc-bzr-command "ignore" t 0 file)) |
| 657 | (vc-bzr-command "ignore" (get-buffer-create "*vc-ignore*") 0 | ||
| 658 | file)) | ||
| 659 | 657 | ||
| 660 | (defun vc-bzr-checkout (_file &optional _editable rev) | 658 | (defun vc-bzr-checkout (_file &optional _editable rev) |
| 661 | (if rev (error "Operation not supported") | 659 | (if rev (error "Operation not supported") |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 3472673f46d..48d83d4f408 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -1228,7 +1228,6 @@ is non-nil." | |||
| 1228 | 1228 | ||
| 1229 | (defun vc-cvs-ignore (file) | 1229 | (defun vc-cvs-ignore (file) |
| 1230 | "Ignore FILE under CVS." | 1230 | "Ignore FILE under CVS." |
| 1231 | (interactive) | ||
| 1232 | (cvs-append-to-ignore (file-name-directory file) file)) | 1231 | (cvs-append-to-ignore (file-name-directory file) file)) |
| 1233 | 1232 | ||
| 1234 | (defun cvs-append-to-ignore (dir str &optional old-dir) | 1233 | (defun cvs-append-to-ignore (dir str &optional old-dir) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2183fef4e7d..4716d13da13 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -682,15 +682,14 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 682 | 682 | ||
| 683 | (defun vc-git-ignore (file) | 683 | (defun vc-git-ignore (file) |
| 684 | "Ignore FILE under Git." | 684 | "Ignore FILE under Git." |
| 685 | (interactive) | ||
| 686 | (with-temp-buffer | 685 | (with-temp-buffer |
| 687 | (insert-file-contents | 686 | (insert-file-contents |
| 688 | (let (gitignore (concat (file-name-as-directory (vc-git-root | 687 | (let ((gitignore (concat (file-name-as-directory (vc-git-root |
| 689 | default-directory)) ".gitignore")) | 688 | default-directory)) ".gitignore"))) |
| 690 | (unless (search-forward file nil t) | 689 | (unless (search-forward (concat "\n" file "\n") nil t) |
| 691 | (goto-char (point-max)) | 690 | (goto-char (point-max)) |
| 692 | (insert (concat "\n" file "\n")) | 691 | (insert (concat "\n" file "\n")) |
| 693 | (write-region 1 (point-max) gitignore)))))) | 692 | (write-region (point-min) (point-max) gitignore)))))) |
| 694 | 693 | ||
| 695 | (defun vc-git-checkout (file &optional _editable rev) | 694 | (defun vc-git-checkout (file &optional _editable rev) |
| 696 | (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) | 695 | (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index dd9ff003493..bc125e2cfa6 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -461,15 +461,14 @@ REV is ignored." | |||
| 461 | 461 | ||
| 462 | (defun vc-hg-ignore (file) | 462 | (defun vc-hg-ignore (file) |
| 463 | "Ignore FILE under Mercurial." | 463 | "Ignore FILE under Mercurial." |
| 464 | (interactive) | ||
| 465 | (with-temp-buffer | 464 | (with-temp-buffer |
| 466 | (insert-file-contents | 465 | (insert-file-contents |
| 467 | (let (hgignore (concat (file-name-as-directory (vc-hg-root | 466 | (let ((hgignore (concat (file-name-as-directory (vc-hg-root |
| 468 | default-directory)) ".hgignore")) | 467 | default-directory)) ".hgignore"))) |
| 469 | (unless (search-forward file nil t) | 468 | (unless (search-forward (concat "\n" file "\n") nil t) |
| 470 | (goto-char (point-max)) | 469 | (goto-char (point-max)) |
| 471 | (insert (concat "\n" file "\n")) | 470 | (insert (concat "\n" file "\n")) |
| 472 | (write-region 1 (point-max) hgignore)))))) | 471 | (write-region (point-min) (point-max) hgignore)))))) |
| 473 | 472 | ||
| 474 | ;; Modeled after the similar function in vc-bzr.el | 473 | ;; Modeled after the similar function in vc-bzr.el |
| 475 | (defun vc-hg-checkout (file &optional _editable rev) | 474 | (defun vc-hg-checkout (file &optional _editable rev) |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 7851aac435e..743a4d5cb67 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -354,9 +354,7 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 354 | 354 | ||
| 355 | (defun vc-svn-ignore (file) | 355 | (defun vc-svn-ignore (file) |
| 356 | "Ignore FILE under Subversion." | 356 | "Ignore FILE under Subversion." |
| 357 | (interactive) | 357 | (vc-svn-command t 0 file "propedit" "svn:ignore")) |
| 358 | (vc-svn-command (get-buffer-create "*vc-ignore*") 0 | ||
| 359 | file "propedit" "svn:ignore")) | ||
| 360 | 358 | ||
| 361 | (defun vc-svn-checkout (file &optional editable rev) | 359 | (defun vc-svn-checkout (file &optional editable rev) |
| 362 | (message "Checking out %s..." file) | 360 | (message "Checking out %s..." file) |