diff options
Diffstat (limited to 'lisp/ledger-complete.el')
-rw-r--r-- | lisp/ledger-complete.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/ledger-complete.el b/lisp/ledger-complete.el index bc4b1854..2fae9911 100644 --- a/lisp/ledger-complete.el +++ b/lisp/ledger-complete.el @@ -1,6 +1,6 @@ ;;; ledger-complete.el --- Helper code for use with the "ledger" command-line tool -;; Copyright (C) 2003-2014 John Wiegley (johnw AT gnu DOT org) +;; Copyright (C) 2003-2015 John Wiegley (johnw AT gnu DOT org) ;; This file is not part of GNU Emacs. @@ -157,9 +157,7 @@ (ledger-accounts))))) (defun ledger-trim-trailing-whitespace (str) - (let ((s str)) - (when (string-match "[ \t]*$" s) - (replace-match "" nil nil s)))) + (replace-regexp-in-string "[ \t]*$" "" str)) (defun ledger-fully-complete-xact () "Completes a transaction if there is another matching payee in the buffer. |