aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1991-05-09 21:50:34 +0000
committerRoland McGrath1991-05-09 21:50:34 +0000
commit7229064dbf9dfcb873824a6f2a9af0bdb112b550 (patch)
treef024dce4c7262b3a5803600360b1ade5bf8bdb59
parentd6003f63e9a3bee57bc3c87ac3e597326e221bb6 (diff)
downloademacs-7229064dbf9dfcb873824a6f2a9af0bdb112b550.tar.gz
emacs-7229064dbf9dfcb873824a6f2a9af0bdb112b550.zip
*** empty log message ***
-rw-r--r--lisp/emacs-lisp/backquote.el1
-rw-r--r--lisp/ledit.el19
-rw-r--r--lisp/lpr.el9
-rw-r--r--lisp/macros.el5
-rw-r--r--lisp/mail/mail-utils.el2
-rw-r--r--lisp/mail/mailalias.el1
-rw-r--r--lisp/man.el1
-rw-r--r--lisp/novice.el4
-rw-r--r--lisp/play/yow.el2
-rw-r--r--lisp/server.el1
-rw-r--r--lisp/terminal.el3
-rw-r--r--lisp/textmodes/ispell4.el4
-rw-r--r--lisp/textmodes/picture.el3
-rw-r--r--lisp/textmodes/tex-mode.el9
-rw-r--r--lisp/time.el19
-rw-r--r--lisp/view.el3
16 files changed, 68 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 715a794d5fe..3b9a071d378 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -90,6 +90,7 @@ a list-value atom"
90 90
91 91
92;;; This is the interface 92;;; This is the interface
93;;;###autoload
93(defmacro ` (form) 94(defmacro ` (form)
94 "(` FORM) is a macro that expands to code to construct FORM. 95 "(` FORM) is a macro that expands to code to construct FORM.
95Note that this is very slow in interpreted code, but fast if you compile. 96Note that this is very slow in interpreted code, but fast if you compile.
diff --git a/lisp/ledit.el b/lisp/ledit.el
index 0428fa8b228..2471b3f485b 100644
--- a/lisp/ledit.el
+++ b/lisp/ledit.el
@@ -32,13 +32,16 @@
32 "File name for data sent to Lisp compiler by Ledit.") 32 "File name for data sent to Lisp compiler by Ledit.")
33(defconst ledit-buffer "*LEDIT*" 33(defconst ledit-buffer "*LEDIT*"
34 "Name of buffer in which Ledit accumulates data to send to Lisp.") 34 "Name of buffer in which Ledit accumulates data to send to Lisp.")
35;These are now in loaddefs.el 35
36;(defconst ledit-save-files t 36;;;###autoload
37; "*Non-nil means Ledit should save files before transferring to Lisp.") 37(defconst ledit-save-files t
38;(defconst ledit-go-to-lisp-string "%?lisp" 38 "*Non-nil means Ledit should save files before transferring to Lisp.")
39; "*Shell commands to execute to resume Lisp job.") 39;;;###autoload
40;(defconst ledit-go-to-liszt-string "%?liszt" 40(defconst ledit-go-to-lisp-string "%?lisp"
41; "*Shell commands to execute to resume Lisp compiler job.") 41 "*Shell commands to execute to resume Lisp job.")
42;;;###autoload
43(defconst ledit-go-to-liszt-string "%?liszt"
44 "*Shell commands to execute to resume Lisp compiler job.")
42 45
43(defun ledit-save-defun () 46(defun ledit-save-defun ()
44 "Save the current defun in the ledit buffer" 47 "Save the current defun in the ledit buffer"
@@ -115,6 +118,7 @@
115 118
116(ledit-setup) 119(ledit-setup)
117 120
121;;;###autoload
118(defun ledit-mode () 122(defun ledit-mode ()
119 "\\<ledit-mode-map>Major mode for editing text and stuffing it to a Lisp job. 123 "\\<ledit-mode-map>Major mode for editing text and stuffing it to a Lisp job.
120Like Lisp mode, plus these special commands: 124Like Lisp mode, plus these special commands:
@@ -131,6 +135,7 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)"
131 (lisp-mode) 135 (lisp-mode)
132 (ledit-from-lisp-mode)) 136 (ledit-from-lisp-mode))
133 137
138;;;###autoload
134(defun ledit-from-lisp-mode () 139(defun ledit-from-lisp-mode ()
135 (use-local-map ledit-mode-map) 140 (use-local-map ledit-mode-map)
136 (setq mode-name "Ledit") 141 (setq mode-name "Ledit")
diff --git a/lisp/lpr.el b/lisp/lpr.el
index 3ae55b2f24a..74c58236149 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -18,8 +18,9 @@
18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20 20
21;(defconst lpr-switches nil 21;;;###autoload
22; "*List of strings to pass as extra switch args to lpr when it is invoked.") 22(defconst lpr-switches nil
23 "*List of strings to pass as extra switch args to lpr when it is invoked.")
23 24
24(defvar lpr-command (if (eq system-type 'usg-unix-v) 25(defvar lpr-command (if (eq system-type 'usg-unix-v)
25 "lp" "lpr") 26 "lp" "lpr")
@@ -29,24 +30,28 @@
29 "Function to call to print the region on a printer. 30 "Function to call to print the region on a printer.
30See definition of `print-region-1' for calling conventions.") 31See definition of `print-region-1' for calling conventions.")
31 32
33;;;###autoload
32(defun lpr-buffer () 34(defun lpr-buffer ()
33 "Print buffer contents as with Unix command `lpr'. 35 "Print buffer contents as with Unix command `lpr'.
34`lpr-switches' is a list of extra switches (strings) to pass to lpr." 36`lpr-switches' is a list of extra switches (strings) to pass to lpr."
35 (interactive) 37 (interactive)
36 (print-region-1 (point-min) (point-max) lpr-switches nil)) 38 (print-region-1 (point-min) (point-max) lpr-switches nil))
37 39
40;;;###autoload
38(defun print-buffer () 41(defun print-buffer ()
39 "Print buffer contents as with Unix command `lpr -p'. 42 "Print buffer contents as with Unix command `lpr -p'.
40`lpr-switches' is a list of extra switches (strings) to pass to lpr." 43`lpr-switches' is a list of extra switches (strings) to pass to lpr."
41 (interactive) 44 (interactive)
42 (print-region-1 (point-min) (point-max) lpr-switches t)) 45 (print-region-1 (point-min) (point-max) lpr-switches t))
43 46
47;;;###autoload
44(defun lpr-region (start end) 48(defun lpr-region (start end)
45 "Print region contents as with Unix command `lpr'. 49 "Print region contents as with Unix command `lpr'.
46`lpr-switches' is a list of extra switches (strings) to pass to lpr." 50`lpr-switches' is a list of extra switches (strings) to pass to lpr."
47 (interactive "r") 51 (interactive "r")
48 (print-region-1 start end lpr-switches nil)) 52 (print-region-1 start end lpr-switches nil))
49 53
54;;;###autoload
50(defun print-region (start end) 55(defun print-region (start end)
51 "Print region contents as with Unix command `lpr -p'. 56 "Print region contents as with Unix command `lpr -p'.
52`lpr-switches' is a list of extra switches (strings) to pass to lpr." 57`lpr-switches' is a list of extra switches (strings) to pass to lpr."
diff --git a/lisp/macros.el b/lisp/macros.el
index b318ff8eefb..94d5fabb411 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -18,6 +18,7 @@
18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20 20
21;;;###autoload
21(defun name-last-kbd-macro (symbol) 22(defun name-last-kbd-macro (symbol)
22 "Assign a name to the last keyboard macro defined. 23 "Assign a name to the last keyboard macro defined.
23Argument SYMBOL is the name to define. 24Argument SYMBOL is the name to define.
@@ -32,6 +33,7 @@ Such a \"function\" cannot be called from Lisp, but it is a valid editor command
32 symbol)) 33 symbol))
33 (fset symbol last-kbd-macro)) 34 (fset symbol last-kbd-macro))
34 35
36;;;###autoload
35(defun insert-kbd-macro (macroname &optional keys) 37(defun insert-kbd-macro (macroname &optional keys)
36 "Insert in buffer the definition of kbd macro NAME, as Lisp code. 38 "Insert in buffer the definition of kbd macro NAME, as Lisp code.
37Optional second arg KEYS means also record the keys it is on 39Optional second arg KEYS means also record the keys it is on
@@ -61,6 +63,7 @@ use this command, and then save the file."
61 (insert ")\n") 63 (insert ")\n")
62 (setq keys (cdr keys)))))) 64 (setq keys (cdr keys))))))
63 65
66;;;###autoload
64(defun kbd-macro-query (flag) 67(defun kbd-macro-query (flag)
65 "Query user during kbd macro execution. 68 "Query user during kbd macro execution.
66 With prefix argument, enters recursive edit, reading keyboard 69 With prefix argument, enters recursive edit, reading keyboard
@@ -100,3 +103,5 @@ C-l -- redisplay screen and ask again."
100 ((= char ?\C-r) 103 ((= char ?\C-r)
101 (let (executing-macro defining-kbd-macro) 104 (let (executing-macro defining-kbd-macro)
102 (recursive-edit)))))))))) 105 (recursive-edit))))))))))
106
107;;;###autoload (define-key ctl-x-map "q" 'kbd-macro-query)
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index a9eafa4b5e3..cdfd6ff0b62 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -20,7 +20,7 @@
20 20
21(provide 'mail-utils) 21(provide 'mail-utils)
22 22
23;; should be in loaddefs 23;;;###autoload
24(defvar mail-use-rfc822 nil 24(defvar mail-use-rfc822 nil
25 "*If non-nil, use a full, hairy RFC822 parser on mail addresses. 25 "*If non-nil, use a full, hairy RFC822 parser on mail addresses.
26Otherwise, (the default) use a smaller, somewhat faster, and 26Otherwise, (the default) use a smaller, somewhat faster, and
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 792514330fb..7201d0182e7 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -130,6 +130,7 @@ removed from alias expansions."
130 130
131;; Always autoloadable in case the user wants to define aliases 131;; Always autoloadable in case the user wants to define aliases
132;; interactively or in .emacs. 132;; interactively or in .emacs.
133;;;###autoload
133(defun define-mail-alias (name definition) 134(defun define-mail-alias (name definition)
134 "Define NAME as a mail alias that translates to DEFINITION. 135 "Define NAME as a mail alias that translates to DEFINITION.
135This means that sending a message to NAME will actually send to DEFINITION. 136This means that sending a message to NAME will actually send to DEFINITION.
diff --git a/lisp/man.el b/lisp/man.el
index a663373dea4..8f517627e08 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -17,6 +17,7 @@
17;; along with GNU Emacs; see the file COPYING. If not, write to 17;; along with GNU Emacs; see the file COPYING. If not, write to
18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20;;;###autoload
20(defun manual-entry (topic &optional section) 21(defun manual-entry (topic &optional section)
21 "Display the Unix manual entry for TOPIC. 22 "Display the Unix manual entry for TOPIC.
22TOPIC is either the title of the entry, or has the form TITLE(SECTION) 23TOPIC is either the title of the entry, or has the form TITLE(SECTION)
diff --git a/lisp/novice.el b/lisp/novice.el
index a0417f14ef2..caddf120743 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -23,6 +23,8 @@
23;; The command is found in this-command 23;; The command is found in this-command
24;; and the keys are returned by (this-command-keys). 24;; and the keys are returned by (this-command-keys).
25 25
26;;;###autoload (setq disabled-command-hook 'disabled-command-hook)
27;;;###autoload
26(defun disabled-command-hook (&rest ignore) 28(defun disabled-command-hook (&rest ignore)
27 (let (char) 29 (let (char)
28 (save-window-excursion 30 (save-window-excursion
@@ -67,6 +69,7 @@ N to do nothing (command remains disabled)."))
67 (if (/= char ?n) 69 (if (/= char ?n)
68 (call-interactively this-command)))) 70 (call-interactively this-command))))
69 71
72;;;###autoload
70(defun enable-command (command) 73(defun enable-command (command)
71 "Allow COMMAND to be executed without special confirmation from now on. 74 "Allow COMMAND to be executed without special confirmation from now on.
72The user's .emacs file is altered so that this will apply 75The user's .emacs file is altered so that this will apply
@@ -86,6 +89,7 @@ to future sessions."
86 (setq foo (buffer-modified-p)) 89 (setq foo (buffer-modified-p))
87 (save-buffer))) 90 (save-buffer)))
88 91
92;;;###autoload
89(defun disable-command (command) 93(defun disable-command (command)
90 "Require special confirmation to execute COMMAND from now on. 94 "Require special confirmation to execute COMMAND from now on.
91The user's .emacs file is altered so that this will apply 95The user's .emacs file is altered so that this will apply
diff --git a/lisp/play/yow.el b/lisp/play/yow.el
index e574b4fa906..46edb8e95fc 100644
--- a/lisp/play/yow.el
+++ b/lisp/play/yow.el
@@ -25,6 +25,7 @@
25; Expects file emacs/etc/yow.lines to be in ITS-style LINS format 25; Expects file emacs/etc/yow.lines to be in ITS-style LINS format
26; (ie strings terminated by ascii 0 characters. Leading whitespace ignored) 26; (ie strings terminated by ascii 0 characters. Leading whitespace ignored)
27; Everything up to the first \000 is a comment. 27; Everything up to the first \000 is a comment.
28;;;###autoload
28(defun yow (&optional n interactive) 29(defun yow (&optional n interactive)
29 "Return or display a Zippy quotation." 30 "Return or display a Zippy quotation."
30 (interactive "P\np") 31 (interactive "P\np")
@@ -69,6 +70,7 @@
69; 70;
70; written by Kayvan Aghaiepour 71; written by Kayvan Aghaiepour
71 72
73;;;###autoload
72(defun psychoanalyze-pinhead () 74(defun psychoanalyze-pinhead ()
73 "Zippy goes to the analyst." 75 "Zippy goes to the analyst."
74 (interactive) 76 (interactive)
diff --git a/lisp/server.el b/lisp/server.el
index f6518777d2c..e4259be4ff0 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -114,6 +114,7 @@ by the programs that invoke the emacs server.")
114 ((eq (process-status proc) 'signal) 114 ((eq (process-status proc) 'signal)
115 (server-log (message "Server subprocess killed"))))) 115 (server-log (message "Server subprocess killed")))))
116 116
117;;;###autoload
117(defun server-start (&optional leave-dead) 118(defun server-start (&optional leave-dead)
118 "Allow this Emacs process to be a server for client processes. 119 "Allow this Emacs process to be a server for client processes.
119This starts a server communications subprocess through which 120This starts a server communications subprocess through which
diff --git a/lisp/terminal.el b/lisp/terminal.el
index d2a514048cb..47bfddba555 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -982,6 +982,7 @@ of the virtual terminal to be appropriate for interactive use.")
982(defvar explicit-shell-file-name nil 982(defvar explicit-shell-file-name nil
983 "*If non-nil, is file name to use for explicitly requested inferior shell.") 983 "*If non-nil, is file name to use for explicitly requested inferior shell.")
984 984
985;;;###autoload
985(defun terminal-emulator (buffer program args &optional width height) 986(defun terminal-emulator (buffer program args &optional width height)
986 "Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS. 987 "Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS.
987ARGS is a list of argument-strings. Remaining arguments are WIDTH and HEIGHT. 988ARGS is a list of argument-strings. Remaining arguments are WIDTH and HEIGHT.
@@ -1225,4 +1226,4 @@ of the terminal-emulator"
1225 end 1226 end
1226 (1+ end))) 1227 (1+ end)))
1227 start (1+ end))) 1228 start (1+ end)))
1228 (concat "\"" harder "\""))))) \ No newline at end of file 1229 (concat "\"" harder "\"")))))
diff --git a/lisp/textmodes/ispell4.el b/lisp/textmodes/ispell4.el
index 782ea43103c..3ca62150511 100644
--- a/lisp/textmodes/ispell4.el
+++ b/lisp/textmodes/ispell4.el
@@ -185,6 +185,7 @@ word any word is checked for spelling. Result is
185(defun ispell-tex-buffer-p () 185(defun ispell-tex-buffer-p ()
186 (memq major-mode '(plain-TeX-mode LaTeX-mode))) 186 (memq major-mode '(plain-TeX-mode LaTeX-mode)))
187 187
188;;;###autoload
188(defun ispell (&optional buf start end) 189(defun ispell (&optional buf start end)
189 "Run ispell over current buffer's visited file. 190 "Run ispell over current buffer's visited file.
190First the file is scanned for misspelled words, then ispell 191First the file is scanned for misspelled words, then ispell
@@ -287,6 +288,7 @@ q, \\[keyboard-quit] Leave the command loop. You can come back later with \\[is
287 (ispell-dump)) 288 (ispell-dump))
288 289
289 290
291;;;###autoload
290(defun ispell-word () 292(defun ispell-word ()
291 "Check the spelling of the word under the cursor. 293 "Check the spelling of the word under the cursor.
292See `ispell' for more information." 294See `ispell' for more information."
@@ -301,7 +303,9 @@ See `ispell' for more information."
301 (load-library "spell") 303 (load-library "spell")
302 (define-key esc-map "$" 'spell-word) 304 (define-key esc-map "$" 'spell-word)
303 (spell-word)))))) 305 (spell-word))))))
306;;;###autoload (define-key esc-map "$" 'ispell-word)
304 307
308;;;###autoload
305(defun ispell-region (start &optional end) 309(defun ispell-region (start &optional end)
306 "Check the spelling for all of the words in the region." 310 "Check the spelling for all of the words in the region."
307 (interactive "r") 311 (interactive "r")
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index d6915c4b0ae..6c8b7a60b79 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -450,6 +450,7 @@ Leaves the region surrounding the rectangle."
450 "If non-nil, it's value is called on entry to Picture mode. 450 "If non-nil, it's value is called on entry to Picture mode.
451Picture mode is invoked by the command \\[edit-picture].") 451Picture mode is invoked by the command \\[edit-picture].")
452 452
453;;;###autoload
453(defun edit-picture () 454(defun edit-picture ()
454 "Switch to Picture mode, in which a quarter-plane screen model is used. 455 "Switch to Picture mode, in which a quarter-plane screen model is used.
455Printing characters replace instead of inserting themselves with motion 456Printing characters replace instead of inserting themselves with motion
@@ -532,7 +533,7 @@ they are not defaultly assigned to keys."
532 "Type \\[picture-mode-exit] in this buffer to return it to %s mode.") 533 "Type \\[picture-mode-exit] in this buffer to return it to %s mode.")
533 picture-mode-old-mode-name))) 534 picture-mode-old-mode-name)))
534 535
535(fset 'picture-mode 'edit-picture) ; for the confused 536;;;###autoload (fset 'picture-mode 'edit-picture)
536 537
537(defun picture-mode-exit (&optional nostrip) 538(defun picture-mode-exit (&optional nostrip)
538 "Undo edit-picture and return to previous major mode. 539 "Undo edit-picture and return to previous major mode.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 34daea299a3..be0b4037bed 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -140,6 +140,7 @@ Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].")
140 140
141;;; This would be a lot simpler if we just used a regexp search, 141;;; This would be a lot simpler if we just used a regexp search,
142;;; but then it would be too slow. 142;;; but then it would be too slow.
143;;;###autoload
143(defun tex-mode () 144(defun tex-mode ()
144 "Major mode for editing files of input for TeX, LaTeX, or SliTeX. 145 "Major mode for editing files of input for TeX, LaTeX, or SliTeX.
145Tries to determine (by looking at the beginning of the file) whether 146Tries to determine (by looking at the beginning of the file) whether
@@ -164,10 +165,10 @@ is used."
164 'plain-tex-mode)))) 165 'plain-tex-mode))))
165 (if mode (funcall mode) 166 (if mode (funcall mode)
166 (funcall tex-default-mode)))) 167 (funcall tex-default-mode))))
168;;;###autoload (fset 'TeX-mode 'tex-mode)
169;;;###autoload (fset 'LaTeX-mode 'latex-mode)
167 170
168(fset 'plain-TeX-mode 'plain-tex-mode) 171;;;###autoload
169(fset 'LaTeX-mode 'latex-mode)
170
171(defun plain-tex-mode () 172(defun plain-tex-mode ()
172 "Major mode for editing files of input for plain TeX. 173 "Major mode for editing files of input for plain TeX.
173Makes $ and } display the characters they match. 174Makes $ and } display the characters they match.
@@ -214,7 +215,9 @@ subshell is initiated, the value of tex-shell-hook is called."
214 (setq tex-end-of-header "%**end of header") 215 (setq tex-end-of-header "%**end of header")
215 (setq tex-trailer "\\bye\n") 216 (setq tex-trailer "\\bye\n")
216 (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook)) 217 (run-hooks 'text-mode-hook 'tex-mode-hook 'plain-tex-mode-hook))
218;;;###autoload (fset 'plain-TeX-mode 'plain-tex-mode)
217 219
220;;;###autoload
218(defun latex-mode () 221(defun latex-mode ()
219 "Major mode for editing files of input for LaTeX. 222 "Major mode for editing files of input for LaTeX.
220Makes $ and } display the characters they match. 223Makes $ and } display the characters they match.
diff --git a/lisp/time.el b/lisp/time.el
index 8a1f37f8e18..fe29ca567df 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -22,6 +22,10 @@
22 "*File name of mail inbox file, for indicating existence of new mail. 22 "*File name of mail inbox file, for indicating existence of new mail.
23Default is system-dependent, and is the same as used by Rmail.") 23Default is system-dependent, and is the same as used by Rmail.")
24 24
25;;;###autoload
26(defconst display-time-day-and-date nil "\
27*Non-nil means \\[display-time] should display day and date as well as time.")
28
25(defvar display-time-process nil) 29(defvar display-time-process nil)
26 30
27(defvar display-time-interval 60 31(defvar display-time-interval 60
@@ -32,6 +36,7 @@ Default is system-dependent, and is the same as used by Rmail.")
32(defvar display-time-hook nil 36(defvar display-time-hook nil
33 "* List of functions to be called when the time is updated on the mode line.") 37 "* List of functions to be called when the time is updated on the mode line.")
34 38
39;;;###autoload
35(defun display-time () 40(defun display-time ()
36 "Display current time and load level in mode line of each buffer. 41 "Display current time and load level in mode line of each buffer.
37Updates automatically every minute. 42Updates automatically every minute.
@@ -52,7 +57,7 @@ After each update, `display-time-hook' is run with `run-hooks'."
52 (setq display-time-string "") 57 (setq display-time-string "")
53 (setq display-time-process 58 (setq display-time-process
54 (start-process "display-time" nil 59 (start-process "display-time" nil
55 "wakeup" 60 (concat exec-directory "wakeup")
56 (int-to-string display-time-interval))) 61 (int-to-string display-time-interval)))
57 (process-kill-without-query display-time-process) 62 (process-kill-without-query display-time-process)
58 (set-process-sentinel display-time-process 'display-time-sentinel) 63 (set-process-sentinel display-time-process 'display-time-sentinel)
@@ -68,7 +73,10 @@ After each update, `display-time-hook' is run with `run-hooks'."
68 73
69(defun display-time-filter (proc string) 74(defun display-time-filter (proc string)
70 (let ((time (current-time-string)) 75 (let ((time (current-time-string))
71 (load (format "%03d" (car (load-average)))) 76 (load (condition-case ()
77 (if (zerop (car (load-average))) ""
78 (format "%03d" (car (load-average))))
79 (error "")))
72 (mail-spool-file (or display-time-mail-file 80 (mail-spool-file (or display-time-mail-file
73 (getenv "MAIL") 81 (getenv "MAIL")
74 (concat rmail-spool-directory 82 (concat rmail-spool-directory
@@ -88,7 +96,7 @@ After each update, `display-time-hook' is run with `run-hooks'."
88 (substring load 0 -2) "." (substring load -2) 96 (substring load 0 -2) "." (substring load -2)
89 (if (and (file-exists-p mail-spool-file) 97 (if (and (file-exists-p mail-spool-file)
90 ;; file not empty? 98 ;; file not empty?
91 (> (nth 7 (file-attributes mail-spool-file)) 0)) 99 (display-time-file-nonempty-p mail-spool-file))
92 " Mail" 100 " Mail"
93 ""))) 101 "")))
94 ;; Append the date if desired. 102 ;; Append the date if desired.
@@ -101,3 +109,8 @@ After each update, `display-time-hook' is run with `run-hooks'."
101 (set-buffer-modified-p (buffer-modified-p)) 109 (set-buffer-modified-p (buffer-modified-p))
102 ;; Do redisplay right now, if no input pending. 110 ;; Do redisplay right now, if no input pending.
103 (sit-for 0)) 111 (sit-for 0))
112
113(defun display-time-file-nonempty-p (file)
114 (while (file-symlink-p file)
115 (setq file (file-symlink-p file)))
116 (> (nth 7 (file-attributes file)) 0))
diff --git a/lisp/view.el b/lisp/view.el
index 36f0d7bb63b..8b0324cfbb4 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -90,6 +90,7 @@
90 ) 90 )
91 91
92 92
93;;;###autoload
93(defun view-file (file-name) 94(defun view-file (file-name)
94 "View FILE in View mode, returning to previous buffer when done. 95 "View FILE in View mode, returning to previous buffer when done.
95The usual Emacs commands are not available; instead, 96The usual Emacs commands are not available; instead,
@@ -108,6 +109,7 @@ Calls the value of view-hook if that is non-nil."
108 (and (not had-a-buf) (not (buffer-modified-p buf-to-view)) 109 (and (not had-a-buf) (not (buffer-modified-p buf-to-view))
109 'kill-buffer)))) 110 'kill-buffer))))
110 111
112;;;###autoload
111(defun view-buffer (buffer-name) 113(defun view-buffer (buffer-name)
112 "View BUFFER in View mode, returning to previous buffer when done. 114 "View BUFFER in View mode, returning to previous buffer when done.
113The usual Emacs commands are not available; instead, 115The usual Emacs commands are not available; instead,
@@ -122,6 +124,7 @@ Calls the value of view-hook if that is non-nil."
122 (switch-to-buffer buffer-name t) 124 (switch-to-buffer buffer-name t)
123 (view-mode old-buf nil))) 125 (view-mode old-buf nil)))
124 126
127;;;###autoload
125(defun view-mode (&optional prev-buffer action) 128(defun view-mode (&optional prev-buffer action)
126 "Major mode for viewing text but not editing it. 129 "Major mode for viewing text but not editing it.
127Letters do not insert themselves. Instead these commands are provided. 130Letters do not insert themselves. Instead these commands are provided.