diff options
| author | Jim Porter | 2025-05-30 22:21:40 -0700 |
|---|---|---|
| committer | Jim Porter | 2025-05-30 22:21:40 -0700 |
| commit | d25e9f518082f31ab730623eea36da45cd73ac06 (patch) | |
| tree | 1bb5c8466e4186e8d54fb29bb015b9e443f6d305 | |
| parent | 9e322088b01f45a024827ead350a02f29d197e0b (diff) | |
| download | emacs-d25e9f518082f31ab730623eea36da45cd73ac06.tar.gz emacs-d25e9f518082f31ab730623eea36da45cd73ac06.zip | |
Add more "safe" display specs to 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--safe-display-specs): Add
'space-width' and 'min-width'.
(visual-wrap--display-property-safe-p): Use 'member' instead of 'memq'
to more-closely match the behavior of other code that works with display
properties.
| -rw-r--r-- | lisp/visual-wrap.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/visual-wrap.el b/lisp/visual-wrap.el index b921e1f0549..227afe71006 100644 --- a/lisp/visual-wrap.el +++ b/lisp/visual-wrap.el | |||
| @@ -74,7 +74,7 @@ extra indent = 2 | |||
| 74 | (face-background face nil t))))) | 74 | (face-background face nil t))))) |
| 75 | 75 | ||
| 76 | (defvar visual-wrap--safe-display-specs | 76 | (defvar visual-wrap--safe-display-specs |
| 77 | '(height raise) | 77 | '(space-width min-width height raise) |
| 78 | "A list of display specs that don't interfere with wrap prefixes. | 78 | "A list of display specs that don't interfere with wrap prefixes. |
| 79 | A \"safe\" display spec is one that won't interfere with the additional | 79 | A \"safe\" display spec is one that won't interfere with the additional |
| 80 | text properties that `visual-wrap-prefix-mode' uses. | 80 | text properties that `visual-wrap-prefix-mode' uses. |
| @@ -98,8 +98,8 @@ members of `visual-wrap--safe-display-specs' (which see)." | |||
| 98 | (when (or (vectorp display) (listp display)) | 98 | (when (or (vectorp display) (listp display)) |
| 99 | (not (catch 'unsafe | 99 | (not (catch 'unsafe |
| 100 | (mapc (lambda (spec) | 100 | (mapc (lambda (spec) |
| 101 | (unless (memq (car-safe spec) | 101 | (unless (member (car-safe spec) |
| 102 | visual-wrap--safe-display-specs) | 102 | visual-wrap--safe-display-specs) |
| 103 | (throw 'unsafe t))) | 103 | (throw 'unsafe t))) |
| 104 | display))))) | 104 | display))))) |
| 105 | 105 | ||