From 54a736feabfa3993ffc38433e3c12b611391f952 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Thu, 27 Nov 2014 09:42:23 -0700 Subject: Remove s-trim functions since they stomp on s.el. --- lisp/ledger-fontify.el | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'lisp/ledger-fontify.el') diff --git a/lisp/ledger-fontify.el b/lisp/ledger-fontify.el index 309cbc3b..caf7690a 100644 --- a/lisp/ledger-fontify.el +++ b/lisp/ledger-fontify.el @@ -82,7 +82,7 @@ Fontify the first line of an xact" (let ((state nil)) (re-search-forward ledger-xact-start-regex) (ledger-fontify-set-face (list (match-beginning 1) (match-end 1)) 'ledger-font-posting-date-face) - (save-match-data (setq state (ledger-state-from-string (s-trim (match-string 5))))) + (save-match-data (setq state (ledger-state-from-string (match-string 5)))) (ledger-fontify-set-face (list (match-beginning 7) (match-end 7)) (cond ((eq state 'pending) 'ledger-font-payee-pending-face) @@ -113,7 +113,7 @@ Fontify the first line of an xact" ;; that took to figure out (re-search-forward " \\([*!]\\) " end t) (if (match-string 1) - (setq state (ledger-state-from-string (s-trim (match-string 1)))))) + (setq state (ledger-state-from-string (match-string 1))))) (beginning-of-line) (re-search-forward "[[:graph:]]\\([ \t][ \t]\\)" end 'end) ;; find the end of the account, or end of line @@ -191,20 +191,4 @@ Fontify the first line of an xact" (defun ledger-fontify-set-face (extents face) (put-text-property (car extents) (cadr extents) 'face face)) - -(defun s-trim-left (s) - "Remove whitespace at the beginning of S." - (if (string-match "\\`[ \t\n\r]+" s) - (replace-match "" t t s) - s)) - -(defun s-trim-right (s) - "Remove whitespace at the end of S." - (if (string-match "[ \t\n\r]+\\'" s) - (replace-match "" t t s) - s)) - -(defun s-trim (s) - "Remove whitespace at the beginning and end of S." - (s-trim-left (s-trim-right s))) ;;; ledger-fontify.el ends here -- cgit v1.2.3