README.md/README_CN.md gain verified sections for every 0.3.0 feature:
layer visibility (hide/show model, flatten/merge exclusion), lower and
canonical rotate orders, stack introspection (tp-layer-stack-at,
tp-describe-layer), the reactive layer-buffer registry and lifecycle
(track-buffer, anonymous-layer GC, minimal-diff tp-text), search
bounds/SUBEXP/PREDICATE, multi-argument parameterized layers, ABSOLUTE
interval coordinates, palette primaries, prefix-conforming define
aliases, and deprecation boxes for the raw search wrappers. Return
conventions corrected against probed behavior (add-to-layers mutates
in place; tp-clear now explicitly returns nil in code and docs), the
in-place string-mutation warning added for all 16 stack mutators, and
the stale pre-B43 with-range example fixed in both languages.
EN/CN parity is exact (132 headings, 158 fenced blocks each); all 316
blocks executed with 0 failures. tp-doctest.el grows 63 -> 88
assertions, all accessor-based for Emacs-28 print-order safety.
docs/ARCHITECTURE.md rewritten to the post-review truth: two hook
variables, verified per-module dependency table, relocated subsystem
homes, and a new mutable-state inventory.
Suite 578/578, doctests 88/88, shuffled green, compile clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Emacs 28 stores/prints text-property plists in a different order than
29+; the S-mystyle and L-paramgroup assertions compared whole prin1
strings and failed on 28.1 only. Compare per property instead (face,
tp-name, tp-layers — the stack order inside tp-layers is stable), and
note the version-dependent print order beside both README examples.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
63 assertions reproduce README code blocks and compare against the
exact documented outputs; make doctest runs them in batch and exits
non-zero on any mismatch, so docs and code cannot silently drift
again. Wired into the Makefile and mentioned in both READMEs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tp-forward-do/tp-backward-do target the TIMES-th match specifically;
when fewer matches exist the string paths applied FUNCTION to the last
available match -- the wrong target -- while buffer paths applied
nothing. Both now apply nothing on shortfall and return the available
count. Updates the two legacy with-range tests that codified the
string behavior, adds four shortfall/exact-count regression tests, and
documents the contract in both READMEs and the docstrings. Suite
443/443 green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README.md/README_CN.md: new verified Quick Start (fixes the dead
#quick-start nav link); Installation rewritten for the tp-*.el module
family; every broken or drifted example fixed and executed in batch
Emacs (mandatory () ARGLIST and quoted reactive keywords in all
define-tp/define-tps calls, corrected tp-search-map argument order,
interval-list returns, stacked duplicate-face results, gap intervals,
last-wins tp-plist, non-destructive string forms, per-pattern match
ordering, case-fold regexp outputs, rewired end-to-end theme example);
documents the symmetric tp-backward contract, the length-changing
replacement rules, all four tp-put-layer layer specs, and the
previously-missing tp-member, buffer/display macros, and palette
system; state resets now use tp-layer-reset; license corrected to
GPLv3+. CN mirrors EN exactly (119 headings / 258 fences each; code
blocks identical, comments translated).
docs/ARCHITECTURE.md rewritten around the real nine-module layering
and hook-variable inversions; nonexistent helper names removed.
docs/CODE-ANALYSIS.md marked as pre-split historical analysis with
locations/counts corrected. Reactive docs aligned with the fixed
engine semantics (replace-not-accumulate, buffer-local isolation,
nil computed values, batching union, first-render transform).
287 fenced blocks from both READMEs executed: 0 failures; 56-example
assertion suite passes; combined ERT suite 439/439 green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Added detailed behavior table and examples to README_CN.md:
- tp-set, tp-reset, tp-add, tp-remove sections now explain:
- Entire string form creates a NEW string (non-destructive)
- Region form with string modifies in-place
- Underlying implementation (propertize vs put-text-property)
- Updated return value documentation
- Updated tp-add-to-layers and tp-add-to-all-layers sections
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
- Update README.md with new quoted format examples
- Update README_CN.md with new quoted format examples
- Simplify format descriptions (merged Format 2 and 3 into one)
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
Updated both English and Chinese documentation to reflect that
when setting text properties on an entire string, it now supports
not only flat properties (PROPERTY VALUE ...) but also layer names
defined by tp-define-layer or tp-define-layer-group.
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
- Updated tp-search-map signature to (function property &optional value object start end)
- Updated tp-forward-do signature to (function property &optional value object times start end)
- Updated tp-backward-do signature to (function property &optional value object times start end)
- Function callback for tp-search-map now accepts (text &optional start end idx)
- Function callback for tp-forward-do/tp-backward-do now accepts (text &optional start end)
- Updated internal helper functions tp--search-do, tp--forward-do, tp--backward-do
- Added new tests for the updated APIs
- Updated documentation in README.md and README_CN.md with examples
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
The FUNCTION parameter in tp-search-map can now optionally accept a
second argument representing the 0-based index of the current match.
This is backwards compatible - functions that only accept one argument
continue to work as before.
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
- Rewrote introduction section with detailed overview of tp.el's innovations
- Reorganized features into 7 hierarchical layers (层层递进):
1. Unified API parameter conventions (统一的API参数规范)
2. Three property operation semantics (三种属性操作语义)
3. Fine-grained sub-property operations (子属性的精细操作)
4. Innovative property layer system (属性层系统)
5. Pattern matching and batch operations (模式匹配与批量操作)
6. Enhanced search and navigation (增强的搜索与导航)
7. Query and diagnostics (查询与诊断)
- Renamed "图层" to "属性层" throughout the document for accuracy
- Added code examples to illustrate each feature category
- Emphasized features not available in native Emacs text property APIs
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
- tp-forward and tp-backward now support string objects
- Renamed tp-forward-do to tp--forward-do (private) with string support
- Renamed tp-backward-do to tp--backward-do (private) with string support
- New public tp-forward-do and tp-backward-do: function receives matched text only
- Renamed tp-search-do to tp--search-do (private)
- New public tp-search-map: function receives matched text only
- Updated English and Chinese documentation
- Updated and added tests for all new functionality
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
- Modified tp-empty-p to support optional OBJECT parameter (nil = current buffer)
- Modified tp-plist to support two formats: (tp-plist start end &optional OBJECT) and (tp-plist string)
- Added tp-forward and tp-backward with new API (property &optional value object n)
- Added tp-forward-do and tp-backward-do for applying functions to matches
- Added tp-search for searching all matching properties in range or string
- Added tp-search-do for executing function on all matches
- Updated documentation (README.md and README_CN.md)
- Updated test cases (tp-tests.el)
- Removed obsolete function references (tp-next, tp-prev, tp-goto-next, tp-goto-prev, tp-in, tp-all, tp-regions-map, tp-strings-map)
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>