[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b2dac24 253/433: Used match-string-no-properties (Joe Kels
From: |
Dmitry Gutov |
Subject: |
[elpa] master b2dac24 253/433: Used match-string-no-properties (Joe Kelsey) |
Date: |
Thu, 15 Mar 2018 19:44:15 -0400 (EDT) |
branch: master
commit b2dac24750f40093ac7261a40071d5dd73a5cf1f
Author: viritrilbia <viritrilbia>
Commit: viritrilbia <viritrilbia>
Used match-string-no-properties (Joe Kelsey)
Fixed spelling, moved mmm-make-marker to this file.
---
mmm-utils.el | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/mmm-utils.el b/mmm-utils.el
index ec15497..772ec70 100644
--- a/mmm-utils.el
+++ b/mmm-utils.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-utils.el,v 1.12 2001/02/08 23:37:53 viritrilbia Exp $
+;; Version: $Id: mmm-utils.el,v 1.13 2003/03/02 20:26:33 viritrilbia Exp $
;;{{{ GPL
@@ -90,12 +90,12 @@ global match. Does nothing if STRING is not a string."
subexp)
(save-match-data
(while (string-match "~\\([0-9]\\)" string)
- (setq subexp (string-to-int (match-string 1 string))
+ (setq subexp (string-to-int (match-string-no-properties 1 string))
string
(replace-match
(save-match-data
(set-match-data old-data)
- (match-string subexp))
+ (match-string-no-properties subexp))
t t string))))))
string)
@@ -105,7 +105,7 @@ global match. Does nothing if STRING is not a string."
(defmacro mmm-save-keyword (param)
"If the value of PARAM as a variable is non-nil, return the list
\(:PARAM (symbol-value PARAM)), otherwise NIL. Best used only when it
-is important that nil valuess disappear."
+is important that nil values disappear."
`(if (and (boundp ',param) ,param)
(list (intern (concat ":" (symbol-name ',param))) ,param)
nil))
@@ -115,7 +115,7 @@ is important that nil valuess disappear."
\(let \(\(a 1) \(c 2)) \(mmm-save-keywords a b c)) ==> \(:a 1 :c 2)
Use of this macro can make code more readable when there are a lot of
PARAMS, but less readable when there are only a few. Also best used
-only when it is important that nil valuess disappear."
+only when it is important that nil values disappear."
`(append ,@(mapcar #'(lambda (param)
(macroexpand `(mmm-save-keyword ,param)))
params)))
@@ -137,6 +137,19 @@ string."
(match-end 0)))))
;;}}}
+;;{{{ Markers
+
+;; Mostly for remembering interactively made regions
+(defun mmm-make-marker (pos beg-p sticky-p)
+ "Make, and return, a marker at POS that is or isn't sticky.
+BEG-P represents whether the marker delimits the beginning of a
+region \(or the end of it). STICKY-P is whether it should be sticky,
+i.e. whether text inserted at the marker should be inside the region."
+ (let ((mkr (set-marker (make-marker) pos)))
+ (set-marker-insertion-type mkr (if beg-p (not sticky-p) sticky-p))
+ mkr))
+
+;;}}}
(provide 'mmm-utils)
- [elpa] master ad6a934 199/433: # Updated docstring, (continued)
- [elpa] master ad6a934 199/433: # Updated docstring, Dmitry Gutov, 2018/03/15
- [elpa] master 1c8d387 201/433: Allowed language names for preference lookup as "mode names"., Dmitry Gutov, 2018/03/15
- [elpa] master f0e34d0 185/433: (mmm-apply-class): Rearranged parameters so faces actually work., Dmitry Gutov, 2018/03/15
- [elpa] master 86803d6 200/433: (mmm-set-major-mode-preferences): Added function., Dmitry Gutov, 2018/03/15
- [elpa] master 4bdcb2f 224/433: Fixed inline JavaScript regexp ( \w ==> \\w )., Dmitry Gutov, 2018/03/15
- [elpa] master 62b7c8c 233/433: # Updated for recent changes in configuration., Dmitry Gutov, 2018/03/15
- [elpa] master 068f332 226/433: # Fixed a couple comments, Dmitry Gutov, 2018/03/15
- [elpa] master d94c8be 240/433: * FAQ: Added question about end delimiter., Dmitry Gutov, 2018/03/15
- [elpa] master 0faf52e 256/433: Updated., Dmitry Gutov, 2018/03/15
- [elpa] master d5a1a43 223/433: Empty regions no longer prevent parsing of later regions., Dmitry Gutov, 2018/03/15
- [elpa] master b2dac24 253/433: Used match-string-no-properties (Joe Kelsey),
Dmitry Gutov <=
- [elpa] master 2524d7a 208/433: Added `require's and `defvar's to eliminate compliation warnings., Dmitry Gutov, 2018/03/15
- [elpa] master c712ad4 190/433: Added flags telling which faces to use for which regions., Dmitry Gutov, 2018/03/15
- [elpa] master 23cd237 197/433: Modified CSS to use preferred mode., Dmitry Gutov, 2018/03/15
- [elpa] master c5b8993 234/433: # Updated, Dmitry Gutov, 2018/03/15
- [elpa] master 15ee310 228/433: Passed arguments to `signal'., Dmitry Gutov, 2018/03/15
- [elpa] master f156169 225/433: * mmm-cweb.el: New file., Dmitry Gutov, 2018/03/15
- [elpa] master ce6b28a 241/433: (mmm-ify-by-class): Removed duplicates from completion list., Dmitry Gutov, 2018/03/15
- [elpa] master 3c8a463 210/433: Added config.log and mmm.info-*., Dmitry Gutov, 2018/03/15
- [elpa] master a55863a 220/433: Improved instructions for turning off PSGML. (Thanks to Michael Alan, Dmitry Gutov, 2018/03/15
- [elpa] master 7142b02 285/433: Fix compilation warnings, Dmitry Gutov, 2018/03/15