I have defined a custom backspace delete function:
(defun delete-with-closing-bracket-back (arg)
(interactive "*p")
;;Check if point is not the minimum
(if (not (= (point) (point-min)))
(progn
(backward-char)
(if
(looking-at "\\({[\n \t]*}\\|\\[[\n \t]*\\]\\|\([\n \t]*\)\\|\"[\n
\t]*\"\\)")
(delete-region (match-beginning 0) (match-end 0))
;;else
(forward-char)
(c-hungry-delete-backwards)
))
;;else
(delete-backward-char 1)
))
(define-key global-map [(backspace)] 'delete-with-closing-bracket-back)
It works fine, but there is a problem. When I am in i-search mode, pressing
backspace deletes the last character in the window, not in the i-search
mini-buffer.
I do not know much about elisp. The function above I just "stole" together.
What can I do?
Thanks!
Nathan
--
View this message in context: http://www.nabble.com/Custom-backspace-delete-in-mini-buffer-tp18881785p18881785.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
I don't have time to look at this now - hopefully someone else will help you.
But here's one piece of info that might help a little: isearch does not use the
minibuffer (for normal searching); it uses the echo area. It reads your input
events without using the minibuffer, and it echoes your keys to the echo area in
an incremental way.
I am not sure and I have no idea why it should be needed, but try this
(define-key isearch-mode-map [backspace] 'isearch-delete-char)
Well, it works! Thanks!
--
View this message in context: http://www.nabble.com/Custom-backspace-delete-in-mini-buffer-tp18881785p18887783.html