[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/num3-mode 2bf8ae2 2/9: num3-mode: use “num3--” as pref
From: |
Stefan Monnier |
Subject: |
[elpa] externals/num3-mode 2bf8ae2 2/9: num3-mode: use “num3--” as prefix for private symbols |
Date: |
Sat, 28 Nov 2020 18:59:25 -0500 (EST) |
branch: externals/num3-mode
commit 2bf8ae2f6ceb2c44723ed56229420a18927f4449
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
num3-mode: use “num3--” as prefix for private symbols
Previous version of num3-mode used “-num3” as a prefix for private
symbols which goes against the style used in the rest of Emacs.
This commit changes the prefix to “num3--”.
---
num3-mode.el | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/num3-mode.el b/num3-mode.el
index b5ce0e5..48f85f4 100644
--- a/num3-mode.el
+++ b/num3-mode.el
@@ -5,7 +5,7 @@
;; Author: Felix Lee <felix8a@gmail.com>, Michal Nazarewicz <mina86@mina86.com>
;; Maintainer: Michal Nazarewicz <mina86@mina86.com>
;; Keywoards: faces, minor-mode
-;; Version: 1.0
+;; Version: 1.1
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -88,31 +88,31 @@ ie. groups are counted starting with one outwards from the
(place
where) decimal point (would be) is."
nil " num3" nil
(if num3-mode
- (unless (assoc '-num3-matcher font-lock-keywords)
- (font-lock-add-keywords nil '(-num3-matcher) 'append))
- (font-lock-remove-keywords nil '(-num3-matcher)))
+ (unless (assoc 'num3--matcher font-lock-keywords)
+ (font-lock-add-keywords nil '(num3--matcher) 'append))
+ (font-lock-remove-keywords nil '(num3--matcher)))
(when font-lock-mode
(font-lock-fontify-buffer)))
;;;###autoload
(define-globalized-minor-mode global-num3-mode num3-mode num3-mode)
-(defconst -num3-number-re
+(defconst num3--number-re
(concat "\\(?:0[xX]\\|#\\)\\([0-9a-fA-F]+\\)" ; 1 = hexadecimal
"\\|\\([0-9]+\\)" ; 2 = decimal
"\\|\\.\\([0-9]+\\)")) ; 3 = fraction
-(defun -num3-matcher (lim)
+(defun num3--matcher (lim)
"Function used as a font-lock-keywoard handler used in `num3-mode'.
Performs fontification of numbers from point to LIM."
(save-excursion
- (while (re-search-forward -num3-number-re lim t)
- (-num3-int (match-beginning 1) (match-end 1) 4)
- (-num3-int (match-beginning 2) (match-end 2) num3-group-size)
- (-num3-frac (match-beginning 3) (match-end 3) num3-group-size)))
+ (while (re-search-forward num3--number-re lim t)
+ (num3--int (match-beginning 1) (match-end 1) 4)
+ (num3--int (match-beginning 2) (match-end 2) num3-group-size)
+ (num3--frac (match-beginning 3) (match-end 3) num3-group-size)))
nil)
-(defun -num3-int (lo hi n)
+(defun num3--int (lo hi n)
"Highlight groups of digits in a long number.
LO and HI arguments specify the range where the number is
located. If the length of that region exceeds `num3-threshold',
@@ -122,10 +122,10 @@ faces. Grouping is done from the end, eg. (12)(345)."
(when (and lo (>= (- hi lo) num3-threshold))
(let (even)
(while (< lo hi)
- (-num3-put even (max lo (- hi n)) hi)
+ (num3--put even (max lo (- hi n)) hi)
(setq hi (- hi n) even (not even))))))
-(defun -num3-frac (lo hi n)
+(defun num3--frac (lo hi n)
"Highlight groups of digits in a long number.
LO and HI arguments specify the range where the number is
located. If the length of that region exceeds `num3-threshold',
@@ -135,10 +135,10 @@ faces. Grouping is done from the beginning, eg.
(123)(45)."
(when (and lo (>= (- hi lo) num3-threshold))
(let (even)
(while (< lo hi)
- (-num3-put even lo (min hi (+ lo n)))
+ (num3--put even lo (min hi (+ lo n)))
(setq lo (+ lo n) even (not even))))))
-(defun -num3-put (even lo hi)
+(defun num3--put (even lo hi)
"Add font lock text property to highlight a single group of digit.
Use `num3-face-odd' if EVEN is nil and `num3-face-even' if EVEN is
non-nil. The region the face is set to is from LO to HI."
- [elpa] branch externals/num3-mode created (now 3e82c87), Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 207a4ae 1/9: Add num3-mode, Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 2bf8ae2 2/9: num3-mode: use “num3--” as prefix for private symbols,
Stefan Monnier <=
- [elpa] externals/num3-mode a5064d9 3/9: * num3-mode.el: Fix footer. Reported by Jonas Bernoulli <address@hidden>., Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode fb55297 4/9: * num3-mode.el: Catch strings looking like hex number even w/o 0x prefix., Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode bb37a10 6/9: * packages/num3-mode/num3-mode.el: Fix compilation warnings., Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 8a8924d 5/9: * packages/num3-mode/num3-mode.el (num3-mode): Use font-lock-flush, Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 802b61c 8/9: num3-mode: cut new release version 1.3, Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 3e82c87 9/9: * .gitignore: New file, Stefan Monnier, 2020/11/28
- [elpa] externals/num3-mode 710466b 7/9: num3-mode: support binary numbers, Stefan Monnier, 2020/11/28