"..."
(concat
(encoded-string-description encoded coding)
- (if (cmpcharp char) "..." ""))))
+ (if (nth 2 (find-composition (point)))
+ " (composed)" ""))))
(format "(0%o, %d, 0x%x)" char char char))))
(if detail
;; We show the detailed information of CHAR.
- (let ((internal
- (if (cmpcharp char)
- ;; For a composite character, we show the
- ;; components only.
- (concat "(composed \""
- (decompose-composite-char char)
- "\")")
- (split-char char))))
- (message "Char: %s %s %s"
- (if (< char 256)
- (single-key-description char)
- (buffer-substring (point) (1+ (point))))
- encoding-msg internal))
+ (message "Char: %s %s %s"
+ (if (< char 256)
+ (single-key-description char)
+ (buffer-substring-no-properties (point) (1+ (point))))
+ encoding-msg (split-char char))
(if (or (/= beg 1) (/= end (1+ total)))
(message "Char: %s %s point=%d of %d(%d%%) <%d - %d> column %d %s"
(if (< char 256)
(single-key-description char)
- (buffer-substring (point) (1+ (point))))
+ (buffer-substring-no-properties (point) (1+ (point))))
encoding-msg pos total percent beg end col hscroll)
(message "Char: %s %s point=%d of %d(%d%%) column %d %s"
(if (< char 256)
(single-key-description char)
- (buffer-substring (point) (1+ (point))))
+ (buffer-substring-no-properties (point) (1+ (point))))
encoding-msg pos total percent col hscroll)))))))
\f
(defvar read-expression-map (cons 'keymap minibuffer-local-map)
to make one entry in the kill ring."
(interactive "*r")
(condition-case nil
- ;; Don't let the undo list be truncated before we can even access it.
- (let ((undo-strong-limit (+ (- (max beg end) (min beg end)) 100))
- (old-list buffer-undo-list)
- tail
- ;; If we can't rely on finding the killed text
- ;; in the undo list, save it now as a string.
- (string (if (or (eq buffer-undo-list t)
- (= beg end))
- (buffer-substring beg end))))
- (delete-region beg end)
- ;; Search back in buffer-undo-list for this string,
- ;; in case a change hook made property changes.
- (setq tail buffer-undo-list)
- (unless string
- (while (not (stringp (car (car tail))))
- (setq tail (cdr tail)))
- ;; If we did not already make the string to use,
- ;; use the same one that undo made for us.
- (setq string (car (car tail))))
- ;; Add that string to the kill ring, one way or another.
- (if (eq last-command 'kill-region)
- (kill-append string (< end beg))
- (kill-new string))
+ (let ((string (delete-and-extract-region beg end)))
+ (when string ;STRING is nil if BEG = END
+ ;; Add that string to the kill ring, one way or another.
+ (if (eq last-command 'kill-region)
+ (kill-append string (< end beg))
+ (kill-new string)))
(setq this-command 'kill-region))
((buffer-read-only text-read-only)
;; The code above failed because the buffer, or some of the characters