/[emacs]/emacs/lisp/vc.el
ViewVC logotype

Diff of /emacs/lisp/vc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.311.4.3 by spiegel, Wed Nov 14 13:50:58 2001 UTC revision 1.311.4.4 by spiegel, Thu Nov 15 10:56:37 2001 UTC
# Line 466  These are passed to the checkin program Line 466  These are passed to the checkin program
466    :version "20.3")    :version "20.3")
467    
468  (defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS")  (defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS")
469    "*List of directory names to be ignored while recursively walking file trees."    "*List of directory names to be ignored when walking directory trees."
470    :type '(repeat string)    :type '(repeat string)
471    :group 'vc)    :group 'vc)
472    
# Line 491  VC can handle." Line 491  VC can handle."
491    
492  ;;;###autoload  ;;;###autoload
493  (defcustom vc-checkout-hook nil  (defcustom vc-checkout-hook nil
494    "*Normal hook (list of functions) run after a file has been checked out.    "*Normal hook (list of functions) run after checking out a file.
495  See `run-hooks'."  See `run-hooks'."
496    :type 'hook    :type 'hook
497    :group 'vc    :group 'vc
# Line 507  See `run-hooks'." Line 507  See `run-hooks'."
507    
508  ;;;###autoload  ;;;###autoload
509  (defcustom vc-before-checkin-hook nil  (defcustom vc-before-checkin-hook nil
510    "*Normal hook (list of functions) run before a file gets checked in.    "*Normal hook (list of functions) run before a file is checked in.
511  See `run-hooks'."  See `run-hooks'."
512    :type 'hook    :type 'hook
513    :group 'vc)    :group 'vc)
# Line 545  Default is eighteen steps using a twenty Line 545  Default is eighteen steps using a twenty
545    :group 'vc)    :group 'vc)
546    
547  (defcustom vc-annotate-very-old-color "#0046FF"  (defcustom vc-annotate-very-old-color "#0046FF"
548    "*Color for lines older than CAR of last cons in `vc-annotate-color-map'."    "*Color for lines older than current color range in \\[vc-annotate]]."
549    :type 'string    :type 'string
550    :group 'vc)    :group 'vc)
551    
# Line 589  the file's version control type in `vc-h Line 589  the file's version control type in `vc-h
589    
590  (defcustom vc-comment-alist  (defcustom vc-comment-alist
591    '((nroff-mode ".\\\"" ""))    '((nroff-mode ".\\\"" ""))
592    "*Special comment delimiters to be used in generating vc headers only.    "*Special comment delimiters for generating VC headers.
593  Add an entry in this list if you need to override the normal `comment-start'  Add an entry in this list if you need to override the normal `comment-start'
594  and `comment-end' variables.  This will only be necessary if the mode language  and `comment-end' variables.  This will only be necessary if the mode language
595  is sensitive to blank lines."  is sensitive to blank lines."
# Line 599  is sensitive to blank lines." Line 599  is sensitive to blank lines."
599                         (string :tag "Comment End")))                         (string :tag "Comment End")))
600    :group 'vc)    :group 'vc)
601    
 ;; Default is to be extra careful for super-user.  
 ;; TODO: This variable is no longer used; the corresponding checks  
 ;;       are always done now.  If that turns out to be fast enough,  
 ;;       the variable can be obsoleted.  
602  (defcustom vc-checkout-carefully (= (user-uid) 0)  (defcustom vc-checkout-carefully (= (user-uid) 0)
603    "*Non-nil means be extra-careful in checkout.    "*This variable is obsolete.
604    The corresponding checks are always done now.
605    From the old doc string:
606    
607    Non-nil means be extra-careful in checkout.
608  Verify that the file really is not locked  Verify that the file really is not locked
609  and that its contents match what the master file says."  and that its contents match what the master file says."
610    :type 'boolean    :type 'boolean
# Line 696  The keys are \(BUFFER . BACKEND\).  See Line 696  The keys are \(BUFFER . BACKEND\).  See
696    (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size)))    (setq vc-comment-ring (make-ring vc-maximum-comment-ring-size)))
697    
698  (defmacro with-vc-properties (file form settings)  (defmacro with-vc-properties (file form settings)
699    "Execute FORM, then set per-file properties for FILE,    "Execute FORM, then maybe set per-file properties for FILE.
700  but only those that have not been set during the execution of FORM.  SETTINGS is an association list of property/value pairs.  After
701  SETTINGS is a list of two-element lists, each of which has the  executing FORM, set those properties from SETTINGS that have not yet
702    form (PROPERTY . VALUE)."  been updated to their corresponding values."
703    `(let ((vc-touched-properties (list t))    `(let ((vc-touched-properties (list t))
704           (filename ,file))           (filename ,file))
705       ,form       ,form
# Line 713  SETTINGS is a list of two-element lists, Line 713  SETTINGS is a list of two-element lists,
713  ;; Random helper functions  ;; Random helper functions
714    
715  (defsubst vc-editable-p (file)  (defsubst vc-editable-p (file)
716      "Return non-nil if FILE can be edited."
717    (or (eq (vc-checkout-model file) 'implicit)    (or (eq (vc-checkout-model file) 'implicit)
718        (memq (vc-state file) '(edited needs-merge))))        (memq (vc-state file) '(edited needs-merge))))
719    
720  ;; Two macros for elisp programming  ;; Two macros for elisp programming
721  ;;;###autoload  ;;;###autoload
722  (defmacro with-vc-file (file comment &rest body)  (defmacro with-vc-file (file comment &rest body)
723    "Check out a writable copy of FILE if necessary and execute the body.    "Check out a writable copy of FILE if necessary, then execute BODY.
724  Check in FILE with COMMENT (a string) after BODY has been executed.  Check in FILE with COMMENT (a string) after BODY has been executed.
725  FILE is passed through `expand-file-name'; BODY executed within  FILE is passed through `expand-file-name'; BODY executed within
726  `save-excursion'.  If FILE is not under version control, or locked by  `save-excursion'.  If FILE is not under version control, or locked by
# Line 777  The only difference with the default fil Line 778  The only difference with the default fil
778          (set-marker (process-mark p) (point))))))          (set-marker (process-mark p) (point))))))
779    
780  (defun vc-setup-buffer (&optional buf)  (defun vc-setup-buffer (&optional buf)
781    "Prepare BUF for executing a VC command and make it the current buffer.    "Prepare BUF for executing a VC command and make it current.
782  BUF defaults to \"*vc*\", can be a string and will be created if necessary."  BUF defaults to \"*vc*\", can be a string and will be created if necessary."
783    (unless buf (setq buf "*vc*"))    (unless buf (setq buf "*vc*"))
784    (let ((camefrom (current-buffer))    (let ((camefrom (current-buffer))
# Line 821  Else, add CODE to the process' sentinel. Line 822  Else, add CODE to the process' sentinel.
822  (defvar vc-post-command-functions nil  (defvar vc-post-command-functions nil
823    "Hook run at the end of `vc-do-command'.    "Hook run at the end of `vc-do-command'.
824  Each function is called inside the buffer in which the command was run  Each function is called inside the buffer in which the command was run
825  and is passed 3 argument: the COMMAND, the FILE and the FLAGS.")  and is passed 3 arguments: the COMMAND, the FILE and the FLAGS.")
826    
827  ;;;###autoload  ;;;###autoload
828  (defun vc-do-command (buffer okstatus command file &rest flags)  (defun vc-do-command (buffer okstatus command file &rest flags)
829    "Execute a version control command, notifying user and checking for errors.    "Execute a VC command, notifying user and checking for errors.
830  Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the  Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the
831  current buffer if BUFFER is t.  If the destination buffer is not  current buffer if BUFFER is t.  If the destination buffer is not
832  already current, set it up properly and erase it.  The command is  already current, set it up properly and erase it.  The command is
# Line 896  if markers are destroyed or corrupted." Line 897  if markers are destroyed or corrupted."
897                            (min (point-max) (+ posn 100)))))                            (min (point-max) (+ posn 100)))))
898    
899  (defun vc-find-position-by-context (context)  (defun vc-find-position-by-context (context)
900    "Return the position of CONTEXT in the current buffer, or nil if not found."    "Return the position of CONTEXT in the current buffer.
901    If CONTEXT cannot be found, return nil."
902    (let ((context-string (nth 2 context)))    (let ((context-string (nth 2 context)))
903      (if (equal "" context-string)      (if (equal "" context-string)
904          (point-max)          (point-max)
# Line 992  CONTEXT is that which `vc-buffer-context Line 994  CONTEXT is that which `vc-buffer-context
994             (if new-mark (set-mark new-mark))))))             (if new-mark (set-mark new-mark))))))
995    
996  (defun vc-revert-buffer1 (&optional arg no-confirm)  (defun vc-revert-buffer1 (&optional arg no-confirm)
997    "Revert buffer, trying to keep point and mark where user expects them.    "Revert buffer, keeping point and mark where user expects them.
998  Tries to be clever in the face of changes due to expanded version control  Try to be clever in the face of changes due to expanded version control
999  key words.  This is important for typeahead to work as expected.  key words.  This is important for typeahead to work as expected.
1000  ARG and NO-CONFIRM are passed on to `revert-buffer'."  ARG and NO-CONFIRM are passed on to `revert-buffer'."
1001    (interactive "P")    (interactive "P")
# Line 1021  NOT-URGENT means it is ok to continue if Line 1023  NOT-URGENT means it is ok to continue if
1023            (error "Aborted")))))            (error "Aborted")))))
1024    
1025  (defun vc-workfile-unchanged-p (file)  (defun vc-workfile-unchanged-p (file)
1026    "Has FILE changed since last checkout?"    "Return non-nil if FILE has not changed since the last checkout."
1027    (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))    (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))
1028          (lastmod (nth 5 (file-attributes file))))          (lastmod (nth 5 (file-attributes file))))
1029      (if checkout-time      (if checkout-time
# Line 1031  NOT-URGENT means it is ok to continue if Line 1033  NOT-URGENT means it is ok to continue if
1033          unchanged))))          unchanged))))
1034    
1035  (defun vc-default-workfile-unchanged-p (backend file)  (defun vc-default-workfile-unchanged-p (backend file)
1036    "Default check whether FILE is unchanged: diff against master version."    "Check if FILE is unchanged by diffing against the master version.
1037    Return non-nil if FILE is unchanged."
1038    (zerop (vc-call diff file (vc-workfile-version file))))    (zerop (vc-call diff file (vc-workfile-version file))))
1039    
1040  (defun vc-default-latest-on-branch-p (backend file)  (defun vc-default-latest-on-branch-p (backend file)
1041    "Default check whether the current workfile version of FILE is the    "Return non-nil if FILE is the latest on its branch.
1042  latest on its branch."  This default implementation always returns non-nil, which means that
1043    editing non-current versions is not supported by default."
1044    t)    t)
1045    
1046  (defun vc-recompute-state (file)  (defun vc-recompute-state (file)
# Line 1046  function `vc-BACKEND-state', not the heu Line 1050  function `vc-BACKEND-state', not the heu
1050    (vc-file-setprop file 'vc-state (vc-call state file)))    (vc-file-setprop file 'vc-state (vc-call state file)))
1051    
1052  (defun vc-next-action-on-file (file verbose &optional comment)  (defun vc-next-action-on-file (file verbose &optional comment)
1053    "Do The Right Thing for a given version-controlled FILE.    "Do The Right Thing for a given FILE under version control.
1054  If COMMENT is specified, it will be used as an admin or checkin comment.  If COMMENT is specified, it will be used as an admin or checkin comment.
1055  If VERBOSE is non-nil, query the user rather than using default parameters."  If VERBOSE is non-nil, query the user rather than using default parameters."
1056    (let ((visited (get-file-buffer file))    (let ((visited (get-file-buffer file))
# Line 1203  Ignores FILE and REV, but passes on COMM Line 1207  Ignores FILE and REV, but passes on COMM
1207    
1208  ;;;###autoload  ;;;###autoload
1209  (defun vc-next-action (verbose)  (defun vc-next-action (verbose)
1210    "Do the next logical checkin or checkout operation on the current file.    "Do the next logical version control operation on the current file.
1211    
1212  If you call this from within a VC dired buffer with no files marked,  If you call this from within a VC dired buffer with no files marked,
1213  it will operate on the file in the current line.  it will operate on the file in the current line.
# Line 1531  Runs the normal hook `vc-checkin-hook'." Line 1535  Runs the normal hook `vc-checkin-hook'."
1535     'vc-checkin-hook))     'vc-checkin-hook))
1536    
1537  (defun vc-comment-to-change-log (&optional whoami file-name)  (defun vc-comment-to-change-log (&optional whoami file-name)
1538    "Enter last VC comment into change log file for current buffer's file.    "Enter last VC comment into the change log for the current file.
1539  Optional arg (interactive prefix) non-nil means prompt for user name and site.  WHOAMI (interactive prefix) non-nil means prompt for user name
1540  Second arg is file name of change log.  \  and site.  FILE-NAME is the name of the change log; if nil, use
1541  If nil, uses `change-log-default-name'.  `change-log-default-name'.
1542    
1543  May be useful as a `vc-checkin-hook' to update change logs automatically."  This may be useful as a `vc-checkin-hook' to update change logs
1544    automatically."
1545    (interactive (if current-prefix-arg    (interactive (if current-prefix-arg
1546                     (list current-prefix-arg                     (list current-prefix-arg
1547                           (prompt-for-change-log-name))))                           (prompt-for-change-log-name))))
# Line 1578  May be useful as a `vc-checkin-hook' to Line 1583  May be useful as a `vc-checkin-hook' to
1583          (insert "\n"))))          (insert "\n"))))
1584    
1585  (defun vc-finish-logentry (&optional nocomment)  (defun vc-finish-logentry (&optional nocomment)
1586    "Complete the operation implied by the current log entry."    "Complete the operation implied by the current log entry.
1587    Use the contents of the current buffer as a check-in or registration
1588    comment.  If the optional arg NOCOMMENT is non-nil, then don't check
1589    the buffer contents as a comment, and don't add it to
1590    `vc-comment-ring'."
1591    (interactive)    (interactive)
1592    ;; Check and record the comment, if any.    ;; Check and record the comment, if any.
1593    (unless nocomment    (unless nocomment
# Line 1632  May be useful as a `vc-checkin-hook' to Line 1641  May be useful as a `vc-checkin-hook' to
1641  ;; Code for access to the comment ring  ;; Code for access to the comment ring
1642    
1643  (defun vc-new-comment-index (stride len)  (defun vc-new-comment-index (stride len)
1644      "Return the comment index STRIDE elements from the current one.
1645    LEN is the length of `vc-comment-ring'."
1646    (mod (cond    (mod (cond
1647          (vc-comment-ring-index (+ vc-comment-ring-index stride))          (vc-comment-ring-index (+ vc-comment-ring-index stride))
1648          ;; Initialize the index on the first use of this command          ;; Initialize the index on the first use of this command
# Line 1642  May be useful as a `vc-checkin-hook' to Line 1653  May be useful as a `vc-checkin-hook' to
1653         len))         len))
1654    
1655  (defun vc-previous-comment (arg)  (defun vc-previous-comment (arg)
1656    "Cycle backwards through comment history."    "Cycle backwards through comment history.
1657    With a numeric prefix ARG, go back ARG comments."
1658    (interactive "*p")    (interactive "*p")
1659    (let ((len (ring-length vc-comment-ring)))    (let ((len (ring-length vc-comment-ring)))
1660      (if (<= len 0)      (if (<= len 0)
# Line 1653  May be useful as a `vc-checkin-hook' to Line 1665  May be useful as a `vc-checkin-hook' to
1665        (insert (ring-ref vc-comment-ring vc-comment-ring-index)))))        (insert (ring-ref vc-comment-ring vc-comment-ring-index)))))
1666    
1667  (defun vc-next-comment (arg)  (defun vc-next-comment (arg)
1668    "Cycle forwards through comment history."    "Cycle forwards through comment history.
1669    With a numeric prefix ARG, go forward ARG comments."
1670    (interactive "*p")    (interactive "*p")
1671    (vc-previous-comment (- arg)))    (vc-previous-comment (- arg)))
1672    
1673  (defun vc-comment-search-reverse (str &optional stride)  (defun vc-comment-search-reverse (str &optional stride)
1674    "Search backwards through comment history for substring match."    "Search backwards through comment history for substring match of STR.
1675    If the optional argument STRIDE is present, that is a step-width to use
1676    when going through the comment ring."
1677    ;; Why substring rather than regexp ?   -sm    ;; Why substring rather than regexp ?   -sm
1678    (interactive    (interactive
1679     (list (read-string "Comment substring: " nil nil vc-last-comment-match)))     (list (read-string "Comment substring: " nil nil vc-last-comment-match)))
# Line 1676  May be useful as a `vc-checkin-hook' to Line 1691  May be useful as a `vc-checkin-hook' to
1691      (vc-previous-comment 0)))      (vc-previous-comment 0)))
1692    
1693  (defun vc-comment-search-forward (str)  (defun vc-comment-search-forward (str)
1694    "Search forwards through comment history for substring match."    "Search forwards through comment history for a substring match of STR."
1695    (interactive    (interactive
1696     (list (read-string "Comment substring: " nil nil vc-last-comment-match)))     (list (read-string "Comment substring: " nil nil vc-last-comment-match)))
1697    (vc-comment-search-reverse str -1))    (vc-comment-search-reverse str -1))
# Line 1686  May be useful as a `vc-checkin-hook' to Line 1701  May be useful as a `vc-checkin-hook' to
1701  ;;;###autoload  ;;;###autoload
1702  (defun vc-diff (historic &optional not-urgent)  (defun vc-diff (historic &optional not-urgent)
1703    "Display diffs between file versions.    "Display diffs between file versions.
1704  Normally this compares the current file and buffer with the most recent  Normally this compares the current file and buffer with the most
1705  checked in version of that file.  This uses no arguments.  recent checked in version of that file.  This uses no arguments.  With
1706  With a prefix argument, it reads the file name to use  a prefix argument HISTORIC, it reads the file name to use and two
1707  and two version designators specifying which versions to compare."  version designators specifying which versions to compare.  The
1708    optional argument NOT-URGENT non-nil means it is ok to say no to
1709    saving the buffer."
1710    (interactive (list current-prefix-arg t))    (interactive (list current-prefix-arg t))
1711    (if historic    (if historic
1712        (call-interactively 'vc-version-diff)        (call-interactively 'vc-version-diff)
# Line 1701  and two version designators specifying w Line 1718  and two version designators specifying w
1718          (vc-version-diff file nil nil)))))          (vc-version-diff file nil nil)))))
1719    
1720  (defun vc-version-diff (file rel1 rel2)  (defun vc-version-diff (file rel1 rel2)
1721    "For FILE, report diffs between two stored versions REL1 and REL2 of it.    "List the differences between FILE's versions REL1 and REL2.
1722  If FILE is a directory, generate diffs between versions for all registered  If REL1 is empty or nil it means to use the current workfile version;
1723  files in or below it."  REL2 empty or nil means the current file contents.  FILE may also be
1724    a directory, in that case, generate diffs between the correponding
1725    versions of all registered files in or below it."
1726    (interactive    (interactive
1727     (let ((file (expand-file-name     (let ((file (expand-file-name
1728                  (read-file-name (if buffer-file-name                  (read-file-name (if buffer-file-name
# Line 1806  actually call the backend, but performs Line 1825  actually call the backend, but performs
1825        (vc-call diff file rel1 rel2))))        (vc-call diff file rel1 rel2))))
1826    
1827  (defmacro vc-diff-switches-list (backend)  (defmacro vc-diff-switches-list (backend)
1828    "Make a list of `diff-switches', `vc-diff-switches',    "Return the list of switches to use for executing diff under BACKEND."
 and `vc-BACKEND-diff-switches'."  
1829    `(append    `(append
1830      (if (listp diff-switches) diff-switches (list diff-switches))      (if (listp diff-switches) diff-switches (list diff-switches))
1831      (if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches))      (if (listp vc-diff-switches) vc-diff-switches (list vc-diff-switches))
# Line 1817  and `vc-BACKEND-diff-switches'." Line 1835  and `vc-BACKEND-diff-switches'."
1835        (if (listp backend-switches) backend-switches (list backend-switches)))))        (if (listp backend-switches) backend-switches (list backend-switches)))))
1836    
1837  (defun vc-default-diff-tree (backend dir rel1 rel2)  (defun vc-default-diff-tree (backend dir rel1 rel2)
1838    "Default implementation for diffing an entire tree at and below DIR.    "List differences for all registered files at and below DIR.
1839  The meaning of REL1 and REL2 is the same as for `vc-version-diff'."  The meaning of REL1 and REL2 is the same as for `vc-version-diff'."
1840    ;; This implementation does an explicit tree walk, and calls    ;; This implementation does an explicit tree walk, and calls
1841    ;; vc-BACKEND-diff directly for each file.  An optimization    ;; vc-BACKEND-diff directly for each file.  An optimization
# Line 1851  The meaning of REL1 and REL2 is the same Line 1869  The meaning of REL1 and REL2 is the same
1869    
1870  ;;;###autoload  ;;;###autoload
1871  (defun vc-version-other-window (rev)  (defun vc-version-other-window (rev)
1872    "Visit version REV of the current buffer in another window.    "Visit version REV of the current file in another window.
1873  If the current buffer is named `F', the version is named `F.~REV~'.  If the current file is named `F', the version is named `F.~REV~'.
1874  If `F.~REV~' already exists, it is used instead of being re-created."  If `F.~REV~' already exists, use it instead of checking it out again."
1875    (interactive "sVersion to visit (default is workfile version): ")    (interactive "sVersion to visit (default is workfile version): ")
1876    (vc-ensure-vc-buffer)    (vc-ensure-vc-buffer)
1877    (let* ((file buffer-file-name)    (let* ((file buffer-file-name)
# Line 1872  If `F.~REV~' already exists, it is used Line 1890  If `F.~REV~' already exists, it is used
1890    
1891  ;;;###autoload  ;;;###autoload
1892  (defun vc-insert-headers ()  (defun vc-insert-headers ()
1893    "Insert headers in a file for use with your version control system.    "Insert headers into a file for use with a version control system.
1894  Headers desired are inserted at point, and are pulled from  Headers desired are inserted at point, and are pulled from
1895  the variable `vc-BACKEND-header'."  the variable `vc-BACKEND-header'."
1896    (interactive)    (interactive)
# Line 1903  the variable `vc-BACKEND-header'." Line 1921  the variable `vc-BACKEND-header'."
1921    
1922  (defun vc-clear-headers (&optional file)  (defun vc-clear-headers (&optional file)
1923    "Clear all version headers in the current buffer (or FILE).    "Clear all version headers in the current buffer (or FILE).
1924  I.e. reset them to the non-expanded form."  The headers are reset to their non-expanded form."
1925    (let* ((filename (or file buffer-file-name))    (let* ((filename (or file buffer-file-name))
1926           (visited (find-buffer-visiting filename))           (visited (find-buffer-visiting filename))
1927           (backend (vc-backend filename)))           (backend (vc-backend filename)))
# Line 2317  With prefix arg READ-SWITCHES, specify a Line 2335  With prefix arg READ-SWITCHES, specify a
2335  ;; Named-configuration entry points  ;; Named-configuration entry points
2336    
2337  (defun vc-snapshot-precondition (dir)  (defun vc-snapshot-precondition (dir)
2338    "Scan the tree below DIR, looking for non-uptodate files.    "Scan the tree below DIR, looking for files not up-to-date.
2339  If any file is not up-to-date, return the name of the first such file.  If any file is not up-to-date, return the name of the first such file.
2340  \(This means, neither snapshot creation nor retrieval is allowed.\)  \(This means, neither snapshot creation nor retrieval is allowed.\)
2341  If one or more of the files are currently visited, return `visited'.  If one or more of the files are currently visited, return `visited'.
# Line 2430  allowed and simply skipped)." Line 2448  allowed and simply skipped)."
2448                                 ',(vc-workfile-version file))))))))                                 ',(vc-workfile-version file))))))))
2449    
2450  (defun vc-default-comment-history (backend file)  (defun vc-default-comment-history (backend file)
2451    "Return a string with all log entries that were made under BACKEND for FILE."    "Return a string with all log entries stored in BACKEND for FILE."
2452    (if (vc-find-backend-function backend 'print-log)    (if (vc-find-backend-function backend 'print-log)
2453        (with-temp-buffer        (with-temp-buffer
2454          (vc-call print-log file)          (vc-call print-log file)
# Line 2459  it if their logs are not in RCS format." Line 2477  it if their logs are not in RCS format."
2477    
2478  ;;;###autoload  ;;;###autoload
2479  (defun vc-revert-buffer ()  (defun vc-revert-buffer ()
2480    "Revert the current buffer's file back to the version it was based on.    "Revert the current buffer's file to the version it was based on.
2481  This asks for confirmation if the buffer contents are not identical  This asks for confirmation if the buffer contents are not identical
2482  to that version.  This function does not automatically pick up newer  to that version.  This function does not automatically pick up newer
2483  changes found in the master file; use \\[universal-argument] \\[vc-next-action] to do so."  changes found in the master file; use \\[universal-argument] \\[vc-next-action] to do so."
# Line 2686  backend to NEW-BACKEND, and unregister F Line 2704  backend to NEW-BACKEND, and unregister F
2704             templates)))             templates)))
2705      (if (or (file-symlink-p oldmaster)      (if (or (file-symlink-p oldmaster)
2706              (file-symlink-p (file-name-directory oldmaster)))              (file-symlink-p (file-name-directory oldmaster)))
2707          (error "This unsafe in the presence of symbolic links"))          (error "This is unsafe in the presence of symbolic links"))
2708      (rename-file      (rename-file
2709       oldmaster       oldmaster
2710       (catch 'found       (catch 'found
# Line 2843  Return NIL if no match made.  Associatio Line 2861  Return NIL if no match made.  Associatio
2861    (cdr (assoc buffer vc-annotate-buffers)))    (cdr (assoc buffer vc-annotate-buffers)))
2862    
2863  (define-derived-mode vc-annotate-mode fundamental-mode "Annotate"  (define-derived-mode vc-annotate-mode fundamental-mode "Annotate"
2864    "Major mode for buffers displaying output from the `annotate' command.    "Major mode for output buffers of the `vc-annotate' command.
2865    
2866  You can use the mode-specific menu to alter the time-span of the used  You can use the mode-specific menu to alter the time-span of the used
2867  colors.  See variable `vc-annotate-menu-elements' for customizing the  colors.  See variable `vc-annotate-menu-elements' for customizing the
# Line 2959  colors. `vc-annotate-background' specifi Line 2977  colors. `vc-annotate-background' specifi
2977      (car (car a-list))))      (car (car a-list))))
2978    
2979  (defun vc-annotate-time-span (a-list span &optional quantize)  (defun vc-annotate-time-span (a-list span &optional quantize)
2980    "Apply factor SPAN  to the time-span of association list A-LIST.    "Apply factor SPAN to the time-span of association list A-LIST.
2981  Return the new alist.  Return the new alist.
2982  Optionally quantize to the factor of QUANTIZE."  Optionally quantize to the factor of QUANTIZE."
2983    ;; Apply span to each car of every cons    ;; Apply span to each car of every cons
# Line 2971  Optionally quantize to the factor of QUA Line 2989  Optionally quantize to the factor of QUA
2989                                               a-list) span quantize))))                                               a-list) span quantize))))
2990    
2991  (defun vc-annotate-compcar (threshold a-list)  (defun vc-annotate-compcar (threshold a-list)
2992    "Test successive cons cells of association list A-LIST against THRESHOLD.    "Test successive cons cells of A-LIST against THRESHOLD.
2993  Return the first cons cell which car is not less than THRESHOLD,  Return the first cons cell with a car that is not less than THRESHOLD,
2994  nil otherwise"  nil if no such cell exists."
2995   (let ((i 1)   (let ((i 1)
2996         (tmp-cons (car a-list)))         (tmp-cons (car a-list)))
2997     (while (and tmp-cons (< (car tmp-cons) threshold))     (while (and tmp-cons (< (car tmp-cons) threshold))

Legend:
Removed from v.1.311.4.3  
changed lines
  Added in v.1.311.4.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26