From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: feature request: indicator of minibuffer-recursion depth Date: Fri, 15 Jun 2007 21:47:16 +0200 Message-ID: References: <87sl8t4208.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181936853 29433 80.91.229.12 (15 Jun 2007 19:47:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2007 19:47:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 15 21:47:31 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HzHla-0005h7-Nv for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 21:47:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzHlZ-0002tV-VN for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 15:47:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HzHlW-0002tQ-KM for emacs-devel@gnu.org; Fri, 15 Jun 2007 15:47:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HzHlS-0002t3-Hq for emacs-devel@gnu.org; Fri, 15 Jun 2007 15:47:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzHlS-0002t0-8Y for emacs-devel@gnu.org; Fri, 15 Jun 2007 15:47:22 -0400 Original-Received: from wx-out-0506.google.com ([66.249.82.231]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HzHlR-0007vN-Pk for emacs-devel@gnu.org; Fri, 15 Jun 2007 15:47:21 -0400 Original-Received: by wx-out-0506.google.com with SMTP id h26so1111489wxd for ; Fri, 15 Jun 2007 12:47:21 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EuLFQ0TTAVArMBQn+deeOWNb+Swx9dQY5KOoA2qsS15PnIrHvcjrurCno3QSg4XdddCQ7NeWM03iQYRHDnGRb+0Z7BGROPSvHX7x0KZK3pp64UjNevqM0vqFN78gN2APRBoDEf9AbbG7wQg0rwrM65dbMeFeTnCGWRMH9z7ruYc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RDkctLP2xEa1sjCOCNpGwGdgrX3XYvyx9DjfHXNqlM8YCuOcu70Hf31Aoid+U8T/jiPb8CobHH6R1AA8+MY5h3oZyPdE5W6oEAmIVLyYc8evPg5YP56FGt4UQ+3pDYSi0BW7XEm52Yd7n1OMOTtj0ypRARbdyx/PXA4tLXUe/bQ= Original-Received: by 10.90.79.6 with SMTP id c6mr3121717agb.1181936841126; Fri, 15 Jun 2007 12:47:21 -0700 (PDT) Original-Received: by 10.90.87.8 with HTTP; Fri, 15 Jun 2007 12:47:16 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73001 Archived-At: On 6/15/07, Drew Adams wrote: > I would also ask that the face used for the overlay be customizable - that > is, use a face variable that defaults to `highlight', or add a new face for > this. Something like the following patch? I'd like to make `minibuffer-depth-indicator' a defcustom, but I don't see a way to allow propertizing it (other than adding a second variable, ugh). Juanma Index: lisp/mb-depth.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/mb-depth.el,v retrieving revision 1.1 diff -u -2 -r1.1 mb-depth.el --- lisp/mb-depth.el 15 Jun 2007 14:36:17 -0000 1.1 +++ lisp/mb-depth.el 15 Jun 2007 19:38:36 -0000 @@ -39,4 +39,9 @@ (make-variable-buffer-local 'minibuf-depth-overlay) +(defvar minibuffer-depth-indicator (propertize "[%d]" 'face 'highlight) + "A string used to indicate minibuffer depths greater than one. +It is passed to `format', along with the minibuffer depth, and the +resulting string added before the minibuffer prompt.") + ;; This function goes on minibuffer-setup-hook (defun minibuf-depth-setup-minibuffer () @@ -46,6 +51,5 @@ (setq minibuf-depth-overlay (make-overlay (point-min) (1+ (point-min)))) (overlay-put minibuf-depth-overlay 'before-string - (propertize (format "[%d]" (minibuffer-depth)) - 'face 'highlight)) + (format minibuffer-depth-indicator (minibuffer-depth))) (overlay-put minibuf-depth-overlay 'evaporate t))) @@ -53,7 +57,8 @@ (define-minor-mode minibuffer-indicate-depth-mode "Toggle Minibuffer Indicate Depth mode. -When active, any recursive use of the minibuffer will show -the recursion depth in the minibuffer prompt. This is only -useful if `enable-recursive-minibuffers' is non-nil. +When active, any recursive use of the minibuffer will show the +recursion depth in the minibuffer prompt by means of +`minibuffer-depth-indicator' (which see). +This is only useful if `enable-recursive-minibuffers' is non-nil. With prefix argument ARG, turn on if positive, otherwise off.