contrib/mercurial.el
changeset 2985 e75fdc37100c
parent 2984 e1762867a734
child 2986 b6e6d2a9c5bc
equal deleted inserted replaced
2984:e1762867a734 2985:e75fdc37100c
   287   (hg-replace-in-string (hg-replace-in-string str "[\r\n][ \t\r\n]*\\'" "")
   287   (hg-replace-in-string (hg-replace-in-string str "[\r\n][ \t\r\n]*\\'" "")
   288 			"\\`[ \t\r\n]*[\r\n]" ""))
   288 			"\\`[ \t\r\n]*[\r\n]" ""))
   289 
   289 
   290 (defsubst hg-chomp (str)
   290 (defsubst hg-chomp (str)
   291   "Strip trailing newlines from a string."
   291   "Strip trailing newlines from a string."
   292   (hg-replace-in-string str "[\r\n]+\'" ""))
   292   (hg-replace-in-string str "[\r\n]+\\'" ""))
   293 
   293 
   294 (defun hg-run-command (command &rest args)
   294 (defun hg-run-command (command &rest args)
   295   "Run the shell command COMMAND, returning (EXIT-CODE . COMMAND-OUTPUT).
   295   "Run the shell command COMMAND, returning (EXIT-CODE . COMMAND-OUTPUT).
   296 The list ARGS contains a list of arguments to pass to the command."
   296 The list ARGS contains a list of arguments to pass to the command."
   297   (let* (exit-code
   297   (let* (exit-code