GNU bug report logs - #25188
Initialization of `global-edebug-map' is not safe

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Alexander Shukaev <emacs@HIDDEN>; Keywords: easy; dated Mon, 12 Dec 2016 23:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) easy. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Dec 2016 23:45:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 12 18:45:25 2016
Received: from localhost ([127.0.0.1]:39742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cGaHd-0006sn-2p
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 18:45:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:35671)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <emacs@HIDDEN>) id 1cGaHc-0006sb-61
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 18:45:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGaHW-0002oM-5k
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 18:45:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40599)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <emacs@HIDDEN>)
 id 1cGaHW-0002oA-2h
 for submit <at> debbugs.gnu.org; Mon, 12 Dec 2016 18:45:18 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54860)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGaHU-0005jo-T4
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 18:45:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1cGaHQ-0002n1-Uh
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 18:45:16 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50652)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <emacs@HIDDEN>)
 id 1cGaHQ-0002mY-OY
 for bug-gnu-emacs@HIDDEN; Mon, 12 Dec 2016 18:45:12 -0500
Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129])
 by relay8-d.mail.gandi.net (Postfix) with ESMTP id 2865340496
 for <bug-gnu-emacs@HIDDEN>; Tue, 13 Dec 2016 00:45:10 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net
Received: from relay8-d.mail.gandi.net ([217.70.183.201])
 by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new,
 port 10024) with ESMTP id 4m63UJklSDLk for <bug-gnu-emacs@HIDDEN>;
 Tue, 13 Dec 2016 00:45:08 +0100 (CET)
X-Originating-IP: 88.68.181.111
Received: from [192.168.3.110]
 (dslb-088-068-181-111.088.068.pools.vodafone-ip.de [88.68.181.111])
 (Authenticated sender: forum@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 6FD3C40406
 for <bug-gnu-emacs@HIDDEN>; Tue, 13 Dec 2016 00:45:08 +0100 (CET)
To: bug-gnu-emacs@HIDDEN
From: Alexander Shukaev <emacs@HIDDEN>
Subject: Initialization of `global-edebug-map' is not safe
Message-ID: <4f637d8d-29c0-d6cb-6e7e-824bdb173601@HIDDEN>
Date: Tue, 13 Dec 2016 00:45:07 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Hi,

first of all, in 'edebug.el', the

;; If you wish to change the default edebug global command prefix, change:
;; (setq edebug-global-prefix "\C-xX")

is invalid because the name of the variable is actually 
`global-edebug-prefix'.  But that's just a minor point.

Consider

(defvar global-edebug-map
   (let ((map (make-sparse-keymap)))

     (define-key map " " 'edebug-step-mode)
     (define-key map "g" 'edebug-go-mode)
     (define-key map "G" 'edebug-Go-nonstop-mode)
     (define-key map "t" 'edebug-trace-mode)
     (define-key map "T" 'edebug-Trace-fast-mode)
     (define-key map "c" 'edebug-continue-mode)
     (define-key map "C" 'edebug-Continue-fast-mode)

     ;; breakpoints
     (define-key map "b" 'edebug-set-breakpoint)
     (define-key map "u" 'edebug-unset-breakpoint)
     (define-key map "x" 'edebug-set-conditional-breakpoint)
     (define-key map "X" 'edebug-set-global-break-condition)

     ;; views
     (define-key map "w" 'edebug-where)
     (define-key map "W" 'edebug-toggle-save-windows)

     ;; quitting
     (define-key map "q" 'top-level)
     (define-key map "Q" 'edebug-top-level-nonstop)
     (define-key map "a" 'abort-recursive-edit)

     ;; statistics
     (define-key map "=" 'edebug-display-freq-count)
     map)
   "Global map of edebug commands, available from any buffer.")

(global-unset-key global-edebug-prefix)
(global-set-key global-edebug-prefix global-edebug-map)

and imagine that somebody has customized `global-map' in such a way that 
it has no "\C-x" prefix command at all.  Then of course the above code 
will fail.  Furthermore, if one does not want to pollute the 
`global-map' with `global-edebug-map', one cannot simply set 
`global-edebug-prefix' to nil because this would also fail.  I believe 
`global-edebug-map' should support the nil value which would mean that 
the above code is disabled completely.

Looking forward to fix.

Regards,
Alexander




Acknowledgement sent to Alexander Shukaev <emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25188; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 12 Jun 2017 00:45:01 UTC

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