From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Feature Request: Help: Display Relevant Bits First? Date: Thu, 31 Mar 2022 13:22:36 -0700 Message-ID: <25158.3468.429616.238692@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40778"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 31 22:23:22 2022 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 1na1KE-000ARX-NR for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Mar 2022 22:23:22 +0200 Original-Received: from localhost ([::1]:36752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1na1KD-0003ZX-Be for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Mar 2022 16:23:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1na1Jc-0002eu-2y for emacs-devel@gnu.org; Thu, 31 Mar 2022 16:22:44 -0400 Original-Received: from [2607:f8b0:4864:20::633] (port=46934 helo=mail-pl1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1na1Ja-0003Bn-BH for emacs-devel@gnu.org; Thu, 31 Mar 2022 16:22:43 -0400 Original-Received: by mail-pl1-x633.google.com with SMTP id a16so582111plh.13 for ; Thu, 31 Mar 2022 13:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:mime-version:content-transfer-encoding:message-id:date:to :subject; bh=QmnOdW4hyFNt28N8xjtdDWHg5OGZnZIMgzlq/UeQMXk=; b=hTHA3vXZkZY5rh+HBsb0jqBlokFQ3i0C31jYIW6y2/9twjH+Q/JrbgqgusqdHJ98SU VCLmulf+zZLR3cSGKZ5hgyas6816Xo2wckELuqgoZ3TBcEJc+p26F9HySaAFRs/VEIZ7 qzGBhScb86jcaXr8jTsdl6+GAURbr5liFl7th2BqUUJisAOdUTLN5TfgsmH97ZgsDJsQ dM1nOvEFiYi56q97qTT1XHK6lIQwrMfkk5w6zPY0u+OqFG123Hpo51SQEwiH+Xc0G8SL 3SvmthcYkeQDrLN6x9AXVz1mqyWl0D/GFa+IeMCQfkopEJuSkc03lKUND6ZL7C6h5dCU xLkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:subject; bh=QmnOdW4hyFNt28N8xjtdDWHg5OGZnZIMgzlq/UeQMXk=; b=SBj6rvYQC1Sl5ndbkklYyl8uuqkxvkrjLgIymUh+l+k+emm9TngHHGPaLer5mIOGFZ tpVCgIMfp+NF7BHWGIXcSxEibPfUV1FiXHkxbMa/fxUqilvqnpdHY467OL3hXmiH9il7 xq8zjGw8byeJVYDF+dUr+bo3uWFXxCR5Jmnmxawekp5jQ65Z25+ZG3rJIlydgDMJSmjj Y7aufli/KjOttuwJGXW9z1j3vkVJZxX73Oz2l0R/KZBIzV/jKTIzd1SWAO6U/fi/rbs3 R/qFq0Ad0pqJRFW9fh9voG7XYe/bvrmHfo8h9utYM2dhzZxCJFIEPoXyhMRiE68LCEWS sGkg== X-Gm-Message-State: AOAM53357dmQT/zkgQUWsNXdQymJ33kizQRdvFZ37s/mNbPzAf361kGJ 9W7nDF0DBoSxc8wUGGhKabdkAp7urJpYug== X-Google-Smtp-Source: ABdhPJwEuU6KR2cES40S+JlU9P2MdIOyodTNzflXRGj7w8gmJdg5xxvJY9x7jrQyiEkccKdtsfzfTA== X-Received: by 2002:a17:902:e851:b0:156:3cbd:22d0 with SMTP id t17-20020a170902e85100b001563cbd22d0mr12109422plg.33.1648758158969; Thu, 31 Mar 2022 13:22:38 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id d80-20020a621d53000000b004fae1119955sm297949pfd.213.2022.03.31.13.22.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 13:22:38 -0700 (PDT) X-Mailer: VM 8.2.0b under 29.0.50 (x86_64-pc-linux-gnu) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::633 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=raman@google.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -161 X-Spam_score: -16.2 X-Spam_bar: ---------------- X-Spam_report: (-16.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=no 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:287642 Archived-At: At present, if you do describe-function on any command that toggles a mode, you get a lot of common boiler-plate, with the salient bits about that particular function at the end -- could we reverse this? As an example, here is what C-h f font-lock-mode shows=20 I'd personally find it more useful if the block of text between=20 "this is a minor mode . ..." and=20 "the mode's hook is called ..." appeared at the end of the help buffer. Thoughts? font-lock-mode is an interactive compiled Lisp function in =E2=80=98font-core.el=E2=80=99. (font-lock-mode &optional ARG) Toggle syntax highlighting in this buffer (Font Lock mode). This is a minor mode. If called interactively, toggle the =E2=80=98Fon= t-Lock mode=E2=80=99 mode. If the prefix argument is positive, enable the mod= e, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is =E2=80=98toggle=E2=80=99= . Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate =E2=80=98font-lock-mode=E2=80=99. The mode=E2=80=99s hook is called both when the mode is enabled and whe= n it is disabled. When Font Lock mode is enabled, text is fontified as you type it: - Comments are displayed in =E2=80=98font-lock-comment-face=E2=80=99; - Strings are displayed in =E2=80=98font-lock-string-face=E2=80=99; - Certain other expressions are displayed in other faces according to the value of the variable =E2=80=98font-lock-keywords=E2= =80=99. To customize the faces (colors, fonts, etc.) used by Font Lock for fontifying different parts of buffer text, use M-x customize-face. You can enable Font Lock mode in any major mode automatically by turning on in the major mode=E2=80=99s hook. For example, put in your ~/.emacs: (add-hook 'c-mode-hook 'turn-on-font-lock) Alternatively, you can use Global Font Lock mode to automagically turn on Font Lock mode in buffers whose major mode supports it and whose major mode is one of =E2=80=98font-lock-global-modes=E2=80=99= . For example, put in your ~/.emacs: (global-font-lock-mode t) Where major modes support different levels of fontification, you can use the variable =E2=80=98font-lock-maximum-decoration=E2=80=99 to = specify which level you generally prefer. When you turn Font Lock mode on/off the buffer is fontified/defontified, though fontification occurs only if the buffer is less than =E2=80=98font-lock-maximum-size=E2= =80=99. To add your own highlighting for some major mode, and modify the highlighting selected automatically via the variable =E2=80=98font-lock-maximum-decoration=E2=80=99, you can use =E2=80=98font-lock-add-keywords=E2=80=99. To fontify a buffer, without turning on Font Lock mode and regardless of buffer size, you can use M-x font-lock-fontify-buffer. To fontify a block (the function or paragraph containing point, or a number of lines around point), perhaps because modification on the current line caused syntactic change on other lines, you can use M-x font-lock-fontify-block. You can set your own default settings for some mode, by setting a buffer local value for =E2=80=98font-lock-defaults=E2=80=99, via its mo= de hook. The above is the default behavior of =E2=80=98font-lock-mode=E2=80=99; = you may specify your own function which is called when =E2=80=98font-lock-mode=E2= =80=99 is toggled via =E2=80=98font-lock-function=E2=80=99. Probably introduced at or before Emacs version 19.29. --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AE -- Thanks, --Raman(I Search, I Find, I Misplace, I Research) ♉ Id: kg:/m/0285kf1 🦮