From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: position on changing defaults? Date: Tue, 11 Mar 2008 00:29:18 +0200 Organization: JURTA Message-ID: <87abl6nrtt.fsf@jurta.org> References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <200803052230.m25MUORx001881@sallyv1.ics.uci.edu> <200803070407.m27471TG016558@sallyv1.ics.uci.edu> <87skz03otb.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205189426 30971 80.91.229.12 (10 Mar 2008 22:50:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 22:50:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 23:50:53 2008 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 1JYqpQ-0006rf-6F for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 23:50:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYqor-0004MN-TR for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 18:50:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYqnB-0003JE-R4 for emacs-devel@gnu.org; Mon, 10 Mar 2008 18:48:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYqnA-0003Hb-8o for emacs-devel@gnu.org; Mon, 10 Mar 2008 18:48:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYqn9-0003HQ-Qk for emacs-devel@gnu.org; Mon, 10 Mar 2008 18:48:23 -0400 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JYqn5-00089Q-QT; Mon, 10 Mar 2008 18:48:20 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JYqn2-0003cv-Cz; Tue, 11 Mar 2008 00:48:18 +0200 In-Reply-To: (Richard Stallman's message of "Sun, 09 Mar 2008 12:39:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: eacc24c597fa83a26e5f02f00d1ff66c X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2377 [Mar 10 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) 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:92102 Archived-At: > 1. After typing C-x b: each M-n (or down-arrow) key will put the > next buffer name to the minibuffer, starting with the most recent > buffer and going in the order buffers are stored in the buffer list. > > That sounds nice -- and hurts nothing. Below is a patch this implements the same to the small letter "b" in the interactive specification. It keeps the original logic of processing of "B" and "b", and doesn't skip the current buffer in the buffer list for "b" if not in the minibuffer. Index: src/callint.c =================================================================== RCS file: /sources/emacs/emacs/src/callint.c,v retrieving revision 1.161 diff -c -r1.161 callint.c *** src/callint.c 19 Feb 2008 04:03:01 -0000 1.161 --- src/callint.c 10 Mar 2008 22:27:46 -0000 *************** *** 513,528 **** break; case 'b': /* Name of existing buffer */ - args[i] = Fcurrent_buffer (); - if (EQ (selected_window, minibuf_window)) - args[i] = Fother_buffer (args[i], Qnil, Qnil); - args[i] = Fread_buffer (callint_message, args[i], Qt); - break; - case 'B': /* Name of buffer, possibly nonexistent */ ! args[i] = Fread_buffer (callint_message, ! Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), ! Qnil); break; case 'c': /* Character */ --- 517,551 ---- break; case 'b': /* Name of existing buffer */ case 'B': /* Name of buffer, possibly nonexistent */ ! { ! Lisp_Object tema, temb, temc; ! int skip_current = 1; ! ! if (*tem == 'b' && !EQ (selected_window, minibuf_window)) ! skip_current = 0; ! ! /* Get a list of buffer names (except the current buffer and ! internal buffers), and use this list for default values. */ ! tema = Qnil; ! temc = Fcurrent_buffer (); ! teml = Fbuffer_list (selected_frame); ! for (; CONSP (teml); teml = XCDR (teml)) ! { ! temb = XCAR (teml); ! if (skip_current && EQ (temb, temc)) ! continue; ! if (NILP (temb)) ! continue; ! if (NILP (XBUFFER (temb)->name)) ! continue; ! if (SREF (XBUFFER (temb)->name, 0) == ' ') ! continue; ! tema = Fcons (XBUFFER (temb)->name, tema); ! } ! args[i] = Fread_buffer (callint_message, Fnreverse (tema), ! *tem == 'b' ? Qt : Qnil); ! } break; case 'c': /* Character */ -- Juri Linkov http://www.jurta.org/emacs/