Mercurial > emacs
comparison lisp/subr.el @ 13812:fdbace398b5e
(add-to-list): Doc fix.
(buffer-substring-no-properties): Function deleted.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 21 Dec 1995 18:11:20 +0000 |
parents | 6d3d7b32c519 |
children | 24ff5e49ac27 |
comparison
equal
deleted
inserted
replaced
13811:66fa6267358e | 13812:fdbace398b5e |
---|---|
563 (setq hook-value nil))) | 563 (setq hook-value nil))) |
564 (set-default hook hook-value))))) | 564 (set-default hook hook-value))))) |
565 | 565 |
566 (defun add-to-list (list-var element) | 566 (defun add-to-list (list-var element) |
567 "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. | 567 "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. |
568 The test for presence of ELEMENT is done with `equal'. | |
568 If you want to use `add-to-list' on a variable that is not defined | 569 If you want to use `add-to-list' on a variable that is not defined |
569 until a certain package is loaded, you should put the call to `add-to-list' | 570 until a certain package is loaded, you should put the call to `add-to-list' |
570 into a hook function that will be run only after loading the package. | 571 into a hook function that will be run only after loading the package. |
571 `eval-after-load' provides one way to do this. In some cases | 572 `eval-after-load' provides one way to do this. In some cases |
572 other hooks, such as major mode hooks, can do the job." | 573 other hooks, such as major mode hooks, can do the job." |
747 (if (match-beginning num) | 748 (if (match-beginning num) |
748 (if string | 749 (if string |
749 (substring string (match-beginning num) (match-end num)) | 750 (substring string (match-beginning num) (match-end num)) |
750 (buffer-substring (match-beginning num) (match-end num))))) | 751 (buffer-substring (match-beginning num) (match-end num))))) |
751 | 752 |
752 (defun buffer-substring-no-properties (beg end) | |
753 "Return the text from BEG to END, without text properties, as a string." | |
754 (let ((string (buffer-substring beg end))) | |
755 (set-text-properties 0 (length string) nil string) | |
756 string)) | |
757 | |
758 (defun shell-quote-argument (argument) | 753 (defun shell-quote-argument (argument) |
759 "Quote an argument for passing as argument to an inferior shell." | 754 "Quote an argument for passing as argument to an inferior shell." |
760 (if (eq system-type 'ms-dos) | 755 (if (eq system-type 'ms-dos) |
761 ;; MS-DOS shells don't have quoting, so don't do any. | 756 ;; MS-DOS shells don't have quoting, so don't do any. |
762 argument | 757 argument |