help delete-to-word
Posted: Mon Dec 14, 2009 3:56 am
if current at point is [ \t\r\n] (re-search-forward "[ \t\r\n]+" nil t)
otherwise (kill-word)
(defun delete-to-word ()
(interactive)
(setq myChar (thing-at-point 'char))
(if (string-match "[ \t\r\n]" myChar)
(progn
(re-search-forward "[ \t\r\n]+" nil t)
(replace-match "" nil nil))
(kill-word))
)
if: Wrong number of arguments: #[(arg) "Ã`^Hv\210`\"\207" [arg kill-region] 3 2119065 "p"], 0
otherwise (kill-word)
(defun delete-to-word ()
(interactive)
(setq myChar (thing-at-point 'char))
(if (string-match "[ \t\r\n]" myChar)
(progn
(re-search-forward "[ \t\r\n]+" nil t)
(replace-match "" nil nil))
(kill-word))
)
if: Wrong number of arguments: #[(arg) "Ã`^Hv\210`\"\207" [arg kill-region] 3 2119065 "p"], 0