unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#835: 23.0.60; Quick calc is quietly disabled in view-mode
@ 2008-09-01 18:53 Chong Yidong
  2008-09-01 21:08 ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2008-09-01 18:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: 835

martin rudalics <rudalics@gmx.at> wrote:

> Any objections against the attached patch?

*** calc/calc.el.~1.115.~       2008-08-23 09:41:44.515625000 +0200
--- calc/calc.el                2008-09-01 19:43:05.515625000 +0200
***************
*** 1097,1105 ****
    (let ((map (make-keymap)))
      (mapc (lambda (x)
              (define-key map (char-to-string (car x)) (cdr x))
!             (when (string-match "abcdefhijklnopqrstuwxyz"
                                  (char-to-string (car x)))
!               (define-key map (char-to-string (- (car x) ?a -1)) (cdr
x)))
              (define-key map (format "\e%c" (car x)) (cdr x)))
            '( ( ?a . calc-embedded-activate )
               ( ?b . calc-big-or-small )
--- 1097,1105 ----
    (let ((map (make-keymap)))
      (mapc (lambda (x)
              (define-key map (char-to-string (car x)) (cdr x))
!             (when (string-match "[abcdefhijklnopqrstuwxyz]"
                                  (char-to-string (car x)))
!               (define-key map (upcase (char-to-string (car x))) (cdr
x)))
              (define-key map (format "\e%c" (car x)) (cdr x)))
            '( ( ?a . calc-embedded-activate )
               ( ?b . calc-big-or-small )

Indeed, the argument to string-match in the original code looks like a
typo (fixed by the first line of the patch).

The second part of the patch is not clear to me.  What the original code
does is the following: for a character such as "n", it adds "C-n" to the
keymap as well (it's a hack that relies on the specific properties of
the ASCII table, and needs at least a comment).  That's not what the
patched code does: it adds "N" to the keymap.  Martin, what's the reason
for this change?






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-09-03  0:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87sksi5b7l.fsf@cyd.mit.edu>
2008-08-31  9:08 ` bug#835: 23.0.60; Quick calc is quietly disabled in view-mode Markus Triska
2008-08-31 10:48   ` martin rudalics
2008-09-01 17:47     ` martin rudalics
2008-09-03  0:30   ` bug#835: marked as done (23.0.60; Quick calc is quietly disabled in view-mode) Emacs bug Tracking System
2008-09-01 18:53 bug#835: 23.0.60; Quick calc is quietly disabled in view-mode Chong Yidong
2008-09-01 21:08 ` martin rudalics
2008-09-01 21:50   ` Chong Yidong
2008-09-01 22:00     ` martin rudalics
2008-09-02  2:33       ` Jay Belanger
2008-09-02  9:02         ` martin rudalics

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).