-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathshen-overlays.el
38 lines (34 loc) · 1.34 KB
/
shen-overlays.el
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
;; [[file:shen-elisp.org::*License][License:1]]
;; Copyright (c) 2015-2018 Aditya Siram. All Rights Reserved.
;; BSD 3-Clause License: http://opensource.org/licenses/BSD-3-Clause
;; License:1 ends here
;; [[file:shen-elisp.org::*Questions][Questions:1]]
(defun shen/y-or-n? (S)
(progn
(shen/shen.prhush (shen/shen.proc-nl S) (shen/stoutput))
(let ((Input (format "%s" (read-from-minibuffer " (y/n) " ))))
(cond
((string-equal Input "y") 'true)
((string-equal Input "n") 'false)
(t (progn
(shen/shen.prhush "please answer y or n~%" (shen/stoutput))
(shen/y-or-n? S)))))))
(defun shen/shen.pause-for-user nil
(let ((Byte (read-from-minibuffer "")))
(if (and (= 1 (length Byte)) (= (string-to-char Byte) ?^))
(shen/simple-error "input aborted\n")
(shen/nl 1))))
;; Questions:1 ends here
;; [[file:shen-elisp.org::*Changing Directories][Changing Directories:1]]
(defun shen/cd (Path)
(if (shen/internal/shen->predicate (shen/= Path ""))
(shen/set '*home-directory* "")
(let ((PathString (concat Path "/")))
(progn
(setq default-directory PathString)
(shen/set '*home-directory* PathString))
PathString)))
;; Changing Directories:1 ends here
;; [[file:shen-elisp.org::*Provide it][Provide it:1]]
(provide 'shen-overlays)
;; Provide it:1 ends here