comparison contrib/mercurial.el @ 1000:3362b410c219

Emacs: kill commit buffer once it's done with.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 22 Aug 2005 03:27:27 -0700
parents bb391518bc28
children ab3939ccbf10
comparison
equal deleted inserted replaced
999:bb391518bc28 1000:3362b410c219
608 (interactive "@e") 608 (interactive "@e")
609 (hg-commit-toggle-file (event-point event))) 609 (hg-commit-toggle-file (event-point event)))
610 610
611 (defun hg-commit-abort () 611 (defun hg-commit-abort ()
612 (interactive) 612 (interactive)
613 (error "not implemented")) 613 (let ((buf hg-prev-buffer))
614 (kill-buffer nil)
615 (switch-to-buffer buf)))
614 616
615 (defun hg-commit-finish () 617 (defun hg-commit-finish ()
616 (interactive) 618 (interactive)
617 (goto-char (point-min)) 619 (goto-char (point-min))
618 (search-forward hg-commit-message-start) 620 (search-forward hg-commit-message-start)
635 (forward-line 1)) 637 (forward-line 1))
636 (when (and (= (length files) 0) 638 (when (and (= (length files) 0)
637 (not hg-commit-allow-empty-file-list)) 639 (not hg-commit-allow-empty-file-list))
638 (error "Cannot proceed - no files to commit")) 640 (error "Cannot proceed - no files to commit"))
639 (setq message (concat message "\n")) 641 (setq message (concat message "\n"))
640 (apply 'hg-run0 "--cwd" hg-root "commit" "-m" message files))) 642 (apply 'hg-run0 "--cwd" hg-root "commit" "-m" message files)
643 (let ((buf hg-prev-buffer))
644 (kill-buffer nil)
645 (switch-to-buffer buf))))
641 646
642 (defun hg-commit-mode () 647 (defun hg-commit-mode ()
643 "Mode for describing a commit of changes to a Mercurial repository. 648 "Mode for describing a commit of changes to a Mercurial repository.
644 This involves two actions: describing the changes with a commit 649 This involves two actions: describing the changes with a commit
645 message, and choosing the files to commit. 650 message, and choosing the files to commit.