Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

23 wiersze
832 B

  1. ;;-*-mode: emacs-lisp; coding: utf-8;-*-
  2. ;; File: tangle.el
  3. ;; Load the default options used or what was passed in as OPTIONS
  4. (defun load-defaults-or-options ()
  5. (load-file (if (getenv "OPTIONS")
  6. (concat (concat "./" (getenv "OPTIONS")) ".el")
  7. "./defaults.el")))
  8. ;; Define functions we use in :tangle blocks
  9. ;; tangle/yn
  10. ;; tangle to "yes" or "no" if the predicate given exists and defined as t.
  11. ;;
  12. ;; Iff predicate is bound, and t, "yes"
  13. ;; rest is "no"
  14. (defun tangle/yn (p) (load-defaults-or-options) (if (bound-and-true-p p) "yes" "no"))
  15. ;; tangle/file
  16. ;; tangle to filename if predicate is bound and t
  17. ;; Note, prepends tmp/ to the filename to conform to match expected layout
  18. (defun tangle/file (p file) (load-defaults-or-options) (if (bound-and-true-p p) (concat "tmp/" file) "no"))