[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/glasses.el
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/glasses.el |
Date: |
Sat, 17 Sep 2005 07:01:05 -0400 |
Index: emacs/lisp/progmodes/glasses.el
diff -c emacs/lisp/progmodes/glasses.el:1.12
emacs/lisp/progmodes/glasses.el:1.13
*** emacs/lisp/progmodes/glasses.el:1.12 Mon Jul 4 16:59:19 2005
--- emacs/lisp/progmodes/glasses.el Sat Sep 17 11:01:01 2005
***************
*** 195,200 ****
--- 195,210 ----
(looking-at glasses-uncapitalize-regexp))))
(overlay-put o 'invisible t)
(overlay-put o 'after-string (downcase (match-string n))))))
+ ;; Separator change
+ (unless (string= glasses-separator "_")
+ (goto-char beg)
+ (while (re-search-forward "[a-zA-Z0-9]\\(_+\\)[a-zA-Z0-9]" end t)
+ (goto-char (match-beginning 1))
+ (while (eql (char-after) ?\_)
+ (let ((o (glasses-make-overlay (point) (1+ (point)))))
+ ;; `concat' ensures the character properties won't merge
+ (overlay-put o 'display (concat glasses-separator)))
+ (forward-char))))
;; Parentheses
(when glasses-separate-parentheses-p
(goto-char beg)
***************
*** 227,232 ****
--- 237,249 ----
(let ((n (if (match-string 1) 1 2)))
(replace-match "" t nil nil n)
(goto-char (match-end n))))
+ (unless (string= glasses-separator "_")
+ (goto-char (point-min))
+ (while (re-search-forward (format "[a-zA-Z0-9]\\(%s+\\)[a-zA-Z0-9]"
+ separator)
+ nil t)
+ (replace-match "_" nil nil nil 1)
+ (goto-char (match-beginning 1))))
(when glasses-separate-parentheses-p
(goto-char (point-min))
(while (re-search-forward "[a-zA-Z]_*\\( \\)\(" nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/progmodes/glasses.el,
Eli Zaretskii <=