Function: edt-one-word-forward

edt-one-word-forward is an interactive and byte-compiled function defined in edt.el.gz.

Signature

(edt-one-word-forward)

Documentation

Move forward to first character of next word.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
;;;
;;; WORD
;;;
;; This one is a tad messy.  To emulate EDT's behavior everywhere in
;; the file (beginning of file, end of file, beginning of line, end
;; of line, etc.) it takes a bit of special handling.
;;
;; The variable edt-word-entities contains a list of characters which
;; are to be viewed as distinct words wherever they appear in the
;; buffer.  This emulates the EDT line mode command SET ENTITY WORD.


(defun edt-one-word-forward ()
  "Move forward to first character of next word."
  (interactive)
  (if (eobp)
      (error "End of buffer"))
  (if (eolp)
      (forward-char)
    (progn
      (if (memq (following-char) edt-word-entities)
	  (forward-char)
	(while (and
		(not (eolp))
		(not (eobp))
		(not (eq ?\  (char-syntax (following-char))))
		(not (memq (following-char) edt-word-entities)))
	  (forward-char)))
      (while (and
	      (not (eolp))
	      (not (eobp))
	      (eq ?\  (char-syntax (following-char)))
	      (not (memq (following-char) edt-word-entities)))
	(forward-char)))))