macros.m4 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. divert(-1)
  2. #------------------------------------------------------------------------------
  3. # Miscellaneous
  4. # Allows using the '<', '>' characters in names and also permits using the dot
  5. # notation (e.g name.operation). This is an experimental functionality which
  6. # will eventually be changed by m4.
  7. #------------------------------------------------------------------------------
  8. changeword(`[_a-zA-Z<][_a-zA-Z0-9>.]*')
  9. #------------------------------------------------------------------------------
  10. # Macro for todo classes
  11. # Usage:
  12. # <todo>
  13. # It's replaced by '<p class=todo>'. Meant to be placed in the line preceding
  14. # the respective TODO text.
  15. #------------------------------------------------------------------------------
  16. # Quotes the empty string to impede inifinite recursion
  17. define(`<todo>', `<p class=t`'odo>')
  18. #------------------------------------------------------------------------------
  19. # A link dictionary
  20. # Usage:
  21. # links.push(`Key', `Value')
  22. # links.fetch(`Key')
  23. # Defines an associative array to store links and a way to access them. Quotes
  24. # can be omitted when calling (e.g 'links.fetch(link_name)')
  25. #------------------------------------------------------------------------------
  26. define(`links.push', `define(format(``array[%s]'', `$1'), `$2')')
  27. define(`links.fetch', `defn(format(``array[%s]'', `$1'))')
  28. # Key must come immediately after the '('
  29. links.push(`dispelling_nk_myths',
  30. `https://www.youtube.com/watch?v=HNf3wM0feb8')
  31. links.push(`political_philosophy_playlist',
  32. `https://www.youtube.com/playlist?list=PLcmaziH9sW6PFy1IiiBKOLdhifFMC2uwa')
  33. #------------------------------------------------------------------------------
  34. divert`'dnl # Removes trailing newline and space