File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,20 @@ This is how you can add data to your history file. We use
346
346
` lem/common/history:add-history hitsory input :allow-duplicates nil `
347
347
followed by ` save-file history ` .
348
348
349
+ The ` add-history ` function also has the ` :move-to-top ` key parameter:
350
+ if T, it moves the input on top of the stack if it already exists.
351
+
352
+ ``` lisp
353
+ ;; lem/common/history.lisp
354
+ add-history (history input &key (allow-duplicates t) (test #'equal) move-to-top)
355
+ "Add this INPUT to the HISTORY.
356
+
357
+ Doesn't add the same INPUT as the previous one.
358
+ If ALLOW-DUPLICATES is non T, don't add duplicates at all.
359
+ If LIMIT is set, overwrite oldest entry when reached.
360
+ If MOVE-TO-TOP is T, move the entry to the top of the stack if it already exists."
361
+ ```
362
+
349
363
``` lisp
350
364
(defun remember-project (input)
351
365
"Add this project path to the history file."
You can’t perform that action at this time.
0 commit comments