aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2007-10-31 15:47:02 +0000
committerStefan Monnier <[email protected]>2007-10-31 15:47:02 +0000
commit2b86bfb1fd50af27d41aff1034df08be2cdf82b1 (patch)
treedddf6866dfd8e878ab45639564dce68ec999c7af
parent26e966803ca07cf77406ff6a568649ac5c670bb4 (diff)
(abbrev-symbol): Correct let->let*.
(abbrev--before-point): Only use abbrev-start-location if before point.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/abbrev.el11
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c7d1b83412..cb936a3265 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-31 Stefan Monnier <[email protected]>
+
+ * abbrev.el (abbrev-symbol): Correct let->let*.
+ (abbrev--before-point): Only use abbrev-start-location if before point.
+
2007-10-31 Juanma Barranquero <[email protected]>
* strokes.el (strokes-alphabetic-lessp): Simplify. Doc fix.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 04b8a8ce97..87a31df811 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -649,8 +649,8 @@ The default is to try buffer's mode-specific abbrev table, then global table."
(let ((tables (abbrev--active-tables table))
sym)
(while (and tables (not (symbol-value sym)))
- (let ((table (pop tables))
- (case-fold (not (abbrev-table-get table :case-fixed))))
+ (let* ((table (pop tables))
+ (case-fold (not (abbrev-table-get table :case-fixed))))
(setq tables (append (abbrev-table-get table :parents) tables))
;; In case the table doesn't set :case-fixed but some of the
;; abbrevs do, we have to be careful.
@@ -693,9 +693,10 @@ then ABBREV is looked up in that table only."
(delete-region start (1+ start)))
(skip-syntax-backward " ")
(setq end (point))
- (setq name (buffer-substring start end))
- (goto-char pos) ; Restore point.
- (list (abbrev-symbol name tables) name start end))
+ (when (> end start)
+ (setq name (buffer-substring start end))
+ (goto-char pos) ; Restore point.
+ (list (abbrev-symbol name tables) name start end)))
(while (and tables (not (car res)))
(let* ((table (pop tables))