comparison contrib/mercurial.el @ 2452:d1a7c8a5b835

Emacs: use delete-region instead of kill-* functions. This patch eliminates `kill-line' which taints kill-ring, and `kill-entire-line' which is specific for XEmacs.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 17 Jun 2006 00:06:28 +0900
parents 6d0a9de9a8ac
children b5902db74ba3
comparison
equal deleted inserted replaced
2451:134227b82a96 2452:d1a7c8a5b835
710 (hg-view-output ("Mercurial Help Overview") 710 (hg-view-output ("Mercurial Help Overview")
711 (insert (documentation 'hg-help-overview)) 711 (insert (documentation 'hg-help-overview))
712 (let ((pos (point))) 712 (let ((pos (point)))
713 (insert (documentation 'hg-mode)) 713 (insert (documentation 'hg-mode))
714 (goto-char pos) 714 (goto-char pos)
715 (kill-line)))) 715 (end-of-line 1)
716 (delete-region pos (point)))))
716 717
717 (defun hg-add (path) 718 (defun hg-add (path)
718 "Add PATH to the Mercurial repository on the next commit. 719 "Add PATH to the Mercurial repository on the next commit.
719 With a prefix argument, prompt for the path to add." 720 With a prefix argument, prompt for the path to add."
720 (interactive (list (hg-read-file-name " to add"))) 721 (interactive (list (hg-read-file-name " to add")))
957 (error "not implemented")) 958 (error "not implemented"))
958 959
959 (defun hg-log-mode () 960 (defun hg-log-mode ()
960 "Mode for viewing a Mercurial change log." 961 "Mode for viewing a Mercurial change log."
961 (goto-char (point-min)) 962 (goto-char (point-min))
962 (when (looking-at "^searching for changes") 963 (when (looking-at "^searching for changes.*$")
963 (kill-entire-line)) 964 (delete-region (match-beginning 0) (match-end 0)))
964 (run-hooks 'hg-log-mode-hook)) 965 (run-hooks 'hg-log-mode-hook))
965 966
966 (defun hg-log (path &optional rev1 rev2 log-limit) 967 (defun hg-log (path &optional rev1 rev2 log-limit)
967 "Display the revision history of PATH. 968 "Display the revision history of PATH.
968 History is displayed between REV1 and REV2. 969 History is displayed between REV1 and REV2.