Skip to content

Commit ee7bb91

Browse files
committed
No longer quote keywords
Keywords are self-quoting.
1 parent 635a690 commit ee7bb91

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

treepy.el

+25-25
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,31 @@ ROOT is the root node."
208208

209209
(defun treepy-branch-p (loc)
210210
"Return t if the node at LOC is a branch."
211-
(funcall (treepy--meta loc ':branchp) (treepy-node loc)))
211+
(funcall (treepy--meta loc :branchp) (treepy-node loc)))
212212

213213
(defun treepy-children (loc)
214214
"Return a children list of the node at LOC, which must be a branch."
215215
(if (treepy-branch-p loc)
216-
(funcall (treepy--meta loc ':children) (treepy-node loc))
216+
(funcall (treepy--meta loc :children) (treepy-node loc))
217217
(error "Called children on a leaf node")))
218218

219219
(defun treepy-make-node (loc node children)
220220
"Return a new branch node.
221221
Given an existing LOC, NODE and new CHILDREN, creates a new LOC
222222
with them. The LOC is only used to supply the constructor."
223-
(funcall (treepy--meta loc ':make-node) node children))
223+
(funcall (treepy--meta loc :make-node) node children))
224224

225225
(defun treepy-path (loc)
226226
"Return a list of nodes leading to the given LOC."
227-
(reverse (treepy--context loc ':pnodes)))
227+
(reverse (treepy--context loc :pnodes)))
228228

229229
(defun treepy-lefts (loc)
230230
"Return a list of the left siblings of this LOC."
231-
(reverse (treepy--context loc ':l)))
231+
(reverse (treepy--context loc :l)))
232232

233233
(defun treepy-rights (loc)
234234
"Return a list of the right siblings of this LOC."
235-
(treepy--context loc ':r))
235+
(treepy--context loc :r))
236236

237237
;;;; Navigation
238238

@@ -261,7 +261,7 @@ nil if at the top."
261261
(if changed?
262262
(cons (treepy-make-node loc pnode
263263
(treepy--join-children l (cons node r)))
264-
(and ppath (treepy--context-assoc ppath ':changed? t)))
264+
(and ppath (treepy--context-assoc ppath :changed? t)))
265265
(cons pnode ppath))
266266
(treepy--meta loc))))))
267267

@@ -289,8 +289,8 @@ nil if there's no more right siblings."
289289
(treepy--with-meta
290290
(cons cr
291291
(treepy--context-assoc context
292-
':l (cons node l)
293-
':r rnext))
292+
:l (cons node l)
293+
:r rnext))
294294
(treepy--meta loc)))))))
295295

296296

@@ -302,8 +302,8 @@ If LOC is already the rightmost sibling, return self."
302302
(treepy--with-meta
303303
(cons (car (last r))
304304
(treepy--context-assoc context
305-
':l (treepy--join-children l (cons node (butlast r)))
306-
':r nil))
305+
:l (treepy--join-children l (cons node (butlast r)))
306+
:r nil))
307307
(treepy--meta loc))
308308
loc)))
309309

@@ -316,8 +316,8 @@ nil if no more left siblings."
316316
(treepy--with-meta
317317
(cons cl
318318
(treepy--context-assoc context
319-
':l lnext
320-
':r (cons node r)))
319+
:l lnext
320+
:r (cons node r)))
321321
(treepy--meta loc))))))
322322

323323
(defun treepy-leftmost (loc)
@@ -328,8 +328,8 @@ If LOC is already the leftmost sibling, return self."
328328
(treepy--with-meta
329329
(cons (car (last l))
330330
(treepy--context-assoc context
331-
':l []
332-
':r (treepy--join-children (butlast l) (cons node r))))
331+
:l []
332+
:r (treepy--join-children (butlast l) (cons node r))))
333333
(treepy--meta loc))
334334
loc)))
335335

@@ -351,8 +351,8 @@ Return same loc with siblings updated."
351351
(treepy--with-meta
352352
(cons node
353353
(treepy--context-assoc context
354-
':l (cons item l)
355-
':changed? t))
354+
:l (cons item l)
355+
:changed? t))
356356
(treepy--meta loc)))))
357357

358358
(defun treepy-insert-right (loc item)
@@ -364,8 +364,8 @@ Return same loc with siblings updated."
364364
(treepy--with-meta
365365
(cons node
366366
(treepy--context-assoc context
367-
':r (cons item r)
368-
':changed? t))
367+
:r (cons item r)
368+
:changed? t))
369369
(treepy--meta loc)))))
370370

371371
(defun treepy-replace (loc node)
@@ -374,7 +374,7 @@ Return same loc with siblings updated."
374374
(treepy--with-meta
375375
(cons node
376376
(treepy--context-assoc context
377-
':changed? t))
377+
:changed? t))
378378
(treepy--meta loc))))
379379

380380
(defun treepy-edit (loc f &rest args)
@@ -405,8 +405,8 @@ walk."
405405
(if (> (length l) 0)
406406
(let ((nloc (treepy--with-meta (cons (car l)
407407
(treepy--context-assoc context
408-
':l (cdr l)
409-
':changed? t))
408+
:l (cdr l)
409+
:changed? t))
410410
(treepy--meta loc)))
411411
(child nil))
412412
(while (setq child (and (treepy-branch-p nloc)
@@ -415,7 +415,7 @@ walk."
415415
nloc)
416416
(treepy--with-meta
417417
(cons (treepy-make-node loc (car pnodes) r)
418-
(and ppath (treepy--context-assoc context ':changed? t)))
418+
(and ppath (treepy--context-assoc context :changed? t)))
419419
(treepy--meta loc))))))
420420

421421
;;;; Enumeration
@@ -452,7 +452,7 @@ When reaching the end, returns a distinguished loc detectable via
452452
"Move to the next LOC in the hierarchy, depth-first.
453453
Use ORDER if given. Possible values for ORDER are `:preorder' and
454454
`:postorder', defaults to the former."
455-
(cl-case (or order ':preorder)
455+
(cl-case (or order :preorder)
456456
(:preorder (treepy--preorder-next loc))
457457
(:postorder (treepy--postorder-next loc))
458458
(t (error "Unrecognized order"))))
@@ -484,7 +484,7 @@ If already at the root, returns nil."
484484
"Move to the previous LOC in the hierarchy, depth-first.
485485
Use ORDER if given. Possible values for ORDER are `:preorder' and `:postorder',
486486
defaults to the former."
487-
(cl-case (or order ':preorder)
487+
(cl-case (or order :preorder)
488488
(:preorder (treepy--preorder-prev loc))
489489
(:postorder (treepy--postorder-prev loc))
490490
(t (error "Unrecognized order"))))

0 commit comments

Comments
 (0)