+2013-07-30 Xue Fuqiao <xfq.free@gmail.com>
+
+ * 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.
+
2013-07-29 Eli Zaretskii <eliz@gnu.org>
* frame.el (frame-notice-user-settings): Avoid inflooping when the
(defun vc-bzr-ignore (file)
"Ignore FILE under Bazaar."
- (interactive)
- (vc-bzr-command "ignore" (get-buffer-create "*vc-ignore*") 0
- file))
+ (vc-bzr-command "ignore" t 0 file))
(defun vc-bzr-checkout (_file &optional _editable rev)
(if rev (error "Operation not supported")
(defun vc-cvs-ignore (file)
"Ignore FILE under CVS."
- (interactive)
(cvs-append-to-ignore (file-name-directory file) file))
(defun cvs-append-to-ignore (dir str &optional old-dir)
(defun vc-git-ignore (file)
"Ignore FILE under Git."
- (interactive)
(with-temp-buffer
(insert-file-contents
- (let (gitignore (concat (file-name-as-directory (vc-git-root
- default-directory)) ".gitignore"))
- (unless (search-forward file nil t)
+ (let ((gitignore (concat (file-name-as-directory (vc-git-root
+ default-directory)) ".gitignore")))
+ (unless (search-forward (concat "\n" file "\n") nil t)
(goto-char (point-max))
(insert (concat "\n" file "\n"))
- (write-region 1 (point-max) gitignore))))))
+ (write-region (point-min) (point-max) gitignore))))))
(defun vc-git-checkout (file &optional _editable rev)
(vc-git-command nil 0 file "checkout" (or rev "HEAD")))
(defun vc-hg-ignore (file)
"Ignore FILE under Mercurial."
- (interactive)
(with-temp-buffer
(insert-file-contents
- (let (hgignore (concat (file-name-as-directory (vc-hg-root
- default-directory)) ".hgignore"))
- (unless (search-forward file nil t)
+ (let ((hgignore (concat (file-name-as-directory (vc-hg-root
+ default-directory)) ".hgignore")))
+ (unless (search-forward (concat "\n" file "\n") nil t)
(goto-char (point-max))
(insert (concat "\n" file "\n"))
- (write-region 1 (point-max) hgignore))))))
+ (write-region (point-min) (point-max) hgignore))))))
;; Modeled after the similar function in vc-bzr.el
(defun vc-hg-checkout (file &optional _editable rev)
(defun vc-svn-ignore (file)
"Ignore FILE under Subversion."
- (interactive)
- (vc-svn-command (get-buffer-create "*vc-ignore*") 0
- file "propedit" "svn:ignore"))
+ (vc-svn-command t 0 file "propedit" "svn:ignore"))
(defun vc-svn-checkout (file &optional editable rev)
(message "Checking out %s..." file)