summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-05 12:25:19 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-05 12:25:19 -0700
commitd67c42207fa75b0b4715705b577a228eec05729a (patch)
tree980dd94fa6ab5116908e26e5f2992f2f5934c28e
parent41469e9943986d909ee7cfa5fe977a57f6900431 (diff)
downloadfork-ledger-d67c42207fa75b0b4715705b577a228eec05729a.tar.gz
fork-ledger-d67c42207fa75b0b4715705b577a228eec05729a.tar.bz2
fork-ledger-d67c42207fa75b0b4715705b577a228eec05729a.zip
Code cleanup to get rid of some elisp compiler warnings.
-rw-r--r--lisp/ldg-occur.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/ldg-occur.el b/lisp/ldg-occur.el
index 9cf7f3b1..09cca45b 100644
--- a/lisp/ldg-occur.el
+++ b/lisp/ldg-occur.el
@@ -71,7 +71,7 @@
(defun ledger-occur-mode (regex buffer)
- (save-excursion
+ (progn
(set-buffer buffer)
(setq ledger-occur-mode
(if (or ledger-occur-mode
@@ -198,10 +198,10 @@
(let ((prev-end (point-min))
(overlays (list)))
(when buffer-matches
- (mapcar (lambda (line)
- (push (list (car line) (cadr line)) overlays)
- (setq prev-end (cadr line)))
- buffer-matches)
+ (mapc (lambda (line)
+ (push (list (car line) (cadr line)) overlays)
+ (setq prev-end (cadr line)))
+ buffer-matches)
(setq overlays (nreverse overlays)))))
(defun ledger-occur-find-xact-extents (pos)
@@ -213,11 +213,11 @@
(let ((end-pos pos)
(beg-pos pos))
(backward-paragraph)
- (next-line)
+ (forward-line)
(beginning-of-line)
(setq beg-pos (point))
(forward-paragraph)
- (previous-line)
+ (forward-line -1)
(end-of-line)
(setq end-pos (1+ (point)))
(list beg-pos end-pos))))
@@ -240,8 +240,8 @@
(let ((bounds (ledger-occur-find-xact-extents (match-beginning 0))))
(push bounds lines)
(setq curpoint (cadr bounds)))) ;move to the end of the
- ;xact, no need to search
- ;inside it more
+ ;xact, no need to search
+ ;inside it more
(goto-char curpoint))
(forward-line 1))
(setq lines (nreverse lines)))))