ob-css.el 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ;;; ob-css.el --- Babel Functions for CSS -*- lexical-binding: t; -*-
  2. ;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
  3. ;; Author: Eric Schulte
  4. ;; Keywords: literate programming, reproducible research
  5. ;; URL: https://orgmode.org
  6. ;; This file is part of GNU Emacs.
  7. ;; GNU Emacs is free software: you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; GNU Emacs is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;; GNU General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;; Since CSS can't be executed, this file exists solely for tangling
  19. ;; CSS from Org files.
  20. ;;; Code:
  21. (require 'org-macs)
  22. (org-assert-version)
  23. (require 'ob)
  24. (defvar org-babel-default-header-args:css '())
  25. (defun org-babel-execute:css (body _params)
  26. "Execute a block of CSS code.
  27. This function is called by `org-babel-execute-src-block'."
  28. body)
  29. (defun org-babel-prep-session:css (_session _params)
  30. "Return an error if the :session header argument is set.
  31. CSS does not support sessions."
  32. (error "CSS sessions are nonsensical"))
  33. (provide 'ob-css)
  34. ;;; ob-css.el ends here