1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
João Távora
498d3768d1 Fix bug in Electric Pair mode
* lisp/elec-pair.el (electric-pair--syntax-ppss): Simplify and fix
possible bug.
2014-04-13 11:27:32 +01:00
Paul Eggert
10ee3b3f17 Spelling fixes.
* automated/electric-tests.el: Fix spelling error in test name.
(whitespace-skipping-for-quotes-not-outside):
Rename from whitespace-skipping-for-quotes-not-ouside.
2014-04-10 12:12:34 -07:00
João Távora
190f899aed Improve on previous quote autopairing change
Backported from trunk 2014-04-04T23:31:02Z!joaotavora@gmail.com

* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'

* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
2014-04-07 08:29:50 +01:00
João Távora
528c33b528 Inhibit quote autopairing more frequently
Backported from trunk 2014-04-02T09:59:06Z!joaotavora@gmail.com

* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.

* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
2014-04-07 08:24:03 +01:00
João Távora
be41113814 Fix electric-pair-delete-adjacent-pairs in modes binding backspace.
* lisp/elec-pair.el (electric-pair-backward-delete-char): Delete.
(electric-pair-backward-delete-char-untabify): Delete.
(electric-pair-mode-map): Bind backspace to a menu item filtering
a new `electric-pair-delete-pair' command.
(electric-pair-delete-pair): New command.

Fixes: debbugs:16981
2014-04-07 00:37:17 +01:00
João Távora
89f20f76d8 Fix electric-pair-skip-whitespace with quotes in text-mode
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Don't
skip whitespace for quote syntax when `electric-pair-text-pairs'
and `electric-pair-pairs' were used.

* test/automated/electric-tests.el (electric-pair-define-test-form):
More readable test docstrings.
(whitespace-skipping-for-quotes-not-ouside)
(whitespace-skipping-for-quotes-only-inside)
(whitespace-skipping-not-without-proper-syntax):

Fixes: debbugs:17183
2014-04-07 00:09:19 +01:00
Juanma Barranquero
025f2c8156 lisp/elec-pair.el: Fix typos.
(electric-pair-text-syntax-table, electric-pair-syntax-info)
(electric-pair--syntax-ppss, electric-pair--balance-info)
(electric-pair-mode): Fix docstring typos.
(electric-pair--looking-at-unterminated-string-p): Doc fix.
(electric-pair--inside-string-p): Doc fix.  Use `let', not `let*'.
2014-02-23 01:19:11 +01:00
Juanma Barranquero
ee0761cad3 lisp/elec-pair.el: Fix bug#16799.
(electric-pair-syntax-info): Do not check syntax
before the start of buffer/region.
2014-02-20 11:33:32 +01:00
João Távora
5dca7759a7 Fix `electric-pair-backward-delete-char' error at bob
* lisp/elec-pair.el (electric-pair-backward-delete-char): Don't error
when at beginning of (possibly narrowed) buffer.
2014-02-03 00:28:57 +00:00
Paul Eggert
da5ecfa9b9 Spelling fixes.
* lib-src/Makefile.in (regex.o): Remove reference to no-longer-used macros
CONFIG_BROKETS and INHIBIT_STRING_HEADER.  "BROKETS" was a
misspelling anyway....
* src/nsterm.h (updateCollectionBehavior): Rename from
updateCollectionBehaviour.  All uses changed.
2014-01-04 18:56:08 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
João Távora
e9d6c46ab5 Fix bug #16272 when inserting newline at point-min in electric-pair-mode.
* elec-pair.el (electric-pair-post-self-insert-function): Don't
open extra newlines at beginning of buffer.
2013-12-28 19:26:54 +00:00
Paul Eggert
7e99158aac Spelling and typo fixes. 2013-12-27 22:37:35 -08:00
Glenn Morris
9c61f806fb Misc small custom fixes
The value of defcustom's const should not be quoted!

* lisp/desktop.el (desktop-restore-in-current-display):
* lisp/newcomment.el (comment-empty-lines):
* lisp/progmodes/idlwave.el (idlwave-scan-all-buffers-for-routine-info)
(idlwave-pad-keyword):
* lisp/progmodes/tcl.el (tcl-tab-always-indent):
* lisp/textmodes/reftex-vars.el (reftex-index-default-tag):
* lisp/elec-pair.el (electric-pair-skip-whitespace):
* lisp/progmodes/cfengine.el (cfengine-cf-promises):
* lisp/cedet/ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default):
* lisp/erc/erc-button.el (erc-button-alist):
* lisp/gnus/auth-source.el (auth-sources):
* lisp/gnus/nnmairix.el (nnmairix-propagate-marks-upon-close):
* lisp/url/url-history.el (url-history-track):
* lisp/url/url-vars.el (url-honor-refresh-requests):
Fix custom types.

* lisp/net/tls.el (tls-certtool-program): Fix default value.
2013-12-27 17:24:15 -08:00
Stefan Monnier
7514d3f806 * lisp/electric.el: Move all electric-pair-* to elec-pair.el.
* lisp/elec-pair.el: New file, split from electric.el.
2013-12-27 07:53:57 -05:00