diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-17 03:25:44 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-17 03:25:44 +0200 |
commit | 75797be249aeae5b5f65850a5c2fe05e855aa1f8 (patch) | |
tree | 796e600c827d754474edb547fce481d3e810882e /elisp/geiser-plt.el | |
parent | 9ab8feaa541efe3ee223c8d18797ea02be3c5ff9 (diff) | |
download | geiser-chez-75797be249aeae5b5f65850a5c2fe05e855aa1f8.tar.gz geiser-chez-75797be249aeae5b5f65850a5c2fe05e855aa1f8.tar.bz2 |
Refactoring.
Diffstat (limited to 'elisp/geiser-plt.el')
-rw-r--r-- | elisp/geiser-plt.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el index 6c50c99..2fbfb22 100644 --- a/elisp/geiser-plt.el +++ b/elisp/geiser-plt.el @@ -134,9 +134,9 @@ This function uses `geiser-plt-init-file' if it exists." ;;; Error display -(defconst geiser-plt--file-rx-0 "^\\([^:\n\"]+\\):\\([0-9]+\\):\\([0-9]+\\)") -(defconst geiser-plt--file-rx-1 "path:\"?\\([^>\"\n]+\\)\"?>") -(defconst geiser-plt--file-rx-2 "module: \"\\([^>\"\n]+\\)\"") +(defconst geiser-plt--file-rxs '("^\\([^:\n\"]+\\):\\([0-9]+\\):\\([0-9]+\\)" + "path:\"?\\([^>\"\n]+\\)\"?>" + "module: \"\\([^>\"\n]+\\)\"")) (defun geiser-plt--find-files (rx) (save-excursion @@ -148,17 +148,16 @@ This function uses `geiser-plt-init-file' if it exists." (match-string 3))))) (defun geiser-plt-display-error (module key msg) - (insert "Error: ") - (when key (geiser-doc--insert-button key nil 'plt)) - (newline 2) + (when key + (insert "Error: ") + (geiser-doc--insert-button key nil 'plt) + (newline 2)) (when msg (let ((p (point))) (insert msg) (let ((end (point))) (goto-char p) - (geiser-plt--find-files geiser-plt--file-rx-0) - (geiser-plt--find-files geiser-plt--file-rx-1) - (geiser-plt--find-files geiser-plt--file-rx-2) + (mapc 'geiser-plt--find-files geiser-plt--file-rxs) (goto-char end) (fill-region p end) (newline)))) |