aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog143
-rw-r--r--lisp/proced.el224
2 files changed, 244 insertions, 123 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b6bf23ccbdc..f76b7cd5553 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,22 @@
12008-04-13 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2
3 * proced.el (proced-command-alist): Remove sort column.
4 (proced-command, proced-procname-column): Use
5 make-variable-buffer-local.
6 (proced-signal-function): Renamed from proced-kill-program. Allow
7 for elisp symbols and string values representing system calls.
8 (proced-marker-regexp, proced-success-message): New functions.
9 (proced): Use defalias. Add autoload cookie.
10 (proced-unmark-backward, proced-toggle-marks)
11 (proced-hide-processes): New commands.
12 (proced-do-mark): Simplify code.
13 (proced-insert-mark): Use optional arg BACKWARD instead of line
14 number.
15 (proced-update): Remove sorting.
16 (proced-send-signal): Display number of processes to operate on.
17 Allow for system calls or elisp functions to send signals. Check
18 if signal was send successfully.
19
12008-04-13 Stefan Monnier <monnier@iro.umontreal.ca> 202008-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 21
3 * minibuffer.el (completion-all-completion-with-base-size): New var. 22 * minibuffer.el (completion-all-completion-with-base-size): New var.
@@ -101,7 +120,7 @@
101 Move non-autoloaded define-obsolete-variable-alias calls for defcustoms 120 Move non-autoloaded define-obsolete-variable-alias calls for defcustoms
102 not in dumped files before the associated defcustom. 121 not in dumped files before the associated defcustom.
103 122
1042008-04-11 Johan BockgÃ¥rd <bojohan@gnu.org> 1232008-04-11 Johan Bockgård <bojohan@gnu.org>
105 124
106 * minibuffer.el (lazy-completion-table): Fix debug spec. 125 * minibuffer.el (lazy-completion-table): Fix debug spec.
107 126
@@ -152,7 +171,7 @@
152 171
153 * loadup.el: Load ldefs-boot.el if loaddefs.el doesn't exist. 172 * loadup.el: Load ldefs-boot.el if loaddefs.el doesn't exist.
154 173
1552008-04-11 Jan Djärv <jan.h.d@swipnet.se> 1742008-04-11 Jan Djärv <jan.h.d@swipnet.se>
156 175
157 * tooltip.el (tooltip-show-help-non-mode): Set message-truncate-lines 176 * tooltip.el (tooltip-show-help-non-mode): Set message-truncate-lines
158 to t and don't truncate msg. 177 to t and don't truncate msg.
@@ -328,7 +347,7 @@
328 * nxml/nxml-mode.el (nxml-cleanup): New function. 347 * nxml/nxml-mode.el (nxml-cleanup): New function.
329 (nxml-mode): Add it to change-major-mode-hook. 348 (nxml-mode): Add it to change-major-mode-hook.
330 349
3312008-04-09 Jan Djärv <jan.h.d@swipnet.se> 3502008-04-09 Jan Djärv <jan.h.d@swipnet.se>
332 351
333 * term/x-win.el (x-gtk-stock-map): Map info to gtk-info. 352 * term/x-win.el (x-gtk-stock-map): Map info to gtk-info.
334 353
@@ -336,7 +355,7 @@
336 355
337 * calc/.cvsignore: New file. 356 * calc/.cvsignore: New file.
338 357
3392008-04-09 Jan Djärv <jan.h.d@swipnet.se> 3582008-04-09 Jan Djärv <jan.h.d@swipnet.se>
340 359
341 * vc.el (vc-status-tool-bar-map): Add vc-print-log to tool bar. 360 * vc.el (vc-status-tool-bar-map): Add vc-print-log to tool bar.
342 361
@@ -478,7 +497,7 @@
478 * faces.el (font-slant-table): Change numeric values for `r', 497 * faces.el (font-slant-table): Change numeric values for `r',
479 `roman', and `normal'. 498 `roman', and `normal'.
480 499
4812008-04-07 Vincent Belaïche <vincent.b.1@hotmail.fr> 5002008-04-07 Vincent Belaïche <vincent.b.1@hotmail.fr>
482 501
483 * calc/calc-vec.el (calcFunc-kron, calc-kron): New functions. 502 * calc/calc-vec.el (calcFunc-kron, calc-kron): New functions.
484 503
@@ -1548,7 +1567,7 @@
1548 Likewise for braille and mathematical. 1567 Likewise for braille and mathematical.
1549 Use unicode scripts that cover the phonetic script for IPA. 1568 Use unicode scripts that cover the phonetic script for IPA.
1550 1569
15512008-04-01 Johan BockgÃ¥rd <bojohan@gnu.org> 15702008-04-01 Johan Bockgård <bojohan@gnu.org>
1552 1571
1553 * emacs-lisp/cl-macs.el (frame-parameter) <defsetf>: Make it 1572 * emacs-lisp/cl-macs.el (frame-parameter) <defsetf>: Make it
1554 return the assigned value. 1573 return the assigned value.
@@ -1920,7 +1939,7 @@
1920 (verilog-auto-unused, verilog-auto): Update documentation to use 1939 (verilog-auto-unused, verilog-auto): Update documentation to use
1921 more obvious instance module names versus cell names. 1940 more obvious instance module names versus cell names.
1922 1941
19232008-03-28 Jan Djärv <jan.h.d@swipnet.se> 19422008-03-28 Jan Djärv <jan.h.d@swipnet.se>
1924 1943
1925 * progmodes/compile.el (compilation-mode-tool-bar-map): Only enable 1944 * progmodes/compile.el (compilation-mode-tool-bar-map): Only enable
1926 kill if a process is running. 1945 kill if a process is running.
@@ -2019,7 +2038,7 @@
2019 * image-mode.el (image-mode-reapply-winprops): Simplify now that 2038 * image-mode.el (image-mode-reapply-winprops): Simplify now that
2020 window-configuration-change-hook works buffer-locally. 2039 window-configuration-change-hook works buffer-locally.
2021 2040
20222008-03-26 Johan BockgÃ¥rd <bojohan@gnu.org> 20412008-03-26 Johan Bockgård <bojohan@gnu.org>
2023 2042
2024 * emacs-lisp/lisp-mnt.el (lm-with-file): Use mode and syntax table 2043 * emacs-lisp/lisp-mnt.el (lm-with-file): Use mode and syntax table
2025 for Emacs Lisp, not Lisp. 2044 for Emacs Lisp, not Lisp.
@@ -2032,7 +2051,7 @@
2032 * emacs-lisp/bytecomp.el (byte-compile-obsolete): If no 2051 * emacs-lisp/bytecomp.el (byte-compile-obsolete): If no
2033 replacement is provided, don't print "use nil instead". 2052 replacement is provided, don't print "use nil instead".
2034 2053
20352008-03-26 Johan BockgÃ¥rd <bojohan@gnu.org> 20542008-03-26 Johan Bockgård <bojohan@gnu.org>
2036 2055
2037 * complete.el (PC-do-completion): Use regexp-quote. 2056 * complete.el (PC-do-completion): Use regexp-quote.
2038 2057
@@ -2173,7 +2192,7 @@
2173 (verilog-signals-matching-regexp): New internal function for 2192 (verilog-signals-matching-regexp): New internal function for
2174 signal matching. 2193 signal matching.
2175 2194
21762008-03-25 Johan BockgÃ¥rd <bojohan@gnu.org> 21952008-03-25 Johan Bockgård <bojohan@gnu.org>
2177 2196
2178 * info.el (Info-isearch-search): Always return point. 2197 * info.el (Info-isearch-search): Always return point.
2179 2198
@@ -2610,7 +2629,7 @@
2610 * international/mule.el (load-with-code-conversion): Avoid setting 2629 * international/mule.el (load-with-code-conversion): Avoid setting
2611 default-enable-multibyte-characters. 2630 default-enable-multibyte-characters.
2612 2631
26132008-03-19 Gustav HÃ¥llberg <gustav@virtutech.com> (tiny change) 26322008-03-19 Gustav Hållberg <gustav@virtutech.com> (tiny change)
2614 2633
2615 * vc.el (vc-annotate-background): Fix custom type. 2634 * vc.el (vc-annotate-background): Fix custom type.
2616 2635
@@ -3173,7 +3192,7 @@
3173 * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Fix handling 3192 * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Fix handling
3174 of \ and '. 3193 of \ and '.
3175 3194
31762008-03-13 Johan BockgÃ¥rd <bojohan@gnu.org> 31952008-03-13 Johan Bockgård <bojohan@gnu.org>
3177 3196
3178 * net/browse-url.el (browse-url-text-xterm): 3197 * net/browse-url.el (browse-url-text-xterm):
3179 Unquote browse-url-text-browser. 3198 Unquote browse-url-text-browser.
@@ -3661,7 +3680,7 @@
3661 (bookmark-insert-buffer-name): Remove. 3680 (bookmark-insert-buffer-name): Remove.
3662 (bookmark-buffer-file-name): Signal an error rather than returning nil. 3681 (bookmark-buffer-file-name): Signal an error rather than returning nil.
3663 3682
36642008-03-09 Thomas Hühn <xf27@arcor.de> (tiny change) 36832008-03-09 Thomas Hühn <xf27@arcor.de> (tiny change)
3665 3684
3666 * tutorial.el (tutorial--default-keys): Update `C-l' binding. 3685 * tutorial.el (tutorial--default-keys): Update `C-l' binding.
3667 3686
@@ -3726,7 +3745,7 @@
3726 (bookmark-prop-get): Declare. 3745 (bookmark-prop-get): Declare.
3727 (Info-bookmark-jump): Use it. 3746 (Info-bookmark-jump): Use it.
3728 3747
37292008-03-08 Johan BockgÃ¥rd <bojohan@gnu.org> 37482008-03-08 Johan Bockgård <bojohan@gnu.org>
3730 3749
3731 * subr.el (while-no-input): Don't splice BODY directly into the 3750 * subr.el (while-no-input): Don't splice BODY directly into the
3732 `or' form. 3751 `or' form.
@@ -3930,7 +3949,7 @@
3930 * image-mode.el (image-bookmark-make-record): 3949 * image-mode.el (image-bookmark-make-record):
3931 * info.el (Info-bookmark-make-record): Delete obsolete second arg. 3950 * info.el (Info-bookmark-make-record): Delete obsolete second arg.
3932 3951
39332008-03-07 Jan Djärv <jan.h.d@swipnet.se> 39522008-03-07 Jan Djärv <jan.h.d@swipnet.se>
3934 3953
3935 * vc.el (vc-status-menu-map-filter): Return orig-binding if 3954 * vc.el (vc-status-menu-map-filter): Return orig-binding if
3936 boundp 'vc-ignore-menu-filter. 3955 boundp 'vc-ignore-menu-filter.
@@ -4080,7 +4099,7 @@
4080 (org-promote, org-demote, org-archive-subtree) 4099 (org-promote, org-demote, org-archive-subtree)
4081 (org-remember-handler, org-refile, org-put-clock-overlay): Use it. 4100 (org-remember-handler, org-refile, org-put-clock-overlay): Use it.
4082 4101
40832008-03-06 Jan Djärv <jan.h.d@swipnet.se> 41022008-03-06 Jan Djärv <jan.h.d@swipnet.se>
4084 4103
4085 * term/x-win.el (x-gtk-stock-map): Add bookmark_add. 4104 * term/x-win.el (x-gtk-stock-map): Add bookmark_add.
4086 4105
@@ -4577,7 +4596,7 @@
4577 when using transient-mark-mode. 4596 when using transient-mark-mode.
4578 (default-indicate-unused-lines): Remove unused var. 4597 (default-indicate-unused-lines): Remove unused var.
4579 4598
45802008-02-26 Jan Djärv <jan.h.d@swipnet.se> 45992008-02-26 Jan Djärv <jan.h.d@swipnet.se>
4581 4600
4582 * progmodes/grep.el (grep-mode-tool-bar-map): Change place on next 4601 * progmodes/grep.el (grep-mode-tool-bar-map): Change place on next
4583 and previous. 4602 and previous.
@@ -4647,7 +4666,7 @@
4647 * help-mode.el (help-info-variable): 4666 * help-mode.el (help-info-variable):
4648 New button able to read Info files for help-fns.el. 4667 New button able to read Info files for help-fns.el.
4649 4668
46502008-02-25 Jan Djärv <jan.h.d@swipnet.se> 46692008-02-25 Jan Djärv <jan.h.d@swipnet.se>
4651 4670
4652 * progmodes/grep.el (grep-mode-tool-bar-map): New variable. 4671 * progmodes/grep.el (grep-mode-tool-bar-map): New variable.
4653 (grep-mode): Use grep-mode-tool-bar-map. 4672 (grep-mode): Use grep-mode-tool-bar-map.
@@ -4884,7 +4903,7 @@
4884 * font-lock.el (font-lock-set-defaults): Unset previously set variables 4903 * font-lock.el (font-lock-set-defaults): Unset previously set variables
4885 when needed. 4904 when needed.
4886 4905
48872008-02-24 Ævar Arnfjörð Bjarmason <avar@cpan.org> (tiny change) 49062008-02-24 Ævar Arnfjörð Bjarmason <avar@cpan.org> (tiny change)
4888 4907
4889 * net/rcirc.el (rcirc-url-regexp): Replace definition by copying 4908 * net/rcirc.el (rcirc-url-regexp): Replace definition by copying
4890 from gnus-button-url-regexp. 4909 from gnus-button-url-regexp.
@@ -5460,7 +5479,7 @@
5460 * startup.el (command-line): Use custom-reevaluate-setting for 5479 * startup.el (command-line): Use custom-reevaluate-setting for
5461 transient-mark-mode. 5480 transient-mark-mode.
5462 5481
54632008-02-17 Michaël Cadilhac <michael@cadilhac.name> 54822008-02-17 Michaël Cadilhac <michael@cadilhac.name>
5464 5483
5465 * wdired.el (wdired-allow-to-change-permissions): Fix typo. 5484 * wdired.el (wdired-allow-to-change-permissions): Fix typo.
5466 5485
@@ -7610,7 +7629,7 @@
76102008-02-01 Dave Love <fx@gnu.org> 76292008-02-01 Dave Love <fx@gnu.org>
7611 7630
7612 * international/mule-diag.el (describe-character-set): 7631 * international/mule-diag.el (describe-character-set):
7613 Fix printing dimensions. Use `×', not `x'. 7632 Fix printing dimensions. Use `×', not `x'.
7614 7633
76152008-02-01 Kenichi Handa <handa@m17n.org> 76342008-02-01 Kenichi Handa <handa@m17n.org>
7616 7635
@@ -8057,7 +8076,7 @@
8057 8076
80582008-02-01 Dave Love <fx@gnu.org> 80772008-02-01 Dave Love <fx@gnu.org>
8059 8078
8060 * international/characters.el: Make Ÿ and ÿ a case pair. 8079 * international/characters.el: Make Ÿ and ÿ a case pair.
8061 8080
80622008-02-01 Kenichi Handa <handa@etl.go.jp> 80812008-02-01 Kenichi Handa <handa@etl.go.jp>
8063 8082
@@ -11994,7 +12013,7 @@
11994 12013
11995 * progmodes/python.el (top-level): Don't require cl when compiling. 12014 * progmodes/python.el (top-level): Don't require cl when compiling.
11996 12015
119972007-12-02 Agustín Martín <agustin.martin@hispalinux.es> 120162007-12-02 Agustín Martín <agustin.martin@hispalinux.es>
11998 12017
11999 * textmodes/flyspell.el (flyspell-large-region): Explicitly set 12018 * textmodes/flyspell.el (flyspell-large-region): Explicitly set
12000 encoding for aspell process and for communication with it. 12019 encoding for aspell process and for communication with it.
@@ -12738,7 +12757,7 @@
12738 (x-send-client-message): 12757 (x-send-client-message):
12739 * emulation/cua-base.el (x-clipboard-yank): Declare as functions. 12758 * emulation/cua-base.el (x-clipboard-yank): Declare as functions.
12740 12759
127412007-11-22 Jan Djärv <jan.h.d@swipnet.se> 127602007-11-22 Jan Djärv <jan.h.d@swipnet.se>
12742 12761
12743 * term/x-win.el (x-gtk-map-stock): Check if FILE is a string. 12762 * term/x-win.el (x-gtk-map-stock): Check if FILE is a string.
12744 12763
@@ -13651,7 +13670,7 @@
13651 13670
13652 * emulation/tpu-mapper.el (tpu-map-key): Remove un-needed cond branch. 13671 * emulation/tpu-mapper.el (tpu-map-key): Remove un-needed cond branch.
13653 13672
136542007-11-07 Johan BockgÃ¥rd <bojohan@gnu.org> 136732007-11-07 Johan Bockgård <bojohan@gnu.org>
13655 13674
13656 * eshell/esh-mode.el (eshell-output-filter): 13675 * eshell/esh-mode.el (eshell-output-filter):
13657 * eshell/esh-proc.el (eshell-insertion-filter, eshell-sentinel): 13676 * eshell/esh-proc.el (eshell-insertion-filter, eshell-sentinel):
@@ -15318,7 +15337,7 @@
15318 * help-fns.el (describe-function-1): Don't use the advice origname 15337 * help-fns.el (describe-function-1): Don't use the advice origname
15319 if it has no function definition. 15338 if it has no function definition.
15320 15339
153212007-10-18 Johan BockgÃ¥rd <bojohan@gnu.org> 153402007-10-18 Johan Bockgård <bojohan@gnu.org>
15322 15341
15323 * net/tramp.el (tramp-rfn-eshadow-update-overlay): Save excursion. 15342 * net/tramp.el (tramp-rfn-eshadow-update-overlay): Save excursion.
15324 Use `save-restriction' rather than `widen'. 15343 Use `save-restriction' rather than `widen'.
@@ -16021,7 +16040,7 @@
16021 (bs--get-mode-name, bs-mode): Fix typos in docstrings. 16040 (bs--get-mode-name, bs-mode): Fix typos in docstrings.
16022 (bs--format-aux): Doc fix. 16041 (bs--format-aux): Doc fix.
16023 16042
160242007-10-08 Michaël Cadilhac <michael@cadilhac.name> 160432007-10-08 Michaël Cadilhac <michael@cadilhac.name>
16025 16044
16026 * progmodes/gud.el (gud-gud-gdb-command-name): Fix typo in docstring. 16045 * progmodes/gud.el (gud-gud-gdb-command-name): Fix typo in docstring.
16027 16046
@@ -16067,11 +16086,11 @@
16067 * progmodes/gud.el (gud-display-line): Find source buffer even when 16086 * progmodes/gud.el (gud-display-line): Find source buffer even when
16068 GUD buffer has its own frame. 16087 GUD buffer has its own frame.
16069 16088
160702007-10-08 Jan Djärv <jan.h.d@swipnet.se> 160892007-10-08 Jan Djärv <jan.h.d@swipnet.se>
16071 16090
16072 * term/x-win.el (icon-map-list): Set to nil for 22.1 compatibility. 16091 * term/x-win.el (icon-map-list): Set to nil for 22.1 compatibility.
16073 16092
160742007-10-08 Jan Djärv <jan.h.d@swipnet.se> 160932007-10-08 Jan Djärv <jan.h.d@swipnet.se>
16075 16094
16076 * term/x-win.el (x-gtk-stock-map): Version is 22.2. 16095 * term/x-win.el (x-gtk-stock-map): Version is 22.2.
16077 16096
@@ -16449,7 +16468,7 @@
16449 * emacs-lisp/copyright.el (copyright-update): Don't update if the file 16468 * emacs-lisp/copyright.el (copyright-update): Don't update if the file
16450 already uses a more recent copyright version than the "current" one. 16469 already uses a more recent copyright version than the "current" one.
16451 16470
164522007-10-03 Michaël Cadilhac <michael@cadilhac.name> 164712007-10-03 Michaël Cadilhac <michael@cadilhac.name>
16453 16472
16454 * doc-view.el (doc-view-dvi->pdf-sentinel, doc-view-reset-slice) 16473 * doc-view.el (doc-view-dvi->pdf-sentinel, doc-view-reset-slice)
16455 (doc-view-insert-image): Minor aesthetical docstring changes. 16474 (doc-view-insert-image): Minor aesthetical docstring changes.
@@ -16820,7 +16839,7 @@
16820 * indent.el (indent-for-tab-command): First check if the region is 16839 * indent.el (indent-for-tab-command): First check if the region is
16821 active. 16840 active.
16822 16841
168232007-09-24 Michaël Cadilhac <michael@cadilhac.name> 168422007-09-24 Michaël Cadilhac <michael@cadilhac.name>
16824 16843
16825 * whitespace.el (whitespace-tickle-timer): Don't install the timer if 16844 * whitespace.el (whitespace-tickle-timer): Don't install the timer if
16826 whitespace-rescan-timer-time is 0. 16845 whitespace-rescan-timer-time is 0.
@@ -16940,7 +16959,7 @@
16940 * indent.el (indent-for-tab-command): Indent the region if 16959 * indent.el (indent-for-tab-command): Indent the region if
16941 transient-mark-mode and the region is active. 16960 transient-mark-mode and the region is active.
16942 16961
169432007-09-21 Francesco Potortì <pot@gnu.org> 169622007-09-21 Francesco Potortì <pot@gnu.org>
16944 16963
16945 * progmodes/octave-inf.el (inferior-octave-mode): Use add-hook to 16964 * progmodes/octave-inf.el (inferior-octave-mode): Use add-hook to
16946 add inferior-octave-directory-tracker to the buffer-local value 16965 add inferior-octave-directory-tracker to the buffer-local value
@@ -17104,7 +17123,7 @@
17104 (browse-url-elinks-sentinel): Use browse-url-elinks-new-window. 17123 (browse-url-elinks-sentinel): Use browse-url-elinks-new-window.
17105 Improve error message. 17124 Improve error message.
17106 17125
171072007-09-19 Michaël Cadilhac <michael@cadilhac.name> 171262007-09-19 Michaël Cadilhac <michael@cadilhac.name>
17108 17127
17109 * net/browse-url.el (browse-url-url-encode-chars): Use the right 17128 * net/browse-url.el (browse-url-url-encode-chars): Use the right
17110 parameter name in the function body. 17129 parameter name in the function body.
@@ -17140,7 +17159,7 @@
17140 * newcomment.el (comment-add): New arg EXTRA. 17159 * newcomment.el (comment-add): New arg EXTRA.
17141 (comment-region-default): Pass EXTRA if not indenting lines. 17160 (comment-region-default): Pass EXTRA if not indenting lines.
17142 17161
171432007-09-17 Michaël Cadilhac <michael@cadilhac.name> 171622007-09-17 Michaël Cadilhac <michael@cadilhac.name>
17144 17163
17145 * net/browse-url.el (browse-url-url-encode-chars): New function. 17164 * net/browse-url.el (browse-url-url-encode-chars): New function.
17146 URL-encode some chars in a string. 17165 URL-encode some chars in a string.
@@ -17189,7 +17208,7 @@
17189 (move-beginning-of-line): Remove unused var `start'. 17208 (move-beginning-of-line): Remove unused var `start'.
17190 (blink-matching-open): Restructure in a more functional style. 17209 (blink-matching-open): Restructure in a more functional style.
17191 17210
171922007-09-16 Michaël Cadilhac <michael@cadilhac.name> 172112007-09-16 Michaël Cadilhac <michael@cadilhac.name>
17193 17212
17194 * calendar/holidays.el (list-holidays): Remove the cyclic alias. 17213 * calendar/holidays.el (list-holidays): Remove the cyclic alias.
17195 17214
@@ -17347,7 +17366,7 @@
17347 17366
17348 * term/rxvt.el (rxvt-function-map): Initialize in the declaration. 17367 * term/rxvt.el (rxvt-function-map): Initialize in the declaration.
17349 17368
173502007-09-12 Michaël Cadilhac <michael@cadilhac.name> 173692007-09-12 Michaël Cadilhac <michael@cadilhac.name>
17351 17370
17352 * net/browse-url.el (browse-url-encode-url): Fix an infinite loop. 17371 * net/browse-url.el (browse-url-encode-url): Fix an infinite loop.
17353 New argument `filename-p' to use one set of confusing chars or another. 17372 New argument `filename-p' to use one set of confusing chars or another.
@@ -17390,7 +17409,7 @@
173902007-09-10 Thien-Thi Nguyen <ttn@gnuvola.org> 174092007-09-10 Thien-Thi Nguyen <ttn@gnuvola.org>
17391 17410
17392 * net/browse-url.el (browse-url-encode-url): Use copy-sequence. 17411 * net/browse-url.el (browse-url-encode-url): Use copy-sequence.
17393 Reported by Jan Djärv <jan.h.d@swipnet.se>. 17412 Reported by Jan Djärv <jan.h.d@swipnet.se>.
17394 17413
173952007-09-10 Dave Love <fx@gnu.org> 174142007-09-10 Dave Love <fx@gnu.org>
17396 17415
@@ -17398,7 +17417,7 @@
17398 Move font-lock-builtin-face down from 4 to 7 to better keep the 17417 Move font-lock-builtin-face down from 4 to 7 to better keep the
17399 progression of color brightness, and to better match Org-mode's faces. 17418 progression of color brightness, and to better match Org-mode's faces.
17400 17419
174012007-09-10 Michaël Cadilhac <michael@cadilhac.name> 174202007-09-10 Michaël Cadilhac <michael@cadilhac.name>
17402 17421
17403 * progmodes/meta-mode.el (meta-font-lock-keywords) 17422 * progmodes/meta-mode.el (meta-font-lock-keywords)
17404 (font-lock-match-meta-declaration-item-and-skip-to-next) 17423 (font-lock-match-meta-declaration-item-and-skip-to-next)
@@ -17566,7 +17585,7 @@
17566 17585
17567 * vc-arch.el (vc-arch-checkin): Fix typo. 17586 * vc-arch.el (vc-arch-checkin): Fix typo.
17568 17587
175692007-09-07 Johan BockgÃ¥rd <bojohan@gnu.org> 175882007-09-07 Johan Bockgård <bojohan@gnu.org>
17570 17589
17571 * cus-face.el (custom-theme-set-faces): Set face attributes 17590 * cus-face.el (custom-theme-set-faces): Set face attributes
17572 locally for each frame. 17591 locally for each frame.
@@ -17635,7 +17654,7 @@
17635 * complete.el (PC-do-completion): Don't try to treat 17654 * complete.el (PC-do-completion): Don't try to treat
17636 empty string as an abbreviation. 17655 empty string as an abbreviation.
17637 17656
176382007-09-06 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> 176572007-09-06 Johan Bockgård <bojohan@dd.chalmers.se>
17639 17658
17640 * help-fns.el (describe-variable): Keep doc's text properties. 17659 * help-fns.el (describe-variable): Keep doc's text properties.
17641 17660
@@ -17662,7 +17681,7 @@
17662 (normal-no-mouse-startup-screen): New fn, broken out. 17681 (normal-no-mouse-startup-screen): New fn, broken out.
17663 (normal-about-screen): New function, contents all new. 17682 (normal-about-screen): New function, contents all new.
17664 17683
176652007-09-05 Michaël Cadilhac <michael@cadilhac.name> 176842007-09-05 Michaël Cadilhac <michael@cadilhac.name>
17666 17685
17667 * emacs-lisp/rx.el (rx): Fix typo in docstring. 17686 * emacs-lisp/rx.el (rx): Fix typo in docstring.
17668 17687
@@ -17671,7 +17690,7 @@
17671 * cus-edit.el (custom-buffer-create-internal): Check tool-bar-mode 17690 * cus-edit.el (custom-buffer-create-internal): Check tool-bar-mode
17672 is bound. 17691 is bound.
17673 17692
176742007-09-05 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> 176932007-09-05 Johan Bockgård <bojohan@dd.chalmers.se>
17675 17694
17676 * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note 17695 * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note
17677 in doc string. 17696 in doc string.
@@ -17743,7 +17762,7 @@
17743 (terminal-init-xterm): Use it. Deal with delete-frame hook. 17762 (terminal-init-xterm): Use it. Deal with delete-frame hook.
17744 Add the selected frame to xterm-modify-other-keys-terminal-list. 17763 Add the selected frame to xterm-modify-other-keys-terminal-list.
17745 17764
177462007-09-02 Jan Djärv <jan.h.d@swipnet.se> 177652007-09-02 Jan Djärv <jan.h.d@swipnet.se>
17747 17766
17748 * term/x-win.el (x-gtk-stock-map): Map diropen to system-file-manager. 17767 * term/x-win.el (x-gtk-stock-map): Map diropen to system-file-manager.
17749 (icon-map-list): New variable. 17768 (icon-map-list): New variable.
@@ -17789,7 +17808,7 @@
17789 17808
17790 * vc-svn.el (vc-svn-diff-tree): Pass a list to vc-svn-diff. 17809 * vc-svn.el (vc-svn-diff-tree): Pass a list to vc-svn-diff.
17791 17810
177922007-08-31 Michaël Cadilhac <michael@cadilhac.name> 178112007-08-31 Michaël Cadilhac <michael@cadilhac.name>
17793 17812
17794 * textmodes/flyspell.el (flyspell-mark-duplications-exceptions): 17813 * textmodes/flyspell.el (flyspell-mark-duplications-exceptions):
17795 New variable. List of exceptions for the duplicated word rule. 17814 New variable. List of exceptions for the duplicated word rule.
@@ -17799,7 +17818,7 @@
17799 * files.el (create-file-buffer): If the filename sans directory starts 17818 * files.el (create-file-buffer): If the filename sans directory starts
17800 with spaces, remove them. 17819 with spaces, remove them.
17801 17820
178022007-08-31 Jan Djärv <jan.h.d@swipnet.se> 178212007-08-31 Jan Djärv <jan.h.d@swipnet.se>
17803 17822
17804 * term/x-win.el (x-gtk-stock-map): Add etc/images to keys. 17823 * term/x-win.el (x-gtk-stock-map): Add etc/images to keys.
17805 (x-gtk-map-stock): Use two directory elements when matching 17824 (x-gtk-map-stock): Use two directory elements when matching
@@ -17906,7 +17925,7 @@
17906 17925
17907 * version.el (emacs-version): Increase to 23.0.50. 17926 * version.el (emacs-version): Increase to 23.0.50.
17908 17927
179092007-08-29 Jan Djärv <jan.h.d@swipnet.se> 179282007-08-29 Jan Djärv <jan.h.d@swipnet.se>
17910 17929
17911 * term/x-win.el (x-gtk-stock-map): :version changed to 23.1. 17930 * term/x-win.el (x-gtk-stock-map): :version changed to 23.1.
17912 17931
@@ -17962,7 +17981,7 @@
17962 17981
17963 * env.el (getenv): Pass frame to getenv-internal. 17982 * env.el (getenv): Pass frame to getenv-internal.
17964 17983
179652007-08-29 Károly LÅ‘rentey <lorentey@elte.hu> 179842007-08-29 Károly LÅ‘rentey <lorentey@elte.hu>
17966 17985
17967 * version.el (emacs-version): Show if multi-tty is present. 17986 * version.el (emacs-version): Show if multi-tty is present.
17968 17987
@@ -18263,7 +18282,7 @@
18263 (display-time-world-timer-second, display-time-world-mode-map): 18282 (display-time-world-timer-second, display-time-world-mode-map):
18264 New variables. 18283 New variables.
18265 18284
182662007-08-28 Jan Djärv <jan.h.d@swipnet.se> 182852007-08-28 Jan Djärv <jan.h.d@swipnet.se>
18267 18286
18268 * term/x-win.el (x-gtk-stock-map): New variable. 18287 * term/x-win.el (x-gtk-stock-map): New variable.
18269 (x-gtk-map-stock): New function. 18288 (x-gtk-map-stock): New function.
@@ -18271,7 +18290,7 @@
18271 * info.el (info-tool-bar-map): Add :rtl keyword to right/left-arrow and 18290 * info.el (info-tool-bar-map): Add :rtl keyword to right/left-arrow and
18272 prev/next-node. 18291 prev/next-node.
18273 18292
182742007-08-28 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> (tiny change) 182932007-08-28 Johan Bockgård <bojohan@dd.chalmers.se> (tiny change)
18275 18294
18276 * play/gamegrid.el (gamegrid-init): Set line-spacing to 0. 18295 * play/gamegrid.el (gamegrid-init): Set line-spacing to 0.
18277 18296
@@ -18371,7 +18390,7 @@
18371 18390
18372 * vc.el (vc-annotate-warp-version): Don't use previous-line. 18391 * vc.el (vc-annotate-warp-version): Don't use previous-line.
18373 18392
183742007-08-27 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> 183932007-08-27 Johan Bockgård <bojohan@dd.chalmers.se>
18375 18394
18376 * net/browse-url.el (browse-url-emacs): New function. 18395 * net/browse-url.el (browse-url-emacs): New function.
18377 18396
@@ -18379,7 +18398,7 @@
18379 18398
18380 * emacs-lisp/avl-tree.el: New file. 18399 * emacs-lisp/avl-tree.el: New file.
18381 18400
183822007-08-26 Michaël Cadilhac <michael@cadilhac.name> 184012007-08-26 Michaël Cadilhac <michael@cadilhac.name>
18383 18402
18384 * hi-lock.el (hi-lock-unface-buffer): Show a x-menu only if the mouse 18403 * hi-lock.el (hi-lock-unface-buffer): Show a x-menu only if the mouse
18385 was used. 18404 was used.
@@ -18827,7 +18846,7 @@
18827 undo-list when setting syntax-table properties. 18846 undo-list when setting syntax-table properties.
18828 (ada-after-change-function): Use ada-set-syntax-table-properties. 18847 (ada-after-change-function): Use ada-set-syntax-table-properties.
18829 18848
188302007-08-18 Michaël Cadilhac <michael@cadilhac.name> 188492007-08-18 Michaël Cadilhac <michael@cadilhac.name>
18831 18850
18832 * progmodes/meta-mode.el (meta-indent-calculate-last): Remove. 18851 * progmodes/meta-mode.el (meta-indent-calculate-last): Remove.
18833 (meta-indent-current-nesting): Use a computation of the nesting 18852 (meta-indent-current-nesting): Use a computation of the nesting
@@ -18880,7 +18899,7 @@
18880 (cperl-find-pods-heres): Fix an error when typing expressions like 18899 (cperl-find-pods-heres): Fix an error when typing expressions like
18881 `s{a}{b}'. 18900 `s{a}{b}'.
18882 18901
188832007-08-17 Michaël Cadilhac <michael@cadilhac.name> 189022007-08-17 Michaël Cadilhac <michael@cadilhac.name>
18884 18903
18885 * mail/emacsbug.el (report-emacs-bug): Remove the last number of 18904 * mail/emacsbug.el (report-emacs-bug): Remove the last number of
18886 `emacs-version', use the topic prefix ``version; ''. Make MS-DOS 18905 `emacs-version', use the topic prefix ``version; ''. Make MS-DOS
@@ -18971,7 +18990,7 @@
18971 sloppier, for the sake of GNU Mailman. 18990 sloppier, for the sake of GNU Mailman.
18972 (rmail-digest-rfc1153): Initialize `result' correctly. 18991 (rmail-digest-rfc1153): Initialize `result' correctly.
18973 18992
189742007-08-15 Michaël Cadilhac <michael@cadilhac.name> 189932007-08-15 Michaël Cadilhac <michael@cadilhac.name>
18975 18994
18976 * mail/emacsbug.el (report-emacs-bug): Put `Bug: emacs-version; ' 18995 * mail/emacsbug.el (report-emacs-bug): Put `Bug: emacs-version; '
18977 in the mail title. Suggested by Reiner Steib. 18996 in the mail title. Suggested by Reiner Steib.
@@ -20070,7 +20089,7 @@
20070 20089
20071 * net/trampver.el: Update release number. 20090 * net/trampver.el: Update release number.
20072 20091
200732007-07-22 Jan Djärv <jan.h.d@swipnet.se> 200922007-07-22 Jan Djärv <jan.h.d@swipnet.se>
20074 20093
20075 * startup.el (command-line-x-option-alist): Use x-handle-no-bitmap-icon. 20094 * startup.el (command-line-x-option-alist): Use x-handle-no-bitmap-icon.
20076 20095
@@ -20715,7 +20734,7 @@
20715 * isearch.el (isearch-edit-string): Call to isearch-push-state 20734 * isearch.el (isearch-edit-string): Call to isearch-push-state
20716 after the search. 20735 after the search.
20717 20736
207182007-07-09 Jan Djärv <jan.h.d@swipnet.se> 207372007-07-09 Jan Djärv <jan.h.d@swipnet.se>
20719 20738
20720 * window.el (fit-window-to-buffer): Remove setting of window-min-height 20739 * window.el (fit-window-to-buffer): Remove setting of window-min-height
20721 to 1 as enlarge-window uses the value to resize/shrink windows other 20740 to 1 as enlarge-window uses the value to resize/shrink windows other
@@ -21094,7 +21113,7 @@
21094 * font-lock.el (lisp-font-lock-keywords-2): Recognize the new \(?1:..\) 21113 * font-lock.el (lisp-font-lock-keywords-2): Recognize the new \(?1:..\)
21095 syntax as well. Reported by Juri Linkov <juri@jurta.org>. 21114 syntax as well. Reported by Juri Linkov <juri@jurta.org>.
21096 21115
210972007-06-28 Jan Djärv <jan.h.d@swipnet.se> 211162007-06-28 Jan Djärv <jan.h.d@swipnet.se>
21098 21117
21099 * dnd.el (dnd-get-local-file-name): Set fixcase to t in call to 21118 * dnd.el (dnd-get-local-file-name): Set fixcase to t in call to
21100 replace-regexp-in-string. 21119 replace-regexp-in-string.
@@ -21707,7 +21726,7 @@
21707 21726
21708 * diff-mode.el (diff-font-lock-keywords): Fix M. Kifer's last change. 21727 * diff-mode.el (diff-font-lock-keywords): Fix M. Kifer's last change.
21709 21728
217102007-06-13 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> (tiny change) 217292007-06-13 Johan Bockgård <bojohan@dd.chalmers.se> (tiny change)
21711 21730
21712 * term/xterm.el (terminal-init-xterm): Escape parens in character 21731 * term/xterm.el (terminal-init-xterm): Escape parens in character
21713 constants. 21732 constants.
@@ -21886,7 +21905,7 @@
21886 * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): 21905 * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions):
21887 Match against file-name-nondirectory. 21906 Match against file-name-nondirectory.
21888 Fix text on user customization variables. 21907 Fix text on user customization variables.
21889 Reported by Johan BockgÃ¥rd <bojohan@dd.chalmers.se>. 21908 Reported by Johan Bockgård <bojohan@dd.chalmers.se>.
21890 21909
218912007-06-09 Alfred M. Szmidt <ams@gnu.org> (tiny change) 219102007-06-09 Alfred M. Szmidt <ams@gnu.org> (tiny change)
21892 21911
@@ -22284,7 +22303,7 @@
22284 22303
22285 * files.el (set-auto-mode): Doc fix. 22304 * files.el (set-auto-mode): Doc fix.
22286 22305
222872007-05-22 Jan Djärv <jan.h.d@swipnet.se> 223062007-05-22 Jan Djärv <jan.h.d@swipnet.se>
22288 22307
22289 * help-fns.el (find-source-lisp-file): New function. 22308 * help-fns.el (find-source-lisp-file): New function.
22290 (describe-function-1): Use find-source-lisp-file to find source 22309 (describe-function-1): Use find-source-lisp-file to find source
@@ -22492,7 +22511,7 @@
22492 * dabbrev.el (dabbrev-eliminate-newlines): 22511 * dabbrev.el (dabbrev-eliminate-newlines):
22493 Renamed from dabbrev--eliminate-newlines. All uses changed. 22512 Renamed from dabbrev--eliminate-newlines. All uses changed.
22494 22513
224952007-05-10 Michaël Cadilhac <michael@cadilhac.name> 225142007-05-10 Michaël Cadilhac <michael@cadilhac.name>
22496 22515
22497 * man.el (Man-next-section): Don't consider the last line of the page 22516 * man.el (Man-next-section): Don't consider the last line of the page
22498 as being part of any section. 22517 as being part of any section.
@@ -22675,7 +22694,7 @@
22675 * image-dired.el (image-dired-display-image): Derive image-type from 22694 * image-dired.el (image-dired-display-image): Derive image-type from
22676 filename rather than assuming jpeg, in case no resizing was needed. 22695 filename rather than assuming jpeg, in case no resizing was needed.
22677 22696
226782007-04-25 Johan BockgÃ¥rd <bojohan@dd.chalmers.se> 226972007-04-25 Johan Bockgård <bojohan@dd.chalmers.se>
22679 22698
22680 * custom.el (defface): Doc fix. 22699 * custom.el (defface): Doc fix.
22681 22700
diff --git a/lisp/proced.el b/lisp/proced.el
index 6f2543ac9ac..9840d6f808f 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1,4 +1,4 @@
1;;; proced.el --- operate on processes like dired 1;;; proced.el --- operate on system processes like dired
2 2
3;; Copyright (C) 2008 Free Software Foundation, Inc. 3;; Copyright (C) 2008 Free Software Foundation, Inc.
4 4
@@ -24,18 +24,15 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; Proced makes an Emacs buffer containing a listing of the current processes 27;; Proced makes an Emacs buffer containing a listing of the current system
28;; (using ps(1)). You can use the normal Emacs commands to move around in 28;; processes (using ps(1)). You can use the normal Emacs commands
29;; this buffer, and special Proced commands to operate on the processes listed. 29;; to move around in this buffer, and special Proced commands to operate
30;; on the processes listed.
30;; 31;;
31;; To autoload, use 32;; To do:
32;; (autoload 'proced "proced" nil t)
33;; in your .emacs file.
34;;
35;; Is there a need for additional features like:
36;; - automatic update of process list
37;; - sort by CPU time or other criteria 33;; - sort by CPU time or other criteria
38;; - filter by user name or other criteria 34;; - filter by user name or other criteria
35;; - automatic update of process list
39 36
40;;; Code: 37;;; Code:
41 38
@@ -69,15 +66,13 @@
69 `(("user" ("ps" "-fu" ,(number-to-string (user-uid))) 2) 66 `(("user" ("ps" "-fu" ,(number-to-string (user-uid))) 2)
70 ("all" ("ps" "-ef") 2)))) 67 ("all" ("ps" "-ef") 2))))
71 "Alist of commands to get list of processes. 68 "Alist of commands to get list of processes.
72Each element has the form (NAME COMMAND PID-COLUMN SORT-COLUMN). 69Each element has the form (NAME COMMAND PID-COLUMN).
73NAME is a shorthand name to select the type of listing. 70NAME is a shorthand name to select the type of listing.
74COMMAND is a list (COMMAND-NAME ARG1 ARG2 ...), 71COMMAND is a list (COMMAND-NAME ARG1 ARG2 ...),
75where COMMAND-NAME is the command to generate the listing (usually \"ps\"). 72where COMMAND-NAME is the command to generate the listing (usually \"ps\").
76ARG1, ARG2, ... are arguments passed to COMMAND-NAME to generate 73ARG1, ARG2, ... are arguments passed to COMMAND-NAME to generate
77a particular listing. These arguments differ under various operating systems. 74a particular listing. These arguments differ under various operating systems.
78PID-COLUMN is the column number (starting from 1) of the process ID. 75PID-COLUMN is the column number (starting from 1) of the process ID."
79SORT-COLUMN is the column number used for sorting the process listing
80\(must be a numeric field). If nil, the process listing is not sorted."
81 :group 'proced 76 :group 'proced
82 :type '(repeat (group (string :tag "name") 77 :type '(repeat (group (string :tag "name")
83 (cons (string :tag "command") 78 (cons (string :tag "command")
@@ -90,11 +85,15 @@ SORT-COLUMN is the column number used for sorting the process listing
90Must be the car of an element of `proced-command-alist'." 85Must be the car of an element of `proced-command-alist'."
91 :group 'proced 86 :group 'proced
92 :type '(string :tag "name")) 87 :type '(string :tag "name"))
88(make-variable-buffer-local 'proced-command)
93 89
94(defcustom proced-kill-program "kill" 90(defcustom proced-signal-function 'signal-process
95 "Name of kill command (usually `kill')." 91 "Name of signal function.
92It can be an elisp function (usually `signal-process') or a string specifying
93the external command (usually \"kill\")."
96 :group 'proced 94 :group 'proced
97 :type '(string :tag "command")) 95 :type '(choice (function :tag "function")
96 (string :tag "command")))
98 97
99(defcustom proced-signal-list 98(defcustom proced-signal-list
100 '(("HUP (1. Hangup)") 99 '(("HUP (1. Hangup)")
@@ -148,6 +147,7 @@ Important: the match ends just after the marker.")
148(defvar proced-procname-column nil 147(defvar proced-procname-column nil
149 "Proced command column. 148 "Proced command column.
150Initialized based on `proced-procname-column-regexp'.") 149Initialized based on `proced-procname-column-regexp'.")
150(make-variable-buffer-local 'proced-procname-column)
151 151
152(defvar proced-font-lock-keywords 152(defvar proced-font-lock-keywords
153 (list 153 (list
@@ -173,13 +173,16 @@ Initialized based on `proced-procname-column-regexp'.")
173 (define-key km "d" 'proced-mark) ; Dired compatibility 173 (define-key km "d" 'proced-mark) ; Dired compatibility
174 (define-key km "m" 'proced-mark) 174 (define-key km "m" 'proced-mark)
175 (define-key km "M" 'proced-mark-all) 175 (define-key km "M" 'proced-mark-all)
176 (define-key km "g" 'revert-buffer) ; Dired compatibility
177 (define-key km "q" 'quit-window)
178 (define-key km "u" 'proced-unmark) 176 (define-key km "u" 'proced-unmark)
177 (define-key km "\177" 'proced-unmark-backward)
179 (define-key km "U" 'proced-unmark-all) 178 (define-key km "U" 'proced-unmark-all)
179 (define-key km "t" 'proced-toggle-marks)
180 (define-key km "h" 'proced-hide-processes)
180 (define-key km "x" 'proced-send-signal) ; Dired compatibility 181 (define-key km "x" 'proced-send-signal) ; Dired compatibility
181 (define-key km "k" 'proced-send-signal) ; kill processes 182 (define-key km "k" 'proced-send-signal) ; kill processes
182 (define-key km "l" 'proced-listing-type) 183 (define-key km "l" 'proced-listing-type)
184 (define-key km "g" 'revert-buffer) ; Dired compatibility
185 (define-key km "q" 'quit-window)
183 (define-key km [remap undo] 'proced-undo) 186 (define-key km [remap undo] 'proced-undo)
184 (define-key km [remap advertised-undo] 'proced-undo) 187 (define-key km [remap advertised-undo] 'proced-undo)
185 km) 188 km)
@@ -192,6 +195,9 @@ Initialized based on `proced-procname-column-regexp'.")
192 ["Unmark" proced-unmark t] 195 ["Unmark" proced-unmark t]
193 ["Mark All" proced-mark-all t] 196 ["Mark All" proced-mark-all t]
194 ["Unmark All" proced-unmark-all t] 197 ["Unmark All" proced-unmark-all t]
198 ["Toggle Marks" proced-unmark-all t]
199 "--"
200 ["Hide Marked Processes" proced-hide-processes t]
195 "--" 201 "--"
196 ["Revert" revert-buffer t] 202 ["Revert" revert-buffer t]
197 ["Send signal" proced-send-signal t] 203 ["Send signal" proced-send-signal t]
@@ -201,8 +207,28 @@ Initialized based on `proced-procname-column-regexp'.")
201 "(n)ext, (p)revious, (m)ark, (u)nmark, (k)ill, (q)uit (type ? for more help)" 207 "(n)ext, (p)revious, (m)ark, (u)nmark, (k)ill, (q)uit (type ? for more help)"
202 "Help string for proced.") 208 "Help string for proced.")
203 209
210(defun proced-marker-regexp ()
211 (concat "^" (regexp-quote (char-to-string proced-marker-char))))
212
213(defun proced-success-message (action count)
214 (message "%s %s process%s" action count (if (= 1 count) "" "es")))
215
216(defun proced-move-to-procname ()
217 "Move to the beginning of the process name on the current line.
218Return the position of the beginning of the process name, or nil if none found."
219 (beginning-of-line)
220 (if proced-procname-column
221 (forward-char proced-procname-column)
222 (forward-char 2)))
223
224(defsubst proced-skip-regexp ()
225 "Regexp to skip in process listing."
226 (apply 'concat (make-list (1- (nth 2 (assoc proced-command
227 proced-command-alist)))
228 "\\s-+\\S-+")))
229
204(defun proced-mode (&optional arg) 230(defun proced-mode (&optional arg)
205 "Mode for displaying UNIX processes and sending signals to them. 231 "Mode for displaying UNIX system processes and sending signals to them.
206Type \\[proced-mark-process] to mark a process for later commands. 232Type \\[proced-mark-process] to mark a process for later commands.
207Type \\[proced-send-signal] to send signals to marked processes. 233Type \\[proced-send-signal] to send signals to marked processes.
208 234
@@ -240,15 +266,8 @@ information will be displayed but not selected.
240;; Proced mode is suitable only for specially formatted data. 266;; Proced mode is suitable only for specially formatted data.
241(put 'proced-mode 'mode-class 'special) 267(put 'proced-mode 'mode-class 'special)
242 268
243(fset 'proced 'proced-mode) 269;;;###autoload
244 270(defalias 'proced 'proced-mode)
245(defun proced-move-to-procname ()
246 "Move to the beginning of the process name on the current line.
247Return the position of the beginning of the process name, or nil if none found."
248 (beginning-of-line)
249 (if proced-procname-column
250 (forward-char proced-procname-column)
251 (forward-char 2)))
252 271
253(defun proced-mark (&optional count) 272(defun proced-mark (&optional count)
254 "Mark the current (or next COUNT) processes." 273 "Mark the current (or next COUNT) processes."
@@ -260,20 +279,24 @@ Return the position of the beginning of the process name, or nil if none found."
260 (interactive "p") 279 (interactive "p")
261 (proced-do-mark nil count)) 280 (proced-do-mark nil count))
262 281
282(defun proced-unmark-backward (&optional count)
283 "Unmark the previous (or COUNT previous) processes."
284 (interactive "p")
285 (proced-do-mark nil (- (or count 1))))
286
263(defun proced-do-mark (mark &optional count) 287(defun proced-do-mark (mark &optional count)
264 "Mark the current (or next ARG) processes using MARK." 288 "Mark the current (or next ARG) processes using MARK."
265 (or count (setq count 1)) 289 (or count (setq count 1))
266 (let ((n (if (<= 0 count) 1 -1)) 290 (let ((backward (< count 0))
267 (line (line-number-at-pos)) 291 (line (line-number-at-pos))
268 buffer-read-only) 292 buffer-read-only)
269 ;; do nothing in the first line 293 ;; do nothing in the first line
270 (unless (= line 1) 294 (unless (= line 1)
271 (setq count (1+ (cond ((<= 0 count) count) 295 (setq count (1+ (if (<= 0 count) count
272 ((< (abs count) line) (abs count)) 296 (min (- line 2) (abs count)))))
273 (t (1- line)))))
274 (beginning-of-line) 297 (beginning-of-line)
275 (while (not (or (zerop (setq count (1- count))) (eobp))) 298 (while (not (or (zerop (setq count (1- count))) (eobp)))
276 (proced-insert-mark mark n)) 299 (proced-insert-mark mark backward))
277 (proced-move-to-procname)))) 300 (proced-move-to-procname))))
278 301
279(defun proced-mark-all () 302(defun proced-mark-all ()
@@ -288,18 +311,74 @@ Return the position of the beginning of the process name, or nil if none found."
288 311
289(defun proced-do-mark-all (mark) 312(defun proced-do-mark-all (mark)
290 "Mark all processes using MARK." 313 "Mark all processes using MARK."
291 (save-excursion 314 (let (buffer-read-only)
292 (let (buffer-read-only) 315 (save-excursion
293 (goto-line 2) 316 (goto-line 2)
294 (while (not (eobp)) 317 (while (not (eobp))
295 (proced-insert-mark mark 1))))) 318 (proced-insert-mark mark)))))
296 319
297(defun proced-insert-mark (mark n) 320(defun proced-toggle-marks ()
298 "If MARK is non-nil, insert `proced-marker-char', move N lines." 321 "Toggle marks: marked processes become unmarked, and vice versa."
299 ;; Do we need other marks besides `proced-marker-char'? 322 (interactive)
323 (let ((mark-re (proced-marker-regexp))
324 buffer-read-only)
325 (save-excursion
326 (goto-line 2)
327 (while (not (eobp))
328 (cond ((looking-at mark-re)
329 (proced-insert-mark nil))
330 ((looking-at " ")
331 (proced-insert-mark t))
332 (t
333 (forward-line 1)))))))
334
335(defun proced-insert-mark (mark &optional backward)
336 "If MARK is non-nil, insert `proced-marker-char'.
337If BACKWARD is non-nil, move one line backwards before inserting the mark.
338Otherwise move one line forward after inserting the mark."
339 (if backward (forward-line -1))
300 (insert (if mark proced-marker-char ?\s)) 340 (insert (if mark proced-marker-char ?\s))
301 (delete-char 1) 341 (delete-char 1)
302 (forward-line n)) 342 (unless backward (forward-line)))
343
344;; Mostly analog of `dired-do-kill-lines'.
345;; However, for negative args the target lines of `dired-do-kill-lines'
346;; include the current line, whereas `dired-mark' for negative args operates
347;; on the preceding lines. Here we are consistent with `dired-mark'.
348(defun proced-hide-processes (&optional arg quiet)
349 "Hide marked processes.
350With prefix ARG, hide that many lines starting with the current line.
351\(A negative argument hides backward.)
352If QUIET is non-nil suppress status message.
353Returns count of hidden lines."
354 (interactive "P")
355 (let ((mark-re (proced-marker-regexp))
356 (count 0)
357 buffer-read-only)
358 (save-excursion
359 (if arg
360 ;; Hide ARG lines starting with the current line.
361 (let ((line (line-number-at-pos)))
362 ;; do nothing in the first line
363 (unless (= line 1)
364 (delete-region (line-beginning-position)
365 (save-excursion
366 (if (<= 0 arg)
367 (setq count (- arg (forward-line arg)))
368 (setq count (min (- line 2) (abs arg)))
369 (forward-line (- count)))
370 (point)))))
371 ;; Hide marked lines
372 (goto-line 2)
373 (while (and (not (eobp))
374 (re-search-forward mark-re nil t))
375 (delete-region (match-beginning 0)
376 (save-excursion (forward-line) (point)))
377 (setq count (1+ count)))))
378 (unless (zerop count) (proced-move-to-procname))
379 (unless quiet
380 (proced-success-message "Hid" count))
381 count))
303 382
304(defun proced-listing-type (command) 383(defun proced-listing-type (command)
305 "Select `proced' listing type COMMAND from `proced-command-alist'." 384 "Select `proced' listing type COMMAND from `proced-command-alist'."
@@ -308,14 +387,9 @@ Return the position of the beginning of the process name, or nil if none found."
308 (setq proced-command command) 387 (setq proced-command command)
309 (proced-update)) 388 (proced-update))
310 389
311(defsubst proced-skip-regexp ()
312 "Regexp to skip in process listing."
313 (apply 'concat (make-list (1- (nth 2 (assoc proced-command
314 proced-command-alist)))
315 "\\s-+\\S-+")))
316
317(defun proced-update (&optional quiet) 390(defun proced-update (&optional quiet)
318 "Update the `proced' process information. Preserves point and marks." 391 "Update the `proced' process information. Preserves point and marks."
392 ;; This is the main function that generates and updates the process listing.
319 (interactive) 393 (interactive)
320 (or quiet (message "Updating process information...")) 394 (or quiet (message "Updating process information..."))
321 (let* ((command (cdr (assoc proced-command proced-command-alist))) 395 (let* ((command (cdr (assoc proced-command proced-command-alist)))
@@ -342,16 +416,12 @@ Return the position of the beginning of the process name, or nil if none found."
342 (goto-char (point-min)) 416 (goto-char (point-min))
343 (while (re-search-forward "[ \t\r]+$" nil t) 417 (while (re-search-forward "[ \t\r]+$" nil t)
344 (delete-region (match-beginning 0) (match-end 0))) 418 (delete-region (match-beginning 0) (match-end 0)))
419 (set-buffer-modified-p nil)
345 ;; set `proced-procname-column' 420 ;; set `proced-procname-column'
346 (goto-char (point-min)) 421 (goto-char (point-min))
347 (and proced-procname-column-regexp 422 (and proced-procname-column-regexp
348 (re-search-forward proced-procname-column-regexp nil t) 423 (re-search-forward proced-procname-column-regexp nil t)
349 (setq proced-procname-column (1- (match-beginning 0)))) 424 (setq proced-procname-column (1- (match-beginning 0))))
350 ;; sort fields
351 (goto-line 2)
352 (if (nth 2 command)
353 (sort-numeric-fields (nth 2 command) (point) (point-max)))
354 (set-buffer-modified-p nil)
355 ;; restore process marks 425 ;; restore process marks
356 (if plist 426 (if plist
357 (save-excursion 427 (save-excursion
@@ -380,7 +450,8 @@ Return the position of the beginning of the process name, or nil if none found."
380 "Analog of `revert-buffer'." 450 "Analog of `revert-buffer'."
381 (proced-update)) 451 (proced-update))
382 452
383;; I do not want to reinvent the wheel 453;; I do not want to reinvent the wheel. Should we rename `dired-pop-to-buffer'
454;; and move it to simple.el so that proced and ibuffer can easily use it, too?
384(autoload 'dired-pop-to-buffer "dired") 455(autoload 'dired-pop-to-buffer "dired")
385 456
386(defun proced-send-signal (&optional signal) 457(defun proced-send-signal (&optional signal)
@@ -388,21 +459,23 @@ Return the position of the beginning of the process name, or nil if none found."
388SIGNAL may be a string (HUP, INT, TERM, etc.) or a number. 459SIGNAL may be a string (HUP, INT, TERM, etc.) or a number.
389If SIGNAL is nil display marked processes and query interactively for SIGNAL." 460If SIGNAL is nil display marked processes and query interactively for SIGNAL."
390 (interactive) 461 (interactive)
391 (let ((regexp (concat "^\\*" (proced-skip-regexp) "\\s-+\\([0-9]+\\>\\).*$")) 462 (let ((regexp (concat (proced-marker-regexp)
463 (proced-skip-regexp) "\\s-+\\([0-9]+\\>\\).*$"))
392 plist) 464 plist)
393 ;; collect marked processes 465 ;; collect marked processes
394 (save-excursion 466 (save-excursion
395 (goto-char (point-min)) 467 (goto-char (point-min))
396 (while (re-search-forward regexp nil t) 468 (while (re-search-forward regexp nil t)
397 (push (cons (match-string-no-properties 1) 469 (push (cons (match-string-no-properties 1)
470 ;; How much info should we collect here? Would it be
471 ;; better to collect only the PID (to avoid ambiguities)
472 ;; and the command name?
398 (substring (match-string-no-properties 0) 2)) 473 (substring (match-string-no-properties 0) 2))
399 plist))) 474 plist)))
400 (if (not plist) 475 (if (not plist)
401 (message "No processes marked") 476 (message "No processes marked")
402 (unless signal 477 (unless signal
403 ;; Display marked processes (code taken from `dired-mark-pop-up'). 478 ;; Display marked processes (code taken from `dired-mark-pop-up').
404 ;; We include all process information to distinguish multiple
405 ;; instances of the same program.
406 (let ((bufname " *Marked Processes*") 479 (let ((bufname " *Marked Processes*")
407 (header (save-excursion 480 (header (save-excursion
408 (goto-char (+ 2 (point-min))) 481 (goto-char (+ 2 (point-min)))
@@ -417,19 +490,48 @@ If SIGNAL is nil display marked processes and query interactively for SIGNAL."
417 (save-window-excursion 490 (save-window-excursion
418 (dired-pop-to-buffer bufname) ; all we need 491 (dired-pop-to-buffer bufname) ; all we need
419 (let* ((completion-ignore-case t) 492 (let* ((completion-ignore-case t)
493 (pnum (if (= 1 (length plist))
494 "1 process"
495 (format "%d processes" (length plist))))
420 ;; The following is an ugly hack. Is there a better way 496 ;; The following is an ugly hack. Is there a better way
421 ;; to help people like me to remember the signals and 497 ;; to help people like me to remember the signals and
422 ;; their meanings? 498 ;; their meanings?
423 (tmp (completing-read "Signal (default TERM): " 499 (tmp (completing-read (concat "Send signal [" pnum
500 "] (default TERM): ")
424 proced-signal-list 501 proced-signal-list
425 nil nil nil nil "TERM"))) 502 nil nil nil nil "TERM")))
426 (setq signal (if (string-match "^\\(\\S-+\\)\\s-" tmp) 503 (setq signal (if (string-match "^\\(\\S-+\\)\\s-" tmp)
427 (match-string 1 tmp) tmp)))))) 504 (match-string 1 tmp) tmp))))))
428 ;; send signal 505 ;; send signal
429 (apply 'call-process proced-kill-program nil 0 nil 506 (let ((count 0)
430 (concat "-" (if (numberp signal) 507 err-list)
431 (number-to-string signal) signal)) 508 (if (functionp proced-signal-function)
432 (mapcar 'car plist)) 509 ;; use built-in `signal-process'
510 (let ((signal (if (stringp signal)
511 (if (string-match "\\`[0-9]+\\'" signal)
512 (string-to-number signal)
513 (make-symbol signal))
514 signal))) ; number
515 (dolist (process plist)
516 (if (zerop (funcall
517 proced-signal-function
518 (string-to-number (car process)) signal))
519 (push (cdr process) err-list)
520 (setq count (1+ count)))))
521 ;; use external system call
522 (let ((signal (concat "-" (if (numberp signal)
523 (number-to-string signal) signal))))
524 (dolist (process plist)
525 (if (zerop (call-process
526 proced-signal-function nil 0 nil
527 signal (car process)))
528 (push (cdr process) err-list)
529 (setq count (1+ count))))))
530 (if err-list
531 ;; FIXME: that's not enough to display the errors.
532 (message "%s: %s" signal err-list)
533 (proced-success-message "Sent signal to" count)))
534 ;; final clean-up
433 (run-hooks 'proced-after-send-signal-hook))))) 535 (run-hooks 'proced-after-send-signal-hook)))))
434 536
435(defun proced-help () 537(defun proced-help ()