1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00
Commit Graph

53 Commits

Author SHA1 Message Date
Noam Postavsky
9552ee4df7 Merge from emacs-26
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary.
572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME
04477adedc Check that length of data returned by sysctl is non-zero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D...
9d48979ca8 Fix Python tests depending on system-type
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
4701e0663e Improve wording of documentation of click events

# Conflicts:
#	lisp/textmodes/sgml-mode.el
#	test/lisp/textmodes/sgml-mode-tests.el
2019-06-25 22:04:13 -04:00
Noam Postavsky
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
syntax-ppss-table if set.  This is only needed on the release branch,
on master the caller (syntax-propertize) already does this.
(sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table.  This
correctly classifies parens as punctuation, so they won't confuse the
parser.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New test copied from master, with two cases added for this bug.
2019-06-25 18:58:23 -04:00
Simen Heggestøyl
abf7d0d802 Split up and add tests for two page.el functions
* lisp/textmodes/page.el (page--count-lines-page): New function
extracted from `count-lines-page'.
(count-lines-page): Extract main logic into `page--count-lines-page'.
(page--what-page); New function extracted from `what-page'.
(what-page): Extract main logic into `page--what-page'.

* test/lisp/textmodes/page-tests.el (page-tests-count-lines-page)
(page-tests-what-page): New tests for `page--count-lines-page' and
`page--what-page'.  (Bug#36009)
2019-06-23 07:27:19 +02:00
Stefan Kangas
e40f1c68b5 Use lexical-binding in underline.el and add tests
* lisp/textmodes/underline.el: Use lexical-binding.
* test/lisp/textmodes/underline-tests.el: New file.
(Bug#36063)
2019-06-09 09:56:03 +03:00
Noam Postavsky
438e4804d1 Fix some SGML syntax edge cases (Bug#33887)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Handle
single and double quotes symmetrically.  Don't skip quoted comment
enders.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add more test cases.
(sgml-mode-quote-in-long-text): New test.
2019-06-04 08:42:50 -04:00
Stefan Kangas
227b3c89f0 Use lexical-binding in paragraphs.el and add tests
* lisp/textmodes/paragraphs.el: Use lexical-binding.
(repunctuate-sentences): Make it work non-interactively.
* test/lisp/textmodes/paragraphs-tests.el: New file.
2019-06-01 18:52:22 -07:00
Simen Heggestøyl
f2a7acdde7 Use lexical-binding in page.el and add tests
* lisp/textmodes/page.el: Use lexical-binding.
(forward-page): Replace `(if x nil y)' with `(unless x y)'.

* test/lisp/textmodes/page-tests.el: New file with tests for page.el.
2019-06-01 15:33:37 +02:00
Stefan Monnier
7083974021 * lisp/textmodes/sgml-mode.el: Fix lone > in sgml text
(sgml--syntax-propertize-ppss):New variable and function.
(sgml-syntax-propertize-rules): Use it.
Don't ignore quotes not followed by a matching quote or a '>' or '<'.
(sgml-syntax-propertize): Set up sgml--syntax-propertize-ppss.

* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add test for lone '>'.
2019-05-22 18:36:37 -04:00
Stefan Monnier
9a74e5666b * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typo
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New corresponding test.
2019-05-15 22:21:36 -04:00
Glenn Morris
5fe9375a51 Merge from origin/emacs-26
02bee78 Let dir locals for more specific modes override those from less
b1235f9 Improve documentation of Hexl mode
32d1813 Fix description of (move-to-column <n> t) when column <n> is ...
0397b7c ; Fix smtpmail-stream-type docstring
7dab3ee Recognize single quote attribute values in nxml and sgml (Bug...
e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897)
ca14dd1 Fix nxml-get-inside (Bug#32003)
e7ab351 Fix positioning client buffer as instructed by emacsclient

# Conflicts:
#	lisp/files.el
#	lisp/textmodes/sgml-mode.el
2019-05-14 17:18:18 -07:00
Noam Postavsky
7dab3ee7ab Recognize single quote attribute values in nxml and sgml (Bug#35381)
* lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote.
(sgml-syntax-propertize-rules): Handle single quote.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New
test.
* test/lisp/textmodes/sgml-mode-tests.el
(sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
2019-05-09 06:42:40 -04:00
Glenn Morris
a298a1f6b2 * test/lisp/textmodes/conf-mode-tests.el (conf-test-align-assignments):
Fix whitespace.
2019-02-15 17:16:06 -05:00
Alex Branham
c3f87efe3a Add basic conf-mode tests
* test/lisp/textmodes/conf-mode-tests.el: New file with tests for
conf-mode.  Mostly taken from conf-mode docstrings.  (Bug#34419)
2019-02-15 10:40:13 +02:00
Paul Eggert
a04bf15130 Update more copyright years
Update some other copyright years automatically, by running:
Run 'UPDATE_COPYRIGHT_YEAR=2019 \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright'
followed by 'admin/merge-gnulib'.
2018-12-31 18:47:22 -08: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
Simen Heggestøyl
58d0642e1c Add Imenu support to CSS mode and its derivatives
* lisp/textmodes/css-mode.el (css--join-nested-selectors)
(css--prev-index-position, css--extract-index-name): New helper
functions for supporting Imenu.
(css-mode): Set `imenu-space-replacement',
`imenu-prev-index-position-function', and
`imenu-extract-index-name-function'.
(css-current-defun-name): Reuse `css--prev-index-position' and
`css--extract-index-name' to support nested selectors.

* test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name):
Fix character index.
(css-test-join-nested-selectors): New tests for
`css--join-nested-selectors'.

* etc/NEWS: Add news entry.
2018-05-29 21:24:26 +02:00
Michal Nazarewicz
8d3bb7beb4 Handle quotation marks and apostrophes in ‘sgml-quote’
To be able to use text in an HTML argument, quotation marks need
to be replaced with an appropriate character reference.  Make
‘sgml-quote’ do that.

While at it, fix entiteis not being unquoted if they lack closing
semicolon (e.g. ‘&amp’) occuring at the very end of a region.
Even though unlikely, make ‘sgml-quote’ handle this scenario.

* lisp/textmodes/sgml-mode.el (sgml-quote): Handle quotation marks and
apostrophes.  Match entities lacking semicolon at the end of regions.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-quote-works): New test
case for ‘sgml-quote’ function.
2018-04-07 11:16:12 +01:00
Glenn Morris
875cb835f0 Merge from origin/emacs-26
0276743 (origin/emacs-26) Doc string fix in latin-alt.el
c9269af Minor improvements in package.texi
898a3e4 Minor improvement in Emacs user manual
8f7d718 * doc/lispref/anti.texi (Antinews): Replace 25.2 with 25.3.
989d0af Improve documentation of mini-window resizing
923e415 More changes in the Emacs manual
565adf2 Clarify that text-quoting-style doesn't affect *Info* (Bug#24...
2dd273b Mention that shell quoting of % on w32 may fail (Bug#19350)
19fa6d5 Fix --no-build-details for w32 and macOS
979944c * doc/lispref/anti.texi (Antinews): Add some more antinews.
c2727e3 Fix crashes when run with --no-build-details
dc08490 More changes for the manual
04c5bd5 Doc fixes for process functions (Bug#30349)
e209034 Fix shr and CSS 4 color maps
5fe8192 Yet another round of improvements in the manual

Conflicts:
	doc/emacs/files.texi
	test/lisp/subr-tests.el
2018-02-09 11:12:48 -08:00
Basil L. Contovounesios
e209034536 Fix shr and CSS 4 color maps
* lisp/net/shr-color.el (shr-color-html-colors-alist): Fix typos.
Add RebeccaPurple.
* lisp/textmodes/css-mode.el (css--color-map): Add fuchsia-magenta
and aqua-cyan aliases.
* test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
Bump color count.
2018-02-07 22:14:00 +01:00
Simen Heggestøyl
69a30e8b87 Shorten CSS hex colors when possible
* lisp/textmodes/css-mode.el (css--format-hex): New function for
shortening CSS hex colors when possible.
(css--named-color-to-hex, css--rgb-to-named-color-or-hex): Use it.

* test/lisp/textmodes/css-mode-tests.el (css-test-format-hex): New
tests for 'css--format-hex'.
(css-test-named-color-to-hex, css-test-cycle-color-format): Adjust for
the changes to 'css--named-color-to-hex' and
'css--rgb-to-named-color-or-hex'.
2018-01-28 15:38:27 +01:00
Simen Heggestøyl
97defdfc36 Fix off-by-one error in 'css--hex-to-rgb'
* lisp/textmodes/css-mode.el (css--hex-to-rgb): Fix off-by-one error.

* test/lisp/textmodes/css-mode-tests.el (css-test-hex-to-rgb): Add
regression tests for the above fix.
2018-01-28 13:28:28 +01:00
Glenn Morris
e3b46f0b9e ; * test/lisp/textmodes/fill-tests.el: Fix copyright years. 2018-01-26 19:18:23 -08:00
Marcin Borkowski
96de0503cd Merge branch 'fix/bug-20871-cur' 2018-01-24 10:32:40 +01:00
Simen Heggestøyl
cff45e6f4e Parse percent values in CSS alpha components
* lisp/textmodes/css-mode.el (css--rgb-color): Support parsing percent
values in the alpha component.

* test/lisp/textmodes/css-mode-tests.el
(css-test-rgb-to-named-color-or-hex, css-test-rgb-parser): Update for
the above changes.
2018-01-21 14:20:56 +01:00
Marcin Borkowski
521470987b Add simple tests for the `fill-polish-nobreak-p' function
* test/lisp/textmodes/fill-tests.el:
(fill-test-no-fill-polish-nobreak-p): New test
2018-01-15 06:25:22 +01:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text

# Conflicts:
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
2018-01-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Simen Heggestøyl
bd9e8b31a1 Add command for cycling between CSS color formats
* lisp/textmodes/css-mode.el (css-mode-map): Add keybinding for
'css-cycle-color-format'.
(css--rgb-color): Add support for extracting alpha component.
(css--hex-alpha, css--color-to-4-dpc, css--named-color-to-hex)
(css--format-rgba-alpha, css--hex-to-rgb)
(css--rgb-to-named-color-or-hex): New functions.
(css-cycle-color-format): New command for cycling between color
formats.

* test/lisp/textmodes/css-mode-tests.el (css-test-color-to-4-dpc):
(css-test-named-color-to-hex, css-test-format-rgba-alpha)
(css-test-hex-to-rgb, css-test-rgb-to-named-color-or-hex)
(css-test-cycle-color-format, css-test-hex-alpha): New tests for the
changes mentioned above.

* etc/NEWS: Mention the new command.
2017-12-17 10:26:04 +01:00
Simen Heggestøyl
63b6281fdd Fix off-by-one error in 'css--hex-color'
* lisp/textmodes/css-mode.el (css--hex-color): Fix off-by-one error.

* test/lisp/textmodes/css-mode-tests.el (css-test-hex-color): New test
for 'css--hex-color'.
2017-12-16 09:46:54 +01:00
Simen Heggestøyl
0f9a78e770 Add tests for `css-current-defun-name'
* test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name)
(css-test-current-defun-name-nested)
(css-test-current-defun-name-complex): New tests for
`css-current-defun-name'.
2017-09-28 18:55:06 +02: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
Simen Heggestøyl
8960f6aa36 Complete CSS property values less eagerly (Bug#27392)
* lisp/textmodes/css-mode.el (css--complete-property-value): Be less
eager by looking for a colon after the property which values are being
completed for.

* test/lisp/textmodes/css-mode-tests.el (css-test-complete-property):
Add a test case ensuring that properties that are prefixes of other
properties don't hinder further completion.
2017-06-17 10:38:29 +02:00
Glenn Morris
2a7bd9dc60 ; Move recent test file to correct directory (my mistake) 2017-05-23 20:42:28 -04:00
Tom Tromey
f0708fc5e4 Add color highlighting to css-mode
Bug#25525
* lisp/textmodes/css-mode.el (css--color-map): New constant.
(css-value-class-alist): Use css--color-map.
(css--number-regexp, css--percent-regexp)
(css--number-or-percent-regexp, css--angle-regexp): New constants.
(css--color-skip-blanks, css--rgb-color, css--hsl-color): New
functions.
(css--colors-regexp): New constant.
(css--hex-color, css--named-color, css--compute-color)
(css--contrasty-color, css--fontify-colors)
(css--fontify-region): New functions.
(css-mode): Set font-lock-fontify-region-function.
(css-mode-syntax-table): Set syntax on more characters.
(css-fontify-colors): New defcustom.
(scss-mode-syntax-table): Define syntax for ?$ and ?%.
* test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
Update.
(css-test-rgb-parser, css-test-hsl-parser)
(css-test-named-color): New tests.
* etc/NEWS: Add entry.
2017-05-03 16:00:25 -06:00
Paul Eggert
cea942e5a6 ; Spelling and punctuation fixes 2017-04-06 19:27:00 -07:00
Tom Tromey
335174ee50 add mhtml-mode.el
* etc/NEWS: Update.
* lisp/textmodes/mhtml-mode.el: New file.
* test/manual/indent/html-multi.html: New file.
* test/lisp/textmodes/mhtml-mode-tests.el: New file.
* doc/emacs/text.texi (HTML Mode): Mention mhtml-mode.
2017-04-05 15:53:39 -06:00
Tom Tromey
c2e19a7340 Fix bug in css--mdn-find-symbol
* lisp/textmodes/css-mode.el (css--mdn-find-symbol): Skip whitespace
before skipping word characters.
test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): Add
regression test.
2017-02-11 08:43:47 -07:00
Tom Tromey
68e8f4bb4a css-mode documentation lookup feature
* etc/NEWS: Mention new feature.
* lisp/textmodes/css-mode.el (css-mode-map): New defvar.
(css--mdn-lookup-history): New defvar.
(css-lookup-url-format): New defcustom.
(css--mdn-property-regexp, css--mdn-completion-list): New defconsts.
(css--mdn-after-render, css--mdn-find-symbol, css-lookup-symbol): New
defuns.
* test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): New
test.
2017-01-30 15:53:10 -07:00
Juanma Barranquero
375c70fd9e test/*.el: Avoid byte-compiler warnings
* test/lisp/abbrev-tests.el (abbrev-table-p-test): Remove unused 'let*'.

* test/lisp/faces-tests.el (faces--test): New customization group.
(faces--test1, faces--test2): Use it.

* test/lisp/ffap-tests.el (ffap-tests-25243):
Call 'mark-whole-buffer' interactively.

* test/lisp/ibuffer-tests.el (ibuffer-filter-groups, ibuffer-filtering-alist)
(ibuffer-filtering-qualifiers, ibuffer-save-with-custom)
(ibuffer-saved-filter-groups, ibuffer-saved-filters): Defvar.
(ibuffer-format-qualifier, ibuffer-unary-operand): Declare.

* test/lisp/minibuffer-tests.el (completion-test1):
Mark unused lexical arguments.

* test/lisp/simple-tests.el (simple-test--dummy-buffer): Wrap result in
'with-no-warnings' to avoid them when the macro is invoked for effect.

* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-count-test):
Mark unused lexical arguments.

* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-surface-test):
Mark unused lexical arguments.
(let-alist-cons): Remove unused let binding.

* test/lisp/net/dbus-tests.el (dbus-debug): Defvar.
(dbus-get-unique-name): Declare.

* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid):
Call 'font-lock-fontify-buffer' interactively.

* test/lisp/textmodes/tildify-tests.el (tildify-space-undo-test--test):
Mark unused lexical argument.
2017-01-28 04:40:36 +01:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08: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
Simen Heggestøyl
07c0db4344 Add tests for foreign completions in CSS mode
* test/lisp/textmodes/css-mode-tests.el
(css-test-foreign-completions): New test for
`css--foreign-completions'.
(css-test-complete-selector-tag): Rename test.
(css-test-complete-selector-class): New test testing completion of
class names in selectors.
(css-test-complete-selector-id): New test testing completion of IDs in
selectors.
2016-10-15 11:23:26 +02:00
Simen Heggestøyl
c0a5ae906d Complete "initial" and "unset" in CSS mode
* lisp/textmodes/css-mode.el (css--complete-property-value): Make
"initial" and "unset" completion candidates for all CSS properties,
just like "inherit".

* test/lisp/textmodes/css-mode-tests.el
(css-test-complete-property-value): Update test to reflect the above
change.
2016-07-06 19:25:10 +02:00
Etienne Prud’homme
162bc021a1 Add completion of colors in CSS mode
* lisp/textmodes/css-mode.el (css-value-class-alist): Add CSS colors
from "CSS Color Module Level 3".

* test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
Update test.
2016-05-22 12:54:02 +02:00
Simen Heggestøyl
29c9803c2a Add tests for CSS mode completion
* test/lisp/textmodes/css-mode-tests.el (css-test-property-values)
(css-test-property-values-no-duplicates)
(css-test-value-class-lookup): Use `seq-sort'.
(css-mode-tests--completions): New helper function for retrieving CSS
completions.
(css-test-complete-bang-rule, scss-test-complete-bang-rule)
(css-test-complete-property-value, css-test-complete-pseudo-class)
(css-test-complete-pseudo-element, css-test-complete-at-rule)
(scss-test-complete-at-rule, css-test-complete-property)
(css-test-complete-selector, css-test-complete-nested-selector)
(scss-test-complete-nested-selector): New tests.
2016-05-07 16:38:02 +02:00
Simen Heggestøyl
07d729130e Add completion of `calc()' in CSS mode
* lisp/textmodes/css-mode.el (css-value-class-alist): Add `calc()' as
a completion candidate for several value classes.
(css--value-class-lookup): Return only unique results.

* test/lisp/textmodes/css-mode-tests.el
(css-test-property-values-no-duplicates)
(css-test-value-class-lookup): Update to reflect the above changes.
2016-04-26 20:41:04 +02:00
Simen Heggestøyl
e6d6a99455 Don't let `css--property-values' return duplicates
* lisp/textmodes/css-mode.el (css--property-values): Don't return
duplicate values.

* test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
Take the above into account.
(css-test-property-values-no-duplicates): Test that duplicates aren't
returned by `css--property-values'.
2016-04-24 19:58:36 +02:00
Simen Heggestøyl
8e2e252932 Cache results of `css--property-values'
* lisp/textmodes/css-mode.el (css--property-values): Cache computed
values.

* test/lisp/textmodes/css-mode-tests.el (css-test-property-value-cache):
New regression test for the above.
2016-04-24 15:02:05 +02:00
Simen Heggestøyl
269d5631ab Support completion of attribute values in CSS mode
* lisp/textmodes/css-mode.el (css-property-alist): New defconst
holding CSS identifiers and the values they can have.
(css-property-ids): Compute dynamically from `css-property-alist'.
(css-value-class-alist): New defconst holding property value classes
and their values.
(css--property-value-cache): New variable providing a cache for
`css--property-values'.
(css--value-class-lookup): New function for computing a list of values
in a value class.
(css--property-values): New function for computing a list of possible
values for a CSS property.
(css--complete-property-value): New function for completing a property
value.
(css-completion-at-point): Add support for completing property values.
* test/lisp/textmodes/css-mode-tests.el: New file.
2016-03-23 19:03:47 +01:00