From 555377edcc1e1fd6a95be344bfd88ccf92df0e48 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 13 Aug 2008 06:14:53 +0300 Subject: [PATCH] Silence byte compiler. Added skeleton Makefile. --- Makefile.am | 1 + magit.el | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..f29fc02d --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +lisp_DATA = magit.el magit.elc diff --git a/magit.el b/magit.el index b581fccd..92c85d72 100644 --- a/magit.el +++ b/magit.el @@ -39,6 +39,9 @@ ;; - Indicate active command in modeline. Show progress in message area? ;; - Detect and handle renames and copies. +(require 'cl) +(require 'parse-time) + ;;; Utilities (defun magit-shell (cmd &rest args) @@ -240,6 +243,9 @@ (put 'magit-mode 'mode-class 'special) (put 'magit-marked-object 'permanent-local t) +(defvar magit-marked-object nil) +(make-variable-buffer-local 'magit-marked-object) + (defun magit-mode () ;;; XXX - the formatting is all screwed up because of the \\[...] ;;; constructs. @@ -322,7 +328,6 @@ pushed. \\{magit-mode-map}" (kill-all-local-variables) - (make-variable-buffer-local 'magit-marked-object) (setq buffer-read-only t) (setq major-mode 'magit-mode mode-name "Magit") @@ -665,7 +670,8 @@ pushed. (goto-char (point-min)) (flush-lines "^#") (goto-char (point-min)) - (replace-regexp "[ \t\n]*\\'" "\n"))) + (if (re-search-forward "[ \t\n]*\\'" nil t) + (replace-match "\n" nil nil)))) (defun magit-log-edit-commit () (interactive) @@ -950,3 +956,5 @@ the current line into your working tree. (interactive) (let ((info (get-char-property (point) 'magit-info))) (message "Thing: %s" info))) + +(provide 'magit)