summaryrefslogtreecommitdiff
path: root/lisp/indent.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-24 16:26:31 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-24 16:26:31 +0000
commit7396630fee46138b27281ef4bb79871883bf0ffb (patch)
tree9fd4512b22e6124440df8bae9817d9088ab7e959 /lisp/indent.el
parent9646572df4614bf0ca3d0cc3a12c67afe3388b8b (diff)
downloademacs-7396630fee46138b27281ef4bb79871883bf0ffb.tar.gz
(indent-relative, insert-tab):
Don't call expand-abbrev unless preceding character is a word char.
Diffstat (limited to 'lisp/indent.el')
-rw-r--r--lisp/indent.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/indent.el b/lisp/indent.el
index 6639f4b2100..69e282b5d84 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -56,7 +56,8 @@
(defun insert-tab (&optional prefix-arg)
(let ((count (prefix-numeric-value prefix-arg)))
- (if abbrev-mode
+ (if (and abbrev-mode
+ (eq (char-syntax (preceding-char)) ?w))
(expand-abbrev))
(if indent-tabs-mode
(insert-char ?\t count)
@@ -338,7 +339,9 @@ An indent point is a non-whitespace character following whitespace.
If the previous nonblank line has no indent points beyond the
column point starts at, `tab-to-tab-stop' is done instead."
(interactive "P")
- (if abbrev-mode (expand-abbrev))
+ (if (and abbrev-mode
+ (eq (char-syntax (preceding-char)) ?w))
+ (expand-abbrev))
(let ((start-column (current-column))
indent)
(save-excursion