Fanael Linithien
cf61a3aee6
Use double hyphen to indicate internal symbols.
12 years ago
Fanael Linithien
f2404ef0bf
Remove dead code.
...
The PPSS cache can never be inserted into in the middle, so testing whether
to insert into the middle is unnecessary.
rainbow-delimiters-syntax-ppss-run adds all the intermediate results
to the front of the cache, so it always leaves the cache in a state where
the elements are always exactly
rainbow-delimiters-parse-partial-sexp-cache-max-span apart, so there's no
gap bigger than rainbow-delimiters-parse-partial-sexp-cache-max-span to
insert into.
The before change hook always removes all elements until before the point
of the change, leaving no gap either.
The only way for a gap bigger than
rainbow-delimiters-parse-partial-sexp-cache-max-span to arise is the user
changing that variable, but that variable an implementation detail, so
worrying about it changing is like worrying about
(fset #'rainbow-delimiters-syntax-ppss-run #'ignore).
All in all, it serves only to make the code more complicated. So remove it.
12 years ago
Fanael Linithien
ccd68b7eb8
Replace a generalized push with setcdr+cons+cdr.
...
Generalized variables are supported in push only since Emacs 24.3,
using primitive operations instead allows the code to work in older
versions, too.
The regression was introduced in 3dfd3fa9b1 , fixes #46 .
12 years ago
Fanael Linithien
d35b992378
Don't error when highlighting an unmatched closing delimiter.
...
Fixes #44 .
12 years ago
Fanael Linithien
3143de1136
Update the readme.
...
The mode can't be used editor-wide as is anymore.
12 years ago
Fanael Linithien
e48b7bf746
Merge pull request #41 from jlr/no-global
...
Remove global-rainbow-delimiters-mode.
12 years ago
Fanael Linithien
756fd642fa
Release version 1.3.12.
12 years ago
Fanael Linithien
5459aa4c6a
Simplify rainbow-delimiters-delim-regex.
12 years ago
Fanael Linithien
5a56248229
Pass the variable symbol to rainbow-delimiters-apply-color directly.
...
This means we do one concat and intern-soft less on every highlighted
delimiter, yielding an easy ~10% speed gain and less GC traffic.
12 years ago
Steve Purcell
e05dd60c12
Don't propertize if the syntax table is unset
...
`rainbow-delimiters-mode' may be restored via desktop.el. When this
happens inside an `mmm-mode' buffer, the subregion-specific values of
the syntax table will not be restored, and so
`rainbow-delimiters-syntax-table' can be nil. We handle this case by
skipping propertization if the syntax table is unset.
Closes https://github.com/purcell/emacs.d/issues/209
12 years ago
Fanael Linithien
4cc4d38479
Remove global-rainbow-delimiters-mode.
12 years ago
Fanael Linithien
29e7bfd8e4
Remove global-rainbow-delimiters-mode from installation instructions.
12 years ago
Fanael Linithien
e2a67de8e7
Deprecate global-rainbow-delimiters-mode.
12 years ago
Steve Purcell
6cdf1f1c14
Merge pull request #38 from lunaryorn/patch-1
...
Don't enable in reftex-toc-mode
12 years ago
Sebastian Wiesner
fb54c05ba0
Don't enable in special RefTeX modes
12 years ago
Sebastian Wiesner
3d425a85d3
Don't enable in Completion List Mode
12 years ago
Fanael Linithien
ecacb319d3
Wrap the font-lock-fontify-buffer call with with-no-warnings.
...
font-lock-fontify-buffer is for interactive use only in Emacs >= 24.5.
12 years ago
Fanael Linithien
3a18183db3
Remove cider-repl-mode from rainbow-delimiters-ignore-modes.
...
CIDER has been updated and doesn't need this workaround anymore.
12 years ago
Fanael Linithien
6df71dba8f
Release version 1.3.11.
12 years ago
Fanael Linithien
49fb05303a
Use when/if instead of and/or+and.
12 years ago
Fanael Linithien
6d488e566a
Test if comment-start-skip is non-nil before using it.
12 years ago
Fanael Linithien
b85b86c0b4
Release version 1.3.10.
12 years ago
Fanael Linithien
1305bca532
Use comment-search-forward to see if a delimiter starts a comment.
...
(looking-at comment-start-skip) is not always enough, because some
major modes set `comment-start-skip' to not exactly what we expect.
Fixes #35 .
12 years ago
Fanael Linithien
df4976a965
Release version 1.3.9.
12 years ago
Fanael Linithien
ddf7f179d3
Change defsubst -> defun.
...
There's no real speed gain from using defsubst, and it interferes with
debugging and profiling.
12 years ago
Fanael Linithien
35eace73ca
Reuse parse-partial-sexp state in rainbow-delimiters-propertize.
...
This is a big performance win, improving both latency and throughput.
12 years ago
Fanael Linithien
24f6c5767e
Release version 1.3.8.
12 years ago
Fanael Linithien
a37d19b415
Add a comment explaining the previous change.
12 years ago
Fanael Linithien
36efff58a8
Don't highlight delimiters inside comments starting with two chars.
...
Fixes #32 .
12 years ago
Steve Purcell
0fa4723a9d
Add rainbow-delimiters-ignore-modes
...
Closes #7 , see #31
12 years ago
Fanael Linithien
14e0f971f6
Call font-lock-{flush,fontify-buffer} only when font-lock-mode is on.
12 years ago
Fanael Linithien
d7946fdf94
Fix a typo in a comment.
12 years ago
Fanael Linithien
f73763583c
Remove unneeded save-excursion.
12 years ago
Fanael Linithien
f116221d42
Simplify the logic in rainbow-delimiters-propertize a little...
...
...by using the delimiter position returned by match-beginning instead of
moving the point to the delimiter.
12 years ago
Fanael Linithien
43b02d2d20
Rename rainbow-delimiters-keywords.
12 years ago
Fanael Linithien
df383f86f7
Clean up comments and whitespace.
12 years ago
Fanael Linithien
a1cd80ee8d
Remove the changelog.
...
It's outdated, and the source file is not the right place for it.
If somebody needs it for historical reasons, it's still there in
older revisions.
12 years ago
Fanael Linithien
b3f87cfe99
Highlight delimiters even in already highlighted text.
...
Fixes #10 .
12 years ago
Fanael Linithien
c4c127992a
Use font-lock instead of jit-lock.
...
This allows us to get rid of the with-silent-modifications compatibility
implementation and unpropertizing hacks.
No performance difference unless somebody intentionally misconfigures
Emacs, because font-lock uses jit-lock by default.
12 years ago
Fanael Linithien
4144a75120
Add lisp-interaction-mode to rainbow-delimiters-escaped-char-predicate-list.
12 years ago
Fanael Linithien
447293003b
Highlight correctly even in presence of these evil 'intangible' properties.
12 years ago
Fanael Linithien
4eae4bc56f
Reduce the amount of copy and paste in rainbow-delimiters-propertize-region.
12 years ago
Fanael Linithien
36df2e014c
Add code to highlight mismatched closing delimiters.
...
Fixes #27 .
12 years ago
Fanael Linithien
a095a77dc9
Correct the prefix of the rainbow-delimiters-faces group.
12 years ago
Fanael Linithien
89b748e401
Make rainbow-delimiters-outermost-only-face-count customizable.
...
Fixes #24 .
12 years ago
Fanael Linithien
b656f8c9cd
Wrap rainbow-delimiters-{un,}propertize-region with with-silent-modifications and with-syntax-table.
...
This avoids constant variable binds in the loop and ensures all internal
function are run with the same environment.
12 years ago
Fanael Linithien
75acc28109
Release version 1.3.7.
12 years ago
Fanael Linithien
54855dcf52
Revert a part of 3dfd3fa9b that shouldn't be changed in the first place.
12 years ago
Fanael Linithien
5ab3135986
Fix a bug that caused (rainbow-delimiters-syntax-ppss 1) to return nil.
12 years ago
Fanael Linithien
9c4950a283
Properly tear down the mode when changing major mode.
...
Unpropertize is now run when changing major mode, so stale highlighting
will not carry on from the previous major mode.
12 years ago