Function: vc-arch-add-tagline
vc-arch-add-tagline is an interactive and byte-compiled function
defined in vc-arch.el.gz.
Signature
(vc-arch-add-tagline)
Documentation
Add an arch-tag to the end of the current file.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vc-arch.el.gz
;;;###autoload (defun vc-arch-registered (file)
;;;###autoload (if (vc-find-root file "{arch}/=tagging-method")
;;;###autoload (progn
;;;###autoload (load "vc-arch" nil t)
;;;###autoload (vc-arch-registered file))))
(defun vc-arch-add-tagline ()
"Add an `arch-tag' to the end of the current file."
(interactive)
(comment-normalize-vars)
(goto-char (point-max))
(forward-comment -1)
(skip-chars-forward " \t\n")
(cond
((not (bolp)) (insert "\n\n"))
((not (eq ?\n (char-before (1- (point))))) (insert "\n")))
(let ((beg (point))
(idfile (and buffer-file-name
(expand-file-name
(concat ".arch-ids/"
(file-name-nondirectory buffer-file-name)
".id")
(file-name-directory buffer-file-name)))))
(insert "arch-tag: ")
(if (and idfile (file-exists-p idfile))
;; If the file is unreadable, we do want to get an error here.
(progn
(insert-file-contents idfile)
(forward-line 1)
(delete-file idfile))
(condition-case nil
(call-process "uuidgen" nil t)
(file-error (insert (format "%s <%s> %s"
(current-time-string)
user-mail-address
(+ (% (car (time-convert nil 1000000))
1000000)
(buffer-size)))))))
(comment-region beg (point))))