all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: TheLonelyStar <nabble@lonely-star.org>
To: Help-gnu-emacs@gnu.org
Subject: Custom backspace delete in mini-buffer
Date: Thu, 7 Aug 2008 16:14:51 -0700 (PDT)	[thread overview]
Message-ID: <18881785.post@talk.nabble.com> (raw)


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.





             reply	other threads:[~2008-08-07 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 23:14 TheLonelyStar [this message]
2008-08-07 23:33 ` Custom backspace delete in mini-buffer Drew Adams
2008-08-08  0:10   ` Lennart Borgman (gmail)
2008-08-08  8:22     ` TheLonelyStar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18881785.post@talk.nabble.com \
    --to=nabble@lonely-star.org \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.