From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master c9cb59b 2/2: * etc/TODO: Entry about converting to defvar-keymap. Date: Sat, 11 Dec 2021 08:56:34 +0800 Message-ID: <87sfv03qnx.fsf@yahoo.com> References: <83ilvwsdxg.fsf@gnu.org> <875yrwo3hg.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6835"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: dick Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 11 01:57:36 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvqhj-0001dP-1U for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 01:57:35 +0100 Original-Received: from localhost ([::1]:51130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvqhg-000372-TF for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Dec 2021 19:57:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvqh0-0002Oy-PS for emacs-devel@gnu.org; Fri, 10 Dec 2021 19:56:51 -0500 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]:42607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvqgy-0005NG-23 for emacs-devel@gnu.org; Fri, 10 Dec 2021 19:56:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639184206; bh=H7xrnofdl66AZZ4Hqz2b3TU7x1Fe9eBQfhA5efUiXxk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=INnoO9uQ0EVOjhn0CF4RqgFBBEHCS+jbuYDafEXqMuVnFAb9AnDsEcn26XpmF8dwu91gSWdFqdUsTGIeztdAAh/4hRkSoVGyE9q9N01Oq5QOT8tFDpkV7GEpJsVp6qoInfmDPN4B6gWz3r+m7xh6DVMl2iaNrwZekRk7FtLV8x92BEvFh8K4c4unJmntiLPnM6Rad4Apt744ComBrJTknI6nOJaOnHBkaVupXXvgCEb/mKSX1hiJ+A1mK10EoQQ4IShStseB2eg/yFfooeAhYncfD4BYiCWBKqZpVqXSKAMglzAuMe4t8BxsRZF+UmkBND9YVgLXXa+kLX75qJ4LIA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639184206; bh=GfwB3rKxEyH4H1Wa5kucgnuC8cqGX9edArTIn9Oggbv=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ByeIN/odq+hHiL427zK+qmowLi29ZxWPwqnbPlJzOZ2GXchfYgUvgzsJn0+zVcA6L10+YP+IjoXN5movHS0kS8C0OuBKdlcryTFMAgni56pz6m9IV6fdBrmniwhngIRnEfVNzp7uTz6C7WYa2gUfYUdH9DeqLwwIhf1dsC/24OhXd5MXYjS1uaqT4O4SIqiFkLD40LZKnV0m4SLtDt7ZFDdESqNhKFa1ZJGVyRC73g+ylcE0cEhco87aIiHopilDQdn7LsNE4vvN+ZhATLkKaZO9cMjEgNGaKlBOeNvGqzTFzgsBfuotM5gfxOJI2fzE+5OKiHtE0oekDcB5MihUPg== X-YMail-OSG: 1U6sJhUVM1lxdh1rgOfH9SBYi1Ld_a0s6v3JpOye5DeG8wjNFhDYrA0r1vkTvwE QpZCfy54t.o8KXsz9MNQi0b63jv5Bi_hiN9qZti.Vv3xntcmk8vElJrKgxzVklbyBweARpi.a6TS Q1F1KB8YtTm.Hf9sFQvjxsu0V.0EWiA.swTKV_KWf2Wbo96IUq50BCqQT2xeS9X.1SSaRzBL9zvu 0vDoGPueyUmsh3hbeUzWuDXWLXvy.0CIFX02HsmeGER_NYBLcVQU_gG9t7Azr_5TBFZmHK97Q.ZN EX7M8wV9coqtmK4v3iq4NNqMCmGArAjLXByIv8kZagFZ2JecEAGZe1zh3SYh7KuuSsHAYoOhQ5LQ l8wUmgNU4M5uhSsZ3YRZs7MyuJpTqiKQs3KBjK9IJ.W702uZaSByg3HQXa.OQxnfMtLV3FCsYrAf SKt.DhAoQCuNIu9NhsX622c9QwmnbQ.kEWnGghUKPYFgXneT0iB1m5YsMitRCKoch8FWhsNg1aZO p1cZIOXId4jNTXJz6uBlJnYDbUnwlybSPnlFVHXLL6SZwZTju4X5eI84Fn0bZ1x2Tr4xH.K0amDn 1J_oYNPGbxVLRgPxqUmL9S9vRr1.ULN.SieV2EIPFd0btXdyntan1rUix3mkCqmhEaSqUCTO1no1 DuICZfrOc_kvd.z1RUgzULDc2F5F1pKvfk7i1hgJwGuiZljNtftCSIfxWeBv3gvHNlyyu1kXFUBL 7UgH14h2KNKuI5R2XvYo2Q0J3HU3GSbeY0GKOUS4aVApxnPVFyoUnEf_Md4tkFPqutQ82FTFuRaj yG2HeuaUmM7zOVn3F9b9eIzOhz5rDT4bPdcEn0c42S X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Sat, 11 Dec 2021 00:56:46 +0000 Original-Received: by kubenode508.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 75be1c741ac23fc62a268846886d24bf; Sat, 11 Dec 2021 00:56:39 +0000 (UTC) In-Reply-To: <875yrwo3hg.fsf@dick> (dick's message of "Fri, 10 Dec 2021 10:59:23 -0500") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.147; envelope-from=luangruo@yahoo.com; helo=sonic316-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281632 Archived-At: dick writes: > To most gatekeepers, spaghetti code is "perfectly fine" if no one > complains. And so long as the spaghetti is of their own making, let > newcomers to the code spin their tires trying to modify it. > Incomprehensibility is an excellent, natural defense. There is nothing spaghetti-like or "incomprehensible" about a traditional keymap definition, which looks something like this: (defvar xwidget-webkit-mode-map (let ((map (make-sparse-keymap))) (define-key map "g" 'xwidget-webkit-browse-url) (define-key map "a" 'xwidget-webkit-adjust-size-dispatch) (define-key map "b" 'xwidget-webkit-back) (define-key map "f" 'xwidget-webkit-forward) (define-key map "r" 'xwidget-webkit-reload) (define-key map "\C-m" 'xwidget-webkit-insert-string) (define-key map "w" 'xwidget-webkit-current-url) (define-key map "+" 'xwidget-webkit-zoom-in) (define-key map "-" 'xwidget-webkit-zoom-out) (define-key map "e" 'xwidget-webkit-edit-mode) (define-key map "\C-r" 'xwidget-webkit-isearch-mode) (define-key map "\C-s" 'xwidget-webkit-isearch-mode) (define-key map "H" 'xwidget-webkit-browse-history) ;;similar to image mode bindings (define-key map (kbd "SPC") 'xwidget-webkit-scroll-up) (define-key map (kbd "S-SPC") 'xwidget-webkit-scroll-down) (define-key map (kbd "DEL") 'xwidget-webkit-scroll-down) (define-key map [remap scroll-up] 'xwidget-webkit-scroll-up-line) (define-key map [remap scroll-up-command] 'xwidget-webkit-scroll-up) (define-key map [remap scroll-down] 'xwidget-webkit-scroll-down-line) (define-key map [remap scroll-down-command] 'xwidget-webkit-scroll-down) (define-key map [remap forward-char] 'xwidget-webkit-scroll-forward) (define-key map [remap backward-char] 'xwidget-webkit-scroll-backward) (define-key map [remap right-char] 'xwidget-webkit-scroll-forward) (define-key map [remap left-char] 'xwidget-webkit-scroll-backward) (define-key map [remap previous-line] 'xwidget-webkit-scroll-down-line) (define-key map [remap next-line] 'xwidget-webkit-scroll-up-line) ;; (define-key map [remap move-beginning-of-line] 'image-bol) ;; (define-key map [remap move-end-of-line] 'image-eol) (define-key map [remap beginning-of-buffer] 'xwidget-webkit-scroll-top) (define-key map [remap end-of-buffer] 'xwidget-webkit-scroll-bottom) map) "Keymap for `xwidget-webkit-mode'.")