all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Custom backspace delete in mini-buffer
@ 2008-08-07 23:14 TheLonelyStar
  2008-08-07 23:33 ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: TheLonelyStar @ 2008-08-07 23:14 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi,

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-08  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 23:14 Custom backspace delete in mini-buffer TheLonelyStar
2008-08-07 23:33 ` Drew Adams
2008-08-08  0:10   ` Lennart Borgman (gmail)
2008-08-08  8:22     ` TheLonelyStar

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.