GNU bug report logs - #1319
Change in where-is-internal causing describe-key problems

Previous Next

Package: emacs;

Reported by: "Geoff Gole" <geoffgole <at> gmail.com>

Date: Sun, 9 Nov 2008 03:30:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Geoff Gole <geoffgole <at> gmail.com>, 1319 <at> debbugs.gnu.org
Subject: bug#1319: Change in where-is-internal causing describe-key problems
Date: Wed, 12 Nov 2008 19:32:26 +0100
>>> 22.2  => ([491520] [458752] [442368] [425984] [409600]...)
>>> CVS   => ([(128 . 4194303)])
>
> The 22.2 answer lists generic chars (these are chars that stand for
> a whole charset).  In Emacs-23, generic chars have been dropped in favor
> of using char-ranges, represented a a cons cell (START . END).

This would deserve a NEWS entry.

Anyway, we can either replace

	  (if (and (eq function 'self-insert-command)
		   (eq (key-binding "a") 'self-insert-command)
		   (eq (key-binding "b") 'self-insert-command)
		   (eq (key-binding "c") 'self-insert-command))
	      (princ "It is bound to many ordinary text characters.\n")
	    ...

by something like

	  (if (and (eq function 'self-insert-command)
		   (catch 'plenty
		     (let ((count 0))
		       (dolist (item (where-is-internal 'self-insert-command))
			 (when (vectorp item)
			   (let ((range (elt item 0)))
			     (when (consp range)
			       (setq count (+ count (- (cdr range) (car range))))
			       (when (> count 100)
				 (throw 'plenty count)))))))))
	      (princ "It is bound to many ordinary text characters.\n")
	    ...
	
or drop that "It is bound to many ordinary text characters" stuff.

martin, who'd drop it unless someone finds a better solution.





This bug report was last modified 16 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.