GNU bug report logs -
#8524
New glasses.el customization option glasses-separate-capital-groups-p
Previous Next
Reported by: Milan Zamazal <pdm <at> zamazal.org>
Date: Wed, 20 Apr 2011 07:37:01 UTC
Severity: wishlist
Tags: patch
Found in version 23.3
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 04 May 2011 23:27:07 -0400
with message-id <e07ha5hlo4.fsf <at> fencepost.gnu.org>
and subject line Re: bug#8524: New glasses.el customization option glasses-separate-capital-groups-p
has caused the GNU bug report #8524,
regarding New glasses.el customization option glasses-separate-capital-groups-p
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
8524: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8524
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
This adds a new customization option for a feature requested by a
glasses.el user.
2011-04-20 Milan Zamazal <pdm <at> zamazal.org>
* progmodes/glasses.el (glasses-separate-capital-groups-p): New
customization option.
[glasses.el.patch (text/x-diff, inline)]
--- glasses.el.orig 2011-01-08 18:45:14.000000000 +0100
+++ glasses.el 2011-04-18 21:45:03.482155846 +0200
@@ -117,6 +117,15 @@
:group 'glasses
:type '(repeat regexp))
+(defcustom glasses-separate-capital-groups-p t
+ "If non-nil, try to separate groups of capital letters.
+When the value is non-nil, HTMLSomething and IPv6 are displayed
+as HTML_Something and I_Pv6 respectively. Set the value to nil
+if you prefer to display them unchanged."
+ :group 'glasses
+ :type 'boolean
+ :version "23.4")
+
(defcustom glasses-uncapitalize-p nil
"If non-nil, downcase embedded capital letters in identifiers.
Only identifiers starting with lower case letters are affected, letters inside
@@ -213,8 +222,11 @@
'glasses-init))
;; Face + separator
(goto-char beg)
- (while (re-search-forward "[a-z]\\([A-Z]\\)\\|[A-Z]\\([A-Z]\\)[a-z]"
- end t)
+ (while (re-search-forward
+ (if glasses-separate-capital-groups-p
+ "[a-z]\\([A-Z]\\)\\|[A-Z]\\([A-Z]\\)[a-z]"
+ "[a-z]\\([A-Z]\\)")
+ end t)
(let* ((n (if (match-string 1) 1 2))
(o (glasses-make-overlay (match-beginning n) (match-end n))))
(goto-char (match-beginning n))
[Message part 5 (message/rfc822, inline)]
Version: 24.1
Thanks; applied.
This bug report was last modified 14 years and 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.