mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
2008-02-15 Lawrence Mitchell <wence@gmx.li> (tiny change)
* ielm.el (ielm-is-whitespace): Remove. (ielm-is-whitespace-or-comment): New function. (ielm-eval-input): Use it.
This commit is contained in:
parent
1b6406b3b1
commit
6ad18d45df
10
lisp/ielm.el
10
lisp/ielm.el
@ -300,9 +300,10 @@ simply inserts a newline."
|
||||
|
||||
;;; Utility functions
|
||||
|
||||
(defun ielm-is-whitespace (string)
|
||||
(defun ielm-is-whitespace-or-comment (string)
|
||||
"Return non-nil if STRING is all whitespace."
|
||||
(or (string= string "") (string-match "\\`[ \t\n]+\\'" string)))
|
||||
(or (string= string "")
|
||||
(string-match "\\`[ \t\n]*\\(?:;.*\\)*\\'" string)))
|
||||
|
||||
;;; Evaluation
|
||||
|
||||
@ -327,7 +328,7 @@ simply inserts a newline."
|
||||
(ielm-output "") ; result to display
|
||||
(ielm-wbuf ielm-working-buffer) ; current buffer after evaluation
|
||||
(ielm-pmark (ielm-pm)))
|
||||
(if (not (ielm-is-whitespace ielm-string))
|
||||
(if (not (ielm-is-whitespace-or-comment ielm-string))
|
||||
(progn
|
||||
(condition-case err
|
||||
(let (rout)
|
||||
@ -342,7 +343,8 @@ simply inserts a newline."
|
||||
(setq ielm-result "Working buffer has been killed"
|
||||
ielm-error-type "IELM Error"
|
||||
ielm-wbuf (current-buffer))
|
||||
(if (ielm-is-whitespace (substring ielm-string ielm-pos))
|
||||
(if (ielm-is-whitespace-or-comment
|
||||
(substring ielm-string ielm-pos))
|
||||
;; To correctly handle the ielm-local variables *,
|
||||
;; ** and ***, we need a temporary buffer to be
|
||||
;; current at entry to the inner of the next two let
|
||||
|
Loading…
Reference in New Issue
Block a user