Commit a4b10328 authored by Christer Ekholm's avatar Christer Ekholm

(elib-string-expand-newtext): Renamed variables newtext and string.

Renamed variables newtext and string to elib-newtext and elib-string,
to silence warnings about "var `xxx' lacks a prefix" in emacs-24.
parent b9b70260
2014-06-21 Christer Ekholm <che@chrekh.se>
* elib-string.el (elib-string-expand-newtext): Renamed variables
newtext and string to elib-newtext and elib-string, to silence
warnings about "var `xxx' lacks a prefix" in emacs-24.
2014-06-19 Christer Ekholm <che@chrekh.se>
* lyskom-rest.el (lyskom-doc-view-text): Use with-current-buffer
......
......@@ -46,8 +46,8 @@
;;; This package has been slightly modified in the following section:
(defvar newtext)
(defvar string)
(defvar elib-newtext)
(defvar elib-string)
;;; Code:
......@@ -109,16 +109,16 @@ Optional arg GLOBAL means to replace all matches instead of only the first."
;; Note that in Emacs 18 match data are clipped to current buffer
;; size...so the buffer should better not be smaller than STRING.
(let ((pos 0)
(len (length newtext))
(len (length elib-newtext))
(expanded-newtext ""))
(while (< pos len)
(setq expanded-newtext
(concat expanded-newtext
(let ((c (aref newtext pos)))
(let ((c (aref elib-newtext pos)))
(if (= ?\\ c)
(cond ((= ?\& (setq c (aref newtext
(cond ((= ?\& (setq c (aref elib-newtext
(setq pos (1+ pos)))))
(substring string
(substring elib-string
(match-beginning 0)
(match-end 0)))
((and (>= c ?1)
......@@ -127,7 +127,7 @@ Optional arg GLOBAL means to replace all matches instead of only the first."
;; sub-regexp did not match:
(let ((n (- c ?0)))
(if (match-beginning n)
(substring string
(substring elib-string
(match-beginning n)
(match-end n))
"")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment