all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: Martin Pohlack <mp26@os.inf.tu-dresden.de>,
	rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Fwd: Patch for sgml-mode.el
Date: Thu, 29 Nov 2007 23:46:57 -0500	[thread overview]
Message-ID: <jwvwss02vdc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <0o4pfcvird.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 23 Nov 2007 14:55:50 -0500")

>>>>> "GM" == Glenn Morris <rgm@gnu.org> writes:

> Stefan Monnier wrote:
>>> Furthermore, it results in "mode-name" not being a string
>>> for html buffers.
>> 
>> I don't see a problem with that.  It's obviously been done on purpose.
>> Please describe where it causes a problem so we can fix that spot.

> I have being meaning to post about this.

> See for example

> http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg00891.html

>   From:   h1t
>   Subject:    Bug in ibuffer-mark-by-mode-regexp function
>   Date:       Wed, 14 Nov 2007 10:27:04 +0200

> A quick grep for mode-name in lisp/ appears to show several places
> that assume it is a string. It's documented as being a string, so I
> would think at the very least should be a NEWS entry saying it might
> not be any more.

Does the patch below fix those problems?


        Stefan


Index: lisp/ibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.88
diff -u -r1.88 ibuffer.el
--- lisp/ibuffer.el	19 Nov 2007 08:50:03 -0000	1.88
+++ lisp/ibuffer.el	30 Nov 2007 04:46:25 -0000
@@ -1722,7 +1722,7 @@
    ('mouse-face 'highlight
 		'keymap ibuffer-mode-name-map
 		'help-echo "mouse-2: filter by this mode"))
-  (format "%s" mode-name))
+  (format-mode-line mode-name))
 
 (define-ibuffer-column process
   (:summarizer
Index: lisp/ibuf-ext.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ibuf-ext.el,v
retrieving revision 1.59
diff -u -r1.59 ibuf-ext.el
--- lisp/ibuf-ext.el	23 Oct 2007 15:54:06 -0000	1.59
+++ lisp/ibuf-ext.el	30 Nov 2007 04:46:25 -0000
@@ -1134,11 +1134,11 @@
   (string-lessp (downcase
 		  (with-current-buffer
 		      (car a)
-		    mode-name))
+		    (format-mode-line mode-name)))
 		(downcase
 		 (with-current-buffer
 		     (car b)
-		   mode-name))))
+		   (format-mode-line mode-name)))))
 
 ;;;###autoload (autoload 'ibuffer-do-sort-by-alphabetic "ibuf-ext")
 (define-ibuffer-sorter alphabetic
@@ -1386,7 +1386,7 @@
   (ibuffer-mark-on-buffer
    #'(lambda (buf)
        (with-current-buffer buf
-	 (string-match regexp mode-name)))))
+	 (string-match regexp (format-mode-line mode-name))))))
 
 ;;;###autoload
 (defun ibuffer-mark-by-file-name-regexp (regexp)

  reply	other threads:[~2007-11-30  4:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23  4:36 [mp26@os.inf.tu-dresden.de: Patch for sgml-mode.el] Richard Stallman
2007-11-23 15:02 ` Fwd: Patch for sgml-mode.el Stefan Monnier
2007-11-23 15:26   ` Martin Pohlack
2007-11-23 16:26     ` Stefan Monnier
2007-11-23 19:55   ` Glenn Morris
2007-11-30  4:46     ` Stefan Monnier [this message]
2007-11-30 20:58       ` Glenn Morris
2007-12-01  3:16         ` Stefan Monnier
2007-12-02 21:59           ` Glenn Morris
2007-12-01  4:07         ` Stefan Monnier

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=jwvwss02vdc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=mp26@os.inf.tu-dresden.de \
    --cc=rgm@gnu.org \
    --cc=rms@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.