+2007-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * abbrev.el (expand-abbrev): Move point back to expansion's end.
+
2007-11-04 Glenn Morris <rgm@gnu.org>
* net/tls.el: Don't require rx when compiling.
2007-11-03 Michael Olson <mwolson@gnu.org>
- * textmodes/remember.el (remember-buffer): Use
- define-obsolete-function-alias rather than defalias.
+ * textmodes/remember.el (remember-buffer):
+ Use define-obsolete-function-alias rather than defalias.
2007-11-03 Ulrich Mueller <ulm@gentoo.org> (tiny change)
uncomment-region-function and comment-insert-comment-function.
(fortran-uncomment-region): New function.
- * textmodes/nroff-mode.el (nroff-mode): Set
- comment-insert-comment-function rather than indent-line-function.
+ * textmodes/nroff-mode.el (nroff-mode):
+ Set comment-insert-comment-function rather than indent-line-function.
(nroff-indent-line-function): Remove.
(nroff-insert-comment-function): New function.
;; If this abbrev has an expansion, delete the abbrev
;; and insert the expansion.
(when (stringp (symbol-value sym))
- (goto-char wordend)
+ (goto-char wordstart)
+ ;; Insert at beginning so that markers at the end (e.g. point)
+ ;; are preserved.
(insert (symbol-value sym))
- (delete-region wordstart wordend)
+ (delete-char (- wordend wordstart))
(let ((case-fold-search nil))
;; If the abbrev's name is different from the buffer text (the
;; only difference should be capitalization), then we may want
(goto-char wordstart)
(skip-syntax-forward "^w" (1- end))
;; Change just that.
- (upcase-initials-region (point) (1+ (point))))))))
+ (upcase-initials-region (point) (1+ (point)))
+ (goto-char end))))))
+ ;; Now point is at the end of the expansion and the beginning is
+ ;; in last-abbrev-location.
(when (symbol-function sym)
(let* ((hook (symbol-function sym))
(expanded