unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 6830@debbugs.gnu.org
Subject: bug#6830: widget-complete bad completions in :type 'file
Date: Mon, 12 Mar 2012 01:36:41 -0700	[thread overview]
Message-ID: <4F5DB599.8050407@cs.ucla.edu> (raw)
In-Reply-To: <AANLkTikrQDBhzyLqTgofQba6i0WvxcrKLEiFwoZANAHb@mail.gmail.com>

That patch assumes that s1 != s2.  This assumption about qsort
is quite likely true on Windows but it's not guaranteed by
the C standard, and for portability it's better to play it safe
and stick with the pattern that's already in the code.
I installed this further patch:

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2012-03-12 06:34:32 +0000
+++ src/ChangeLog	2012-03-12 08:27:25 +0000
@@ -1,3 +1,7 @@
+2012-03-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
+
 2012-03-12  Chong Yidong  <cyd@gnu.org>
 
 	* eval.c (inhibit_lisp_code): Rename from

=== modified file 'src/buffer.c'
--- src/buffer.c	2012-03-09 16:46:25 +0000
+++ src/buffer.c	2012-03-12 08:27:25 +0000
@@ -2868,7 +2868,9 @@
      between "equal" overlays.  The result can still change between
      invocations of Emacs, but it won't change in the middle of
      `find_field' (bug#6830).  */
-  return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
+  if (XHASH (s1->overlay) != XHASH (s2->overlay))
+    return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1;
+  return 0;
 }
 
 /* Sort an array of overlays by priority.  The array is modified in place.






      parent reply	other threads:[~2012-03-12  8:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09 11:45 bug#6830: widget-complete bad completions in :type 'file Lennart Borgman
2010-09-04 17:48 ` Chong Yidong
2010-09-04 22:16   ` Lennart Borgman
2010-09-05  1:47     ` Chong Yidong
2012-02-22 21:33       ` Glenn Morris
2012-02-22 23:02         ` Drew Adams
2012-02-22 23:51           ` Drew Adams
2012-02-23  3:57           ` Glenn Morris
2012-02-23 15:27             ` Drew Adams
2012-02-24 19:38               ` Eli Zaretskii
2012-02-25 12:16                 ` Richard Stallman
2012-02-24 19:35         ` Eli Zaretskii
2012-02-24 19:47           ` Drew Adams
2012-02-25  3:30           ` Chong Yidong
2012-02-25  5:26             ` Stefan Monnier
2012-02-25  7:45               ` Eli Zaretskii
2012-02-25  6:54             ` Eli Zaretskii
2012-03-04  9:37               ` Chong Yidong
2012-03-04 17:06                 ` Eli Zaretskii
2012-03-05  3:07                   ` Chong Yidong
2012-03-05 17:28                     ` Eli Zaretskii
2012-03-05 21:28                       ` Stefan Monnier
2012-03-06  3:50                         ` Eli Zaretskii
2012-03-06 20:45                           ` Stefan Monnier
2012-03-06 21:12                             ` Eli Zaretskii
2012-03-07 22:09                               ` Stefan Monnier
2012-03-09  9:14                                 ` Eli Zaretskii
2012-03-09 16:35                                   ` Stefan Monnier
2012-03-09 16:46                                   ` Stefan Monnier
2012-03-12  8:36 ` Paul Eggert [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4F5DB599.8050407@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=6830@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).