Mercurial > emacs
comparison lisp/subr.el @ 9510:f03544494d1c
(add-to-list): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 13 Oct 1994 06:34:09 +0000 |
parents | 92d6de82426a |
children | a2908d5da32a |
comparison
equal
deleted
inserted
replaced
9509:d4e74a66a357 | 9510:f03544494d1c |
---|---|
708 (if (member function hook-value) | 708 (if (member function hook-value) |
709 (setq hook-value (delete function (copy-sequence hook-value)))) | 709 (setq hook-value (delete function (copy-sequence hook-value)))) |
710 (if (equal hook-value function) | 710 (if (equal hook-value function) |
711 (setq hook-value nil))) | 711 (setq hook-value nil))) |
712 (set-default hook hook-value))))) | 712 (set-default hook hook-value))))) |
713 | |
714 (defun add-to-list (list-var element) | |
715 "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet." | |
716 (or (member element (symbol-value list-var)) | |
717 (set list-var (cons element (symbol-value list-var))))) | |
713 | 718 |
714 ;;;; Specifying things to do after certain files are loaded. | 719 ;;;; Specifying things to do after certain files are loaded. |
715 | 720 |
716 (defun eval-after-load (file form) | 721 (defun eval-after-load (file form) |
717 "Arrange that, if FILE is ever loaded, FORM will be run at that time. | 722 "Arrange that, if FILE is ever loaded, FORM will be run at that time. |