aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/paren.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* (custom-initialize-after-file): New functionStefan Monnier2025-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some global minor modes require initialization. Those that are preloaded currently abuse `custom-initialize-delay` for that, but it's suboptimal and doesn't help those that aren't preloaded. So introduce a new function to fill that need. While at it, make `define-globalized-minor-mode` use it automatically when useful. * lisp/custom.el (custom-initialize-after-file-load): New function. * lisp/tooltip.el (tooltip-mode): * lisp/paren.el (show-paren-mode): * lisp/rfn-eshadow.el (file-name-shadow-mode): * lisp/epa-hook.el (auto-encryption-mode): * lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode): * lisp/electric.el (electric-indent-mode): Use it instead of `custom-initialize-delay` since the value does not depend on the runtime context. (electric-quote-mode): Don't use `custom-initialize-delay` since the default value is nil anyway. * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Automatically add `:initialize` if needed. * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`, now provided automatically. * doc/lispref/customize.texi (Variable Definitions): * doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest `custom-initialize-after-file-load` instead of `custom-initialize-delay`.
* ; Fix last change (bug#78396)Eli Zaretskii2025-06-071-9/+10
| | | | | | | * lisp/paren.el (show-paren-not-in-comments-or-strings): * etc/NEWS: * doc/emacs/programs.texi (Matching): Fix wording and punctuation in doc string, defcustom tags, manual, and NEWS.
* Add option for not highlight parens inside comments or stringsElías Gabriel Pérez2025-06-071-81/+103
| | | | | | | | * lisp/paren.el (show-paren-not-in-comments-or-strings): New user option. (Bug#78396) (show-paren-function): Enclose code in 'catch' function. * etc/NEWS: Announce changes. * doc/emacs/programs.texi (Matching): Document new option.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Don't check for child frame supportGerd Möllmann2024-10-221-4/+1
| | | | | * lisp/paren.el (show-paren-function): Don't check with display-graphics-p or featurep.
* Check for tty-child-frames feature in show-parenGerd Möllmann2024-10-221-1/+2
| | | | | * lisp/paren.el (show-paren-function): Don't rely on display-graphic-p, also check tty-child-frames feature.
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; * lisp/paren.el (show-paren-function): Fix last change (bug#64547).Eli Zaretskii2023-07-151-3/+2
|
* Fix show-paren-mode when the parentheses is partially visibleEli Zaretskii2023-07-101-1/+13
| | | | | | * lisp/paren.el (show-paren-function): Support the case where the open paren is partially visible, but enough so to not consider it "off-screen". (Bug#64547)
* Make sure 'M-x show-paren-local-mode' turns on right awayDmitry Gutov2023-02-051-8/+12
| | | | | | * lisp/paren.el (show-paren--enabled-p): Extract from 'show-paren-function'. (show-paren-local-mode): Use it in the :variable getter (bug#61098).
* Fix inability to turn show-paren-local-mode on manually (bug#61098)Dmitry Gutov2023-02-051-2/+2
| | | | | | | * lisp/paren.el (show-paren-local-mode): Don't kill the local value when both local and global are t. Because the show-paren-predicate check in show-paren-function also checks whether a local (non-nil) value of this variable exists.
* ; * lisp/paren.el (show-paren-predicate): Doc fix. (Bug#61098)Eli Zaretskii2023-02-051-1/+2
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Typo fixes in etc/NEWS and lisp/ filesJuanma Barranquero2022-11-291-1/+1
|
* Fix face issues in show-paren context overlay (bug#59527)Tassilo Horn2022-11-241-0/+4
| | | | | | | | | * lisp/paren.el (show-paren--show-context-in-overlay): Use show-paren-priority as overlay priority (fixes problem 2 of bug#59527). * lisp/simple.el (blink-paren-open-paren-line-string): Ensure the context lines are font-locked before taking the buffer-substring (fixes problem 1 of bug#59527).
* Add a basic widget type for buffer predicatesLars Ingebrigtsen2022-09-041-1/+1
| | | | | | * lisp/paren.el (show-paren-predicate): * lisp/outline.el (outline-minor-mode-use-buttons): Use it. * lisp/wid-edit.el (buffer-predicate): New widget type.
* Default show-paren-mode to off in special-mode buffersLars Ingebrigtsen2022-09-021-1/+18
| | | | | | | | | | | * doc/emacs/programs.texi (Matching): Mention the new user option. * doc/misc/efaq.texi (Matching parentheses): Adjust text to the current state of affairs. * lisp/paren.el (show-paren-function): New user option (bug#50894). (show-paren-mode): Mention it. (show-paren-function): Use it.
* Make buffer-local-value obsolete as a generalized variableLars Ingebrigtsen2022-08-231-1/+2
| | | | | | | | | | * lisp/electric.el (electric-indent-local-mode) (electric-layout-local-mode, electric-quote-local-mode): * lisp/elec-pair.el (electric-pair-local-mode): Adjust usage. * lisp/emacs-lisp/gv.el (make-obsolete-generalized-variable): Move since we're using it earlier in the file. (buffer-local-value): Make obsolete as a generalized variable since the semantics are unclear (bug#26624).
* Revert "Make the generalized buffer-local-variable obsolete"Lars Ingebrigtsen2022-08-221-2/+1
| | | | | | This reverts commit bfe222288e02472bff0e1ab5ba7ef26af6a2769a. This led to the local modes not working.
* Make the generalized buffer-local-variable obsoleteLars Ingebrigtsen2022-08-211-1/+2
| | | | | | | | | | | | | | | * lisp/paren.el (show-paren-local-mode): * lisp/electric.el (electric-indent-local-mode) (electric-layout-local-mode, electric-quote-local-mode): * lisp/elec-pair.el (electric-pair-local-mode): Don't use it. * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Autoload. * lisp/emacs-lisp/gv.el (buffer-local-variable): Make obsolete (bug#26624). * lisp/emacs-lisp/gv.el (make-obsolete-generalized-variable): Move to allow usage.
* Allow show-paren to show matching parentheses inside commentsLars Ingebrigtsen2022-05-021-0/+7
| | | | | * lisp/paren.el (show-paren--default): Improve blinking when inside a comment (bug#5410).
* ; show-paren: improve previous commit bb69361cbeTassilo Horn2022-02-091-1/+2
| | | | | | Update show-paren--last-pos also in the "not at paren position" case. Otherwise, we don't get the context info when moving point from a paren position to a non-paren position and back again.
* show-paren: Don't show context again after C-g-ing it away.Tassilo Horn2022-02-091-15/+23
| | | | | * lisp/paren.el (show-paren--last-pos): New variable. (show-paren-function): Don't show context again after C-g-ing it away.
* Allow showing show-paren context in an overlayTassilo Horn2022-02-081-10/+43
| | | | | | | | | | | | * lisp/paren.el (show-paren-context-when-offscreen): Add new possibility `overlay'. (show-paren--context-overlay): New defvar. (show-paren--delete-context-overlay): New function. (show-paren--show-context-in-overlay): New function. (show-paren-function): Handle the new `overlay' case. * lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p): There's no interference if `show-paren-context-when-offscreen' is overlay or child-frame.
* ; paren.el: fix comment speaking of an undefined variableTassilo Horn2022-02-071-3/+3
|
* ; Set show-paren--context-child-frame to nil after deleting itTassilo Horn2022-02-071-1/+2
|
* ; Fix previous commit (6e5d79c048)Tassilo Horn2022-02-071-1/+1
|
* Display show-paren-context-when-offscreen in child frameTassilo Horn2022-02-061-7/+119
| | | | | | | | | | | | | | | * etc/NEWS: Extend section about the new `show-paren-context-when-offscreen' custom option. * lisp/paren.el (show-paren-context-when-offscreen): Allow special value `child-frame'. (show-paren-function): Handle `child-frame' value of `show-paren-context-when-offscreen'. (show-paren--context-child-frame): New defvar. (show-paren--context-child-frame-redirect-focus): New function. (show-paren--context-child-frame-buffer): New function. (show-paren--context-child-frame-parameters): New defvar. (show-paren--delete-context-child-frame): New function. (show-paren--show-context-in-child-frame): New function.
* Don't strip properties in show-paren-functionLars Ingebrigtsen2022-01-151-3/+1
| | | | | | * lisp/paren.el (show-paren-function): Don't strip text properties (bug#51606) because that makes the offscreen context less informative.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | New option show-paren-context-when-offscreenDaniel Martín2021-10-181-0/+21
|/ | | | | | | | | | | | | | | | | * lisp/simple.el (blink-paren-open-paren-line-string): Extract functionality that shows the open paren line in the echo area into its own function, to reuse it from paren.el. (blink-matching-open): Use blink-paren-open-paren-line-string. * lisp/paren.el (show-paren-context-when-offscreen): New option show-paren-context-when-offscreen. (show-paren-function): Implement it using blink-paren-open-paren-line-string. * lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p): Make sure the feature works well with eldoc. * test/lisp/paren-tests.el (paren-tests-open-paren-line): Test blink-paren-open-paren-line-string. * doc/emacs/programs.texi (Matching): Update the documentation. * etc/NEWS: And announce the new feature.
* Enable show-paren-mode by defaultDmitry Gutov2021-09-291-0/+2
| | | | | | | * etc/NEWS (https): Mention the change. * lisp/paren.el (show-paren-mode): Enable by default, as discussed on emacs-devel.
* New minor mode 'show-paren-local-mode'Dmitry Gutov2021-09-111-5/+27
| | | | | | | | | * lisp/paren.el (show-paren--delete-overlays): New function, extracted from show-paren-mode. (show-paren-local-mode): New minor mode. (show-paren-mode): Update docstring to mention it (bug#29381). * doc/emacs/programs.texi (Matching): Update show-paren-mode section.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Use lexical-binding in paren.el and add testsSimen Heggestøyl2019-05-261-2/+2
| | | | | | | * lisp/paren.el: Use lexical-binding. (show-paren--default): Use imperative form in doc-string. * test/lisp/paren-tests.el: New file with tests for paren.el.
* Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-251-0/+1
| | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+0
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Optionally add argument description in minor mode DOC (bug#10754)John Shahid2018-07-011-3/+0
|/ | | | | | | | | | | Add a paragraph to minor mode's docstring documenting the mode's ARG usage if the supplied docstring doesn't already contain the word "ARG". * easy-mmode.el (easy-mmode--arg-docstring): New const. (easy-mmode--arg-docstring): New function. (define-minor-mode): Use them. Remove argument documentation from all minor modes.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-2/+2
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* A new face for show-paren in expression modeFelipe Ochoa2017-08-181-11/+15
| | | | | | | | * lisp/faces.el (show-paren-match-expression): Define the new face. * lisp/paren.el (show-paren-function): Apply the different face when in expression mode. (Bug#28047) Copyright-paperwork-exempt: yes
* Merge from origin/emacs-25Paul Eggert2017-03-191-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a094732 * etc/PROBLEMS: Say that HP-UX cc doesn't work. 1925dd9 Fix duplicate wording in Emacs manual 6de8429 * lisp/paren.el (show-paren--default, show-paren-function): A... 2d671fd Fix wording in Emacs manual a8766a2 Document how to customize input methods 6eb8995 * lisp/net/eww.el (eww-reload): Doc fix. (Bug#25981) aceac95 Fix warning message about native completion (Bug#25984) a314c1f Clarify documentation of 'raise' and 'height' display specs f366f6e Mention problems with GPaste in PROBLEMS 6e788ef ; etc/PROBLEMS: Explain about the python+libedit problem (Bug... 6406618 Fix doc strings in info.el c1ed152 ; * src/keyboard.c (Fposn_at_point): Fix last change. eed9677 Fix doc string of 'posn-at-point' 0d5957e Documentation fix in elisp reference manual
| * * lisp/paren.el (show-paren--default, show-paren-function): Add docstring.Hong Xu2017-03-141-2/+4
| |
* | Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ \ | |/ | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.