Skip to content

Instantly share code, notes, and snippets.

@Eskatrem
Last active August 29, 2015 14:02
Show Gist options
  • Save Eskatrem/5cb70ce244237f16675a to your computer and use it in GitHub Desktop.
Save Eskatrem/5cb70ce244237f16675a to your computer and use it in GitHub Desktop.
(defun get-back-char ()
(buffer-substring-no-properties (- (point) 6) (point)))
(defun del-backward ()
(interactive)
(let ((text-back (get-back-char)))
(do
(message "test")
(if (string= text-back "lambda")
(delete-backward-char 6)
(delete-backward-char 1)))))
(global-set-key [delete] 'del-backward)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment