1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

141 Commits

Author SHA1 Message Date
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Juanma Barranquero
f6aa7c335f ; Typo fixes in etc/NEWS and lisp/ files 2022-11-29 22:37:18 +01:00
Tassilo Horn
005efce764 Fix face issues in show-paren context overlay (bug#59527)
* 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).
2022-11-24 10:47:54 +01:00
Lars Ingebrigtsen
ad6878005d Add a basic widget type for buffer predicates
* 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.
2022-09-04 16:29:06 +02:00
Lars Ingebrigtsen
9474ac1b61 Default show-paren-mode to off in special-mode buffers
* 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.
2022-09-02 14:23:15 +02:00
Lars Ingebrigtsen
915efbff98 Make buffer-local-value obsolete as a generalized variable
* 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).
2022-08-23 12:22:42 +02:00
Lars Ingebrigtsen
ae5fe348fb Revert "Make the generalized buffer-local-variable obsolete"
This reverts commit bfe222288e.

This led to the local modes not working.
2022-08-22 00:14:07 +02:00
Lars Ingebrigtsen
bfe222288e Make the generalized buffer-local-variable obsolete
* 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.
2022-08-21 23:38:09 +02:00
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