emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e9b0522 2/3: Unlispify even more in custom-unlispif


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e9b0522 2/3: Unlispify even more in custom-unlispify-menu-entry
Date: Tue, 25 Jun 2019 08:53:59 -0400 (EDT)

branch: master
commit e9b05221abc7c8b440072d6600691017ffda5015
Author: Robert Weiner <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Unlispify even more in custom-unlispify-menu-entry
    
    * lisp/cus-edit.el (custom-unlispify-menu-entry): Also allow : and
    / as separators in symbols when making the symbols look more
    human-readable (bug#23986).
---
 lisp/cus-edit.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 5fd9322..0b9fb27 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -552,7 +552,11 @@ value unless you are sure you know what it does."
                         (setq prefixes nil)
                         (delete-region (point-min) (point)))
                     (setq prefixes (cdr prefixes))))))
-          (subst-char-in-region (point-min) (point-max) ?- ?\s t)
+          (goto-char (point-min))
+           ;; Translate characters commonly used as delimiters between
+           ;; words in symbols into space; e.g. foo:bar-zot/thing.
+          (while (re-search-forward "[-:/]+" nil t)
+            (replace-match " "))
           (capitalize-region (point-min) (point-max))
           (unless no-suffix
             (goto-char (point-max))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]