Mercurial > emacs
comparison lisp/subr.el @ 110356:d2f5496377e6
* subr.el (unintern): Declare the obarray arg mandatory.
* emacs-lisp/byte-run.el (set-advertised-calling-convention):
Add `when' argument. Update callers.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 14 Sep 2010 13:11:44 +0200 |
parents | 252e1eb2e944 |
children | 41bf9b6f3b91 ab9aebf1b099 |
comparison
equal
deleted
inserted
replaced
110355:be6132068051 | 110356:d2f5496377e6 |
---|---|
236 In Emacs, the convention is that error messages start with a capital | 236 In Emacs, the convention is that error messages start with a capital |
237 letter but *do not* end with a period. Please follow this convention | 237 letter but *do not* end with a period. Please follow this convention |
238 for the sake of consistency." | 238 for the sake of consistency." |
239 (while t | 239 (while t |
240 (signal 'error (list (apply 'format args))))) | 240 (signal 'error (list (apply 'format args))))) |
241 (set-advertised-calling-convention 'error '(string &rest args)) | 241 (set-advertised-calling-convention 'error '(string &rest args) "23.1") |
242 | 242 |
243 ;; We put this here instead of in frame.el so that it's defined even on | 243 ;; We put this here instead of in frame.el so that it's defined even on |
244 ;; systems where frame.el isn't loaded. | 244 ;; systems where frame.el isn't loaded. |
245 (defun frame-configuration-p (object) | 245 (defun frame-configuration-p (object) |
246 "Return non-nil if OBJECT seems to be a frame configuration. | 246 "Return non-nil if OBJECT seems to be a frame configuration. |
1036 (defalias 'unfocus-frame 'ignore "") | 1036 (defalias 'unfocus-frame 'ignore "") |
1037 (make-obsolete 'unfocus-frame "it does nothing." "22.1") | 1037 (make-obsolete 'unfocus-frame "it does nothing." "22.1") |
1038 (make-obsolete 'make-variable-frame-local | 1038 (make-obsolete 'make-variable-frame-local |
1039 "explicitly check for a frame-parameter instead." "22.2") | 1039 "explicitly check for a frame-parameter instead." "22.2") |
1040 (make-obsolete 'interactive-p 'called-interactively-p "23.2") | 1040 (make-obsolete 'interactive-p 'called-interactively-p "23.2") |
1041 (set-advertised-calling-convention 'called-interactively-p '(kind)) | 1041 (set-advertised-calling-convention 'called-interactively-p '(kind) "23.1") |
1042 (set-advertised-calling-convention | 1042 (set-advertised-calling-convention |
1043 'all-completions '(string collection &optional predicate)) | 1043 'all-completions '(string collection &optional predicate) "23.1") |
1044 (set-advertised-calling-convention 'unintern '(name obarray) "23.3") | |
1044 | 1045 |
1045 ;;;; Obsolescence declarations for variables, and aliases. | 1046 ;;;; Obsolescence declarations for variables, and aliases. |
1046 | 1047 |
1047 ;; Special "default-FOO" variables which contain the default value of | 1048 ;; Special "default-FOO" variables which contain the default value of |
1048 ;; the "FOO" variable are nasty. Their implementation is brittle, and | 1049 ;; the "FOO" variable are nasty. Their implementation is brittle, and |
2059 ;; this-command-keys by read-key-sequence. | 2060 ;; this-command-keys by read-key-sequence. |
2060 (if (eq overriding-terminal-local-map universal-argument-map) | 2061 (if (eq overriding-terminal-local-map universal-argument-map) |
2061 (setq read (cons t read))) | 2062 (setq read (cons t read))) |
2062 (push read unread-command-events) | 2063 (push read unread-command-events) |
2063 nil)))))) | 2064 nil)))))) |
2064 (set-advertised-calling-convention 'sit-for '(seconds &optional nodisp)) | 2065 (set-advertised-calling-convention 'sit-for '(seconds &optional nodisp) "22.1") |
2065 | 2066 |
2066 ;;; Atomic change groups. | 2067 ;;; Atomic change groups. |
2067 | 2068 |
2068 (defmacro atomic-change-group (&rest body) | 2069 (defmacro atomic-change-group (&rest body) |
2069 "Perform BODY as an atomic change group. | 2070 "Perform BODY as an atomic change group. |
2587 ;; We used to use `exec' to replace the shell with the command, | 2588 ;; We used to use `exec' to replace the shell with the command, |
2588 ;; but that failed to handle (...) and semicolon, etc. | 2589 ;; but that failed to handle (...) and semicolon, etc. |
2589 (start-process name buffer shell-file-name shell-command-switch | 2590 (start-process name buffer shell-file-name shell-command-switch |
2590 (mapconcat 'identity args " "))) | 2591 (mapconcat 'identity args " "))) |
2591 (set-advertised-calling-convention 'start-process-shell-command | 2592 (set-advertised-calling-convention 'start-process-shell-command |
2592 '(name buffer command)) | 2593 '(name buffer command) "23.1") |
2593 | 2594 |
2594 (defun start-file-process-shell-command (name buffer &rest args) | 2595 (defun start-file-process-shell-command (name buffer &rest args) |
2595 "Start a program in a subprocess. Return the process object for it. | 2596 "Start a program in a subprocess. Return the process object for it. |
2596 Similar to `start-process-shell-command', but calls `start-file-process'." | 2597 Similar to `start-process-shell-command', but calls `start-file-process'." |
2597 (start-file-process | 2598 (start-file-process |
2598 name buffer | 2599 name buffer |
2599 (if (file-remote-p default-directory) "/bin/sh" shell-file-name) | 2600 (if (file-remote-p default-directory) "/bin/sh" shell-file-name) |
2600 (if (file-remote-p default-directory) "-c" shell-command-switch) | 2601 (if (file-remote-p default-directory) "-c" shell-command-switch) |
2601 (mapconcat 'identity args " "))) | 2602 (mapconcat 'identity args " "))) |
2602 (set-advertised-calling-convention 'start-file-process-shell-command | 2603 (set-advertised-calling-convention 'start-file-process-shell-command |
2603 '(name buffer command)) | 2604 '(name buffer command) "23.1") |
2604 | 2605 |
2605 (defun call-process-shell-command (command &optional infile buffer display | 2606 (defun call-process-shell-command (command &optional infile buffer display |
2606 &rest args) | 2607 &rest args) |
2607 "Execute the shell command COMMAND synchronously in separate process. | 2608 "Execute the shell command COMMAND synchronously in separate process. |
2608 The remaining arguments are optional. | 2609 The remaining arguments are optional. |