1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
|
From: Jari Aalto <jari.aalto@cante.net>
Subject: Emacs 24.x adjustments
---
lisp/connection.el | 12 ++++++------
lisp/database.el | 4 ++--
lisp/db-file-io.el | 6 +++---
lisp/db-format.el | 4 ++--
lisp/db-interfa.el | 4 ++--
lisp/db-rep.el | 2 +-
lisp/db-search.el | 6 +++---
lisp/db-sort.el | 2 +-
lisp/db-tagged.el | 2 +-
lisp/db-two-dbs.el | 2 +-
lisp/db-types.el | 2 +-
lisp/edb-1int-to-single.el | 6 +++---
lisp/edb-meta.el | 2 +-
lisp/edbcore.el | 30 +++++++++++++++---------------
14 files changed, 42 insertions(+), 42 deletions(-)
--- a/lisp/connection.el
+++ b/lisp/connection.el
@@ -175,7 +175,7 @@
(put 'edb--with-callable-connection 'lisp-indent-function 1)
(defmacro edb--with-callable-connection (name &rest body)
- `(flet ((,name (&rest args) (apply ,name args)))
+ `(cl-flet ((,name (&rest args) (apply ,name args)))
,@body))
(defun edb--connect (control-spec-source)
@@ -216,7 +216,7 @@
(conn :V! :schema-type (car meta))
(conn :V! :schema-options (cddr meta))
(when (setq schema (cadr meta))
- (flet ((bad (why) (error "Invalid (%s) schema basis: %S"
+ (cl-flet ((bad (why) (error "Invalid (%s) schema basis: %S"
why schema)))
(unless (symbolp schema)
(bad "not a symbol"))
@@ -266,7 +266,7 @@
(point-max)
(forward-line 1)
(match-beginning 0)))
- (flet ((pl! (prop val) (setq pls (plist-put pls prop val))))
+ (cl-flet ((pl! (prop val) (setq pls (plist-put pls prop val))))
(if datap
(let* ((seqr (plist-get pls :seqr))
(f (or (edb--rget '(:edb1 :seq-funcs) seqr)
@@ -302,7 +302,7 @@
(inhibit-file-name-handlers (cons 'edb--connection-file-cache
inhibit-file-name-handlers))
name desc)
- (flet ((!! (s) (setq name (substring s (cdr (read-from-string s)))
+ (cl-flet ((!! (s) (setq name (substring s (cdr (read-from-string s)))
desc (let ((ls schema) look)
(while (and (setq ls (memq :display ls)
look (cadr ls))
@@ -328,7 +328,7 @@
(defun edb--1mm<-connection (conn)
(let ((schema (funcall conn :schema))
v)
- (flet ((S (prop) (plist-get schema prop)))
+ (cl-flet ((S (prop) (plist-get schema prop)))
(edb--make-v1-monolithic-mess
:print-name
@@ -454,7 +454,7 @@
(conn :schema)))
(mm (edb--1mm<-connection conn))
v form)
- (flet ((S (prop) (plist-get schema prop))
+ (cl-flet ((S (prop) (plist-get schema prop))
(maybe-quote (v) (if (or (and (consp v)
(memq (car v) '(function lambda)))
(stringp v)
--- a/lisp/database.el
+++ b/lisp/database.el
@@ -53,7 +53,7 @@
buffer), with extension one of \".data\", \".dat\", or \"\" (empty string),
in that order."
(interactive
- (flet ((r (p1 p2) (let ((filename (read-file-name
+ (cl-flet ((r (p1 p2) (let ((filename (read-file-name
(format "%s file (type RET %s): "
p1 p2)
nil "")))
@@ -86,7 +86,7 @@
(unless data
(setq data (when c-fname
(let ((stem (file-name-sans-extension c-fname)))
- (flet ((try (ext) (let ((f (concat stem ext)))
+ (cl-flet ((try (ext) (let ((f (concat stem ext)))
(when (file-exists-p f)
f))))
(or (try ".data")
--- a/lisp/db-file-io.el
+++ b/lisp/db-file-io.el
@@ -242,7 +242,7 @@
(down-list 1)
(insert "cl-struct-")
(goto-char here))
- (flet ((skip-zonk (s z) (let ((p (progn (forward-sexp s) (point))))
+ (cl-flet ((skip-zonk (s z) (let ((p (progn (forward-sexp s) (point))))
(forward-sexp z)
(delete-region p (point)))))
(when (db-skip-string-forward "; format 0.5")
@@ -922,7 +922,7 @@
(cond
;; Data inherent data to the connection.
(inherent
- (flet ((iget (k) (gethash k inherent))
+ (cl-flet ((iget (k) (gethash k inherent))
(bget (k) (car (iget k)))
(bput (k v) (setcar (iget k) v)))
(let* ((all (db-maprecords 'identity db nil nil t))
@@ -1171,7 +1171,7 @@
;;;
(defun database-io-setup (db &optional norx)
- (flet ((bad (part s name)
+ (cl-flet ((bad (part s name)
(error "Need a submatch to go with %s-regexp `%s' of %s."
part s name))
(chk (si name sdef)
--- a/lisp/db-format.el
+++ b/lisp/db-format.el
@@ -241,7 +241,7 @@
(defconst db-optspec-list
(mapcar (lambda (x)
`(,(nth 0 x)
- ,(flet ((dset (frag) (let ((f (intern (format "edb--1ds-%s"
+ ,(cl-flet ((dset (frag) (let ((f (intern (format "edb--1ds-%s"
frag))))
`(lambda (ds val)
(setf (,f ds) val)))))
@@ -1487,7 +1487,7 @@
(error "`%s' is not the name of a format." format-name)))))
;; Filename is now set.
- (flet ((mkspec (sumfmt sumfun)
+ (cl-flet ((mkspec (sumfmt sumfun)
;; All of these items vary from format to format within a
;; particular data display buffer.
(list
--- a/lisp/db-interfa.el
+++ b/lisp/db-interfa.el
@@ -391,7 +391,7 @@
(interactive)
(unless (edb--S :this-ds)
(error "Not on a field."))
- (flet ((try (x) (when x
+ (cl-flet ((try (x) (when x
(if (stringp x)
(list "%s" x)
(condition-case err
@@ -844,7 +844,7 @@
(idx (edb--S :index))
(vov (edb--1D dbc-database :vov))
(rno (edb--1D dbc-database :nrecords))
- (new (flet ((new-idx (delta) (1+ (% (+ rno delta -1 idx) rno))))
+ (new (cl-flet ((new-idx (delta) (1+ (% (+ rno delta -1 idx) rno))))
(if (or hidep markedp)
;; slow path
(let ((sign (if up 1 -1))
--- a/lisp/db-rep.el
+++ b/lisp/db-rep.el
@@ -30,7 +30,7 @@
(edb--define-child-hash 1D db (edb--G :1singles)
(let ((new (make-hash-table :size 7)))
- (flet ((ahash () (make-hash-table
+ (cl-flet ((ahash () (make-hash-table
:test 'eq
:weakness 'key)))
(edb--mputhash new
--- a/lisp/db-search.el
+++ b/lisp/db-search.el
@@ -42,7 +42,7 @@
(p-< "^<")
(p-> "^>")
(p-= "^="))
- (flet ((try (x) (string-match x string))
+ (cl-flet ((try (x) (string-match x string))
(sub (x) (db-parse-match-pattern x ds))
(p1o (x) (db-callconvert (edb--1ds-display->actual ds)
x nil nil nil))
@@ -63,7 +63,7 @@
;;;###autoload
(defun db-print-match-pattern (pat ds)
- (flet ((sub (x) (db-print-match-pattern x ds))
+ (cl-flet ((sub (x) (db-print-match-pattern x ds))
(p1o (x) (db-callconvert (edb--1ds-actual->display ds)
x nil nil)))
(let* ((type (when (listp pat) (car pat)))
@@ -86,7 +86,7 @@
;;;###autoload
(defun db-match (pat targ rs)
- (flet ((m (x) (db-match x targ rs))
+ (cl-flet ((m (x) (db-match x targ rs))
(rso (x) (funcall (db-rs-ordfunc rs) x targ))
(rsm (x) (funcall (edb--1rs-match-function rs) x targ)))
(if (listp pat)
--- a/lisp/db-sort.el
+++ b/lisp/db-sort.el
@@ -370,7 +370,7 @@
;; Insert item and trailing newline.
(defun dbsi-format (item which)
- (flet ((pinsert (s) (insert (propertize s :item item :which which))))
+ (cl-flet ((pinsert (s) (insert (propertize s :item item :which which))))
(pinsert (format " %-16s " (db-fname<-fno (car item) dbc-database)))
(if (atom (cdr item))
(pinsert (format "%s" (cdr item)))
--- a/lisp/db-tagged.el
+++ b/lisp/db-tagged.el
@@ -178,7 +178,7 @@
(D-! :continuation-output (D :continuation))
;; Performance-motivated pre-computations.
- (flet ((P! (k &rest ls) (edb--1D! database k ls)))
+ (cl-flet ((P! (k &rest ls) (edb--1D! database k ls)))
(P! :tagged-read-kargs
;; trx
(concat "^" (D :pre-tag-regexp)
--- a/lisp/db-two-dbs.el
+++ b/lisp/db-two-dbs.el
@@ -255,7 +255,7 @@
name1 " and " name2))))
(dolist (buf (list loners1 loners2 discrep))
(with-current-buffer buf (erase-buffer)))
- (flet ((print-r (r db)
+ (cl-flet ((print-r (r db)
(let ((names (database-fieldnames db)))
(princ "\n")
(dotimes (fno (length (database-fieldnames db)))
--- a/lisp/db-types.el
+++ b/lisp/db-types.el
@@ -201,7 +201,7 @@
a->d (nreverse a->d)
a->s (and a-s-differ (nreverse a->s)))
- (flet ((enum-do-completions
+ (cl-flet ((enum-do-completions
(rep type d->a)
;; Given a string REP and an enum TYPE, return REP if it is a
;; valid input representation, otherwise see if it completes to a
--- a/lisp/edb-1int-to-single.el
+++ b/lisp/edb-1int-to-single.el
@@ -50,7 +50,7 @@
'cl-struct-slots))))
(map 'list 'cons slots (number-sequence 0 (length slots)))))
mm extra records coding loc-block locals)
- (flet ((elm () (let ((emacs-lisp-mode-hook nil))
+ (cl-flet ((elm () (let ((emacs-lisp-mode-hook nil))
(emacs-lisp-mode)))
(mref (slot) (aref mm (cdr (assq slot mm-idx))))
(cprop (prop &optional more) (insert (format "%s" prop)
@@ -99,7 +99,7 @@
(when (setq v (car (mref :field-priorities)))
(cprop :field-order)
(pp (apply 'vector
- (flet ((ok (x) (cond ((symbolp x)
+ (cl-flet ((ok (x) (cond ((symbolp x)
x)
((numberp x)
(aref (mref :fieldnames) x))
@@ -128,7 +128,7 @@
(pp (apply 'vector v)))
(nl))
(let (try limit)
- (flet ((yes (c) (when c
+ (cl-flet ((yes (c) (when c
(cprop :display t)
(setq limit (+ (cadr (insert-file-contents try))
(point)))
--- a/lisp/edb-meta.el
+++ b/lisp/edb-meta.el
@@ -70,7 +70,7 @@
(symbol-name f))
(push f acc)))
(insert (format " %s\n" acc)))
- (flet ((w/face (string face)
+ (cl-flet ((w/face (string face)
(propertize string 'face face))
(fo (o &optional keyp)
(case (type-of o)
|