diff options
| author | Pavel Janík | 2001-10-28 13:42:48 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-10-28 13:42:48 +0000 |
| commit | d883731ca8d48f947d4df178d64c41de989364c6 (patch) | |
| tree | 336e2bd022dfb21697b0a29830d95647b2d9f9c3 /src | |
| parent | 040122547f4264c7c6576bb9d0053dd9c3aac853 (diff) | |
| download | emacs-d883731ca8d48f947d4df178d64c41de989364c6.tar.gz emacs-d883731ca8d48f947d4df178d64c41de989364c6.zip | |
(bug_reporting_address): New function.
Use it when displaying usage message.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/emacs.c | 39 |
2 files changed, 40 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7d22191f326..cb6a27c6a4e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-10-28 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 1 | 2001-10-28 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 2 | ||
| 3 | * emacs.c (bug_reporting_address): New function. | ||
| 4 | Use it when displaying usage message. | ||
| 5 | |||
| 3 | * minibuf.c (read_minibuf): Remove unused external declaration of | 6 | * minibuf.c (read_minibuf): Remove unused external declaration of |
| 4 | variable `Qread_only'. | 7 | variable `Qread_only'. |
| 5 | 8 | ||
diff --git a/src/emacs.c b/src/emacs.c index 4222a8e3eb0..db031bc5c8a 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -285,8 +285,10 @@ abbreviation for a --option.\n\ | |||
| 285 | \n\ | 285 | \n\ |
| 286 | Various environment variables and window system resources also affect\n\ | 286 | Various environment variables and window system resources also affect\n\ |
| 287 | Emacs' operation. See the main documentation.\n\ | 287 | Emacs' operation. See the main documentation.\n\ |
| 288 | \n\ | 288 | \n" |
| 289 | Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\ | 289 | |
| 290 | #define USAGE3 "\ | ||
| 291 | Report bugs to %s. First, please see the Bugs\n\ | ||
| 290 | section of the Emacs manual or the file BUGS.\n" | 292 | section of the Emacs manual or the file BUGS.\n" |
| 291 | 293 | ||
| 292 | 294 | ||
| @@ -713,6 +715,38 @@ void (*__malloc_initialize_hook) () = malloc_initialize_hook; | |||
| 713 | 715 | ||
| 714 | #endif /* DOUG_LEA_MALLOC */ | 716 | #endif /* DOUG_LEA_MALLOC */ |
| 715 | 717 | ||
| 718 | |||
| 719 | #define REPORT_EMACS_BUG_ADDRESS "bug-gnu-emacs@gnu.org" | ||
| 720 | #define REPORT_EMACS_BUG_PRETEST_ADDRESS "emacs-pretest-bug@gnu.org" | ||
| 721 | |||
| 722 | /* This function is used to determine an address to which bug report should | ||
| 723 | be sent. */ | ||
| 724 | |||
| 725 | char *bug_reporting_address () | ||
| 726 | { | ||
| 727 | int count=0; | ||
| 728 | Lisp_Object temp; | ||
| 729 | char *string; | ||
| 730 | |||
| 731 | temp = Fsymbol_value (intern ("emacs-version")); | ||
| 732 | |||
| 733 | /* When `emacs-version' is invalid, use normal address. */ | ||
| 734 | if (!STRINGP(temp)) | ||
| 735 | return REPORT_EMACS_BUG_ADDRESS; | ||
| 736 | |||
| 737 | string = XSTRING (temp)->data; | ||
| 738 | |||
| 739 | do { | ||
| 740 | if (*string=='.') | ||
| 741 | count++; | ||
| 742 | } while (string++,*string); | ||
| 743 | |||
| 744 | /* When `emacs-version' has at least three dots, it is development or | ||
| 745 | pretest version of Emacs. */ | ||
| 746 | return (count>=3) ? REPORT_EMACS_BUG_PRETEST_ADDRESS : REPORT_EMACS_BUG_ADDRESS; | ||
| 747 | } | ||
| 748 | |||
| 749 | |||
| 716 | /* ARGSUSED */ | 750 | /* ARGSUSED */ |
| 717 | int | 751 | int |
| 718 | main (argc, argv, envp) | 752 | main (argc, argv, envp) |
| @@ -978,6 +1012,7 @@ main (argc, argv, envp) | |||
| 978 | { | 1012 | { |
| 979 | printf (USAGE1, argv[0]); | 1013 | printf (USAGE1, argv[0]); |
| 980 | printf (USAGE2); | 1014 | printf (USAGE2); |
| 1015 | printf (USAGE3, bug_reporting_address()); | ||
| 981 | exit (0); | 1016 | exit (0); |
| 982 | } | 1017 | } |
| 983 | 1018 | ||