aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorPaul Eggert2011-10-22 23:38:24 -0700
committerPaul Eggert2011-10-22 23:38:24 -0700
commitcfc09582247ffef6a46b6249e2fba9136a62d21e (patch)
tree50e102f64a2b88c692d9110990abd416c78c32f0 /lisp/vc
parent92c938895c639463681ae1c58a944cae62b70b87 (diff)
parent86c606818495d9411fd5d6b1477f9a097eb18020 (diff)
downloademacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.tar.gz
emacs-cfc09582247ffef6a46b6249e2fba9136a62d21e.zip
Merge from trunk.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/diff-mode.el19
-rw-r--r--lisp/vc/ediff-init.el8
-rw-r--r--lisp/vc/log-edit.el4
-rw-r--r--lisp/vc/vc-bzr.el4
-rw-r--r--lisp/vc/vc-hooks.el18
-rw-r--r--lisp/vc/vc.el10
6 files changed, 32 insertions, 31 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 392973e08fe..9f0fa584b0d 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -225,9 +225,16 @@ when editing big diffs)."
225 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.") 225 "Keymap for `diff-minor-mode'. See also `diff-mode-shared-map'.")
226 226
227(define-minor-mode diff-auto-refine-mode 227(define-minor-mode diff-auto-refine-mode
228 "Automatically highlight changes in detail as the user visits hunks. 228 "Toggle automatic diff hunk highlighting (Diff Auto Refine mode).
229When transitioning from disabled to enabled, 229With a prefix argument ARG, enable Diff Auto Refine mode if ARG
230try to refine the current hunk, as well." 230is positive, and disable it otherwise. If called from Lisp,
231enable the mode if ARG is omitted or nil.
232
233Diff Auto Refine mode is a buffer-local minor mode used with
234`diff-mode'. When enabled, Emacs automatically highlights
235changes in detail as the user visits hunks. When transitioning
236from disabled to enabled, it tries to refine the current hunk, as
237well."
231 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine" 238 :group 'diff-mode :init-value t :lighter nil ;; " Auto-Refine"
232 (when diff-auto-refine-mode 239 (when diff-auto-refine-mode
233 (condition-case-no-debug nil (diff-refine-hunk) (error nil)))) 240 (condition-case-no-debug nil (diff-refine-hunk) (error nil))))
@@ -1306,7 +1313,11 @@ a diff with \\[diff-reverse-direction].
1306 1313
1307;;;###autoload 1314;;;###autoload
1308(define-minor-mode diff-minor-mode 1315(define-minor-mode diff-minor-mode
1309 "Minor mode for viewing/editing context diffs. 1316 "Toggle Diff minor mode.
1317With a prefix argument ARG, enable Diff minor mode if ARG is
1318positive, and disable it otherwise. If called from Lisp, enable
1319the mode if ARG is omitted or nil.
1320
1310\\{diff-minor-mode-map}" 1321\\{diff-minor-mode-map}"
1311 :group 'diff-mode :lighter " Diff" 1322 :group 'diff-mode :lighter " Diff"
1312 ;; FIXME: setup font-lock 1323 ;; FIXME: setup font-lock
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 0d904ec85c4..eeaa2cfa927 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1340,11 +1340,9 @@ this variable represents.")
1340 ovr-list)))))))) 1340 ovr-list))))))))
1341 1341
1342 1342
1343(defvar ediff-toggle-read-only-function nil 1343(defvar ediff-toggle-read-only-function 'toggle-read-only
1344 "*Specifies the function to be used to toggle read-only. 1344 "Function to be used to toggle read-only status of the buffer.
1345If nil, Ediff tries to deduce the function from the binding of C-x C-q. 1345If nil, Ediff tries using the command bound to C-x C-q.")
1346Normally, this is the `toggle-read-only' function, but, if version
1347control is used, it could be `vc-toggle-read-only' or `rcs-toggle-read-only'.")
1348 1346
1349(defcustom ediff-make-buffers-readonly-at-startup nil 1347(defcustom ediff-make-buffers-readonly-at-startup nil
1350 "Make all variant buffers read-only when Ediff starts up. 1348 "Make all variant buffers read-only when Ediff starts up.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index b3f5cfb78f7..c421304442f 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -386,7 +386,7 @@ uses the current buffer."
386 (setq setup (not setup))) 386 (setq setup (not setup)))
387 (when setup 387 (when setup
388 (erase-buffer) 388 (erase-buffer)
389 (insert "Summary: ") 389 (insert "Summary: \nAuthor: ")
390 (save-excursion (insert "\n\n"))) 390 (save-excursion (insert "\n\n")))
391 (if mode 391 (if mode
392 (funcall mode) 392 (funcall mode)
@@ -536,7 +536,7 @@ If you want to abort the commit, simply delete the buffer."
536 (or (= (point-min) (point-max)) 536 (or (= (point-min) (point-max))
537 (save-excursion 537 (save-excursion
538 (goto-char (point-min)) 538 (goto-char (point-min))
539 (while (and (looking-at "^\\(Summary: \\)?$") 539 (while (and (looking-at "^\\([a-zA-Z]+: \\)?$")
540 (zerop (forward-line 1)))) 540 (zerop (forward-line 1))))
541 (eobp)))) 541 (eobp))))
542 542
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 3ab1caf2864..cc28db689e9 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -866,7 +866,7 @@ stream. Standard error output is discarded."
866 (" M " . edited) ;; file text modified 866 (" M " . edited) ;; file text modified
867 (" *" . edited) ;; execute bit changed 867 (" *" . edited) ;; execute bit changed
868 (" M*" . edited) ;; text modified + execute bit changed 868 (" M*" . edited) ;; text modified + execute bit changed
869 ;; FIXME: what about ignored files? 869 ("I " . ignored)
870 (" D " . missing) 870 (" D " . missing)
871 ;; For conflicts, should we list the .THIS/.BASE/.OTHER? 871 ;; For conflicts, should we list the .THIS/.BASE/.OTHER?
872 ("C " . conflict) 872 ("C " . conflict)
@@ -916,7 +916,7 @@ stream. Standard error output is discarded."
916 (push (list new-name 'edited 916 (push (list new-name 'edited
917 (vc-bzr-create-extra-fileinfo old-name)) result))) 917 (vc-bzr-create-extra-fileinfo old-name)) result)))
918 ;; do nothing for non existent files 918 ;; do nothing for non existent files
919 ((eq translated 'not-found)) 919 ((memq translated '(not-found ignored)))
920 (t 920 (t
921 (push (list (file-relative-name 921 (push (list (file-relative-name
922 (buffer-substring-no-properties 922 (buffer-substring-no-properties
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index e7bfd273732..35fa11c2e5e 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -648,22 +648,8 @@ this function."
648 (throw 'found trial)))) 648 (throw 'found trial))))
649 templates)))) 649 templates))))
650 650
651(defun vc-toggle-read-only (&optional verbose) 651(define-obsolete-function-alias
652 "Change read-only status of current buffer, perhaps via version control. 652 'vc-toggle-read-only 'toggle-read-only "24.1")
653
654If the buffer is visiting a file registered with version control,
655throw an error, because this is not a safe or really meaningful operation
656on any version-control system newer than RCS.
657
658Otherwise, just change the read-only flag of the buffer.
659
660If you bind this function to \\[toggle-read-only], then Emacs
661will properly intercept all attempts to toggle the read-only flag
662on version-controlled buffer."
663 (interactive "P")
664 (if (vc-backend buffer-file-name)
665 (error "Toggling the readability of a version controlled file is likely to wreak havoc")
666 (toggle-read-only)))
667 653
668(defun vc-default-make-version-backups-p (backend file) 654(defun vc-default-make-version-backups-p (backend file)
669 "Return non-nil if unmodified versions should be backed up locally. 655 "Return non-nil if unmodified versions should be backed up locally.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 62536fd94be..909585138fc 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -675,6 +675,8 @@
675 :type 'boolean 675 :type 'boolean
676 :group 'vc) 676 :group 'vc)
677 677
678(make-obsolete-variable 'vc-initial-comment "it has no effect." "23.2")
679
678(defcustom vc-default-init-revision "1.1" 680(defcustom vc-default-init-revision "1.1"
679 "A string used as the default revision number when a new file is registered. 681 "A string used as the default revision number when a new file is registered.
680This can be overridden by giving a prefix argument to \\[vc-register]. This 682This can be overridden by giving a prefix argument to \\[vc-register]. This
@@ -1118,9 +1120,13 @@ merge in the changes into your working copy."
1118 ;; Files have local changes 1120 ;; Files have local changes
1119 ((vc-compatible-state state 'edited) 1121 ((vc-compatible-state state 'edited)
1120 (let ((ready-for-commit files)) 1122 (let ((ready-for-commit files))
1121 ;; If files are edited but read-only, give user a chance to correct 1123 ;; If files are edited but read-only, give user a chance to correct.
1122 (dolist (file files) 1124 (dolist (file files)
1123 (unless (file-writable-p file) 1125 ;; If committing a mix of removed and edited files, the
1126 ;; fileset has state = 'edited. Rather than checking the
1127 ;; state of each individual file in the fileset, it seems
1128 ;; simplest to just check if the file exists. Bug#9781.
1129 (when (and (file-exists-p file) (not (file-writable-p file)))
1124 ;; Make the file+buffer read-write. 1130 ;; Make the file+buffer read-write.
1125 (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) 1131 (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file))
1126 (error "Aborted")) 1132 (error "Aborted"))