annotate src/sound.h @ 4539:061e030e3270

Fix some bugs in load-history construction, built-in symbol file names. lib-src/ChangeLog addition: 2008-12-27 Aidan Kehoe <kehoea@parhasard.net> * make-docfile.c (main): Allow more than one -d argument, followed by a directory to change to. (put_filename): Don't strip directory information; with previous change, allows retrieval of Lisp function and variable origin files from #'built-in-symbol-file relative to lisp-directory. (scan_lisp_file): Don't add an extraneous newline after the file name, put_filename has added the newline already. lisp/ChangeLog addition: 2008-12-27 Aidan Kehoe <kehoea@parhasard.net> * loadup.el (load-history): Add the contents of current-load-list to load-history before clearing it. Move the variable declarations earlier in the file to a format understood by make-docfile.c. * custom.el (custom-declare-variable): Add the variable's symbol to the current file's load history entry correctly, don't use a cons. Eliminate a comment that we don't need to worry about, we don't need to check the `initialized' C variable in Lisp. * bytecomp.el (byte-compile-output-file-form): Merge Andreas Schwab's pre-GPLv3 GNU change of 19970831 here; treat #'custom-declare-variable correctly, generating the docstrings in a format understood by make-docfile.c. * loadhist.el (symbol-file): Correct behaviour for checking autoloaded macros and functions when supplied with a TYPE argument. Accept fully-qualified paths from #'built-in-symbol-file; if a path is not fully-qualified, return it relative to lisp-directory if the filename corresponds to a Lisp file, and relative to (concat source-directory "/src/") otherwise. * make-docfile.el (preloaded-file-list): Rationalise some let bindings a little. Use the "-d" argument to make-docfile.c to supply Lisp paths relative to lisp-directory, not absolutely. Add in loadup.el explicitly to the list of files to be processed by make-docfile.c--it doesn't make sense to add it to preloaded-file-list, since that is used for purposes of byte-compilation too. src/ChangeLog addition: 2008-12-27 Aidan Kehoe <kehoea@parhasard.net> * doc.c (Fbuilt_in_symbol_file): Return a subr's filename immediately if we've found it. Check for compiled function and compiled macro docstrings in DOC too, and return them if they exist. The branch of the if statement focused on functions may have executed, but we may still want to check variable bindings; an else clause isn't appropriate.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 27 Dec 2008 14:05:50 +0000
parents 902d5bd9b75c
children b3ea9c582280
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
1 /* Sound functions.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
2 Copyright (C) 2000 Free Software Foundation, Inc.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
3 Copyright (C) 2001 Ben Wing.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
4
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
5 This file is part of XEmacs.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
6
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
7 XEmacs is free software; you can redistribute it and/or modify it
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
10 later version.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
11
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
15 for more details.
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
16
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
21
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
23
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
24 /* This file Mule-ized by Ben Wing, 5-15-01. */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
25
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
26 #include "buffer.h"
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
27
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
28 /* Defined in *play.c */
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
29 void play_sound_file (Extbyte *name, int volume);
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2367
diff changeset
30 void nt_play_sound_file (Lisp_Object name, int volume);
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 867
diff changeset
31 int play_sound_data (Binbyte *data, int length, int volume);
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
32
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
33 # define sound_perror(string) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
34 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
35 Ibyte *errmess; \
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
36 Ibyte *string_int; \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 665
diff changeset
37 GET_STRERROR (errmess, errno); \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
38 EXTERNAL_TO_C_STRING (string, string_int, Qnative); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 616
diff changeset
39 warn_when_safe (Qsound, Qerror, "audio: %s, %s", string_int, errmess); \
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
40 } while (0)
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
41 # define sound_warn(string) \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
42 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 771
diff changeset
43 Ibyte *string_int; \
563
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
44 EXTERNAL_TO_C_STRING (GETTEXT (string), string_int, Qnative); \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
45 warn_when_safe (Qsound, Qwarning, "audio: %s", string_int); \
183866b06e0b [xemacs-hg @ 2001-05-24 07:50:48 by ben]
ben
parents:
diff changeset
46 } while (0)