[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.1 Hacking: General Advice

  1. Pay attention to file names and contents. If you’re making changes to mode-line related code, don’t put it in ‘core.lisp’. If you’re introducing some completely new featureset, consider putting all of the new code in a new file.
  2. Does a command need to be user-visible (“interactive”) or is it just called by other commands?
  3. Note that all commands defined using the defcommand syntax are available both to be called with C-t ; and from within other lisp programs, as though they had been defun-ned (which, in fact, they have).
  4. Any code that depends on external libraries or programs that some users might not have installed should be packaged as a module and placed in the ‘*data-dir*/modules/’ directory.
  5. Don’t be afraid to submit your patches to the StumpWM mailing list! It may not immediately make it into the official git repository, but individual users might find it useful and apply it to their own setup, or might be willing to offer suggestions on how to improve the code.
  6. Remember: StumpWM is designed to run on many lisp systems. If you must use code specific to one or the other, at the very least warn people that it only works with one lisp implementation. Better yet, figure out how to do it in the other distribution and write a statement like this:
     
    #+clisp
    (your-clisp-code)
    #+sbcl
    (your-sbcl-code)
    

    #to wrap the code for each lisp. Of course, the best option is to find a way to use the same code for clisp and SBCL.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on January 28, 2024 using texi2html 1.82.