]> git.eshelyaron.com Git - emacs.git/commitdiff
Unlispify even more in custom-unlispify-menu-entry
authorRobert Weiner <rsw@gnu.org>
Tue, 25 Jun 2019 12:08:49 +0000 (14:08 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 25 Jun 2019 12:53:52 +0000 (14:53 +0200)
* 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

index 5fd93224f8ae075993e827c283c4efcab8c75106..0b9fb27a737125031f077d51901104d3bd89d370 100644 (file)
@@ -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))