diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-01-31 00:01:20 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-01-31 00:01:20 +0100 |
| commit | bfde79ed440343c0dbf0f64cfe7913c1efbe3f83 (patch) | |
| tree | 014f7befd185a152cea48bed5e141c770188e5a1 /cape.el | |
| parent | 597fe6938c832238e97e92a5b7392bba25e0e827 (diff) | |
Improve cape-wrap-inside-code
Diffstat (limited to 'cape.el')
| -rw-r--r-- | cape.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1119,7 +1119,8 @@ This function can be used as an advice around an existing Capf." (defun cape-wrap-inside-code (capf) "Call CAPF only if inside code, not inside a comment or string. This function can be used as an advice around an existing Capf." - (and (not (or (nth 3 (syntax-ppss)) (nth 4 (syntax-ppss)))) (funcall capf))) + (let ((s (syntax-ppss))) + (and (not (nth 3 s)) (not (nth 4 s)) (funcall capf)))) ;;;###autoload (defun cape-wrap-inside-comment (capf) |
