1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

133 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
95507dd403 Allow show-paren to show matching parentheses inside comments
* lisp/paren.el (show-paren--default): Improve blinking when
inside a comment (bug#5410).
2022-05-02 11:02:54 +02:00
Tassilo Horn
f063e38521 ; show-paren: improve previous commit bb69361cbe
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.
2022-02-09 20:48:02 +01:00
Tassilo Horn
bb69361cbe show-paren: Don't show context again after C-g-ing it away.
* lisp/paren.el (show-paren--last-pos): New variable.
(show-paren-function): Don't show context again after C-g-ing it away.
2022-02-09 15:15:32 +01:00
Tassilo Horn
2755e6bba0 Allow showing show-paren context in an overlay
* 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.
2022-02-08 21:54:56 +01:00
Tassilo Horn
919cbe2b7d ; paren.el: fix comment speaking of an undefined variable 2022-02-07 21:03:53 +01:00
Tassilo Horn
90eb6a7fe4 ; Set show-paren--context-child-frame to nil after deleting it 2022-02-07 13:37:14 +01:00
Tassilo Horn
f91a911ef3 ; Fix previous commit (6e5d79c048) 2022-02-07 06:52:04 +01:00
Tassilo Horn
6e5d79c048 Display show-paren-context-when-offscreen in child frame
* 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.
2022-02-06 11:10:08 +01:00
Lars Ingebrigtsen
17231a26d8 Don't strip properties in show-paren-function
* lisp/paren.el (show-paren-function): Don't strip text properties
(bug#51606) because that makes the offscreen context less
informative.
2022-01-15 14:16:01 +01:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
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
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Daniel Martín
9f505c476e New option show-paren-context-when-offscreen
* 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.
2021-10-18 09:26:44 +02:00
Dmitry Gutov
ee856b76ff Enable show-paren-mode by default
* etc/NEWS (https): Mention the change.

* lisp/paren.el (show-paren-mode):
Enable by default, as discussed on emacs-devel.
2021-09-29 03:48:27 +03:00
Dmitry Gutov
d37dcfa30f New minor mode 'show-paren-local-mode'
* 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.
2021-09-11 05:12:20 +03:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Simen Heggestøyl
a51ab2f357 Use lexical-binding in paren.el and add tests
* 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.
2019-05-26 11:22:27 +02:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
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.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
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.
2019-05-19 21:34:27 -07:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
John Shahid
ee3e432300 Optionally add argument description in minor mode DOC (bug#10754)
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.
2018-07-01 23:34:53 -04:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
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.
2017-09-13 15:54:37 -07:00
Felipe Ochoa
fb1a489757 A new face for show-paren in expression mode
* 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
2017-08-18 12:05:12 +03:00
Paul Eggert
da17b70a99 Merge from origin/emacs-25
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
2017-03-19 12:34:04 -07:00
Hong Xu
6de8429c29 * lisp/paren.el (show-paren--default, show-paren-function): Add docstring. 2017-03-14 00:07:14 -04:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Mark Oteiza
c430f7e23f Remove some face aliases obsoleted in 22.1
* lisp/faces.el (modeline-inactive, modeline-highlight, modeline-buffer-id):
* lisp/hilit-chg.el (highlight-changes-face, highlight-changes-delete-face):
* lisp/info.el (Info-title-1-face, Info-title-2-face, Info-title-3-face,
Info-title-4-face, info-menu-5):
* lisp/obsolete/old-whitespace.el (whitespace-highlight-face):
* lisp/paren.el (show-paren-match-face, show-paren-mismatch-face):
* lisp/progmodes/make-mode.el (makefile-space-face):
* lisp/textmodes/texinfo.el (texinfo-heading-face): Remove.
(texinfo-font-lock-keywords): Use texinfo-heading face.
* lisp/vc/add-log.el (change-log-date-face, change-log-name-face,
change-log-email-face, change-log-file-face, change-log-list-face,
change-log-conditionals-face, change-log-function-face,
change-log-acknowledgement-face):
* lisp/vc/diff-mode.el (diff-header-face, diff-file-header-face,
diff-index-face, diff-hunk-header-face, diff-removed-face, diff-added-face,
diff-changed-face, diff-function-face, diff-context-face,
diff-nonexistent-face): Remove.
(diff-use-changed-face, diff-font-lock-keywords): Use non-obsolete face
symbols.
(diff-hunk-file-names): Fix comment.
(diff-refine-change): Remove.
(diff-refine-removed, diff-refine-added, diff-refine-hunk): Use
non-obsolete face.
* lisp/vc/log-view.el (log-view-file-face, log-view-message-face): Remove.
(log-view-font-lock-keywords): Use non-obsolete face names.
* lisp/vc/pcvs-info.el (cvs-header-face, cvs-filename-face, cvs-unknown-face,
cvs-handled-face, cvs-need-action-face, cvs-marked-face, cvs-msg-face):
* lisp/wid-edit.el (widget-documentation-face, widget-button-face,
widget-field-face, widget-single-line-field-face, widget-inactive-face,
widget-button-pressed-face):
* lisp/woman.el (woman-italic-face, woman-bold-face, woman-unknown-face,
woman-addition-face): Remove.
2016-06-23 17:13:11 -04:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Alan Mackenzie
6d4ae9d338 Add documentation for changes to Show Paren mode.
* lisp/paren.el (show-paren-highlight-openparen): Enhance doc string.

* doc/emacs/programs.texi (Matching): Add descriptions of some pertinent user
options, including the new show-paren-when-point-inside-paren and
show-paren-when-point-in-periphery.

* etc/NEWS (.. Specialized Modes ...): Add an entry for Show Paren mode.
Move an entry on pcase to the Lisp Changes section.
2015-12-16 15:13:12 +00:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Alan Mackenzie
01c1b1a8ae Trigger showing when point is in the "periphery" of a line or just
inside a paren.
paren.el (show-paren-style, show-paren-delay)
(show-paren-priority, show-paren-ring-bell-on-mismatch): Remove
superfluous :group specifications.
(show-paren-when-point-inside-paren)
(show-paren-when-point-in-periphery): New customizable variables.
(show-paren-highlight-openparen): Make into a defcustom.
(show-paren--unescaped-p, show-paren--categorize-paren)
(show-paren--locate-near-paren): New defuns.
(show-paren--default): Refaactor and trigger on more paren
positions.
(show-paren-function): Small consequential changes.
2014-10-16 20:29:44 +00:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Dmitry Gutov
84c73ba099 Make blink-matching-paren perform blinking without moving the cursor
* lisp/faces.el (paren-showing-faces, show-paren-match)
(show-paren-mismatch): Move from paren.el.

* lisp/simple.el (blink-matching--overlay): New variable.
(blink-matching-open): Instead of moving point, highlight the
matching paren with an overlay
(http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00333.html).
2013-12-13 06:14:17 +02:00
Stefan Monnier
9190b35b7d * lisp/paren.el: Simplify the code.
(show-paren-mode): Always start the timer.
(show-paren--idle-timer): Rename from show-paren-idle-timer.
(show-paren--overlay, show-paren--overlay-1): Rename from
show-paren-overlay and show-paren-overlay-1, and initialize to an
overlay rather than to nil.
(show-paren-function): Misc cleanup and simplifications.
2013-05-30 11:44:54 -04:00
Stefan Monnier
4f8d1cf6d4 * lisp/paren.el (show-paren-data-function): New hook.
(show-paren--default): New function, extracted from show-paren-function.
(show-paren-function): Use show-paren-data-function.
2013-05-30 10:20:52 -04:00
Bastien Guerry
3d4147bae3 * paren.el (show-paren-function): Make sure to set 'priority and
'face only if the overlay does exist.
2013-01-24 22:19:02 +01:00
Bastien Guerry
d6f9c03fbb * paren.el (show-paren-function): Make sure an overlay exists
before trying to delete it.  Also use `pos' as a position only
when it is an integer.

See this thread: http://thread.gmane.org/gmane.emacs.devel/156498
2013-01-23 10:43:29 +01:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
69ba1f0420 * lisp/paren.el (show-paren-delay): Add a :set function. Doc fix. (Bug#12297) 2012-08-29 21:44:11 -04:00
Chong Yidong
fb7ada5f94 Remove * characters from the front of variable docstrings. 2012-04-09 21:05:48 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Chong Yidong
06e21633a4 Fix minor mode docstrings for the new meaning of a nil ARG.
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.

* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04:00
Juri Linkov
056e44efe8 * lisp/paren.el (show-paren-function): Don't show escaped parens.
Let-bind `unescaped' to `t' when paren is not escaped.

Fixes: debbugs:9461
2011-09-10 14:28:19 +03:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00