[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/quote-escaping f9f3aa5: Handle closing quote insid
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] scratch/quote-escaping f9f3aa5: Handle closing quote inside printed value better |
Date: |
Thu, 02 Jul 2015 00:05:53 +0000 |
branch: scratch/quote-escaping
commit f9f3aa548b6703e2467c1a38a85e8da9319efa8b
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Handle closing quote inside printed value better
---
lisp/help-mode.el | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 72f90ee..aba4d87 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -318,17 +318,21 @@ Commands:
((get-text-property mbeg 'help-tilde-escaped)
;; The opening quote is escaped, continue after it.
(goto-char (1+ mbeg)))
- ((get-text-property (1- (point)) 'help-tilde-escaped)
- ;; The closing quote is escaped, look for the next one.
- (let (found)
- (while (unless found (search-forward "'" limit t))
+ (t
+ (let ((mend (unless (get-text-property (1- (point))
'help-tilde-escaped)
+ (1- (point)))))
+ ;; The closing quote is escaped, look for the next one.
+ (while (unless mend (search-forward "'" limit t))
(unless (get-text-property (1- (point)) 'help-tilde-escaped)
- (setq found)
- (help--translate-quote mbeg)
- (help--translate-quote (1- (point)))))))
- (t ; Translate the quotes.
- (help--translate-quote mbeg)
- (help--translate-quote (1- (point))))))))
+ (setq mend (1- (point)))))
+ (when (and mend
+ (eq ; Not inside or after a printed value.
+ (next-single-char-property-change mbeg 'help-value
+ nil mend)
+ mend))
+ ;; Translate the quotes.
+ (help--translate-quote mbeg)
+ (help--translate-quote mend))))))))
(defun help--translate-quote (beg)
(let* ((char (char-after beg))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] scratch/quote-escaping f9f3aa5: Handle closing quote inside printed value better,
Dmitry Gutov <=