Sebastian Lipp <bacuh at riseup.net> writes: >> I think it's good to include an initial value (even an invalid >> placeholder one, if the real initialization has not happened yet), and a >> doc string. C-h f defvar RET will say more about how to do that. > >I hope I got that right now. (I've got no real clue of Lisp yet because >I just recently switched to emacs partly because of notmuch. :) > >How about > > (defvar bbdb-get-addresses-headers nil > "List of Addresses to import into bbdb")
That's interesting -- from seeing the variable's name, I would not have guessed that it is a list. Can the doc string describe the exact format of the list, and something about how the list is initialized and used? In other words, if you were a programmer seeing this variable for the first time, and you had only a basic working knowledge of what the notmuch Elisp code does, what would you want to see in this doc string to give you a good understanding of what this variable is, how it gets set, and how it's used? One test I often use for myself is that if after I've read the doc string, I can look at any value and say whether or not it is a valid value that this variable might hold (when the code is running), then the doc string has done its job. Best, -Karl