From: Stefan Bund Date: Tue, 13 Sep 2011 11:16:45 +0000 (+0200) Subject: more concise function naming X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=2d7b110770b5d9d8f5b2bb4b0959e261820b0efb;p=emacs-egrep.git more concise function naming --- diff --git a/egrep.el b/egrep.el index 1bab9fe..ba30fd8 100644 --- a/egrep.el +++ b/egrep.el @@ -1,7 +1,7 @@ (require 'cl) (require 'htmlize) -(defun egrep-regexps-1 (result-buffer regexp predicate args) +(defun egrep-1 (result-buffer regexp predicate args) (let ((file-name (buffer-file-name))) (save-excursion (goto-char (point-min)) @@ -33,10 +33,10 @@ (defun egrep-finalize-result-buffer (result-buffer) (goto-char (point-min))) -(defun egrep-regexps (regexp &optional predicate &rest args) +(defun egrep (regexp &optional predicate &rest args) (interactive "sRegexp: ") (let ((result-buffer (egrep-prepare-result-buffer))) - (egrep-regexps-1 result-buffer regexp predicate args) + (egrep-1 result-buffer regexp predicate args) (egrep-finalize-result-buffer result-buffer))) (defun egrep-font-face-predicate (face-symbol) @@ -44,14 +44,14 @@ if (not (eq (get-text-property point 'face) face-symbol)) return nil finally return t)) -(defun egrep-regexps-with-face (regexp face-symbol) +(defun egrep-with-face (regexp face-symbol) (interactive (list (read-string "Regexp: ") (intern (completing-read "Face symbol: " (mapcar (lambda (face) (symbol-name face)) (face-list)) nil t)))) - (egrep-regexps regexp 'egrep-font-face-predicate face-symbol)) + (egrep regexp 'egrep-font-face-predicate face-symbol)) -(defun egrep-regexps-dired-marked-files (regexp &optional prepare predicate &rest args) +(defun egrep-dired-marked-files (regexp &optional prepare predicate &rest args) (interactive "sRegexp: ") (let ((result-buffer (egrep-prepare-result-buffer))) (loop for file-name in (dired-get-marked-files nil current-prefix-arg) @@ -60,7 +60,7 @@ (message (format "Searching %s ..." (file-name-nondirectory file-name))) (sit-for .1) (if prepare (funcall prepare)) - (egrep-regexps-1 result-buffer regexp predicate args)))) + (egrep-1 result-buffer regexp predicate args)))) (egrep-finalize-result-buffer result-buffer) (message "Search complete."))) @@ -82,14 +82,14 @@ (mapcar (lambda (face) (symbol-name face)) (face-list))) predicate t (or initial "font-lock-") hist default inherit-input-method))) -(defun egrep-regexps-with-face-dired-marked-files (regexp face-symbol) +(defun egrep-with-face-dired-marked-files (regexp face-symbol) (interactive (list (read-string "Regexp: ") (egrep-read-font-lock-face "Font symbol: "))) - (egrep-regexps-dired-marked-files regexp - (lambda () - (font-lock-fontify-buffer) - (htmlize-ensure-fontified)) - 'egrep-font-face-predicate - face-symbol)) + (egrep-dired-marked-files regexp + (lambda () + (font-lock-fontify-buffer) + (htmlize-ensure-fontified)) + 'egrep-font-face-predicate + face-symbol)) (provide 'egrep)