Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. This is handy to add some elements to configuration variables,
  2. but please do not abuse it in Elisp code, where you are usually
  3. better off using `push' or `cl-pushnew'.
  4.  
  5. (setq testasdf nil)
  6.  
  7. (push 'a testasdf)
  8.  
  9. testasdf
  10. (a)
  11.  
  12. (add-to-list 'testasdf 'b)
  13.  
  14. testasdf
  15. (b a)
  16.  
  17. ;; add element to the end
  18. (add-to-list 'testasdf "hello" t)
  19.  
  20. testasdf
  21. (b a "hello")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement