Skip to content

Instantly share code, notes, and snippets.

@kawaguchi
Created October 23, 2009 02:56
Show Gist options
  • Save kawaguchi/216599 to your computer and use it in GitHub Desktop.
Save kawaguchi/216599 to your computer and use it in GitHub Desktop.
(defadvice delete-backward-char
(around stop-when-beginning-of-line (n &optional killflag) activate)
"前の行まで削除しない"
(unless (equal (point) (point-at-bol))
ad-do-it))
(defadvice delete-char
(around stop-when-end-of-line (n &optional killflag) activate)
"次の行まで削除しない"
(unless (equal (point) (point-at-eol))
ad-do-it))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment