From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Understanding the cause of a bug causing *all* bindings to be wiped out Date: Mon, 11 Jul 2016 15:52:29 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141bd14550c5f05375e242c X-Trace: ger.gmane.org 1468252415 5402 80.91.229.3 (11 Jul 2016 15:53:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2016 15:53:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 11 17:53:20 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMdWG-0003NY-Fd for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2016 17:53:16 +0200 Original-Received: from localhost ([::1]:34380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMdWF-0008PX-Qg for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2016 11:53:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMdVh-0008PO-HE for emacs-devel@gnu.org; Mon, 11 Jul 2016 11:52:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMdVg-0006UB-DA for emacs-devel@gnu.org; Mon, 11 Jul 2016 11:52:41 -0400 Original-Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:33157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMdVg-0006U5-63 for emacs-devel@gnu.org; Mon, 11 Jul 2016 11:52:40 -0400 Original-Received: by mail-oi0-x236.google.com with SMTP id u201so153426070oie.0 for ; Mon, 11 Jul 2016 08:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C64en85fw0fibLDciSPrSueZDZtXLv2oZc6MW9Zv8oc=; b=iEaoNnxNUeoinSf88eLayZKh68/iXdz0uVXTZDgqZfiAqmEh5nHMA0Iglp3uKs6F6k yj6a9m96N7FE4MSsKwOxRiIsfZbPGoVPoULvS4Py+MbL53ZdC6Iu18gKWoKPbLbzmXJ8 J/xfxXH2tQyVvzVhM+6bdZLgkyAaEVf2UjFVP7vcC6f1b9HOGz9zyK7xUVxSFVK4xPDC GtJLiRLKZTNmwUymhuaQHxBi4N5Pve24rA3NvcIQMcoIcOWDO0b1ftARHNFRGDiUGwzP onAbpussWwGvjsGv+W/qv7Zks62C1jEg834H97Yzu4iS4SiQFc72R8GGPS8npiovvPEJ x29A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C64en85fw0fibLDciSPrSueZDZtXLv2oZc6MW9Zv8oc=; b=a85jNXiMGPtmCezYBrsfhDbNrosNfTpaNezwLEAxHoLvxqu5yzBiD9uDXLDkniwXJo z29GPMTgR0d8VY1NLx9cpSx2oPz/zOQJ0qcFRmSouLkfS1BNkjFlfoIynBDLZg/iZ+CZ WQEJNKxenkoacEkKo+QHvjQX8ZdUaEMOzwQKlSGZqGT+p72CCc5kwStUfWeYw9wITHij I5NqgmgWFm0/ROYZq1KsGOy9zBKzsmGTWJn/Gf7UC/0b0fw2ahS3wZbjyCkxaYz86nHe 9suJB2zH4p55yV+kH0fHUqTqpmLmfYFrMym7Y5/o9udsTT6Yxh3wCsyKRiw8TEkYPST5 Rpnw== X-Gm-Message-State: ALyK8tL4Ip+LNvfbXtvqnVehgojD+V7Z9ZfrVf2FZ/fuzyNIvmVdTGDk1esY2UYMWsdW6UomP3zK1YuOWJGodA== X-Received: by 10.202.106.194 with SMTP id f185mr10693672oic.50.1468252359557; Mon, 11 Jul 2016 08:52:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205552 Archived-At: --001a1141bd14550c5f05375e242c Content-Type: text/plain; charset=UTF-8 I am using the emacs master build version (25.1.50.x). Here is how I set my minor mode map: ===== (defvar modi-mode-special-map (make-sparse-keymap) "Special keymap for `modi-mode' whose bindings begin with `modi-special-keymap-prefix'.") (fset 'modi-mode-special-map modi-mode-special-map) (defvar modi-mode-map (let ((map (make-sparse-keymap))) (define-key map modi-special-keymap-prefix 'modi-mode-special-map) map) "Keymap for `modi-mode'.") ;; The keymaps in `emulation-mode-map-alists' take precedence over ;; `minor-mode-map-alist' (add-to-list 'emulation-mode-map-alists `((modi-mode . ,modi-mode-map))) ===== Also there was a typo in my previous email: I meant: ===== The strange thing is that (string-match "." nil) ; *not* (string-match-p ..) generates proper backtrace as expected .. ===== On Mon, Jul 11, 2016 at 11:28 AM Stefan Monnier wrote: > The overriding-local-map if non-nil disables all other maps. > And in Emacs<24.4, the same holds for overriding-terminal-local-map. > > Could it be you're using a package written for Emacs>=24.4 which sets > a sparse keymap in overriding-terminal-local-map to just override a few > key bindings, but you use it with Emacs<24.4 where that ends up > disabling all other bindings? -- -- Kaushal Modi --001a1141bd14550c5f05375e242c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am using the emacs master build version (25.1.50.x).
Here is how I set my minor mode map:

=3D=3D=3D=3D=3D
(defvar modi-mode-special-map (make-spars= e-keymap)
=C2=A0 "Special keymap for `modi-mode' whose b= indings begin with
`modi-special-keymap-prefix'.")
=
(fset 'modi-mode-special-map modi-mode-special-map)

=
(defvar modi-mode-map (let ((map (make-sparse-keymap)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (define-key map modi-special-keymap-prefix 'modi-mode-specia= l-map)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 map)
=C2=A0 "Keymap for `modi-mo= de'.")

;;= The keymaps in `emulation-mode-map-alists' take precedence over=
;; `minor-mode-map-alist'
(add-to-list 'em= ulation-mode-map-alists `((modi-mode . ,modi-mode-map)))
=3D=3D= =3D=3D=3D

Also there was a typo in my previous email:

I meant:

=3D=3D=3D=3D=3D
The strange thing is that= =C2=A0

(string-match "." nil) ; *not*=C2= =A0(string-match-p ..)

generates proper backtrace as expected ..
=3D=3D=3D=3D=3D=C2=A0

On= Mon, Jul 11, 2016 at 11:28 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote= :
The overriding-local-map if non-n= il disables all other maps.
And in Emacs<24.4, the same holds for overriding-terminal-local-map.

Could it be you're using a package written for Emacs>=3D24.4 which s= ets
a sparse keymap in overriding-terminal-local-map to just override a few
key bindings, but you use it with Emacs<24.4 where that ends up
disabling all other bindings?
--

-- Kaushal Modi

--001a1141bd14550c5f05375e242c--