Paste number 40040: delete-word

Paste number 40040: delete-word
Pasted by: hroptatyr
When:4 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+UW8
Channel:#XEmacs
Paste contents:
Raw Source | XML | Display As
;; current SXEmacs implementation

(defun delete-word (&optional count)
  "Delete characters forward until encountering the end of a word.
With optional argument COUNT, do this that many times."
  (interactive "*p")
  (delete-region (point) (save-excursion (forward-word count) (point))))

(defun backward-delete-word (&optional count)
  "Delete characters backward until encountering the end of a word.
With argument, do this that many times."
  (interactive "*p")
  (delete-word (- (or count 1))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.