[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ielm.el,v
From: |
Bastien Guerry |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ielm.el,v |
Date: |
Fri, 15 Feb 2008 16:32:39 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Bastien Guerry <bastien1> 08/02/15 16:32:39
Index: ielm.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ielm.el,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- ielm.el 8 Jan 2008 20:44:50 -0000 1.58
+++ ielm.el 15 Feb 2008 16:32:39 -0000 1.59
@@ -300,9 +300,10 @@
;;; 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 @@
(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 @@
(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
- [Emacs-diffs] Changes to emacs/lisp/ielm.el,v,
Bastien Guerry <=