(or emacs irrelevant)

Easy helm improvement

When you press DEL (also known as backspace) in a helm buffer, and there isn't any input to delete, it only errors at you with:

Text is read only

Why not make it do something useful instead, for instance close helm?


(require 'helm)
(defun helm-backspace ()
  "Forward to `backward-delete-char'.
On error (read-only), quit without selecting."
  (condition-case nil
      (backward-delete-char 1)

(define-key helm-map (kbd "DEL") 'helm-backspace)