[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117366: * lisp/international/mule-util.el (truncate
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r117366: * lisp/international/mule-util.el (truncate-string-ellipsis): New var. |
Date: |
Thu, 19 Jun 2014 14:59:09 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117366
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2014-06-19 10:58:57 -0400
message:
* lisp/international/mule-util.el (truncate-string-ellipsis): New var.
(truncate-string-to-width): Use it.
modified:
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/international/mule-util.el
muleutil.el-20091113204419-o5vbwnq5f7feedwu-1045
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-06-19 14:03:45 +0000
+++ b/etc/NEWS 2014-06-19 14:58:57 +0000
@@ -46,6 +46,8 @@
* Changes in Emacs 24.5
+** New var `truncate-string-ellipsis' to choose how to indicate truncation.
+
---
** The default value of `history-length' has increased to 100.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-19 14:03:45 +0000
+++ b/lisp/ChangeLog 2014-06-19 14:58:57 +0000
@@ -1,3 +1,8 @@
+2014-06-19 Stefan Monnier <address@hidden>
+
+ * international/mule-util.el (truncate-string-ellipsis): New var.
+ (truncate-string-to-width): Use it.
+
2014-06-19 Robert Brown <address@hidden> (tiny change)
* emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p): New fun.
=== modified file 'lisp/international/mule-util.el'
--- a/lisp/international/mule-util.el 2014-01-01 07:43:34 +0000
+++ b/lisp/international/mule-util.el 2014-06-19 14:58:57 +0000
@@ -56,6 +56,9 @@
(setq i (1+ i)))))
string)
+(defvar truncate-string-ellipsis "..." ;"…"
+ "String to use to indicate truncation.")
+
;;;###autoload
(defun truncate-string-to-width (str end-column
&optional start-column padding ellipsis)
@@ -80,11 +83,11 @@
end of STR (including any padding) if it extends beyond END-COLUMN,
unless the display width of STR is equal to or less than the display
width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS
-defaults to \"...\"."
+defaults to `truncate-string-ellipsis'."
(or start-column
(setq start-column 0))
(when (and ellipsis (not (stringp ellipsis)))
- (setq ellipsis "..."))
+ (setq ellipsis truncate-string-ellipsis))
(let ((str-len (length str))
(str-width (string-width str))
(ellipsis-len (if ellipsis (length ellipsis) 0))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117366: * lisp/international/mule-util.el (truncate-string-ellipsis): New var.,
Stefan Monnier <=