diff options
Diffstat (limited to 'lisp')
41 files changed, 1121 insertions, 484 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82f1dc88cb9..7f8b66c0e32 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,207 @@ | |||
| 1 | 2006-09-04 John Paul Wallington <jpw@pobox.com> | ||
| 2 | |||
| 3 | * simple.el (completion-show-help): New defcustom. | ||
| 4 | (completion-setup-function): Heed it. | ||
| 5 | |||
| 6 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 7 | |||
| 8 | * term/xterm.el (terminal-init-xterm): Add C-M- bindings. | ||
| 9 | |||
| 10 | 2006-09-04 Richard Stallman <rms@gnu.org> | ||
| 11 | |||
| 12 | * mail/rmail-spam-filter.el (rsf-scanning-messages-now): Doc fix. | ||
| 13 | (rsf-min-region-to-spam-list): Doc fix. | ||
| 14 | (rsf-add-content-type-field): Doc fix. | ||
| 15 | |||
| 16 | * simple.el (kill-region): Explicitly test there is a region. | ||
| 17 | |||
| 18 | 2006-09-04 Chong Yidong <cyd@stupidchicken.com> | ||
| 19 | |||
| 20 | * mail/feedmail.el (feedmail-buffer-to-sendmail): Look for | ||
| 21 | sendmail in several common directories. | ||
| 22 | |||
| 23 | * mail/sendmail.el (sendmail-program): Moved here from pathe.el. | ||
| 24 | |||
| 25 | * paths.el (sendmail-program): Removed. | ||
| 26 | |||
| 27 | 2006-09-04 Daiki Ueno <ueno@unixuser.org> | ||
| 28 | |||
| 29 | * pgg-gpg.el (pgg-gpg-process-region): Revert two patches from Satyaki | ||
| 30 | Das. http://article.gmane.org/gmane.emacs.gnus.general/49947 | ||
| 31 | http://article.gmane.org/gmane.emacs.gnus.general/50457 | ||
| 32 | |||
| 33 | 2006-09-03 Chong Yidong <cyd@stupidchicken.com> | ||
| 34 | |||
| 35 | * cus-edit.el (custom-group-menu-create): Avoid deactivating the | ||
| 36 | mark after running the menu filter. | ||
| 37 | |||
| 38 | 2006-09-03 Juri Linkov <juri@jurta.org> | ||
| 39 | |||
| 40 | * international/quail.el (quail-defrule-internal): Add a check | ||
| 41 | if a key is a vector. | ||
| 42 | |||
| 43 | 2006-09-02 Juri Linkov <juri@jurta.org> | ||
| 44 | |||
| 45 | * man.el (Man-topic-history): New variable. | ||
| 46 | (man): Use it. | ||
| 47 | |||
| 48 | * woman.el (woman-topic-history): Change defvar to defvaralias | ||
| 49 | for symbol `Man-topic-history'. | ||
| 50 | |||
| 51 | * shell.el (shell-filter-ctrl-a-ctrl-b): Check if | ||
| 52 | `comint-last-output-start' is a marker by using `markerp' and | ||
| 53 | check if it has a position by using `marker-position', and use | ||
| 54 | this position for `goto-char'. | ||
| 55 | |||
| 56 | * international/quail.el (quail-defrule-internal): Add missing | ||
| 57 | `error' call for null key. | ||
| 58 | |||
| 59 | 2006-09-02 Ryan Yeske <rcyeske@gmail.com> | ||
| 60 | |||
| 61 | * rcirc.el (rcirc-keywords): New variable. | ||
| 62 | (rcirc-bright-nicks, rcirc-dim-nicks): New variables. | ||
| 63 | (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Remove | ||
| 64 | variables. | ||
| 65 | (rcirc-responses-no-activity): New function. | ||
| 66 | (rcirc-handler-generic): Check for responses in above. | ||
| 67 | (rcirc-process-command): Add ?: character to arguments of raw | ||
| 68 | server commands. | ||
| 69 | (rcirc-format-response-string): Use `rcirc-bright-nicks' and | ||
| 70 | `rcirc-dim-nicks'. | ||
| 71 | (rcirc-gray-toggle): Remove unused variable. | ||
| 72 | (rcirc-print): Remove some tracking logic, which is moved into | ||
| 73 | markup functions. | ||
| 74 | (rcirc-activity-types): Was `rcirc-activity-type', now a list of | ||
| 75 | types. | ||
| 76 | (rcirc-activity-string): Look for 'keyword in activity-types. | ||
| 77 | (rcirc-window-configuration-change): Don't erase overlay-arrow | ||
| 78 | unnecessarily. | ||
| 79 | (rcirc-add-or-remove): New function. | ||
| 80 | (rcirc-cmd-ignore): Use it. | ||
| 81 | (rcirc-message-leader): Remove unused function. | ||
| 82 | (rcicr-cmd-bright, rcirc-cmd-dim, rcirc-cmd-keyword): New commands. | ||
| 83 | (rcirc-add-face): New function. | ||
| 84 | (rcirc-facify): Use rcirc-add-face. | ||
| 85 | (rcirc-url-regexp): Add parens. | ||
| 86 | (rcirc-map-regexp): Remove function. | ||
| 87 | (rcirc-mangle-regexp): Remove function. | ||
| 88 | (rcirc-markup-text-functions): New variable. | ||
| 89 | (rcirc-markup-text): New function (replaces `rcirc-mangle-text'). | ||
| 90 | (rcirc-markup-body-text, rcirc-markup-attributes) | ||
| 91 | (rcirc-markup-my-nick, rcirc-markup-urls, rcirc-markup-keywords) | ||
| 92 | (rcirc-markup-bright-nicks): New markup handler functions. | ||
| 93 | (rcirc-nick-in-message-full-line): New face. | ||
| 94 | (rcirc-track-nick): Rename from `rcirc-mode-line-nick'. | ||
| 95 | (rcirc-track-keyword, rcirc-url, rcirc-keyword): New faces. | ||
| 96 | |||
| 97 | 2006-09-02 Martin Rudalics <rudalics@gmx.at> | ||
| 98 | |||
| 99 | * cus-start.el (hscroll-margin, hscroll-step) | ||
| 100 | (mode-line-in-non-selected-windows, mouse-autoselect-window) | ||
| 101 | (x-use-underline-position-properties): Change version to "22.1" | ||
| 102 | since they will appear there for the first time. | ||
| 103 | |||
| 104 | 2006-09-01 Chong Yidong <cyd@stupidchicken.com> | ||
| 105 | |||
| 106 | * imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick. | ||
| 107 | |||
| 108 | 2006-08-31 Richard Stallman <rms@gnu.org> | ||
| 109 | |||
| 110 | * cus-edit.el (custom-save-variables): Slight cleanup. | ||
| 111 | (Custom-no-edit): Renamed from custom-no-edit. | ||
| 112 | (Custom-newline): Renamed from custom-newline. | ||
| 113 | (custom-mode-map): Use new names. | ||
| 114 | |||
| 115 | * emacs-lisp/easy-mmode.el (define-minor-mode): Reference manual | ||
| 116 | about customization, rather than M-x customize, in the doc string | ||
| 117 | made for the defcustom. | ||
| 118 | |||
| 119 | * emacs-lisp/trace.el (trace-function-background): Doc fix. | ||
| 120 | |||
| 121 | 2006-08-31 Romain Francoise <romain@orebokech.com> | ||
| 122 | |||
| 123 | * dired-x.el (dired-guess-shell-alist-default): Update. | ||
| 124 | |||
| 125 | 2006-08-31 Michael Mauger <mmaug@yahoo.com> | ||
| 126 | |||
| 127 | * custom.el (custom-theme-set-variables): Autoload packages before | ||
| 128 | sorting the variables. | ||
| 129 | |||
| 130 | 2006-08-30 Michael Kifer <kifer@cs.stonybrook.edu> | ||
| 131 | |||
| 132 | * viper-cmd.el (viper-special-read-and-insert-char): Convert events to | ||
| 133 | chars if XEmacs. | ||
| 134 | (viper-after-change-undo-hook): Check if undo-in-progress is bound. | ||
| 135 | |||
| 136 | 2006-08-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 137 | |||
| 138 | * progmodes/python.el (python-eldoc-function): Re-enable quit while | ||
| 139 | waiting for process. | ||
| 140 | |||
| 141 | 2006-08-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 142 | |||
| 143 | * term/mac-win.el (mac-string-to-utxt): If adjustment for MacJapanese | ||
| 144 | results in ASCII-only string, encode original one directly. | ||
| 145 | |||
| 146 | 2006-08-29 Romain Francoise <romain@orebokech.com> | ||
| 147 | |||
| 148 | * startup.el (normal-splash-screen, fancy-splash-screens): | ||
| 149 | Make buffer read-only and arrange to enter view mode if necessary. | ||
| 150 | |||
| 151 | 2006-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 152 | |||
| 153 | * hl-line.el (hl-line): New face. | ||
| 154 | (hl-line-face): Use it. | ||
| 155 | |||
| 156 | * image-mode.el (image-mode): Fix last fix. | ||
| 157 | Suggested by Kim F. Storm. | ||
| 158 | |||
| 159 | 2006-08-29 Michael Albinus <michael.albinus@gmx.de> | ||
| 160 | |||
| 161 | Sync with Tramp 2.0.54. | ||
| 162 | |||
| 163 | * net/tramp.el (tramp-convert-file-attributes): Call `eql' instead | ||
| 164 | of `=', because `tramp-get-remote-gid' might not always return an | ||
| 165 | integer when expected. | ||
| 166 | (tramp-register-file-name-handlers): `partial-completion-mode' is | ||
| 167 | unknown to XEmacs. | ||
| 168 | (tramp-time-diff): Don't use `floor', it might fail for large | ||
| 169 | differences. | ||
| 170 | (tramp-handle-make-auto-save-file-name): For Emacs 21, set | ||
| 171 | `tramp-auto-save-directory' if unset in order to guarantee unique | ||
| 172 | auto-save file names. | ||
| 173 | |||
| 174 | 2006-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 175 | |||
| 176 | * image-mode.el (image-mode): Display image as text on a terminal. | ||
| 177 | |||
| 178 | 2006-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 179 | |||
| 180 | * progmodes/python.el (python-send-command): Simplify. | ||
| 181 | (run-python): Don't generate a new buffer unless `new' was specified. | ||
| 182 | Make sure we send `import emacs' to the proper process. | ||
| 183 | |||
| 184 | * progmodes/python.el (python-send-command): Don't wait for the command | ||
| 185 | to terminate. Don't fiddle with compilation-parsing-end. | ||
| 186 | |||
| 187 | 2006-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 188 | |||
| 189 | * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): | ||
| 190 | Insert commentary after first line summary. | ||
| 191 | |||
| 192 | * woman.el (woman-follow): New function, based on `man-follow'. | ||
| 193 | (woman-mode-map): Use it. | ||
| 194 | |||
| 195 | * ibuffer.el (ibuffer-do-sort-by-recency): Perform full update | ||
| 196 | since ibuffer-do-sort-by-recency does not define a sorter. | ||
| 197 | |||
| 198 | 2006-08-28 Kim F. Storm <storm@cua.dk> | ||
| 199 | |||
| 200 | * find-dired.el (find-dired): Use shell-quote-argument to properly | ||
| 201 | escape ( and ) args. Also use it on {} and ; args in default | ||
| 202 | value of find-ls-option string. | ||
| 203 | (find-grep-dired): Use shell-quote-argument on {} and ; args. | ||
| 204 | |||
| 1 | 2006-08-27 Michael Olson <mwolson@gnu.org> | 205 | 2006-08-27 Michael Olson <mwolson@gnu.org> |
| 2 | 206 | ||
| 3 | * emacs-lisp/tq.el: Small grammar fix in comments. | 207 | * emacs-lisp/tq.el: Small grammar fix in comments. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 609b5572a08..c31e319f798 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4255,19 +4255,31 @@ This function does not save the buffer." | |||
| 4255 | (let ((spec (car-safe (get symbol 'theme-value))) | 4255 | (let ((spec (car-safe (get symbol 'theme-value))) |
| 4256 | (value (get symbol 'saved-value)) | 4256 | (value (get symbol 'saved-value)) |
| 4257 | (requests (get symbol 'custom-requests)) | 4257 | (requests (get symbol 'custom-requests)) |
| 4258 | (now (not (or (custom-variable-p symbol) | 4258 | (now (and (not (custom-variable-p symbol)) |
| 4259 | (and (not (boundp symbol)) | 4259 | (or (boundp symbol) |
| 4260 | (not (eq (get symbol 'force-value) | 4260 | (eq (get symbol 'force-value) |
| 4261 | 'rogue)))))) | 4261 | 'rogue)))) |
| 4262 | (comment (get symbol 'saved-variable-comment))) | 4262 | (comment (get symbol 'saved-variable-comment))) |
| 4263 | ;; Check `requests'. | 4263 | ;; Check REQUESTS for validity. |
| 4264 | (dolist (request requests) | 4264 | (dolist (request requests) |
| 4265 | (when (and (symbolp request) (not (featurep request))) | 4265 | (when (and (symbolp request) (not (featurep request))) |
| 4266 | (message "Unknown requested feature: %s" request) | 4266 | (message "Unknown requested feature: %s" request) |
| 4267 | (setq requests (delq request requests)))) | 4267 | (setq requests (delq request requests)))) |
| 4268 | ;; Is there anything customized about this variable? | ||
| 4268 | (when (or (and spec (eq (car spec) 'user)) | 4269 | (when (or (and spec (eq (car spec) 'user)) |
| 4269 | comment | 4270 | comment |
| 4270 | (and (null spec) (get symbol 'saved-value))) | 4271 | (and (null spec) (get symbol 'saved-value))) |
| 4272 | ;; Output an element for this variable. | ||
| 4273 | ;; It has the form (SYMBOL VALUE-FORM NOW REQUESTS COMMENT). | ||
| 4274 | ;; SYMBOL is the variable name. | ||
| 4275 | ;; VALUE-FORM is an expression to return the customized value. | ||
| 4276 | ;; NOW if non-nil means always set the variable immediately | ||
| 4277 | ;; when the customizations are reloaded. This is used | ||
| 4278 | ;; for rogue variables | ||
| 4279 | ;; REQUESTS is a list of packages to load before setting the | ||
| 4280 | ;; variable. Each element of it will be passed to `require'. | ||
| 4281 | ;; COMMENT is whatever comment the user has specified | ||
| 4282 | ;; with the customize facility. | ||
| 4271 | (unless (bolp) | 4283 | (unless (bolp) |
| 4272 | (princ "\n")) | 4284 | (princ "\n")) |
| 4273 | (princ " '(") | 4285 | (princ " '(") |
| @@ -4383,7 +4395,8 @@ This function does not save the buffer." | |||
| 4383 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." | 4395 | "Ignoring WIDGET, create a menu entry for customization group SYMBOL." |
| 4384 | `( ,(custom-unlispify-menu-entry symbol t) | 4396 | `( ,(custom-unlispify-menu-entry symbol t) |
| 4385 | :filter (lambda (&rest junk) | 4397 | :filter (lambda (&rest junk) |
| 4386 | (let ((menu (custom-menu-create ',symbol))) | 4398 | (let* ((deactivate-mark nil) |
| 4399 | (menu (custom-menu-create ',symbol))) | ||
| 4387 | (if (consp menu) (cdr menu) menu))))) | 4400 | (if (consp menu) (cdr menu) menu))))) |
| 4388 | 4401 | ||
| 4389 | ;;;###autoload | 4402 | ;;;###autoload |
| @@ -4435,8 +4448,8 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4435 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. | 4448 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. |
| 4436 | (let ((map (make-keymap))) | 4449 | (let ((map (make-keymap))) |
| 4437 | (set-keymap-parent map widget-keymap) | 4450 | (set-keymap-parent map widget-keymap) |
| 4438 | (define-key map [remap self-insert-command] 'custom-no-edit) | 4451 | (define-key map [remap self-insert-command] 'Custom-no-edit) |
| 4439 | (define-key map "\^m" 'custom-newline) | 4452 | (define-key map "\^m" 'Custom-newline) |
| 4440 | (define-key map " " 'scroll-up) | 4453 | (define-key map " " 'scroll-up) |
| 4441 | (define-key map "\177" 'scroll-down) | 4454 | (define-key map "\177" 'scroll-down) |
| 4442 | (define-key map "\C-c\C-c" 'Custom-set) | 4455 | (define-key map "\C-c\C-c" 'Custom-set) |
| @@ -4448,12 +4461,12 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4448 | map) | 4461 | map) |
| 4449 | "Keymap for `custom-mode'.") | 4462 | "Keymap for `custom-mode'.") |
| 4450 | 4463 | ||
| 4451 | (defun custom-no-edit (pos &optional event) | 4464 | (defun Custom-no-edit (pos &optional event) |
| 4452 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4465 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4453 | (interactive "@d") | 4466 | (interactive "@d") |
| 4454 | (error "You can't edit this part of the Custom buffer")) | 4467 | (error "You can't edit this part of the Custom buffer")) |
| 4455 | 4468 | ||
| 4456 | (defun custom-newline (pos &optional event) | 4469 | (defun Custom-newline (pos &optional event) |
| 4457 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4470 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4458 | (interactive "@d") | 4471 | (interactive "@d") |
| 4459 | (let ((button (get-char-property pos 'button))) | 4472 | (let ((button (get-char-property pos 'button))) |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 75cd340604c..4d817474f3a 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -347,11 +347,11 @@ since it could result in memory overflow and make Emacs crash." | |||
| 347 | (scroll-step windows integer) | 347 | (scroll-step windows integer) |
| 348 | (scroll-conservatively windows integer) | 348 | (scroll-conservatively windows integer) |
| 349 | (scroll-margin windows integer) | 349 | (scroll-margin windows integer) |
| 350 | (hscroll-margin windows integer "21.3") | 350 | (hscroll-margin windows integer "22.1") |
| 351 | (hscroll-step windows number "21.3") | 351 | (hscroll-step windows number "22.1") |
| 352 | (truncate-partial-width-windows display boolean) | 352 | (truncate-partial-width-windows display boolean) |
| 353 | (mode-line-inverse-video modeline boolean) | 353 | (mode-line-inverse-video modeline boolean) |
| 354 | (mode-line-in-non-selected-windows modeline boolean "21.3") | 354 | (mode-line-in-non-selected-windows modeline boolean "22.1") |
| 355 | (line-number-display-limit display | 355 | (line-number-display-limit display |
| 356 | (choice integer | 356 | (choice integer |
| 357 | (const :tag "No limit" nil))) | 357 | (const :tag "No limit" nil))) |
| @@ -373,8 +373,8 @@ since it could result in memory overflow and make Emacs crash." | |||
| 373 | (x-gtk-show-hidden-files menu boolean "22.1") | 373 | (x-gtk-show-hidden-files menu boolean "22.1") |
| 374 | (x-gtk-whole-detached-tool-bar x boolean "22.1") | 374 | (x-gtk-whole-detached-tool-bar x boolean "22.1") |
| 375 | ;; xterm.c | 375 | ;; xterm.c |
| 376 | (mouse-autoselect-window display boolean "21.3") | 376 | (mouse-autoselect-window display boolean "22.1") |
| 377 | (x-use-underline-position-properties display boolean "21.3") | 377 | (x-use-underline-position-properties display boolean "22.1") |
| 378 | (x-underline-at-descent-line display boolean "22.1") | 378 | (x-underline-at-descent-line display boolean "22.1") |
| 379 | (x-stretch-cursor display boolean "21.1"))) | 379 | (x-stretch-cursor display boolean "21.1"))) |
| 380 | this symbol group type standard version native-p | 380 | this symbol group type standard version native-p |
diff --git a/lisp/custom.el b/lisp/custom.el index 2e5c0a59d9b..104e63126f0 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -874,6 +874,18 @@ COMMENT is a comment string about SYMBOL. | |||
| 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and | 874 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and |
| 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | 875 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." |
| 876 | (custom-check-theme theme) | 876 | (custom-check-theme theme) |
| 877 | |||
| 878 | ;; Process all the needed autoloads before anything else, so that the | ||
| 879 | ;; subsequent code has all the info it needs (e.g. which var corresponds | ||
| 880 | ;; to a minor mode), regardless of the ordering of the variables. | ||
| 881 | (dolist (entry args) | ||
| 882 | (let* ((symbol (indirect-variable (nth 0 entry)))) | ||
| 883 | (unless (or (get symbol 'standard-value) | ||
| 884 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 885 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 886 | (custom-load-symbol symbol)))) | ||
| 887 | |||
| 888 | ;; Move minor modes and variables with explicit requires to the end. | ||
| 877 | (setq args | 889 | (setq args |
| 878 | (sort args | 890 | (sort args |
| 879 | (lambda (a1 a2) | 891 | (lambda (a1 a2) |
| @@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | |||
| 904 | (when requests | 916 | (when requests |
| 905 | (put symbol 'custom-requests requests) | 917 | (put symbol 'custom-requests requests) |
| 906 | (mapc 'require requests)) | 918 | (mapc 'require requests)) |
| 907 | (unless (or (get symbol 'standard-value) | ||
| 908 | (memq (get symbol 'custom-autoload) '(nil noset))) | ||
| 909 | ;; This symbol needs to be autoloaded, even just for a `set'. | ||
| 910 | (custom-load-symbol symbol)) | ||
| 911 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) | 919 | (setq set (or (get symbol 'custom-set) 'custom-set-default)) |
| 912 | (put symbol 'saved-value (list value)) | 920 | (put symbol 'saved-value (list value)) |
| 913 | (put symbol 'saved-variable-comment comment) | 921 | (put symbol 'saved-variable-comment comment) |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 4d3734bbd5a..942d16d3478 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -958,119 +958,132 @@ dired." | |||
| 958 | (defvar dired-guess-shell-alist-default | 958 | (defvar dired-guess-shell-alist-default |
| 959 | (list | 959 | (list |
| 960 | (list "\\.tar$" | 960 | (list "\\.tar$" |
| 961 | '(if dired-guess-shell-gnutar | 961 | '(if dired-guess-shell-gnutar |
| 962 | (concat dired-guess-shell-gnutar " xvf") | 962 | (concat dired-guess-shell-gnutar " xvf") |
| 963 | "tar xvf") | 963 | "tar xvf") |
| 964 | ;; Extract files into a separate subdirectory | 964 | ;; Extract files into a separate subdirectory |
| 965 | '(if dired-guess-shell-gnutar | 965 | '(if dired-guess-shell-gnutar |
| 966 | (concat "mkdir " (file-name-sans-extension file) | 966 | (concat "mkdir " (file-name-sans-extension file) |
| 967 | "; " dired-guess-shell-gnutar " -C " | 967 | "; " dired-guess-shell-gnutar " -C " |
| 968 | (file-name-sans-extension file) " -xvf") | 968 | (file-name-sans-extension file) " -xvf") |
| 969 | (concat "mkdir " (file-name-sans-extension file) | 969 | (concat "mkdir " (file-name-sans-extension file) |
| 970 | "; tar -C " (file-name-sans-extension file) " -xvf"))) | 970 | "; tar -C " (file-name-sans-extension file) " -xvf")) |
| 971 | ;; List archive contents. | ||
| 972 | '(if dired-guess-shell-gnutar | ||
| 973 | (concat dired-guess-shell-gnutar " tvf") | ||
| 974 | "tar tvf")) | ||
| 971 | 975 | ||
| 972 | ;; REGEXPS for compressed archives must come before the .Z rule to | 976 | ;; REGEXPS for compressed archives must come before the .Z rule to |
| 973 | ;; be recognized: | 977 | ;; be recognized: |
| 974 | (list "\\.tar\\.Z$" | 978 | (list "\\.tar\\.Z$" |
| 975 | ;; Untar it. | 979 | ;; Untar it. |
| 976 | '(if dired-guess-shell-gnutar | 980 | '(if dired-guess-shell-gnutar |
| 977 | (concat dired-guess-shell-gnutar " zxvf") | 981 | (concat dired-guess-shell-gnutar " zxvf") |
| 978 | (concat "zcat * | tar xvf -")) | 982 | (concat "zcat * | tar xvf -")) |
| 979 | ;; Optional conversion to gzip format. | 983 | ;; Optional conversion to gzip format. |
| 980 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 984 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 981 | " " dired-guess-shell-znew-switches)) | 985 | " " dired-guess-shell-znew-switches)) |
| 982 | 986 | ||
| 983 | ;; gzip'ed archives | 987 | ;; gzip'ed archives |
| 984 | (list "\\.t\\(ar\\.\\)?gz$" | 988 | (list "\\.t\\(ar\\.\\)?gz$" |
| 985 | '(if dired-guess-shell-gnutar | 989 | '(if dired-guess-shell-gnutar |
| 986 | (concat dired-guess-shell-gnutar " zxvf") | 990 | (concat dired-guess-shell-gnutar " zxvf") |
| 987 | (concat "gunzip -qc * | tar xvf -")) | 991 | (concat "gunzip -qc * | tar xvf -")) |
| 988 | ;; Extract files into a separate subdirectory | 992 | ;; Extract files into a separate subdirectory |
| 989 | '(if dired-guess-shell-gnutar | 993 | '(if dired-guess-shell-gnutar |
| 990 | (concat "mkdir " (file-name-sans-extension file) | 994 | (concat "mkdir " (file-name-sans-extension file) |
| 991 | "; " dired-guess-shell-gnutar " -C " | 995 | "; " dired-guess-shell-gnutar " -C " |
| 992 | (file-name-sans-extension file) " -zxvf") | 996 | (file-name-sans-extension file) " -zxvf") |
| 993 | (concat "mkdir " (file-name-sans-extension file) | 997 | (concat "mkdir " (file-name-sans-extension file) |
| 994 | "; gunzip -qc * | tar -C " | 998 | "; gunzip -qc * | tar -C " |
| 995 | (file-name-sans-extension file) " -xvf -")) | 999 | (file-name-sans-extension file) " -xvf -")) |
| 996 | ;; Optional decompression. | 1000 | ;; Optional decompression. |
| 997 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))) | 1001 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" "")) |
| 1002 | ;; List archive contents. | ||
| 1003 | '(if dired-guess-shell-gnutar | ||
| 1004 | (concat dired-guess-shell-gnutar " ztvf") | ||
| 1005 | (concat "gunzip -qc * | tar tvf -"))) | ||
| 998 | 1006 | ||
| 999 | ;; bzip2'ed archives | 1007 | ;; bzip2'ed archives |
| 1000 | (list "\\.t\\(ar\\.bz2\\|bz\\)$" | 1008 | (list "\\.t\\(ar\\.bz2\\|bz\\)$" |
| 1001 | "bunzip2 -c * | tar xvf -" | 1009 | "bunzip2 -c * | tar xvf -" |
| 1002 | ;; Extract files into a separate subdirectory | 1010 | ;; Extract files into a separate subdirectory |
| 1003 | '(concat "mkdir " (file-name-sans-extension file) | 1011 | '(concat "mkdir " (file-name-sans-extension file) |
| 1004 | "; bunzip2 -c * | tar -C " | 1012 | "; bunzip2 -c * | tar -C " |
| 1005 | (file-name-sans-extension file) " -xvf -") | 1013 | (file-name-sans-extension file) " -xvf -") |
| 1006 | ;; Optional decompression. | 1014 | ;; Optional decompression. |
| 1007 | "bunzip2") | 1015 | "bunzip2") |
| 1008 | 1016 | ||
| 1009 | '("\\.shar\\.Z$" "zcat * | unshar") | 1017 | '("\\.shar\\.Z$" "zcat * | unshar") |
| 1010 | '("\\.shar\\.g?z$" "gunzip -qc * | unshar") | 1018 | '("\\.shar\\.g?z$" "gunzip -qc * | unshar") |
| 1011 | 1019 | ||
| 1012 | '("\\.e?ps$" "ghostview" "xloadimage" "lpr") | 1020 | '("\\.e?ps$" "ghostview" "xloadimage" "lpr") |
| 1013 | (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" | 1021 | (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" |
| 1014 | ;; Optional decompression. | 1022 | ;; Optional decompression. |
| 1015 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1023 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1016 | (list "\\.e?ps\\.Z$" "zcat * | ghostview -" | 1024 | (list "\\.e?ps\\.Z$" "zcat * | ghostview -" |
| 1017 | ;; Optional conversion to gzip format. | 1025 | ;; Optional conversion to gzip format. |
| 1018 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1026 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1019 | " " dired-guess-shell-znew-switches)) | 1027 | " " dired-guess-shell-znew-switches)) |
| 1020 | 1028 | ||
| 1021 | '("\\.patch$" "cat * | patch") | 1029 | '("\\.patch$" "cat * | patch") |
| 1022 | (list "\\.patch\\.g?z$" "gunzip -qc * | patch" | 1030 | (list "\\.patch\\.g?z$" "gunzip -qc * | patch" |
| 1023 | ;; Optional decompression. | 1031 | ;; Optional decompression. |
| 1024 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1032 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1025 | (list "\\.patch\\.Z$" "zcat * | patch" | 1033 | (list "\\.patch\\.Z$" "zcat * | patch" |
| 1026 | ;; Optional conversion to gzip format. | 1034 | ;; Optional conversion to gzip format. |
| 1027 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1035 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1028 | " " dired-guess-shell-znew-switches)) | 1036 | " " dired-guess-shell-znew-switches)) |
| 1029 | 1037 | ||
| 1030 | ;; The following four extensions are useful with dired-man ("N" key) | 1038 | ;; The following four extensions are useful with dired-man ("N" key) |
| 1031 | (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) | 1039 | (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) |
| 1032 | (if (Man-support-local-filenames) | 1040 | (if (Man-support-local-filenames) |
| 1033 | "man -l" | 1041 | "man -l" |
| 1034 | "cat * | tbl | nroff -man -h"))) | 1042 | "cat * | tbl | nroff -man -h"))) |
| 1035 | (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) | 1043 | (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) |
| 1036 | (if (Man-support-local-filenames) | 1044 | (if (Man-support-local-filenames) |
| 1037 | "man -l" | 1045 | "man -l" |
| 1038 | "gunzip -qc * | tbl | nroff -man -h")) | 1046 | "gunzip -qc * | tbl | nroff -man -h")) |
| 1039 | ;; Optional decompression. | 1047 | ;; Optional decompression. |
| 1040 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) | 1048 | '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) |
| 1041 | (list "\\.[0-9]\\.Z$" '(progn (require 'man) | 1049 | (list "\\.[0-9]\\.Z$" '(progn (require 'man) |
| 1042 | (if (Man-support-local-filenames) | 1050 | (if (Man-support-local-filenames) |
| 1043 | "man -l" | 1051 | "man -l" |
| 1044 | "zcat * | tbl | nroff -man -h")) | 1052 | "zcat * | tbl | nroff -man -h")) |
| 1045 | ;; Optional conversion to gzip format. | 1053 | ;; Optional conversion to gzip format. |
| 1046 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1054 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1047 | " " dired-guess-shell-znew-switches)) | 1055 | " " dired-guess-shell-znew-switches)) |
| 1048 | '("\\.pod$" "perldoc" "pod2man * | nroff -man") | 1056 | '("\\.pod$" "perldoc" "pod2man * | nroff -man") |
| 1049 | 1057 | ||
| 1050 | '("\\.dvi$" "xdvi" "dvips") ; preview and printing | 1058 | '("\\.dvi$" "xdvi" "dvips") ; preview and printing |
| 1051 | '("\\.au$" "play") ; play Sun audiofiles | 1059 | '("\\.au$" "play") ; play Sun audiofiles |
| 1052 | '("\\.mpg$" "mpeg_play") | 1060 | '("\\.mpe?g$\\|\\.avi$" "xine -p") |
| 1053 | '("\\.uu$" "uudecode") ; for uudecoded files | 1061 | '("\\.wav$" "play") |
| 1062 | '("\\.uu$" "uudecode") ; for uudecoded files | ||
| 1054 | '("\\.hqx$" "mcvert") | 1063 | '("\\.hqx$" "mcvert") |
| 1055 | '("\\.sh$" "sh") ; execute shell scripts | 1064 | '("\\.sh$" "sh") ; execute shell scripts |
| 1056 | '("\\.xbm$" "bitmap") ; view X11 bitmaps | 1065 | '("\\.xbm$" "bitmap") ; view X11 bitmaps |
| 1057 | '("\\.gp$" "gnuplot") | 1066 | '("\\.gp$" "gnuplot") |
| 1058 | '("\\.p[bgpn]m$" "xloadimage") | 1067 | '("\\.p[bgpn]m$" "xloadimage") |
| 1059 | '("\\.gif$" "xloadimage") ; view gif pictures | 1068 | '("\\.gif$" "xloadimage") ; view gif pictures |
| 1060 | '("\\.tif$" "xloadimage") | 1069 | '("\\.tif$" "xloadimage") |
| 1061 | '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG | 1070 | '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG |
| 1062 | '("\\.jpe?g$" "xloadimage") | 1071 | '("\\.jpe?g$" "xloadimage") |
| 1063 | '("\\.fig$" "xfig") ; edit fig pictures | 1072 | '("\\.fig$" "xfig") ; edit fig pictures |
| 1064 | '("\\.out$" "xgraph") ; for plotting purposes. | 1073 | '("\\.out$" "xgraph") ; for plotting purposes. |
| 1065 | '("\\.tex$" "latex" "tex") | 1074 | '("\\.tex$" "latex" "tex") |
| 1066 | '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") | 1075 | '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") |
| 1067 | '("\\.pdf$" "xpdf") ; edit PDF files | 1076 | '("\\.pdf$" "xpdf") |
| 1077 | '("\\.doc$" "antiword" "strings") | ||
| 1078 | '("\\.rpm$" "rpm -qilp" "rpm -ivh") | ||
| 1079 | '("\\.dia$" "dia") | ||
| 1080 | '("\\.mgp$" "mgp") | ||
| 1068 | 1081 | ||
| 1069 | ;; Some other popular archivers. | 1082 | ;; Some other popular archivers. |
| 1070 | (list "\\.zip$" "unzip" | 1083 | (list "\\.zip$" "unzip" "unzip -l" |
| 1071 | ;; Extract files into a separate subdirectory | 1084 | ;; Extract files into a separate subdirectory |
| 1072 | '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") | 1085 | '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") |
| 1073 | " -d " (file-name-sans-extension file))) | 1086 | " -d " (file-name-sans-extension file))) |
| 1074 | '("\\.zoo$" "zoo x//") | 1087 | '("\\.zoo$" "zoo x//") |
| 1075 | '("\\.lzh$" "lharc x") | 1088 | '("\\.lzh$" "lharc x") |
| 1076 | '("\\.arc$" "arc x") | 1089 | '("\\.arc$" "arc x") |
| @@ -1081,10 +1094,11 @@ dired." | |||
| 1081 | (list "\\.dz$" "dictunzip") | 1094 | (list "\\.dz$" "dictunzip") |
| 1082 | (list "\\.bz2$" "bunzip2") | 1095 | (list "\\.bz2$" "bunzip2") |
| 1083 | (list "\\.Z$" "uncompress" | 1096 | (list "\\.Z$" "uncompress" |
| 1084 | ;; Optional conversion to gzip format. | 1097 | ;; Optional conversion to gzip format. |
| 1085 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") | 1098 | '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") |
| 1086 | " " dired-guess-shell-znew-switches)) | 1099 | " " dired-guess-shell-znew-switches)) |
| 1087 | ) | 1100 | |
| 1101 | '("\\.sign?$" "gpg --verify")) | ||
| 1088 | 1102 | ||
| 1089 | "Default alist used for shell command guessing. | 1103 | "Default alist used for shell command guessing. |
| 1090 | See `dired-guess-shell-alist-user'.") | 1104 | See `dired-guess-shell-alist-user'.") |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 68603c905a5..666b373ca53 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -2261,7 +2261,8 @@ Code:, and others referenced in the style guide." | |||
| 2261 | (re-search-forward "^;;; Code" nil t) | 2261 | (re-search-forward "^;;; Code" nil t) |
| 2262 | (re-search-forward "^(require" nil t) | 2262 | (re-search-forward "^(require" nil t) |
| 2263 | (re-search-forward "^(" nil t)) | 2263 | (re-search-forward "^(" nil t)) |
| 2264 | (beginning-of-line))) | 2264 | (beginning-of-line)) |
| 2265 | (t (re-search-forward ";;; .* --- .*\n"))) | ||
| 2265 | (if (checkdoc-y-or-n-p | 2266 | (if (checkdoc-y-or-n-p |
| 2266 | "You should have a \";;; Commentary:\", add one? ") | 2267 | "You should have a \";;; Commentary:\", add one? ") |
| 2267 | (insert "\n;;; Commentary:\n;; \n\n") | 2268 | (insert "\n;;; Commentary:\n;; \n\n") |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index d4ba8d30623..b22e49dac34 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -200,7 +200,8 @@ Use the command `%s' to change this variable." pretty-name mode)) | |||
| 200 | See the command `%s' for a description of this minor-mode." | 200 | See the command `%s' for a description of this minor-mode." |
| 201 | (if body " | 201 | (if body " |
| 202 | Setting this variable directly does not take effect; | 202 | Setting this variable directly does not take effect; |
| 203 | use either \\[customize] or the function `%s'.")))) | 203 | either customize it (see the info node `Easy Customization') |
| 204 | or call the function `%s'.")))) | ||
| 204 | `(defcustom ,mode ,init-value | 205 | `(defcustom ,mode ,init-value |
| 205 | ,(format base-doc-string pretty-name mode mode) | 206 | ,(format base-doc-string pretty-name mode mode) |
| 206 | ,@set | 207 | ,@set |
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index 1ebf1186c2d..191be58c0b5 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el | |||
| @@ -265,11 +265,14 @@ display oriented stuff, use `trace-function-background' instead." | |||
| 265 | ;;;###autoload | 265 | ;;;###autoload |
| 266 | (defun trace-function-background (function &optional buffer) | 266 | (defun trace-function-background (function &optional buffer) |
| 267 | "Traces FUNCTION with trace output going quietly to BUFFER. | 267 | "Traces FUNCTION with trace output going quietly to BUFFER. |
| 268 | For every call of FUNCTION Lisp-style trace messages that display argument | 268 | When this tracing is enabled, every call to FUNCTION writes |
| 269 | and return values will be inserted into BUFFER. This function generates the | 269 | a Lisp-style trace message (showing the arguments and return value) |
| 270 | trace advice for FUNCTION and activates it together with any other advice | 270 | into BUFFER. This function generates advice to trace FUNCTION |
| 271 | there might be!! Trace output will quietly go to BUFFER without changing | 271 | and activates it together with any other advice there might be. |
| 272 | the window or buffer configuration at all." | 272 | The trace output goes to BUFFER quietly, without changing |
| 273 | the window or buffer configuration. | ||
| 274 | |||
| 275 | BUFFER defaults to `trace-buffer'." | ||
| 273 | (interactive | 276 | (interactive |
| 274 | (list | 277 | (list |
| 275 | (intern | 278 | (intern |
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index af757a2a55c..1685b829f64 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -892,12 +892,17 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to | |||
| 892 | (t | 892 | (t |
| 893 | ;;(setq ch (read-char-exclusive)) | 893 | ;;(setq ch (read-char-exclusive)) |
| 894 | (setq ch (aref (read-key-sequence nil) 0)) | 894 | (setq ch (aref (read-key-sequence nil) 0)) |
| 895 | (if viper-xemacs-p | ||
| 896 | (setq ch (event-to-character ch))) | ||
| 895 | ;; replace ^M with the newline | 897 | ;; replace ^M with the newline |
| 896 | (if (eq ch ?\C-m) (setq ch ?\n)) | 898 | (if (eq ch ?\C-m) (setq ch ?\n)) |
| 897 | ;; Make sure ^V and ^Q work as quotation chars | 899 | ;; Make sure ^V and ^Q work as quotation chars |
| 898 | (if (memq ch '(?\C-v ?\C-q)) | 900 | (if (memq ch '(?\C-v ?\C-q)) |
| 899 | ;;(setq ch (read-char-exclusive)) | 901 | (progn |
| 900 | (setq ch (aref (read-key-sequence nil) 0)) | 902 | ;;(setq ch (read-char-exclusive)) |
| 903 | (setq ch (aref (read-key-sequence nil) 0)) | ||
| 904 | (if viper-xemacs-p | ||
| 905 | (setq ch (event-to-character ch)))) | ||
| 901 | ) | 906 | ) |
| 902 | (insert ch)) | 907 | (insert ch)) |
| 903 | ) | 908 | ) |
| @@ -1750,7 +1755,7 @@ invokes the command before that, etc." | |||
| 1750 | 1755 | ||
| 1751 | ;; Hook used in viper-undo | 1756 | ;; Hook used in viper-undo |
| 1752 | (defun viper-after-change-undo-hook (beg end len) | 1757 | (defun viper-after-change-undo-hook (beg end len) |
| 1753 | (if undo-in-progress | 1758 | (if (and (boundp 'undo-in-progress) undo-in-progress) |
| 1754 | (setq undo-beg-posn beg | 1759 | (setq undo-beg-posn beg |
| 1755 | undo-end-posn (or end beg)) | 1760 | undo-end-posn (or end beg)) |
| 1756 | ;; some other hooks may be changing various text properties in | 1761 | ;; some other hooks may be changing various text properties in |
diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 88e5414d525..a2895133c27 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el | |||
| @@ -129,8 +129,17 @@ as the final argument." | |||
| 129 | args (concat find-dired-find-program " . " | 129 | args (concat find-dired-find-program " . " |
| 130 | (if (string= args "") | 130 | (if (string= args "") |
| 131 | "" | 131 | "" |
| 132 | (concat "\\( " args " \\) ")) | 132 | (concat |
| 133 | (car find-ls-option))) | 133 | (shell-quote-argument "(") |
| 134 | " " args " " | ||
| 135 | (shell-quote-argument ")") | ||
| 136 | " ")) | ||
| 137 | (if (equal (car find-ls-option) "-exec ls -ld {} \\;") | ||
| 138 | (concat "-exec ls -ld " | ||
| 139 | (shell-quote-argument "{}") | ||
| 140 | " " | ||
| 141 | (shell-quote-argument ";")) | ||
| 142 | (car find-ls-option)))) | ||
| 134 | ;; Start the find process. | 143 | ;; Start the find process. |
| 135 | (shell-command (concat args "&") (current-buffer)) | 144 | (shell-command (concat args "&") (current-buffer)) |
| 136 | ;; The next statement will bomb in classic dired (no optional arg allowed) | 145 | ;; The next statement will bomb in classic dired (no optional arg allowed) |
| @@ -215,7 +224,10 @@ Thus ARG can also contain additional grep options." | |||
| 215 | (find-dired dir | 224 | (find-dired dir |
| 216 | (concat "-type f -exec grep " find-grep-options " -e " | 225 | (concat "-type f -exec grep " find-grep-options " -e " |
| 217 | (shell-quote-argument regexp) | 226 | (shell-quote-argument regexp) |
| 218 | " {} \\\; "))) | 227 | " " |
| 228 | (shell-quote-argument "{}") | ||
| 229 | " " | ||
| 230 | (shell-quote-argument ";")))) | ||
| 219 | 231 | ||
| 220 | (defun find-dired-filter (proc string) | 232 | (defun find-dired-filter (proc string) |
| 221 | ;; Filter for \\[find-dired] processes. | 233 | ;; Filter for \\[find-dired] processes. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6927e3bfbac..81d566fc856 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,43 @@ | |||
| 1 | 2006-09-04 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * message.el (message-send-mail-with-sendmail): Look for sendmail in | ||
| 4 | several common directories. | ||
| 5 | |||
| 6 | 2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 7 | |||
| 8 | * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' | ||
| 9 | in quoted string into `\'. | ||
| 10 | |||
| 11 | 2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 12 | |||
| 13 | * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): | ||
| 14 | Use standard-syntax-table. | ||
| 15 | |||
| 16 | 2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 17 | |||
| 18 | * gnus-art.el (gnus-decode-address-function): New variable. | ||
| 19 | (article-decode-encoded-words): Use it to decode headers which are | ||
| 20 | assumed to contain addresses. | ||
| 21 | (gnus-mime-delete-part): Remove useless `or'. | ||
| 22 | |||
| 23 | * gnus-sum.el (gnus-decode-encoded-address-function): New variable. | ||
| 24 | (gnus-summary-from-or-to-or-newsgroups): Use it to decode To header. | ||
| 25 | (gnus-nov-parse-line): Use it to decode From header. | ||
| 26 | (gnus-get-newsgroup-headers): Ditto. | ||
| 27 | (gnus-summary-enter-digest-group): Use it to decode `to-address'. | ||
| 28 | |||
| 29 | * mail-parse.el (mail-decode-encoded-address-region): New alias. | ||
| 30 | (mail-decode-encoded-address-string): New alias. | ||
| 31 | |||
| 32 | * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings): | ||
| 33 | New function. | ||
| 34 | (rfc2047-encode-message-header, rfc2047-encode-region): Use it. | ||
| 35 | (rfc2047-strip-backslashes-in-quoted-strings): New fnction. | ||
| 36 | (rfc2047-decode-region): Use it; add optional argument `address-mime'. | ||
| 37 | (rfc2047-decode-string): Ditto. | ||
| 38 | (rfc2047-decode-address-region): New function. | ||
| 39 | (rfc2047-decode-address-string): New function. | ||
| 40 | |||
| 1 | 2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> | 41 | 2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> |
| 2 | 42 | ||
| 3 | [ Backported bug fix from No Gnus. ] | 43 | [ Backported bug fix from No Gnus. ] |
| @@ -389,10 +429,6 @@ | |||
| 389 | * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an | 429 | * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an |
| 390 | optional parameter. | 430 | optional parameter. |
| 391 | 431 | ||
| 392 | 2006-04-07 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 393 | |||
| 394 | * pgg-gpg.el: Revert to revision 7.15 to allow the use of gpg-agent. | ||
| 395 | |||
| 396 | 2006-04-06 Reiner Steib <Reiner.Steib@gmx.de> | 432 | 2006-04-06 Reiner Steib <Reiner.Steib@gmx.de> |
| 397 | 433 | ||
| 398 | * gnus-fun.el (gnus): Require it for gnus-directory. | 434 | * gnus-fun.el (gnus): Require it for gnus-directory. |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 39292e33a1f..17cbbeb0a75 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -853,6 +853,9 @@ be displayed by the first non-nil matching CONTENT face." | |||
| 853 | (defvar gnus-decode-header-function 'mail-decode-encoded-word-region | 853 | (defvar gnus-decode-header-function 'mail-decode-encoded-word-region |
| 854 | "Function used to decode headers.") | 854 | "Function used to decode headers.") |
| 855 | 855 | ||
| 856 | (defvar gnus-decode-address-function 'mail-decode-encoded-address-region | ||
| 857 | "Function used to decode addresses.") | ||
| 858 | |||
| 856 | (defvar gnus-article-dumbquotes-map | 859 | (defvar gnus-article-dumbquotes-map |
| 857 | '(("\200" "EUR") | 860 | '(("\200" "EUR") |
| 858 | ("\202" ",") | 861 | ("\202" ",") |
| @@ -2377,10 +2380,23 @@ If PROMPT (the prefix), prompt for a coding system to use." | |||
| 2377 | (set-buffer gnus-summary-buffer) | 2380 | (set-buffer gnus-summary-buffer) |
| 2378 | (error)) | 2381 | (error)) |
| 2379 | gnus-newsgroup-ignored-charsets)) | 2382 | gnus-newsgroup-ignored-charsets)) |
| 2380 | (inhibit-read-only t)) | 2383 | (inhibit-read-only t) |
| 2384 | start) | ||
| 2381 | (save-restriction | 2385 | (save-restriction |
| 2382 | (article-narrow-to-head) | 2386 | (article-narrow-to-head) |
| 2383 | (funcall gnus-decode-header-function (point-min) (point-max))))) | 2387 | (while (not (eobp)) |
| 2388 | (setq start (point)) | ||
| 2389 | (if (prog1 | ||
| 2390 | (looking-at "\ | ||
| 2391 | \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ | ||
| 2392 | \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") | ||
| 2393 | (while (progn | ||
| 2394 | (forward-line) | ||
| 2395 | (if (eobp) | ||
| 2396 | nil | ||
| 2397 | (memq (char-after) '(?\t ? )))))) | ||
| 2398 | (funcall gnus-decode-address-function start (point)) | ||
| 2399 | (funcall gnus-decode-header-function start (point))))))) | ||
| 2384 | 2400 | ||
| 2385 | (defun article-decode-group-name () | 2401 | (defun article-decode-group-name () |
| 2386 | "Decode group names in `Newsgroups:'." | 2402 | "Decode group names in `Newsgroups:'." |
| @@ -4324,9 +4340,8 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4324 | (handles gnus-article-mime-handles) | 4340 | (handles gnus-article-mime-handles) |
| 4325 | (none "(none)") | 4341 | (none "(none)") |
| 4326 | (description | 4342 | (description |
| 4327 | (or | 4343 | (mail-decode-encoded-word-string (or (mm-handle-description data) |
| 4328 | (mail-decode-encoded-word-string (or (mm-handle-description data) | 4344 | none))) |
| 4329 | none)))) | ||
| 4330 | (filename | 4345 | (filename |
| 4331 | (or (mail-content-type-get (mm-handle-disposition data) 'filename) | 4346 | (or (mail-content-type-get (mm-handle-disposition data) 'filename) |
| 4332 | none)) | 4347 | none)) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index b94d093329a..7d91d4db5aa 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -992,7 +992,11 @@ which it may alter in any way." | |||
| 992 | :group 'gnus-summary) | 992 | :group 'gnus-summary) |
| 993 | 993 | ||
| 994 | (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string | 994 | (defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string |
| 995 | "Variable that says which function should be used to decode a string with encoded words.") | 995 | "Function used to decode a string with encoded words.") |
| 996 | |||
| 997 | (defvar gnus-decode-encoded-address-function | ||
| 998 | 'mail-decode-encoded-address-string | ||
| 999 | "Function used to decode addresses with encoded words.") | ||
| 996 | 1000 | ||
| 997 | (defcustom gnus-extra-headers '(To Newsgroups) | 1001 | (defcustom gnus-extra-headers '(To Newsgroups) |
| 998 | "*Extra headers to parse." | 1002 | "*Extra headers to parse." |
| @@ -1001,7 +1005,7 @@ which it may alter in any way." | |||
| 1001 | :type '(repeat symbol)) | 1005 | :type '(repeat symbol)) |
| 1002 | 1006 | ||
| 1003 | (defcustom gnus-ignored-from-addresses | 1007 | (defcustom gnus-ignored-from-addresses |
| 1004 | (and user-mail-address | 1008 | (and user-mail-address |
| 1005 | (not (string= user-mail-address "")) | 1009 | (not (string= user-mail-address "")) |
| 1006 | (regexp-quote user-mail-address)) | 1010 | (regexp-quote user-mail-address)) |
| 1007 | "*Regexp of From headers that may be suppressed in favor of To headers." | 1011 | "*Regexp of From headers that may be suppressed in favor of To headers." |
| @@ -3436,7 +3440,7 @@ buffer that was in action when the last article was fetched." | |||
| 3436 | (concat "-> " | 3440 | (concat "-> " |
| 3437 | (inline | 3441 | (inline |
| 3438 | (gnus-summary-extract-address-component | 3442 | (gnus-summary-extract-address-component |
| 3439 | (funcall gnus-decode-encoded-word-function to))))) | 3443 | (funcall gnus-decode-encoded-address-function to))))) |
| 3440 | ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) | 3444 | ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) |
| 3441 | (concat "=> " newsgroups))))) | 3445 | (concat "=> " newsgroups))))) |
| 3442 | (inline (gnus-summary-extract-address-component gnus-tmp-from))))) | 3446 | (inline (gnus-summary-extract-address-component gnus-tmp-from))))) |
| @@ -4182,7 +4186,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." | |||
| 4182 | (error x)) | 4186 | (error x)) |
| 4183 | (condition-case () ; from | 4187 | (condition-case () ; from |
| 4184 | (gnus-remove-odd-characters | 4188 | (gnus-remove-odd-characters |
| 4185 | (funcall gnus-decode-encoded-word-function | 4189 | (funcall gnus-decode-encoded-address-function |
| 4186 | (setq x (nnheader-nov-field)))) | 4190 | (setq x (nnheader-nov-field)))) |
| 4187 | (error x)) | 4191 | (error x)) |
| 4188 | (nnheader-nov-field) ; date | 4192 | (nnheader-nov-field) ; date |
| @@ -5956,7 +5960,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." | |||
| 5956 | (progn | 5960 | (progn |
| 5957 | (goto-char p) | 5961 | (goto-char p) |
| 5958 | (if (search-forward "\nfrom:" nil t) | 5962 | (if (search-forward "\nfrom:" nil t) |
| 5959 | (funcall gnus-decode-encoded-word-function | 5963 | (funcall gnus-decode-encoded-address-function |
| 5960 | (nnheader-header-value)) | 5964 | (nnheader-header-value)) |
| 5961 | "(nobody)")) | 5965 | "(nobody)")) |
| 5962 | ;; Date. | 5966 | ;; Date. |
| @@ -8449,10 +8453,11 @@ to guess what the document format is." | |||
| 8449 | ;; the parent article. | 8453 | ;; the parent article. |
| 8450 | (when (setq to-address (or (gnus-fetch-field "reply-to") | 8454 | (when (setq to-address (or (gnus-fetch-field "reply-to") |
| 8451 | (gnus-fetch-field "from"))) | 8455 | (gnus-fetch-field "from"))) |
| 8452 | (setq params (append | 8456 | (setq params |
| 8453 | (list (cons 'to-address | 8457 | (append |
| 8454 | (funcall gnus-decode-encoded-word-function | 8458 | (list (cons 'to-address |
| 8455 | to-address)))))) | 8459 | (funcall gnus-decode-encoded-address-function |
| 8460 | to-address)))))) | ||
| 8456 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) | 8461 | (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) |
| 8457 | (insert-buffer-substring gnus-original-article-buffer) | 8462 | (insert-buffer-substring gnus-original-article-buffer) |
| 8458 | ;; Remove lines that may lead nndoc to misinterpret the | 8463 | ;; Remove lines that may lead nndoc to misinterpret the |
diff --git a/lisp/gnus/mail-parse.el b/lisp/gnus/mail-parse.el index 6a9a4755bb2..3c1aa8111c2 100644 --- a/lisp/gnus/mail-parse.el +++ b/lisp/gnus/mail-parse.el | |||
| @@ -70,6 +70,8 @@ | |||
| 70 | (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) | 70 | (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) |
| 71 | (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) | 71 | (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) |
| 72 | (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) | 72 | (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) |
| 73 | (defalias 'mail-decode-encoded-address-region 'rfc2047-decode-address-region) | ||
| 74 | (defalias 'mail-decode-encoded-address-string 'rfc2047-decode-address-string) | ||
| 73 | 75 | ||
| 74 | (provide 'mail-parse) | 76 | (provide 'mail-parse) |
| 75 | 77 | ||
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 4ee87933967..f8d3a32a515 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -3897,9 +3897,15 @@ If you always want Gnus to send messages in one piece, set | |||
| 3897 | 'call-process-region | 3897 | 'call-process-region |
| 3898 | (append | 3898 | (append |
| 3899 | (list (point-min) (point-max) | 3899 | (list (point-min) (point-max) |
| 3900 | (if (boundp 'sendmail-program) | 3900 | (cond ((boundp 'sendmail-program) |
| 3901 | sendmail-program | 3901 | sendmail-program) |
| 3902 | "/usr/lib/sendmail") | 3902 | ((file-exists-p "/usr/sbin/sendmail") |
| 3903 | "/usr/sbin/sendmail") | ||
| 3904 | ((file-exists-p "/usr/lib/sendmail") | ||
| 3905 | "/usr/lib/sendmail") | ||
| 3906 | ((file-exists-p "/usr/ucblib/sendmail") | ||
| 3907 | "/usr/ucblib/sendmail") | ||
| 3908 | (t "fakemail")) | ||
| 3903 | nil errbuf nil "-oi") | 3909 | nil errbuf nil "-oi") |
| 3904 | ;; Always specify who from, | 3910 | ;; Always specify who from, |
| 3905 | ;; since some systems have broken sendmails. | 3911 | ;; since some systems have broken sendmails. |
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el index f282795a0ab..534459683ce 100644 --- a/lisp/gnus/rfc2047.el +++ b/lisp/gnus/rfc2047.el | |||
| @@ -171,6 +171,40 @@ This is either `base64' or `quoted-printable'." | |||
| 171 | (re-search-forward ":[ \t\n]*" nil t) | 171 | (re-search-forward ":[ \t\n]*" nil t) |
| 172 | (buffer-substring-no-properties (point) (point-max))))) | 172 | (buffer-substring-no-properties (point) (point-max))))) |
| 173 | 173 | ||
| 174 | (defun rfc2047-quote-special-characters-in-quoted-strings (&optional | ||
| 175 | encodable-regexp) | ||
| 176 | "Quote special characters with `\\'s in quoted strings. | ||
| 177 | Quoting will not be done in a quoted string if it contains characters | ||
| 178 | matching ENCODABLE-REGEXP." | ||
| 179 | (goto-char (point-min)) | ||
| 180 | (let ((tspecials (concat "[" ietf-drums-tspecials "]")) | ||
| 181 | beg) | ||
| 182 | (with-syntax-table (standard-syntax-table) | ||
| 183 | (while (search-forward "\"" nil t) | ||
| 184 | (unless (eq (char-before) ?\\) | ||
| 185 | (setq beg (match-end 0)) | ||
| 186 | (goto-char (match-beginning 0)) | ||
| 187 | (condition-case nil | ||
| 188 | (progn | ||
| 189 | (forward-sexp) | ||
| 190 | (save-restriction | ||
| 191 | (narrow-to-region beg (1- (point))) | ||
| 192 | (goto-char beg) | ||
| 193 | (unless (and encodable-regexp | ||
| 194 | (re-search-forward encodable-regexp nil t)) | ||
| 195 | (while (re-search-forward tspecials nil 'move) | ||
| 196 | (unless (and (eq (char-before) ?\\) ;; Already quoted. | ||
| 197 | (looking-at tspecials)) | ||
| 198 | (goto-char (match-beginning 0)) | ||
| 199 | (unless (or (eq (char-before) ?\\) | ||
| 200 | (and rfc2047-encode-encoded-words | ||
| 201 | (eq (char-after) ??) | ||
| 202 | (eq (char-before) ?=))) | ||
| 203 | (insert "\\"))) | ||
| 204 | (forward-char))))) | ||
| 205 | (error | ||
| 206 | (goto-char beg)))))))) | ||
| 207 | |||
| 174 | (defvar rfc2047-encoding-type 'address-mime | 208 | (defvar rfc2047-encoding-type 'address-mime |
| 175 | "The type of encoding done by `rfc2047-encode-region'. | 209 | "The type of encoding done by `rfc2047-encode-region'. |
| 176 | This should be dynamically bound around calls to | 210 | This should be dynamically bound around calls to |
| @@ -187,8 +221,18 @@ Should be called narrowed to the head of the message." | |||
| 187 | (while (not (eobp)) | 221 | (while (not (eobp)) |
| 188 | (save-restriction | 222 | (save-restriction |
| 189 | (rfc2047-narrow-to-field) | 223 | (rfc2047-narrow-to-field) |
| 224 | (setq method nil | ||
| 225 | alist rfc2047-header-encoding-alist) | ||
| 226 | (while (setq elem (pop alist)) | ||
| 227 | (when (or (and (stringp (car elem)) | ||
| 228 | (looking-at (car elem))) | ||
| 229 | (eq (car elem) t)) | ||
| 230 | (setq alist nil | ||
| 231 | method (cdr elem)))) | ||
| 190 | (if (not (rfc2047-encodable-p)) | 232 | (if (not (rfc2047-encodable-p)) |
| 191 | (prog1 | 233 | (prog2 |
| 234 | (when (eq method 'address-mime) | ||
| 235 | (rfc2047-quote-special-characters-in-quoted-strings)) | ||
| 192 | (if (and (eq (mm-body-7-or-8) '8bit) | 236 | (if (and (eq (mm-body-7-or-8) '8bit) |
| 193 | (mm-multibyte-p) | 237 | (mm-multibyte-p) |
| 194 | (mm-coding-system-p | 238 | (mm-coding-system-p |
| @@ -209,14 +253,6 @@ Should be called narrowed to the head of the message." | |||
| 209 | (point)) | 253 | (point)) |
| 210 | (point-max)))) | 254 | (point-max)))) |
| 211 | ;; We found something that may perhaps be encoded. | 255 | ;; We found something that may perhaps be encoded. |
| 212 | (setq method nil | ||
| 213 | alist rfc2047-header-encoding-alist) | ||
| 214 | (while (setq elem (pop alist)) | ||
| 215 | (when (or (and (stringp (car elem)) | ||
| 216 | (looking-at (car elem))) | ||
| 217 | (eq (car elem) t)) | ||
| 218 | (setq alist nil | ||
| 219 | method (cdr elem)))) | ||
| 220 | (re-search-forward "^[^:]+: *" nil t) | 256 | (re-search-forward "^[^:]+: *" nil t) |
| 221 | (cond | 257 | (cond |
| 222 | ((eq method 'address-mime) | 258 | ((eq method 'address-mime) |
| @@ -347,6 +383,7 @@ Dynamically bind `rfc2047-encoding-type' to change that." | |||
| 347 | (rfc2047-encode start (point)) | 383 | (rfc2047-encode start (point)) |
| 348 | (goto-char end)))) | 384 | (goto-char end)))) |
| 349 | ;; `address-mime' case -- take care of quoted words, comments. | 385 | ;; `address-mime' case -- take care of quoted words, comments. |
| 386 | (rfc2047-quote-special-characters-in-quoted-strings encodable-regexp) | ||
| 350 | (with-syntax-table rfc2047-syntax-table | 387 | (with-syntax-table rfc2047-syntax-table |
| 351 | (goto-char (point-min)) | 388 | (goto-char (point-min)) |
| 352 | (condition-case err ; in case of unbalanced quotes | 389 | (condition-case err ; in case of unbalanced quotes |
| @@ -821,6 +858,29 @@ encoded-word, concatenate them, and decode it by charset. Otherwise, | |||
| 821 | the decoder will fully decode each encoded-word before concatenating | 858 | the decoder will fully decode each encoded-word before concatenating |
| 822 | them.") | 859 | them.") |
| 823 | 860 | ||
| 861 | (defun rfc2047-strip-backslashes-in-quoted-strings () | ||
| 862 | "Strip backslashes in quoted strings. `\\\"' remains." | ||
| 863 | (goto-char (point-min)) | ||
| 864 | (let (beg) | ||
| 865 | (with-syntax-table (standard-syntax-table) | ||
| 866 | (while (search-forward "\"" nil t) | ||
| 867 | (unless (eq (char-before) ?\\) | ||
| 868 | (setq beg (match-end 0)) | ||
| 869 | (goto-char (match-beginning 0)) | ||
| 870 | (condition-case nil | ||
| 871 | (progn | ||
| 872 | (forward-sexp) | ||
| 873 | (save-restriction | ||
| 874 | (narrow-to-region beg (1- (point))) | ||
| 875 | (goto-char beg) | ||
| 876 | (while (search-forward "\\" nil 'move) | ||
| 877 | (unless (memq (char-after) '(?\")) | ||
| 878 | (delete-backward-char 1)) | ||
| 879 | (forward-char))) | ||
| 880 | (forward-char)) | ||
| 881 | (error | ||
| 882 | (goto-char beg)))))))) | ||
| 883 | |||
| 824 | (defun rfc2047-charset-to-coding-system (charset) | 884 | (defun rfc2047-charset-to-coding-system (charset) |
| 825 | "Return coding-system corresponding to MIME CHARSET. | 885 | "Return coding-system corresponding to MIME CHARSET. |
| 826 | If your Emacs implementation can't decode CHARSET, return nil." | 886 | If your Emacs implementation can't decode CHARSET, return nil." |
| @@ -898,8 +958,10 @@ ENCODED-WORD)." | |||
| 898 | ;; and worthwhile (is it more correct or not?), e.g. something like | 958 | ;; and worthwhile (is it more correct or not?), e.g. something like |
| 899 | ;; `=?iso-8859-1?q?foo?=@'. | 959 | ;; `=?iso-8859-1?q?foo?=@'. |
| 900 | 960 | ||
| 901 | (defun rfc2047-decode-region (start end) | 961 | (defun rfc2047-decode-region (start end &optional address-mime) |
| 902 | "Decode MIME-encoded words in region between START and END." | 962 | "Decode MIME-encoded words in region between START and END. |
| 963 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters | ||
| 964 | other than `\"' and `\\' in quoted strings." | ||
| 903 | (interactive "r") | 965 | (interactive "r") |
| 904 | (let ((case-fold-search t) | 966 | (let ((case-fold-search t) |
| 905 | (eword-regexp (eval-when-compile | 967 | (eword-regexp (eval-when-compile |
| @@ -910,6 +972,8 @@ ENCODED-WORD)." | |||
| 910 | (save-excursion | 972 | (save-excursion |
| 911 | (save-restriction | 973 | (save-restriction |
| 912 | (narrow-to-region start end) | 974 | (narrow-to-region start end) |
| 975 | (when address-mime | ||
| 976 | (rfc2047-strip-backslashes-in-quoted-strings)) | ||
| 913 | (goto-char (setq b start)) | 977 | (goto-char (setq b start)) |
| 914 | ;; Look for the encoded-words. | 978 | ;; Look for the encoded-words. |
| 915 | (while (setq match (re-search-forward eword-regexp nil t)) | 979 | (while (setq match (re-search-forward eword-regexp nil t)) |
| @@ -995,8 +1059,16 @@ ENCODED-WORD)." | |||
| 995 | (not (eq mail-parse-charset 'gnus-decoded))) | 1059 | (not (eq mail-parse-charset 'gnus-decoded))) |
| 996 | (mm-decode-coding-region b (point-max) mail-parse-charset)))))) | 1060 | (mm-decode-coding-region b (point-max) mail-parse-charset)))))) |
| 997 | 1061 | ||
| 998 | (defun rfc2047-decode-string (string) | 1062 | (defun rfc2047-decode-address-region (start end) |
| 999 | "Decode the quoted-printable-encoded STRING and return the results." | 1063 | "Decode MIME-encoded words in region between START and END. |
| 1064 | Backslashes which precede characters other than `\"' and `\\' in quoted | ||
| 1065 | strings are stripped." | ||
| 1066 | (rfc2047-decode-region start end t)) | ||
| 1067 | |||
| 1068 | (defun rfc2047-decode-string (string &optional address-mime) | ||
| 1069 | "Decode MIME-encoded STRING and return the result. | ||
| 1070 | If ADDRESS-MIME is non-nil, strip backslashes which precede characters | ||
| 1071 | other than `\"' and `\\' in quoted strings." | ||
| 1000 | (let ((m (mm-multibyte-p))) | 1072 | (let ((m (mm-multibyte-p))) |
| 1001 | (if (string-match "=\\?" string) | 1073 | (if (string-match "=\\?" string) |
| 1002 | (with-temp-buffer | 1074 | (with-temp-buffer |
| @@ -1010,8 +1082,16 @@ ENCODED-WORD)." | |||
| 1010 | (mm-enable-multibyte)) | 1082 | (mm-enable-multibyte)) |
| 1011 | (insert string) | 1083 | (insert string) |
| 1012 | (inline | 1084 | (inline |
| 1013 | (rfc2047-decode-region (point-min) (point-max))) | 1085 | (rfc2047-decode-region (point-min) (point-max) address-mime)) |
| 1014 | (buffer-string)) | 1086 | (buffer-string)) |
| 1087 | (when address-mime | ||
| 1088 | (setq string | ||
| 1089 | (with-temp-buffer | ||
| 1090 | (when (mm-multibyte-string-p string) | ||
| 1091 | (mm-enable-multibyte)) | ||
| 1092 | (insert string) | ||
| 1093 | (rfc2047-strip-backslashes-in-quoted-strings) | ||
| 1094 | (buffer-string)))) | ||
| 1015 | ;; Fixme: As above, `m' here is inappropriate. | 1095 | ;; Fixme: As above, `m' here is inappropriate. |
| 1016 | (if (and m | 1096 | (if (and m |
| 1017 | mail-parse-charset | 1097 | mail-parse-charset |
| @@ -1033,6 +1113,12 @@ ENCODED-WORD)." | |||
| 1033 | (mm-decode-coding-string string mail-parse-charset)) | 1113 | (mm-decode-coding-string string mail-parse-charset)) |
| 1034 | (mm-string-as-multibyte string))))) | 1114 | (mm-string-as-multibyte string))))) |
| 1035 | 1115 | ||
| 1116 | (defun rfc2047-decode-address-string (string) | ||
| 1117 | "Decode MIME-encoded STRING and return the result. | ||
| 1118 | Backslashes which precede characters other than `\"' and `\\' in quoted | ||
| 1119 | strings are stripped." | ||
| 1120 | (rfc2047-decode-string string t)) | ||
| 1121 | |||
| 1036 | (defun rfc2047-pad-base64 (string) | 1122 | (defun rfc2047-pad-base64 (string) |
| 1037 | "Pad STRING to quartets." | 1123 | "Pad STRING to quartets." |
| 1038 | ;; Be more liberal to accept buggy base64 strings. If | 1124 | ;; Be more liberal to accept buggy base64 strings. If |
diff --git a/lisp/hl-line.el b/lisp/hl-line.el index c2d2d293010..757a398086d 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el | |||
| @@ -64,16 +64,37 @@ | |||
| 64 | 64 | ||
| 65 | ;;; Code: | 65 | ;;; Code: |
| 66 | 66 | ||
| 67 | (defvar hl-line-overlay nil | ||
| 68 | "Overlay used by Hl-Line mode to highlight the current line.") | ||
| 69 | (make-variable-buffer-local 'hl-line-overlay) | ||
| 70 | |||
| 71 | (defvar global-hl-line-overlay nil | ||
| 72 | "Overlay used by Global-Hl-Line mode to highlight the current line.") | ||
| 73 | |||
| 67 | (defgroup hl-line nil | 74 | (defgroup hl-line nil |
| 68 | "Highlight the current line." | 75 | "Highlight the current line." |
| 69 | :version "21.1" | 76 | :version "21.1" |
| 70 | :group 'editing) | 77 | :group 'editing) |
| 71 | 78 | ||
| 72 | (defcustom hl-line-face 'highlight | 79 | (defface hl-line |
| 73 | "Face with which to highlight the current line." | 80 | '((t :inherit highlight)) |
| 74 | :type 'face | 81 | "Default face for highlighting the current line in Hl-Line mode." |
| 82 | :version "22.1" | ||
| 75 | :group 'hl-line) | 83 | :group 'hl-line) |
| 76 | 84 | ||
| 85 | (defcustom hl-line-face 'hl-line | ||
| 86 | "Face with which to highlight the current line in Hl-Line mode." | ||
| 87 | :type 'face | ||
| 88 | :group 'hl-line | ||
| 89 | :set (lambda (symbol value) | ||
| 90 | (set symbol value) | ||
| 91 | (dolist (buffer (buffer-list)) | ||
| 92 | (with-current-buffer buffer | ||
| 93 | (when hl-line-overlay | ||
| 94 | (overlay-put hl-line-overlay 'face hl-line-face)))) | ||
| 95 | (when global-hl-line-overlay | ||
| 96 | (overlay-put global-hl-line-overlay 'face hl-line-face)))) | ||
| 97 | |||
| 77 | (defcustom hl-line-sticky-flag t | 98 | (defcustom hl-line-sticky-flag t |
| 78 | "*Non-nil means highlight the current line in all windows. | 99 | "*Non-nil means highlight the current line in all windows. |
| 79 | Otherwise Hl-Line mode will highlight only in the selected | 100 | Otherwise Hl-Line mode will highlight only in the selected |
| @@ -92,13 +113,6 @@ It should return nil if there's no region to be highlighted. | |||
| 92 | 113 | ||
| 93 | This variable is expected to be made buffer-local by modes.") | 114 | This variable is expected to be made buffer-local by modes.") |
| 94 | 115 | ||
| 95 | (defvar hl-line-overlay nil | ||
| 96 | "Overlay used by Hl-Line mode to highlight the current line.") | ||
| 97 | (make-variable-buffer-local 'hl-line-overlay) | ||
| 98 | |||
| 99 | (defvar global-hl-line-overlay nil | ||
| 100 | "Overlay used by Global-Hl-Line mode to highlight the current line.") | ||
| 101 | |||
| 102 | ;;;###autoload | 116 | ;;;###autoload |
| 103 | (define-minor-mode hl-line-mode | 117 | (define-minor-mode hl-line-mode |
| 104 | "Buffer-local minor mode to highlight the line about point. | 118 | "Buffer-local minor mode to highlight the line about point. |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 29767cee7f6..04672f6e29f 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -1972,12 +1972,12 @@ the value of point at the beginning of the line for that buffer." | |||
| 1972 | (not (eq ibuffer-buf buf)))))) | 1972 | (not (eq ibuffer-buf buf)))))) |
| 1973 | 1973 | ||
| 1974 | ;; This function is a special case; it's not defined by | 1974 | ;; This function is a special case; it's not defined by |
| 1975 | ;; `ibuffer-define-sorter'. | 1975 | ;; `define-ibuffer-sorter'. |
| 1976 | (defun ibuffer-do-sort-by-recency () | 1976 | (defun ibuffer-do-sort-by-recency () |
| 1977 | "Sort the buffers by last view time." | 1977 | "Sort the buffers by last view time." |
| 1978 | (interactive) | 1978 | (interactive) |
| 1979 | (setq ibuffer-sorting-mode 'recency) | 1979 | (setq ibuffer-sorting-mode 'recency) |
| 1980 | (ibuffer-redisplay t)) | 1980 | (ibuffer-update nil t)) |
| 1981 | 1981 | ||
| 1982 | (defun ibuffer-update-format () | 1982 | (defun ibuffer-update-format () |
| 1983 | (when (null ibuffer-current-format) | 1983 | (when (null ibuffer-current-format) |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 523ef3f73a8..66f719ae1eb 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -60,16 +60,19 @@ to toggle between display as an image and display as text." | |||
| 60 | (setq major-mode 'image-mode) | 60 | (setq major-mode 'image-mode) |
| 61 | (use-local-map image-mode-map) | 61 | (use-local-map image-mode-map) |
| 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) | 62 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) |
| 63 | (if (not (get-text-property (point-min) 'display)) | 63 | (if (and (display-images-p) |
| 64 | (not (get-text-property (point-min) 'display))) | ||
| 64 | (image-toggle-display) | 65 | (image-toggle-display) |
| 65 | ;; Set next vars when image is already displayed but local | 66 | ;; Set next vars when image is already displayed but local |
| 66 | ;; variables were cleared by kill-all-local-variables | 67 | ;; variables were cleared by kill-all-local-variables |
| 67 | (setq cursor-type nil truncate-lines t)) | 68 | (setq cursor-type nil truncate-lines t)) |
| 68 | (run-mode-hooks 'image-mode-hook) | 69 | (run-mode-hooks 'image-mode-hook) |
| 69 | (message "%s" (concat (substitute-command-keys | 70 | (if (display-images-p) |
| 70 | "Type \\[image-toggle-display] to view the image as ") | 71 | (message "%s" (concat |
| 71 | (if (get-text-property (point-min) 'display) | 72 | (substitute-command-keys |
| 72 | "text" "an image") "."))) | 73 | "Type \\[image-toggle-display] to view the image as ") |
| 74 | (if (get-text-property (point-min) 'display) | ||
| 75 | "text" "an image") ".")))) | ||
| 73 | 76 | ||
| 74 | ;;;###autoload | 77 | ;;;###autoload |
| 75 | (define-minor-mode image-minor-mode | 78 | (define-minor-mode image-minor-mode |
diff --git a/lisp/imenu.el b/lisp/imenu.el index d9c75c5fdd4..ed190c24e12 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -967,15 +967,15 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook." | |||
| 967 | (defvar imenu-buffer-menubar nil) | 967 | (defvar imenu-buffer-menubar nil) |
| 968 | 968 | ||
| 969 | (defvar imenu-menubar-modified-tick 0 | 969 | (defvar imenu-menubar-modified-tick 0 |
| 970 | "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.") | 970 | "The value of (buffer-chars-modified-tick) as of the last call |
| 971 | to `imenu-update-menubar'.") | ||
| 971 | (make-variable-buffer-local 'imenu-menubar-modified-tick) | 972 | (make-variable-buffer-local 'imenu-menubar-modified-tick) |
| 972 | 973 | ||
| 973 | (defun imenu-update-menubar () | 974 | (defun imenu-update-menubar () |
| 974 | (when (and (current-local-map) | 975 | (when (and (current-local-map) |
| 975 | (keymapp (lookup-key (current-local-map) [menu-bar index])) | 976 | (keymapp (lookup-key (current-local-map) [menu-bar index])) |
| 976 | (not (eq (buffer-modified-tick) | 977 | (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick)) |
| 977 | imenu-menubar-modified-tick))) | 978 | (setq imenu-menubar-modified-tick (buffer-chars-modified-tick)) |
| 978 | (setq imenu-menubar-modified-tick (buffer-modified-tick)) | ||
| 979 | (let ((index-alist (imenu--make-index-alist t))) | 979 | (let ((index-alist (imenu--make-index-alist t))) |
| 980 | ;; Don't bother updating if the index-alist has not changed | 980 | ;; Don't bother updating if the index-alist has not changed |
| 981 | ;; since the last time we did it. | 981 | ;; since the last time we did it. |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 36a828d2142..75de3e1f271 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1095,8 +1095,8 @@ Optional 5th arg DECODE-MAP is a Quail decode map. | |||
| 1095 | 1095 | ||
| 1096 | Optional 6th arg PROPS is a property list annotating TRANS. See the | 1096 | Optional 6th arg PROPS is a property list annotating TRANS. See the |
| 1097 | function `quail-define-rules' for the detail." | 1097 | function `quail-define-rules' for the detail." |
| 1098 | (if (null (stringp key)) | 1098 | (if (not (or (stringp key) (vectorp key))) |
| 1099 | "Invalid Quail key `%s'" key) | 1099 | (error "Invalid Quail key `%s'" key)) |
| 1100 | (if (not (or (numberp trans) (stringp trans) (vectorp trans) | 1100 | (if (not (or (numberp trans) (stringp trans) (vectorp trans) |
| 1101 | (consp trans) | 1101 | (consp trans) |
| 1102 | (symbolp trans) | 1102 | (symbolp trans) |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 3bd287541cf..04928fb537b 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -1340,7 +1340,15 @@ complicated cases." | |||
| 1340 | (set-buffer prepped) | 1340 | (set-buffer prepped) |
| 1341 | (apply 'call-process-region | 1341 | (apply 'call-process-region |
| 1342 | (append (list (point-min) (point-max) | 1342 | (append (list (point-min) (point-max) |
| 1343 | (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail") | 1343 | (cond ((boundp 'sendmail-program) |
| 1344 | sendmail-program) | ||
| 1345 | ((file-exists-p "/usr/sbin/sendmail") | ||
| 1346 | "/usr/sbin/sendmail") | ||
| 1347 | ((file-exists-p "/usr/lib/sendmail") | ||
| 1348 | "/usr/lib/sendmail") | ||
| 1349 | ((file-exists-p "/usr/ucblib/sendmail") | ||
| 1350 | "/usr/ucblib/sendmail") | ||
| 1351 | (t "fakemail")) | ||
| 1344 | nil errors-to nil "-oi" "-t") | 1352 | nil errors-to nil "-oi" "-t") |
| 1345 | ;; provide envelope "from" to sendmail; results will vary | 1353 | ;; provide envelope "from" to sendmail; results will vary |
| 1346 | (list "-f" user-mail-address) | 1354 | (list "-f" user-mail-address) |
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index 933e1f6c8a2..bba23111612 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el | |||
| @@ -134,12 +134,11 @@ spam, as one of the fields of `rsf-definitions-alist'" | |||
| 134 | :group 'rmail-spam-filter ) | 134 | :group 'rmail-spam-filter ) |
| 135 | 135 | ||
| 136 | (defcustom rsf-min-region-to-spam-list 7 | 136 | (defcustom rsf-min-region-to-spam-list 7 |
| 137 | "*User may highlight a region in an incomming message and use | 137 | "*Minimum size of region that you can add to the spam list. |
| 138 | the menubar to add this region to the spam definitions. This | 138 | This is a size limit on text that you can specify as |
| 139 | variable specifies the minimum size of region that may be added | 139 | indicating a message is spam. The aim is to avoid |
| 140 | to spam list, to avoid accidentally adding a too short region | 140 | accidentally adding a too short region, which would result |
| 141 | which would result in false positive identification of spam | 141 | in false positive identification of spam." |
| 142 | messages." | ||
| 143 | :type 'integer | 142 | :type 'integer |
| 144 | :group 'rmail-spam-filter ) | 143 | :group 'rmail-spam-filter ) |
| 145 | 144 | ||
| @@ -212,8 +211,8 @@ specify 'this\\&that' in the appropriate spam definition field." | |||
| 212 | :group 'rmail-spam-filter) | 211 | :group 'rmail-spam-filter) |
| 213 | 212 | ||
| 214 | (defvar rsf-scanning-messages-now nil | 213 | (defvar rsf-scanning-messages-now nil |
| 215 | "Non nil when rmail-spam-filter scans messages, | 214 | "Non nil when `rmail-spam-filter' scans messages. |
| 216 | for interaction with `rsf-bbdb-auto-delete-spam-entries'") | 215 | This is for interaction with `rsf-bbdb-auto-delete-spam-entries'.") |
| 217 | 216 | ||
| 218 | ;; the advantage over the automatic filter definitions is the AND conjunction | 217 | ;; the advantage over the automatic filter definitions is the AND conjunction |
| 219 | ;; of in-one-definition-elements | 218 | ;; of in-one-definition-elements |
| @@ -596,8 +595,8 @@ Added to spam definitions as a contents field." | |||
| 596 | (define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) | 595 | (define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) |
| 597 | 596 | ||
| 598 | (defun rsf-add-content-type-field () | 597 | (defun rsf-add-content-type-field () |
| 599 | "Maintain backward compatibility with previous versions of rmail-spam-filter. | 598 | "Maintain backward compatibility for `rmail-spam-filter'. |
| 600 | The most recent version of rmai-spam-filter checks the contents | 599 | The most recent version of `rmail-spam-filter' checks the contents |
| 601 | field of the incoming mail to see if it spam. The format of | 600 | field of the incoming mail to see if it spam. The format of |
| 602 | `rsf-definitions-alist' has therefore changed. This function | 601 | `rsf-definitions-alist' has therefore changed. This function |
| 603 | checks to see if old format is used, and if it is, it converts | 602 | checks to see if old format is used, and if it is, it converts |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 0760aa648ec..7e9da94b100 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -48,6 +48,16 @@ | |||
| 48 | :group 'sendmail | 48 | :group 'sendmail |
| 49 | :version "22.1") | 49 | :version "22.1") |
| 50 | 50 | ||
| 51 | (defcustom sendmail-program | ||
| 52 | (cond | ||
| 53 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | ||
| 54 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | ||
| 55 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | ||
| 56 | (t "fakemail")) ;In ../etc, to interface to /bin/mail. | ||
| 57 | "Program used to send messages." | ||
| 58 | :group 'mail | ||
| 59 | :type 'file) | ||
| 60 | |||
| 51 | ;;;###autoload | 61 | ;;;###autoload |
| 52 | (defcustom mail-from-style 'angles | 62 | (defcustom mail-from-style 'angles |
| 53 | "Specifies how \"From:\" fields look. | 63 | "Specifies how \"From:\" fields look. |
diff --git a/lisp/man.el b/lisp/man.el index 77c089b9d8d..2351853eeca 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -388,6 +388,8 @@ Otherwise, the value is whatever the function | |||
| 388 | /\e\\[[0-9][0-9]*m/ s///g" | 388 | /\e\\[[0-9][0-9]*m/ s///g" |
| 389 | "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") | 389 | "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") |
| 390 | 390 | ||
| 391 | (defvar Man-topic-history nil "Topic read history.") | ||
| 392 | |||
| 391 | (defvar man-mode-syntax-table | 393 | (defvar man-mode-syntax-table |
| 392 | (let ((table (copy-syntax-table (standard-syntax-table)))) | 394 | (let ((table (copy-syntax-table (standard-syntax-table)))) |
| 393 | (modify-syntax-entry ?. "w" table) | 395 | (modify-syntax-entry ?. "w" table) |
| @@ -686,7 +688,7 @@ all sections related to a subject, put something appropriate into the | |||
| 686 | (if (string= default-entry "") | 688 | (if (string= default-entry "") |
| 687 | ": " | 689 | ": " |
| 688 | (format " (default %s): " default-entry))) | 690 | (format " (default %s): " default-entry))) |
| 689 | nil nil default-entry))) | 691 | nil 'Man-topic-history default-entry))) |
| 690 | (if (string= input "") | 692 | (if (string= input "") |
| 691 | (error "No man args given") | 693 | (error "No man args given") |
| 692 | input)))) | 694 | input)))) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index c34ac7dcf78..8c678b6ae5f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -144,7 +144,9 @@ number. If zero or nil, no truncating is done." | |||
| 144 | 144 | ||
| 145 | (defcustom rcirc-show-maximum-output t | 145 | (defcustom rcirc-show-maximum-output t |
| 146 | "*If non-nil, scroll buffer to keep the point at the bottom of | 146 | "*If non-nil, scroll buffer to keep the point at the bottom of |
| 147 | the window.") | 147 | the window." |
| 148 | :type 'boolean | ||
| 149 | :group 'rcirc) | ||
| 148 | 150 | ||
| 149 | (defcustom rcirc-authinfo nil | 151 | (defcustom rcirc-authinfo nil |
| 150 | "List of authentication passwords. | 152 | "List of authentication passwords. |
| @@ -200,6 +202,11 @@ use either M-x customize or also call `rcirc-update-prompt'." | |||
| 200 | :initialize 'custom-initialize-default | 202 | :initialize 'custom-initialize-default |
| 201 | :group 'rcirc) | 203 | :group 'rcirc) |
| 202 | 204 | ||
| 205 | (defcustom rcirc-keywords nil | ||
| 206 | "List of keywords to highlight in message text." | ||
| 207 | :type '(repeat string) | ||
| 208 | :group 'rcirc) | ||
| 209 | |||
| 203 | (defcustom rcirc-ignore-list () | 210 | (defcustom rcirc-ignore-list () |
| 204 | "List of ignored nicks. | 211 | "List of ignored nicks. |
| 205 | Use /ignore to list them, use /ignore NICK to add or remove a nick." | 212 | Use /ignore to list them, use /ignore NICK to add or remove a nick." |
| @@ -212,16 +219,16 @@ When an ignored person renames, their nick is added to both lists. | |||
| 212 | Nicks will be removed from the automatic list on follow-up renamings or | 219 | Nicks will be removed from the automatic list on follow-up renamings or |
| 213 | parts.") | 220 | parts.") |
| 214 | 221 | ||
| 215 | (defcustom rcirc-bright-nick-regexp nil | 222 | (defcustom rcirc-bright-nicks nil |
| 216 | "Regexp matching nicks to be emphasized. | 223 | "List of nicks to be emphasized. |
| 217 | See `rcirc-bright-nick' face." | 224 | See `rcirc-bright-nick' face." |
| 218 | :type 'regexp | 225 | :type '(repeat string) |
| 219 | :group 'rcirc) | 226 | :group 'rcirc) |
| 220 | 227 | ||
| 221 | (defcustom rcirc-dim-nick-regexp nil | 228 | (defcustom rcirc-dim-nicks nil |
| 222 | "Regexp matching nicks to be deemphasized. | 229 | "List of nicks to be deemphasized. |
| 223 | See `rcirc-dim-nick' face." | 230 | See `rcirc-dim-nick' face." |
| 224 | :type 'regexp | 231 | :type '(repeat string) |
| 225 | :group 'rcirc) | 232 | :group 'rcirc) |
| 226 | 233 | ||
| 227 | (defcustom rcirc-print-hooks nil | 234 | (defcustom rcirc-print-hooks nil |
| @@ -246,7 +253,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." | |||
| 246 | :group 'rcirc) | 253 | :group 'rcirc) |
| 247 | 254 | ||
| 248 | (defcustom rcirc-coding-system-alist nil | 255 | (defcustom rcirc-coding-system-alist nil |
| 249 | "Alist to decide a coding system to use for a file I/O operation. | 256 | "Alist to decide a coding system to use for a channel I/O operation. |
| 250 | The format is ((PATTERN . VAL) ...). | 257 | The format is ((PATTERN . VAL) ...). |
| 251 | PATTERN is either a string or a cons of strings. | 258 | PATTERN is either a string or a cons of strings. |
| 252 | If PATTERN is a string, it is used to match a target. | 259 | If PATTERN is a string, it is used to match a target. |
| @@ -528,10 +535,14 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") | |||
| 528 | process cmd sender args text))) | 535 | process cmd sender args text))) |
| 529 | (message "UNHANDLED: %s" text))) | 536 | (message "UNHANDLED: %s" text))) |
| 530 | 537 | ||
| 531 | (defun rcirc-handler-generic (process command sender args text) | 538 | (defvar rcirc-responses-no-activity '("305" "306") |
| 539 | "Responses that don't trigger activity in the mode-line indicator.") | ||
| 540 | |||
| 541 | (defun rcirc-handler-generic (process response sender args text) | ||
| 532 | "Generic server response handler." | 542 | "Generic server response handler." |
| 533 | (rcirc-print process sender command nil | 543 | (rcirc-print process sender response nil |
| 534 | (mapconcat 'identity (cdr args) " ") t)) | 544 | (mapconcat 'identity (cdr args) " ") |
| 545 | (not (member response rcirc-responses-no-activity)))) | ||
| 535 | 546 | ||
| 536 | (defun rcirc-send-string (process string) | 547 | (defun rcirc-send-string (process string) |
| 537 | "Send PROCESS a STRING plus a newline." | 548 | "Send PROCESS a STRING plus a newline." |
| @@ -748,13 +759,10 @@ If NOTICEP is non-nil, send a notice instead of privmsg." | |||
| 748 | 759 | ||
| 749 | ;; if the user changes the major mode or kills the buffer, there is | 760 | ;; if the user changes the major mode or kills the buffer, there is |
| 750 | ;; cleanup work to do | 761 | ;; cleanup work to do |
| 751 | (make-local-variable 'change-major-mode-hook) | 762 | (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t) |
| 752 | (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook) | 763 | (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t) |
| 753 | (make-local-variable 'kill-buffer-hook) | ||
| 754 | (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook) | ||
| 755 | 764 | ||
| 756 | (make-local-variable 'window-scroll-functions) | 765 | (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom nil t) |
| 757 | (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom) | ||
| 758 | 766 | ||
| 759 | ;; add to buffer list, and update buffer abbrevs | 767 | ;; add to buffer list, and update buffer abbrevs |
| 760 | (when target ; skip server buffer | 768 | (when target ; skip server buffer |
| @@ -941,7 +949,7 @@ Create the buffer if it doesn't exist." | |||
| 941 | (if (fboundp fun) | 949 | (if (fboundp fun) |
| 942 | (funcall fun args process rcirc-target) | 950 | (funcall fun args process rcirc-target) |
| 943 | (rcirc-send-string process | 951 | (rcirc-send-string process |
| 944 | (concat command " " args))))))) | 952 | (concat command " :" args))))))) |
| 945 | 953 | ||
| 946 | (defvar rcirc-parent-buffer nil) | 954 | (defvar rcirc-parent-buffer nil) |
| 947 | (defvar rcirc-window-configuration nil) | 955 | (defvar rcirc-window-configuration nil) |
| @@ -1073,7 +1081,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1073 | "%") | 1081 | "%") |
| 1074 | ((or (eq key ?n) (eq key ?N)) | 1082 | ((or (eq key ?n) (eq key ?N)) |
| 1075 | ;; %n/%N -- nick | 1083 | ;; %n/%N -- nick |
| 1076 | (let ((nick (concat (if (string= (with-rcirc-process-buffer process | 1084 | (let ((nick (concat (if (string= (with-rcirc-process-buffer |
| 1085 | process | ||
| 1077 | rcirc-server) | 1086 | rcirc-server) |
| 1078 | sender) | 1087 | sender) |
| 1079 | "" | 1088 | "" |
| @@ -1084,26 +1093,26 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1084 | face | 1093 | face |
| 1085 | (cond ((string= sender (rcirc-nick process)) | 1094 | (cond ((string= sender (rcirc-nick process)) |
| 1086 | 'rcirc-my-nick) | 1095 | 'rcirc-my-nick) |
| 1087 | ((and rcirc-bright-nick-regexp | 1096 | ((and rcirc-bright-nicks |
| 1088 | (string-match rcirc-bright-nick-regexp sender)) | 1097 | (string-match |
| 1098 | (regexp-opt rcirc-bright-nicks) | ||
| 1099 | sender)) | ||
| 1089 | 'rcirc-bright-nick) | 1100 | 'rcirc-bright-nick) |
| 1090 | ((and rcirc-dim-nick-regexp | 1101 | ((and rcirc-dim-nicks |
| 1091 | (string-match rcirc-dim-nick-regexp sender)) | 1102 | (string-match |
| 1103 | (regexp-opt rcirc-dim-nicks) | ||
| 1104 | sender)) | ||
| 1092 | 'rcirc-dim-nick) | 1105 | 'rcirc-dim-nick) |
| 1093 | (t | 1106 | (t |
| 1094 | 'rcirc-other-nick)))))) | 1107 | 'rcirc-other-nick)))))) |
| 1095 | ((eq key ?T) | 1108 | ((eq key ?T) |
| 1096 | ;; %T -- timestamp | 1109 | ;; %T -- timestamp |
| 1097 | (rcirc-facify | 1110 | (rcirc-facify |
| 1098 | (format-time-string rcirc-time-format (current-time)) | 1111 | (format-time-string rcirc-time-format (current-time)) |
| 1099 | 'rcirc-timestamp)) | 1112 | 'rcirc-timestamp)) |
| 1100 | ((eq key ?m) | 1113 | ((eq key ?m) |
| 1101 | ;; %m -- message text | 1114 | ;; %m -- message text |
| 1102 | ;; We add the text property `rcirc-text' to identify this | 1115 | (rcirc-markup-text process sender response (rcirc-facify text face))) |
| 1103 | ;; as the body text. | ||
| 1104 | (propertize | ||
| 1105 | (rcirc-mangle-text process (rcirc-facify text face)) | ||
| 1106 | 'rcirc-text text)) | ||
| 1107 | ((eq key ?t) | 1116 | ((eq key ?t) |
| 1108 | ;; %t -- target | 1117 | ;; %t -- target |
| 1109 | (rcirc-facify (or rcirc-target "") face)) | 1118 | (rcirc-facify (or rcirc-target "") face)) |
| @@ -1152,12 +1161,10 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1152 | ((or (rcirc-get-buffer process target) | 1161 | ((or (rcirc-get-buffer process target) |
| 1153 | (rcirc-any-buffer process)))))) | 1162 | (rcirc-any-buffer process)))))) |
| 1154 | 1163 | ||
| 1155 | (defvar rcirc-activity-type nil) | 1164 | (defvar rcirc-activity-types nil) |
| 1156 | (make-variable-buffer-local 'rcirc-activity-type) | 1165 | (make-variable-buffer-local 'rcirc-activity-types) |
| 1157 | (defvar rcirc-last-sender nil) | 1166 | (defvar rcirc-last-sender nil) |
| 1158 | (make-variable-buffer-local 'rcirc-last-sender) | 1167 | (make-variable-buffer-local 'rcirc-last-sender) |
| 1159 | (defvar rcirc-gray-toggle nil) | ||
| 1160 | (make-variable-buffer-local 'rcirc-gray-toggle) | ||
| 1161 | 1168 | ||
| 1162 | (defun rcirc-scroll-to-bottom (window display-start) | 1169 | (defun rcirc-scroll-to-bottom (window display-start) |
| 1163 | "Scroll window to show maximum output if `rcirc-show-maximum-output' is | 1170 | "Scroll window to show maximum output if `rcirc-show-maximum-output' is |
| @@ -1261,26 +1268,13 @@ record activity." | |||
| 1261 | (buffer-enable-undo)) | 1268 | (buffer-enable-undo)) |
| 1262 | 1269 | ||
| 1263 | ;; record modeline activity | 1270 | ;; record modeline activity |
| 1264 | (when activity | 1271 | (when (and activity |
| 1265 | (let ((nick-match | 1272 | (not rcirc-ignore-buffer-activity-flag) |
| 1266 | (with-syntax-table rcirc-nick-syntax-table | 1273 | (not (and rcirc-dim-nicks sender |
| 1267 | (string-match (concat "\\b" | 1274 | (string-match (regexp-opt rcirc-dim-nicks) sender)))) |
| 1268 | (regexp-quote (rcirc-nick process)) | 1275 | (rcirc-record-activity (current-buffer) |
| 1269 | "\\b") | 1276 | (when (not (rcirc-channel-p rcirc-target)) |
| 1270 | text)))) | 1277 | 'nick))) |
| 1271 | (when (if rcirc-ignore-buffer-activity-flag | ||
| 1272 | ;; - Always notice when our nick is mentioned | ||
| 1273 | nick-match | ||
| 1274 | ;; - unless our nick is mentioned, don't bother us | ||
| 1275 | ;; - with dim-nicks | ||
| 1276 | (or nick-match | ||
| 1277 | (not (and rcirc-dim-nick-regexp sender | ||
| 1278 | (string-match rcirc-dim-nick-regexp sender))))) | ||
| 1279 | (rcirc-record-activity | ||
| 1280 | (current-buffer) | ||
| 1281 | (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) | ||
| 1282 | (not rcirc-low-priority-flag))) | ||
| 1283 | 'nick))))) | ||
| 1284 | 1278 | ||
| 1285 | (sit-for 0) ; displayed text before hook | 1279 | (sit-for 0) ; displayed text before hook |
| 1286 | (run-hook-with-args 'rcirc-print-hooks | 1280 | (run-hook-with-args 'rcirc-print-hooks |
| @@ -1501,8 +1495,7 @@ activity. Only run if the buffer is not visible and | |||
| 1501 | (let ((t1 (with-current-buffer b1 rcirc-last-post-time)) | 1495 | (let ((t1 (with-current-buffer b1 rcirc-last-post-time)) |
| 1502 | (t2 (with-current-buffer b2 rcirc-last-post-time))) | 1496 | (t2 (with-current-buffer b2 rcirc-last-post-time))) |
| 1503 | (time-less-p t2 t1))))) | 1497 | (time-less-p t2 t1))))) |
| 1504 | (if (not rcirc-activity-type) | 1498 | (pushnew type rcirc-activity-types) |
| 1505 | (setq rcirc-activity-type type)) | ||
| 1506 | (rcirc-update-activity-string))) | 1499 | (rcirc-update-activity-string))) |
| 1507 | (run-hook-with-args 'rcirc-activity-hooks buffer)) | 1500 | (run-hook-with-args 'rcirc-activity-hooks buffer)) |
| 1508 | 1501 | ||
| @@ -1510,7 +1503,7 @@ activity. Only run if the buffer is not visible and | |||
| 1510 | "Clear the BUFFER activity." | 1503 | "Clear the BUFFER activity." |
| 1511 | (setq rcirc-activity (delete buffer rcirc-activity)) | 1504 | (setq rcirc-activity (delete buffer rcirc-activity)) |
| 1512 | (with-current-buffer buffer | 1505 | (with-current-buffer buffer |
| 1513 | (setq rcirc-activity-type nil))) | 1506 | (setq rcirc-activity-types nil))) |
| 1514 | 1507 | ||
| 1515 | (defun rcirc-split-activity (activity) | 1508 | (defun rcirc-split-activity (activity) |
| 1516 | "Return a cons cell with ACTIVITY split into (lopri . hipri)." | 1509 | "Return a cons cell with ACTIVITY split into (lopri . hipri)." |
| @@ -1518,7 +1511,7 @@ activity. Only run if the buffer is not visible and | |||
| 1518 | (dolist (buf rcirc-activity) | 1511 | (dolist (buf rcirc-activity) |
| 1519 | (with-current-buffer buf | 1512 | (with-current-buffer buf |
| 1520 | (if (and rcirc-low-priority-flag | 1513 | (if (and rcirc-low-priority-flag |
| 1521 | (not (eq rcirc-activity-type 'nick))) | 1514 | (not (member 'nick rcirc-activity-types))) |
| 1522 | (add-to-list 'lopri buf t) | 1515 | (add-to-list 'lopri buf t) |
| 1523 | (add-to-list 'hipri buf t)))) | 1516 | (add-to-list 'hipri buf t)))) |
| 1524 | (cons lopri hipri))) | 1517 | (cons lopri hipri))) |
| @@ -1547,11 +1540,15 @@ activity. Only run if the buffer is not visible and | |||
| 1547 | 1540 | ||
| 1548 | (defun rcirc-activity-string (buffers) | 1541 | (defun rcirc-activity-string (buffers) |
| 1549 | (mapconcat (lambda (b) | 1542 | (mapconcat (lambda (b) |
| 1550 | (let ((s (rcirc-short-buffer-name b))) | 1543 | (let ((s (substring-no-properties (rcirc-short-buffer-name b)))) |
| 1551 | (with-current-buffer b | 1544 | (with-current-buffer b |
| 1552 | (if (not (eq rcirc-activity-type 'nick)) | 1545 | (dolist (type rcirc-activity-types) |
| 1553 | s | 1546 | (rcirc-add-face 0 (length s) |
| 1554 | (rcirc-facify s 'rcirc-mode-line-nick))))) | 1547 | (case type |
| 1548 | ('nick 'rcirc-track-nick) | ||
| 1549 | ('keyword 'rcirc-track-keyword)) | ||
| 1550 | s))) | ||
| 1551 | s)) | ||
| 1555 | buffers ",")) | 1552 | buffers ",")) |
| 1556 | 1553 | ||
| 1557 | (defun rcirc-short-buffer-name (buffer) | 1554 | (defun rcirc-short-buffer-name (buffer) |
| @@ -1566,15 +1563,18 @@ Also, clear the overlay arrow if the current buffer is now hidden." | |||
| 1566 | (let ((current-now-hidden t)) | 1563 | (let ((current-now-hidden t)) |
| 1567 | (walk-windows (lambda (w) | 1564 | (walk-windows (lambda (w) |
| 1568 | (let ((buf (window-buffer w))) | 1565 | (let ((buf (window-buffer w))) |
| 1569 | (when (eq major-mode 'rcirc-mode) | 1566 | (with-current-buffer buf |
| 1570 | (rcirc-clear-activity buf) | 1567 | (when (eq major-mode 'rcirc-mode) |
| 1568 | (rcirc-clear-activity buf))) | ||
| 1571 | (when (eq buf rcirc-current-buffer) | 1569 | (when (eq buf rcirc-current-buffer) |
| 1572 | (setq current-now-hidden nil)))))) | 1570 | (setq current-now-hidden nil))))) |
| 1573 | ;; add overlay arrow if the buffer isn't displayed | 1571 | ;; add overlay arrow if the buffer isn't displayed |
| 1574 | (when (and rcirc-current-buffer current-now-hidden) | 1572 | (when (and current-now-hidden |
| 1573 | rcirc-current-buffer | ||
| 1574 | (buffer-live-p rcirc-current-buffer)) | ||
| 1575 | (with-current-buffer rcirc-current-buffer | 1575 | (with-current-buffer rcirc-current-buffer |
| 1576 | (when (eq major-mode 'rcirc-mode) | 1576 | (when (and (eq major-mode 'rcirc-mode) |
| 1577 | (marker-position overlay-arrow-position) | 1577 | (marker-position overlay-arrow-position)) |
| 1578 | (set-marker overlay-arrow-position nil))))) | 1578 | (set-marker overlay-arrow-position nil))))) |
| 1579 | 1579 | ||
| 1580 | ;; remove any killed buffers from list | 1580 | ;; remove any killed buffers from list |
| @@ -1792,17 +1792,21 @@ With a prefix arg, prompt for new topic." | |||
| 1792 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" | 1792 | (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" |
| 1793 | target args))) | 1793 | target args))) |
| 1794 | 1794 | ||
| 1795 | (defun rcirc-add-or-remove (set &optional elt) | ||
| 1796 | (if (and elt (not (string= "" elt))) | ||
| 1797 | (if (member-ignore-case elt set) | ||
| 1798 | (delete elt set) | ||
| 1799 | (cons elt set)) | ||
| 1800 | set)) | ||
| 1801 | |||
| 1795 | (defun-rcirc-command ignore (nick) | 1802 | (defun-rcirc-command ignore (nick) |
| 1796 | "Manage the ignore list. | 1803 | "Manage the ignore list. |
| 1797 | Ignore NICK, unignore NICK if already ignored, or list ignored | 1804 | Ignore NICK, unignore NICK if already ignored, or list ignored |
| 1798 | nicks when no NICK is given. When listing ignored nicks, the | 1805 | nicks when no NICK is given. When listing ignored nicks, the |
| 1799 | ones added to the list automatically are marked with an asterisk." | 1806 | ones added to the list automatically are marked with an asterisk." |
| 1800 | (interactive "sToggle ignoring of nick: ") | 1807 | (interactive "sToggle ignoring of nick: ") |
| 1801 | (when (not (string= "" nick)) | 1808 | (setq rcirc-ignore-list (rcirc-add-or-remove rcirc-ignore-list nick)) |
| 1802 | (if (member-ignore-case nick rcirc-ignore-list) | 1809 | (rcirc-print process nil "IGNORE" target |
| 1803 | (setq rcirc-ignore-list (delete nick rcirc-ignore-list)) | ||
| 1804 | (setq rcirc-ignore-list (cons nick rcirc-ignore-list)))) | ||
| 1805 | (rcirc-print process (rcirc-nick process) "IGNORE" target | ||
| 1806 | (mapconcat | 1810 | (mapconcat |
| 1807 | (lambda (nick) | 1811 | (lambda (nick) |
| 1808 | (concat nick | 1812 | (concat nick |
| @@ -1810,14 +1814,47 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1810 | "*" ""))) | 1814 | "*" ""))) |
| 1811 | rcirc-ignore-list " "))) | 1815 | rcirc-ignore-list " "))) |
| 1812 | 1816 | ||
| 1817 | (defun-rcirc-command bright (nick) | ||
| 1818 | "Manage the bright nick list." | ||
| 1819 | (interactive "sToggle emphasis of nick: ") | ||
| 1820 | (setq rcirc-bright-nicks (rcirc-add-or-remove rcirc-bright-nicks nick)) | ||
| 1821 | (rcirc-print process nil "BRIGHT" target | ||
| 1822 | (mapconcat 'identity rcirc-bright-nicks " "))) | ||
| 1823 | |||
| 1824 | (defun-rcirc-command dim (nick) | ||
| 1825 | "Manage the dim nick list." | ||
| 1826 | (interactive "sToggle deemphasis of nick: ") | ||
| 1827 | (setq rcirc-dim-nicks (rcirc-add-or-remove rcirc-dim-nicks nick)) | ||
| 1828 | (rcirc-print process nil "DIM" target | ||
| 1829 | (mapconcat 'identity rcirc-dim-nicks " "))) | ||
| 1830 | |||
| 1831 | (defun-rcirc-command keyword (keyword) | ||
| 1832 | "Manage the keyword list. | ||
| 1833 | Mark KEYWORD, unmark KEYWORD if already marked, or list marked | ||
| 1834 | keywords when no KEYWORD is given." | ||
| 1835 | (interactive "sToggle highlighting of keyword: ") | ||
| 1836 | (setq rcirc-keywords (rcirc-add-or-remove rcirc-keywords keyword)) | ||
| 1837 | (rcirc-print process nil "KEYWORD" target | ||
| 1838 | (mapconcat 'identity rcirc-keywords " "))) | ||
| 1839 | |||
| 1813 | 1840 | ||
| 1814 | (defun rcirc-message-leader (sender face) | 1841 | (defun rcirc-add-face (start end name &optional object) |
| 1815 | "Return a string with SENDER propertized with FACE." | 1842 | "Add face NAME to the face text property of the text from START to END." |
| 1816 | (rcirc-facify (concat "<" sender "> ") face)) | 1843 | (when name |
| 1844 | (let ((pos start) | ||
| 1845 | next prop) | ||
| 1846 | (while (< pos end) | ||
| 1847 | (setq prop (get-text-property pos 'face object) | ||
| 1848 | next (next-single-property-change pos 'face object end)) | ||
| 1849 | (unless (member name (get-text-property pos 'face object)) | ||
| 1850 | (add-text-properties pos next (list 'face (cons name prop)) object)) | ||
| 1851 | (setq pos next))))) | ||
| 1817 | 1852 | ||
| 1818 | (defun rcirc-facify (string face) | 1853 | (defun rcirc-facify (string face) |
| 1819 | "Return a copy of STRING with FACE property added." | 1854 | "Return a copy of STRING with FACE property added." |
| 1820 | (propertize (or string "") 'face face 'rear-nonsticky t)) | 1855 | (let ((string (or string ""))) |
| 1856 | (rcirc-add-face 0 (length string) face string) | ||
| 1857 | string)) | ||
| 1821 | 1858 | ||
| 1822 | (defvar rcirc-url-regexp | 1859 | (defvar rcirc-url-regexp |
| 1823 | (rx-to-string | 1860 | (rx-to-string |
| @@ -1835,8 +1872,8 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1835 | word-boundary)) | 1872 | word-boundary)) |
| 1836 | (optional | 1873 | (optional |
| 1837 | (and "/" | 1874 | (and "/" |
| 1838 | (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]")) | 1875 | (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]()")) |
| 1839 | (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]"))))) | 1876 | (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()"))))) |
| 1840 | "Regexp matching URLs. Set to nil to disable URL features in rcirc.") | 1877 | "Regexp matching URLs. Set to nil to disable URL features in rcirc.") |
| 1841 | 1878 | ||
| 1842 | (defun rcirc-browse-url (&optional arg) | 1879 | (defun rcirc-browse-url (&optional arg) |
| @@ -1863,68 +1900,99 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1863 | (with-current-buffer (window-buffer (posn-window position)) | 1900 | (with-current-buffer (window-buffer (posn-window position)) |
| 1864 | (rcirc-browse-url-at-point (posn-point position))))) | 1901 | (rcirc-browse-url-at-point (posn-point position))))) |
| 1865 | 1902 | ||
| 1866 | (defun rcirc-map-regexp (function regexp string) | 1903 | |
| 1867 | "Return a copy of STRING after calling FUNCTION for each REGEXP match. | 1904 | (defvar rcirc-markup-text-functions |
| 1868 | FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING." | 1905 | '(rcirc-markup-body-text |
| 1869 | (let ((start 0)) | 1906 | rcirc-markup-attributes |
| 1870 | (while (string-match regexp string start) | 1907 | rcirc-markup-my-nick |
| 1871 | (setq start (match-end 0)) | 1908 | rcirc-markup-urls |
| 1872 | (funcall function (match-beginning 0) (match-end 0) string))) | 1909 | rcirc-markup-keywords |
| 1873 | string) | 1910 | rcirc-markup-bright-nicks) |
| 1874 | 1911 | "List of functions used to manipulate text before it is printed. | |
| 1875 | (defun rcirc-mangle-text (process text) | 1912 | |
| 1913 | Each function takes three arguments, PROCESS, SENDER, RESPONSE | ||
| 1914 | and CHANNEL-BUFFER. The current buffer is temporary buffer that | ||
| 1915 | contains the text to manipulate. Each function works on the text | ||
| 1916 | in this buffer.") | ||
| 1917 | |||
| 1918 | (defun rcirc-markup-text (process sender response text) | ||
| 1876 | "Return TEXT with properties added based on various patterns." | 1919 | "Return TEXT with properties added based on various patterns." |
| 1877 | ;; ^B | 1920 | (let ((channel-buffer (current-buffer))) |
| 1878 | (setq text | 1921 | (with-temp-buffer |
| 1879 | (rcirc-map-regexp | 1922 | (insert text) |
| 1880 | (lambda (start end string) | 1923 | (goto-char (point-min)) |
| 1881 | (let ((orig-face (get-text-property start 'face string))) | 1924 | (dolist (fn rcirc-markup-text-functions) |
| 1882 | (add-text-properties | 1925 | (save-excursion |
| 1883 | start end | 1926 | (funcall fn process sender response channel-buffer))) |
| 1884 | (list 'face (if (listp orig-face) | 1927 | (buffer-substring (point-min) (point-max))))) |
| 1885 | (append orig-face | 1928 | |
| 1886 | (list 'bold)) | 1929 | (defun rcirc-markup-body-text (process sender response channel-buffer) |
| 1887 | (list orig-face 'bold)) | 1930 | ;; We add the text property `rcirc-text' to identify this as the |
| 1888 | 'rear-nonsticky t) | 1931 | ;; body text. |
| 1889 | string))) | 1932 | (add-text-properties (point-min) (point-max) |
| 1890 | ".*?" | 1933 | (list 'rcirc-text (buffer-substring-no-properties |
| 1891 | text)) | 1934 | (point-min) (point-max))))) |
| 1892 | ;; TODO: deal with ^_ and ^C colors sequences | 1935 | |
| 1893 | (while (string-match "\\(.*\\)[]\\(.*\\)" text) | 1936 | (defun rcirc-markup-attributes (process sender response channel-buffer) |
| 1894 | (setq text (concat (match-string 1 text) | 1937 | (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t) |
| 1895 | (match-string 2 text)))) | 1938 | (rcirc-add-face (match-beginning 0) (match-end 0) |
| 1896 | ;; my nick | 1939 | (case (char-after (match-beginning 1)) |
| 1897 | (setq text | 1940 | (?\C-b 'bold) |
| 1898 | (with-syntax-table rcirc-nick-syntax-table | 1941 | (?\C-v 'italic) |
| 1899 | (rcirc-map-regexp (lambda (start end string) | 1942 | (?\C-_ 'underline))) |
| 1900 | (add-text-properties | 1943 | ;; keep the ^O since it could terminate other attributes |
| 1901 | start end | 1944 | (when (not (eq ?\C-o (char-before (match-end 2)))) |
| 1902 | (list 'face 'rcirc-nick-in-message | 1945 | (delete-region (match-beginning 2) (match-end 2))) |
| 1903 | 'rear-nonsticky t) | 1946 | (delete-region (match-beginning 1) (match-end 1)) |
| 1904 | string)) | 1947 | (goto-char (1+ (match-beginning 1)))) |
| 1905 | (concat "\\b" | 1948 | ;; remove the ^O characters now |
| 1906 | (regexp-quote (rcirc-nick process)) | 1949 | (while (re-search-forward "\C-o+" nil t) |
| 1907 | "\\b") | 1950 | (delete-region (match-beginning 0) (match-end 0)))) |
| 1908 | text))) | 1951 | |
| 1909 | ;; urls | 1952 | (defun rcirc-markup-my-nick (process sender response channel-buffer) |
| 1910 | (setq text | 1953 | (with-syntax-table rcirc-nick-syntax-table |
| 1911 | (rcirc-map-regexp | 1954 | (while (re-search-forward (concat "\\b" |
| 1912 | (lambda (start end string) | 1955 | (regexp-quote (rcirc-nick process)) |
| 1913 | (let ((orig-face (get-text-property start 'face string))) | 1956 | "\\b") |
| 1914 | (add-text-properties start end | 1957 | nil t) |
| 1915 | (list 'face (if (listp orig-face) | 1958 | (rcirc-add-face (match-beginning 0) (match-end 0) |
| 1916 | (append orig-face | 1959 | 'rcirc-nick-in-message) |
| 1917 | (list 'bold)) | 1960 | (when (string= response "PRIVMSG") |
| 1918 | (list orig-face 'bold)) | 1961 | (rcirc-add-face (point-min) (point-max) 'rcirc-nick-in-message-full-line) |
| 1919 | 'rear-nonsticky t | 1962 | (rcirc-record-activity channel-buffer 'nick))))) |
| 1920 | 'mouse-face 'highlight | 1963 | |
| 1921 | 'keymap rcirc-browse-url-map) | 1964 | (defun rcirc-markup-urls (process sender response channel-buffer) |
| 1922 | string)) | 1965 | (while (re-search-forward rcirc-url-regexp nil t) |
| 1923 | (push (substring-no-properties string start end) rcirc-urls)) | 1966 | (let ((start (match-beginning 0)) |
| 1924 | rcirc-url-regexp | 1967 | (end (match-end 0))) |
| 1925 | text)) | 1968 | (rcirc-add-face start end 'rcirc-url) |
| 1926 | text) | 1969 | (add-text-properties start end (list 'mouse-face 'highlight |
| 1927 | 1970 | 'keymap rcirc-browse-url-map)) | |
| 1971 | ;; record the url | ||
| 1972 | (let ((url (buffer-substring-no-properties start end))) | ||
| 1973 | (with-current-buffer channel-buffer | ||
| 1974 | (push url rcirc-urls)))))) | ||
| 1975 | |||
| 1976 | (defun rcirc-markup-keywords (process sender response channel-buffer) | ||
| 1977 | (let* ((target (with-current-buffer channel-buffer (or rcirc-target ""))) | ||
| 1978 | (keywords (delq nil (mapcar (lambda (keyword) | ||
| 1979 | (when (not (string-match keyword target)) | ||
| 1980 | keyword)) | ||
| 1981 | rcirc-keywords)))) | ||
| 1982 | (when keywords | ||
| 1983 | (while (re-search-forward (regexp-opt keywords 'words) nil t) | ||
| 1984 | (rcirc-add-face (match-beginning 0) (match-end 0) 'rcirc-keyword) | ||
| 1985 | (when (and (string= response "PRIVMSG") | ||
| 1986 | (not (string= sender (rcirc-nick process)))) | ||
| 1987 | (rcirc-record-activity channel-buffer 'keyword)))))) | ||
| 1988 | |||
| 1989 | (defun rcirc-markup-bright-nicks (process sender response channel-buffer) | ||
| 1990 | (when (and rcirc-bright-nicks | ||
| 1991 | (string= response "NAMES")) | ||
| 1992 | (with-syntax-table rcirc-nick-syntax-table | ||
| 1993 | (while (re-search-forward (regexp-opt rcirc-bright-nicks 'words) nil t) | ||
| 1994 | (rcirc-add-face (match-beginning 0) (match-end 0) | ||
| 1995 | 'rcirc-bright-nick))))) | ||
| 1928 | 1996 | ||
| 1929 | ;;; handlers | 1997 | ;;; handlers |
| 1930 | ;; these are called with the server PROCESS, the SENDER, which is a | 1998 | ;; these are called with the server PROCESS, the SENDER, which is a |
| @@ -2275,12 +2343,12 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2275 | (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) | 2343 | (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) |
| 2276 | (((class color) (min-colors 8)) (:foreground "magenta")) | 2344 | (((class color) (min-colors 8)) (:foreground "magenta")) |
| 2277 | (t (:weight bold :underline t))) | 2345 | (t (:weight bold :underline t))) |
| 2278 | "Face used for nicks matched by `rcirc-bright-nick-regexp'." | 2346 | "Face used for nicks matched by `rcirc-bright-nicks'." |
| 2279 | :group 'rcirc-faces) | 2347 | :group 'rcirc-faces) |
| 2280 | 2348 | ||
| 2281 | (defface rcirc-dim-nick | 2349 | (defface rcirc-dim-nick |
| 2282 | '((t :inherit default)) | 2350 | '((t :inherit default)) |
| 2283 | "Face used for nicks matched by `rcirc-dim-nick-regexp'." | 2351 | "Face used for nicks in `rcirc-dim-nicks'." |
| 2284 | :group 'rcirc-faces) | 2352 | :group 'rcirc-faces) |
| 2285 | 2353 | ||
| 2286 | (defface rcirc-server ; font-lock-comment-face | 2354 | (defface rcirc-server ; font-lock-comment-face |
| @@ -2329,9 +2397,14 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2329 | (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) | 2397 | (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) |
| 2330 | (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) | 2398 | (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) |
| 2331 | (t (:weight bold))) | 2399 | (t (:weight bold))) |
| 2332 | "The face used to highlight instances of nick within messages." | 2400 | "The face used to highlight instances of your nick within messages." |
| 2333 | :group 'rcirc-faces) | 2401 | :group 'rcirc-faces) |
| 2334 | 2402 | ||
| 2403 | (defface rcirc-nick-in-message-full-line | ||
| 2404 | '((t (:bold t))) | ||
| 2405 | "The face used emphasize the entire message when your nick is mentioned." | ||
| 2406 | :group 'rcirc-faces) | ||
| 2407 | |||
| 2335 | (defface rcirc-prompt ; comint-highlight-prompt | 2408 | (defface rcirc-prompt ; comint-highlight-prompt |
| 2336 | '((((min-colors 88) (background dark)) (:foreground "cyan1")) | 2409 | '((((min-colors 88) (background dark)) (:foreground "cyan1")) |
| 2337 | (((background dark)) (:foreground "cyan")) | 2410 | (((background dark)) (:foreground "cyan")) |
| @@ -2339,9 +2412,24 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2339 | "The face used to highlight prompts." | 2412 | "The face used to highlight prompts." |
| 2340 | :group 'rcirc-faces) | 2413 | :group 'rcirc-faces) |
| 2341 | 2414 | ||
| 2342 | (defface rcirc-mode-line-nick | 2415 | (defface rcirc-track-nick |
| 2416 | '((t (:inverse-video t))) | ||
| 2417 | "The face used in the mode-line when your nick is mentioned." | ||
| 2418 | :group 'rcirc-faces) | ||
| 2419 | |||
| 2420 | (defface rcirc-track-keyword | ||
| 2421 | '((t (:bold t ))) | ||
| 2422 | "The face used in the mode-line when keywords are mentioned." | ||
| 2423 | :group 'rcirc-faces) | ||
| 2424 | |||
| 2425 | (defface rcirc-url | ||
| 2343 | '((t (:bold t))) | 2426 | '((t (:bold t))) |
| 2344 | "The face used indicate activity directed at you." | 2427 | "The face used to highlight urls." |
| 2428 | :group 'rcirc-faces) | ||
| 2429 | |||
| 2430 | (defface rcirc-keyword | ||
| 2431 | '((t (:inherit highlight))) | ||
| 2432 | "The face used to highlight keywords." | ||
| 2345 | :group 'rcirc-faces) | 2433 | :group 'rcirc-faces) |
| 2346 | 2434 | ||
| 2347 | 2435 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cb5a6d75331..97b08e7e704 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3888,37 +3888,50 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3888 | (defun tramp-handle-make-auto-save-file-name () | 3888 | (defun tramp-handle-make-auto-save-file-name () |
| 3889 | "Like `make-auto-save-file-name' for tramp files. | 3889 | "Like `make-auto-save-file-name' for tramp files. |
| 3890 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." | 3890 | Returns a file name in `tramp-auto-save-directory' for autosaving this file." |
| 3891 | (when tramp-auto-save-directory | 3891 | (let ((tramp-auto-save-directory tramp-auto-save-directory)) |
| 3892 | (unless (file-exists-p tramp-auto-save-directory) | 3892 | ;; File name must be unique. This is ensured with Emacs 22 (see |
| 3893 | (make-directory tramp-auto-save-directory t))) | 3893 | ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for |
| 3894 | ;; jka-compr doesn't like auto-saving, so by appending "~" to the | 3894 | ;; all other cases we must do it ourselves. |
| 3895 | ;; file name we make sure that jka-compr isn't used for the | 3895 | (when (boundp 'auto-save-file-name-transforms) |
| 3896 | ;; auto-save file. | 3896 | (mapcar |
| 3897 | (let ((buffer-file-name | 3897 | '(lambda (x) |
| 3898 | (if tramp-auto-save-directory | 3898 | (when (and (string-match (car x) buffer-file-name) |
| 3899 | (expand-file-name | 3899 | (not (car (cddr x)))) |
| 3900 | (tramp-subst-strs-in-string | 3900 | (setq tramp-auto-save-directory |
| 3901 | '(("_" . "|") | 3901 | (or tramp-auto-save-directory temporary-file-directory)))) |
| 3902 | ("/" . "_a") | 3902 | (symbol-value 'auto-save-file-name-transforms))) |
| 3903 | (":" . "_b") | 3903 | ;; Create directory. |
| 3904 | ("|" . "__") | 3904 | (when tramp-auto-save-directory |
| 3905 | ("[" . "_l") | 3905 | (unless (file-exists-p tramp-auto-save-directory) |
| 3906 | ("]" . "_r")) | 3906 | (make-directory tramp-auto-save-directory t))) |
| 3907 | (buffer-file-name)) | 3907 | ;; jka-compr doesn't like auto-saving, so by appending "~" to the |
| 3908 | tramp-auto-save-directory) | 3908 | ;; file name we make sure that jka-compr isn't used for the |
| 3909 | (buffer-file-name)))) | 3909 | ;; auto-save file. |
| 3910 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | 3910 | (let ((buffer-file-name |
| 3911 | ;; it is not a magic file name operation (since Emacs 22). | 3911 | (if tramp-auto-save-directory |
| 3912 | ;; We must deactivate it temporarily. | 3912 | (expand-file-name |
| 3913 | (if (not (ad-is-active 'make-auto-save-file-name)) | 3913 | (tramp-subst-strs-in-string |
| 3914 | (tramp-run-real-handler | 3914 | '(("_" . "|") |
| 3915 | 'make-auto-save-file-name nil) | 3915 | ("/" . "_a") |
| 3916 | ;; else | 3916 | (":" . "_b") |
| 3917 | (ad-deactivate 'make-auto-save-file-name) | 3917 | ("|" . "__") |
| 3918 | (prog1 | 3918 | ("[" . "_l") |
| 3919 | (tramp-run-real-handler | 3919 | ("]" . "_r")) |
| 3920 | 'make-auto-save-file-name nil) | 3920 | (buffer-file-name)) |
| 3921 | (ad-activate 'make-auto-save-file-name))))) | 3921 | tramp-auto-save-directory) |
| 3922 | (buffer-file-name)))) | ||
| 3923 | ;; Run plain `make-auto-save-file-name'. There might be an advice when | ||
| 3924 | ;; it is not a magic file name operation (since Emacs 22). | ||
| 3925 | ;; We must deactivate it temporarily. | ||
| 3926 | (if (not (ad-is-active 'make-auto-save-file-name)) | ||
| 3927 | (tramp-run-real-handler | ||
| 3928 | 'make-auto-save-file-name nil) | ||
| 3929 | ;; else | ||
| 3930 | (ad-deactivate 'make-auto-save-file-name) | ||
| 3931 | (prog1 | ||
| 3932 | (tramp-run-real-handler | ||
| 3933 | 'make-auto-save-file-name nil) | ||
| 3934 | (ad-activate 'make-auto-save-file-name)))))) | ||
| 3922 | 3935 | ||
| 3923 | 3936 | ||
| 3924 | ;; CCC grok APPEND, LOCKNAME, CONFIRM | 3937 | ;; CCC grok APPEND, LOCKNAME, CONFIRM |
| @@ -4333,7 +4346,12 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4333 | "Add tramp file name handlers to `file-name-handler-alist'." | 4346 | "Add tramp file name handlers to `file-name-handler-alist'." |
| 4334 | (add-to-list 'file-name-handler-alist | 4347 | (add-to-list 'file-name-handler-alist |
| 4335 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) | 4348 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) |
| 4336 | (when (or partial-completion-mode (featurep 'ido)) | 4349 | ;; `partial-completion-mode' is unknown in XEmacs. So we should |
| 4350 | ;; load it unconditionally there. In the GNU Emacs case, method/ | ||
| 4351 | ;; user/host name completion shall be bound to `partial-completion-mode'. | ||
| 4352 | (when (or (not (boundp 'partial-completion-mode)) | ||
| 4353 | (symbol-value 'partial-completion-mode) | ||
| 4354 | (featurep 'ido)) | ||
| 4337 | (add-to-list 'file-name-handler-alist | 4355 | (add-to-list 'file-name-handler-alist |
| 4338 | (cons tramp-completion-file-name-regexp | 4356 | (cons tramp-completion-file-name-regexp |
| 4339 | 'tramp-completion-file-name-handler)) | 4357 | 'tramp-completion-file-name-handler)) |
| @@ -6749,8 +6767,8 @@ Return ATTR." | |||
| 6749 | ;; Set file's gid change bit. Possible only when id-format is 'integer. | 6767 | ;; Set file's gid change bit. Possible only when id-format is 'integer. |
| 6750 | (when (numberp (nth 3 attr)) | 6768 | (when (numberp (nth 3 attr)) |
| 6751 | (setcar (nthcdr 9 attr) | 6769 | (setcar (nthcdr 9 attr) |
| 6752 | (not (= (nth 3 attr) | 6770 | (not (eql (nth 3 attr) |
| 6753 | (tramp-get-remote-gid multi-method method user host))))) | 6771 | (tramp-get-remote-gid multi-method method user host))))) |
| 6754 | ;; Set virtual device number. | 6772 | ;; Set virtual device number. |
| 6755 | (setcar (nthcdr 11 attr) | 6773 | (setcar (nthcdr 11 attr) |
| 6756 | (tramp-get-device multi-method method user host)) | 6774 | (tramp-get-device multi-method method user host)) |
| @@ -7200,10 +7218,7 @@ Invokes `password-read' if available, `read-passwd' else." | |||
| 7200 | 7218 | ||
| 7201 | (defun tramp-time-diff (t1 t2) | 7219 | (defun tramp-time-diff (t1 t2) |
| 7202 | "Return the difference between the two times, in seconds. | 7220 | "Return the difference between the two times, in seconds. |
| 7203 | T1 and T2 are time values (as returned by `current-time' for example). | 7221 | T1 and T2 are time values (as returned by `current-time' for example)." |
| 7204 | |||
| 7205 | NOTE: This function will fail if the time difference is too large to | ||
| 7206 | fit in an integer." | ||
| 7207 | ;; Pacify byte-compiler with `symbol-function'. | 7222 | ;; Pacify byte-compiler with `symbol-function'. |
| 7208 | (cond ((and (fboundp 'subtract-time) | 7223 | (cond ((and (fboundp 'subtract-time) |
| 7209 | (fboundp 'float-time)) | 7224 | (fboundp 'float-time)) |
| @@ -7214,10 +7229,9 @@ fit in an integer." | |||
| 7214 | (funcall (symbol-function 'time-to-seconds) | 7229 | (funcall (symbol-function 'time-to-seconds) |
| 7215 | (funcall (symbol-function 'subtract-time) t1 t2))) | 7230 | (funcall (symbol-function 'subtract-time) t1 t2))) |
| 7216 | ((fboundp 'itimer-time-difference) | 7231 | ((fboundp 'itimer-time-difference) |
| 7217 | (floor (funcall | 7232 | (funcall (symbol-function 'itimer-time-difference) |
| 7218 | (symbol-function 'itimer-time-difference) | 7233 | (if (< (length t1) 3) (append t1 '(0)) t1) |
| 7219 | (if (< (length t1) 3) (append t1 '(0)) t1) | 7234 | (if (< (length t2) 3) (append t2 '(0)) t2))) |
| 7220 | (if (< (length t2) 3) (append t2 '(0)) t2)))) | ||
| 7221 | (t | 7235 | (t |
| 7222 | ;; snarfed from Emacs 21 time-date.el; combining | 7236 | ;; snarfed from Emacs 21 time-date.el; combining |
| 7223 | ;; time-to-seconds and subtract-time | 7237 | ;; time-to-seconds and subtract-time |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index c7edf9a4cdc..710022f885b 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run | 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run |
| 31 | ;; "autoconf && ./configure" to change them. | 31 | ;; "autoconf && ./configure" to change them. |
| 32 | 32 | ||
| 33 | (defconst tramp-version "2.0.53" | 33 | (defconst tramp-version "2.0.54" |
| 34 | "This version of Tramp.") | 34 | "This version of Tramp.") |
| 35 | 35 | ||
| 36 | (defconst tramp-bug-report-address "tramp-devel@gnu.org" | 36 | (defconst tramp-bug-report-address "tramp-devel@gnu.org" |
diff --git a/lisp/paths.el b/lisp/paths.el index 846f91793d1..022f12dd1fc 100644 --- a/lisp/paths.el +++ b/lisp/paths.el | |||
| @@ -159,16 +159,6 @@ The `ORGANIZATION' environment variable is used instead if defined.") | |||
| 159 | "Name of directory used by system mailer for delivering new mail. | 159 | "Name of directory used by system mailer for delivering new mail. |
| 160 | Its name should end with a slash.") | 160 | Its name should end with a slash.") |
| 161 | 161 | ||
| 162 | (defcustom sendmail-program | ||
| 163 | (cond | ||
| 164 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | ||
| 165 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | ||
| 166 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | ||
| 167 | (t "fakemail")) ;In ../etc, to interface to /bin/mail. | ||
| 168 | "Program used to send messages." | ||
| 169 | :group 'mail | ||
| 170 | :type 'file) | ||
| 171 | |||
| 172 | (defcustom remote-shell-program | 162 | (defcustom remote-shell-program |
| 173 | (cond | 163 | (cond |
| 174 | ;; Some systems use rsh for the remote shell; others use that name for the | 164 | ;; Some systems use rsh for the remote shell; others use that name for the |
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index ab91471a619..46dbf833311 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el | |||
| @@ -74,23 +74,27 @@ | |||
| 74 | (errors-buffer pgg-errors-buffer) | 74 | (errors-buffer pgg-errors-buffer) |
| 75 | (orig-mode (default-file-modes)) | 75 | (orig-mode (default-file-modes)) |
| 76 | (process-connection-type nil) | 76 | (process-connection-type nil) |
| 77 | exit-status) | 77 | process status exit-status) |
| 78 | (with-current-buffer (get-buffer-create errors-buffer) | 78 | (with-current-buffer (get-buffer-create errors-buffer) |
| 79 | (buffer-disable-undo) | 79 | (buffer-disable-undo) |
| 80 | (erase-buffer)) | 80 | (erase-buffer)) |
| 81 | (unwind-protect | 81 | (unwind-protect |
| 82 | (progn | 82 | (progn |
| 83 | (set-default-file-modes 448) | 83 | (set-default-file-modes 448) |
| 84 | (let ((coding-system-for-write 'binary) | 84 | (let ((coding-system-for-write 'binary)) |
| 85 | (input (buffer-substring-no-properties start end)) | 85 | (setq process |
| 86 | (default-enable-multibyte-characters nil)) | 86 | (apply #'start-process "*GnuPG*" errors-buffer |
| 87 | (with-temp-buffer | 87 | program args))) |
| 88 | (when passphrase | 88 | (set-process-sentinel process #'ignore) |
| 89 | (insert passphrase "\n")) | 89 | (when passphrase |
| 90 | (insert input) | 90 | (process-send-string process (concat passphrase "\n"))) |
| 91 | (setq exit-status | 91 | (process-send-region process start end) |
| 92 | (apply #'call-process-region (point-min) (point-max) program | 92 | (process-send-eof process) |
| 93 | nil errors-buffer nil args)))) | 93 | (while (eq 'run (process-status process)) |
| 94 | (accept-process-output process 5)) | ||
| 95 | (setq status (process-status process) | ||
| 96 | exit-status (process-exit-status process)) | ||
| 97 | (delete-process process) | ||
| 94 | (with-current-buffer (get-buffer-create output-buffer) | 98 | (with-current-buffer (get-buffer-create output-buffer) |
| 95 | (buffer-disable-undo) | 99 | (buffer-disable-undo) |
| 96 | (erase-buffer) | 100 | (erase-buffer) |
| @@ -100,9 +104,12 @@ | |||
| 100 | 'binary))) | 104 | 'binary))) |
| 101 | (insert-file-contents output-file-name))) | 105 | (insert-file-contents output-file-name))) |
| 102 | (set-buffer errors-buffer) | 106 | (set-buffer errors-buffer) |
| 103 | (if (not (equal exit-status 0)) | 107 | (if (memq status '(stop signal)) |
| 104 | (insert (format "\n%s exited abnormally: '%s'\n" | 108 | (error "%s exited abnormally: '%s'" program exit-status)) |
| 105 | program exit-status))))) | 109 | (if (= 127 exit-status) |
| 110 | (error "%s could not be found" program)))) | ||
| 111 | (if (and process (eq 'run (process-status process))) | ||
| 112 | (interrupt-process process)) | ||
| 106 | (if (file-exists-p output-file-name) | 113 | (if (file-exists-p output-file-name) |
| 107 | (delete-file output-file-name)) | 114 | (delete-file output-file-name)) |
| 108 | (set-default-file-modes orig-mode)))) | 115 | (set-default-file-modes orig-mode)))) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c38a6e82f83..66d8cd4714f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1330,30 +1330,30 @@ buffer for a list of commands.)" | |||
| 1330 | ;; (not a name) in Python buffers from which `run-python' &c is | 1330 | ;; (not a name) in Python buffers from which `run-python' &c is |
| 1331 | ;; invoked. Would support multiple processes better. | 1331 | ;; invoked. Would support multiple processes better. |
| 1332 | (when (or new (not (comint-check-proc python-buffer))) | 1332 | (when (or new (not (comint-check-proc python-buffer))) |
| 1333 | (save-current-buffer | 1333 | (with-current-buffer |
| 1334 | (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) | 1334 | (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) |
| 1335 | (path (getenv "PYTHONPATH")) | 1335 | (path (getenv "PYTHONPATH")) |
| 1336 | (process-environment ; to import emacs.py | 1336 | (process-environment ; to import emacs.py |
| 1337 | (cons (concat "PYTHONPATH=" data-directory | 1337 | (cons (concat "PYTHONPATH=" data-directory |
| 1338 | (if path (concat ":" path))) | 1338 | (if path (concat ":" path))) |
| 1339 | process-environment))) | 1339 | process-environment))) |
| 1340 | (set-buffer (apply 'make-comint-in-buffer "Python" | 1340 | (apply 'make-comint-in-buffer "Python" |
| 1341 | (generate-new-buffer "*Python*") | 1341 | (if new (generate-new-buffer "*Python*") "*Python*") |
| 1342 | (car cmdlist) nil (cdr cmdlist))) | 1342 | (car cmdlist) nil (cdr cmdlist))) |
| 1343 | (setq-default python-buffer (current-buffer)) | 1343 | (setq-default python-buffer (current-buffer)) |
| 1344 | (setq python-buffer (current-buffer))) | 1344 | (setq python-buffer (current-buffer)) |
| 1345 | (accept-process-output (get-buffer-process python-buffer) 5) | 1345 | (accept-process-output (get-buffer-process python-buffer) 5) |
| 1346 | (inferior-python-mode))) | 1346 | (inferior-python-mode) |
| 1347 | ;; Load function definitions we need. | ||
| 1348 | ;; Before the preoutput function was used, this was done via -c in | ||
| 1349 | ;; cmdlist, but that loses the banner and doesn't run the startup | ||
| 1350 | ;; file. The code might be inline here, but there's enough that it | ||
| 1351 | ;; seems worth putting in a separate file, and it's probably cleaner | ||
| 1352 | ;; to put it in a module. | ||
| 1353 | ;; Ensure we're at a prompt before doing anything else. | ||
| 1354 | (python-send-receive "import emacs; print '_emacs_out ()'"))) | ||
| 1347 | (if (derived-mode-p 'python-mode) | 1355 | (if (derived-mode-p 'python-mode) |
| 1348 | (setq python-buffer (default-value 'python-buffer))) ; buffer-local | 1356 | (setq python-buffer (default-value 'python-buffer))) ; buffer-local |
| 1349 | ;; Load function definitions we need. | ||
| 1350 | ;; Before the preoutput function was used, this was done via -c in | ||
| 1351 | ;; cmdlist, but that loses the banner and doesn't run the startup | ||
| 1352 | ;; file. The code might be inline here, but there's enough that it | ||
| 1353 | ;; seems worth putting in a separate file, and it's probably cleaner | ||
| 1354 | ;; to put it in a module. | ||
| 1355 | ;; Ensure we're at a prompt before doing anything else. | ||
| 1356 | (python-send-receive "import emacs; print '_emacs_out ()'") | ||
| 1357 | ;; Without this, help output goes into the inferior python buffer if | 1357 | ;; Without this, help output goes into the inferior python buffer if |
| 1358 | ;; the process isn't already running. | 1358 | ;; the process isn't already running. |
| 1359 | (sit-for 1 t) ;Should we use accept-process-output instead? --Stef | 1359 | (sit-for 1 t) ;Should we use accept-process-output instead? --Stef |
| @@ -1369,15 +1369,20 @@ buffer for a list of commands.)" | |||
| 1369 | (defun python-send-command (command) | 1369 | (defun python-send-command (command) |
| 1370 | "Like `python-send-string' but resets `compilation-shell-minor-mode'. | 1370 | "Like `python-send-string' but resets `compilation-shell-minor-mode'. |
| 1371 | COMMAND should be a single statement." | 1371 | COMMAND should be a single statement." |
| 1372 | (assert (not (string-match "\n" command))) | 1372 | ;; (assert (not (string-match "\n" command))) |
| 1373 | (let ((end (marker-position (process-mark (python-proc))))) | 1373 | ;; (let ((end (marker-position (process-mark (python-proc))))) |
| 1374 | (with-current-buffer python-buffer (goto-char (point-max))) | 1374 | (with-current-buffer python-buffer (goto-char (point-max))) |
| 1375 | (compilation-forget-errors) | 1375 | (compilation-forget-errors) |
| 1376 | ;; Must wait until this has completed before re-setting variables below. | 1376 | (python-send-string command) |
| 1377 | (python-send-receive (concat command "; print '_emacs_out ()'")) | ||
| 1378 | (with-current-buffer python-buffer | 1377 | (with-current-buffer python-buffer |
| 1379 | (set-marker compilation-parsing-end end) | 1378 | (setq compilation-last-buffer (current-buffer))) |
| 1380 | (setq compilation-last-buffer (current-buffer))))) | 1379 | ;; No idea what this is for but it breaks the call to |
| 1380 | ;; compilation-fake-loc in python-send-region. -- Stef | ||
| 1381 | ;; Must wait until this has completed before re-setting variables below. | ||
| 1382 | ;; (python-send-receive "print '_emacs_out ()'") | ||
| 1383 | ;; (with-current-buffer python-buffer | ||
| 1384 | ;; (set-marker compilation-parsing-end end)) | ||
| 1385 | ) ;;) | ||
| 1381 | 1386 | ||
| 1382 | (defun python-send-region (start end) | 1387 | (defun python-send-region (start end) |
| 1383 | "Send the region to the inferior Python process." | 1388 | "Send the region to the inferior Python process." |
| @@ -1594,24 +1599,26 @@ Only works when point is in a function name, not its arg list, for | |||
| 1594 | instance. Assumes an inferior Python is running." | 1599 | instance. Assumes an inferior Python is running." |
| 1595 | (let ((symbol (with-syntax-table python-dotty-syntax-table | 1600 | (let ((symbol (with-syntax-table python-dotty-syntax-table |
| 1596 | (current-word)))) | 1601 | (current-word)))) |
| 1597 | ;; First try the symbol we're on. | 1602 | ;; This is run from timers, so inhibit-quit tends to be set. |
| 1598 | (or (and symbol | 1603 | (with-local-quit |
| 1599 | (python-send-receive (format "emacs.eargs(%S, %s)" | 1604 | ;; First try the symbol we're on. |
| 1600 | symbol python-imports))) | 1605 | (or (and symbol |
| 1601 | ;; Try moving to symbol before enclosing parens. | 1606 | (python-send-receive (format "emacs.eargs(%S, %s)" |
| 1602 | (let ((s (syntax-ppss))) | 1607 | symbol python-imports))) |
| 1603 | (unless (zerop (car s)) | 1608 | ;; Try moving to symbol before enclosing parens. |
| 1604 | (when (eq ?\( (char-after (nth 1 s))) | 1609 | (let ((s (syntax-ppss))) |
| 1605 | (save-excursion | 1610 | (unless (zerop (car s)) |
| 1606 | (goto-char (nth 1 s)) | 1611 | (when (eq ?\( (char-after (nth 1 s))) |
| 1607 | (skip-syntax-backward "-") | 1612 | (save-excursion |
| 1608 | (let ((point (point))) | 1613 | (goto-char (nth 1 s)) |
| 1609 | (skip-chars-backward "a-zA-Z._") | 1614 | (skip-syntax-backward "-") |
| 1610 | (if (< (point) point) | 1615 | (let ((point (point))) |
| 1611 | (python-send-receive | 1616 | (skip-chars-backward "a-zA-Z._") |
| 1612 | (format "emacs.eargs(%S, %s)" | 1617 | (if (< (point) point) |
| 1613 | (buffer-substring-no-properties (point) point) | 1618 | (python-send-receive |
| 1614 | python-imports))))))))))) | 1619 | (format "emacs.eargs(%S, %s)" |
| 1620 | (buffer-substring-no-properties (point) point) | ||
| 1621 | python-imports)))))))))))) | ||
| 1615 | 1622 | ||
| 1616 | ;;;; Info-look functionality. | 1623 | ;;;; Info-look functionality. |
| 1617 | 1624 | ||
diff --git a/lisp/shell.el b/lisp/shell.el index 6a145ae1569..d4791821b5b 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -483,7 +483,9 @@ This function can be put on `comint-output-filter-functions'. | |||
| 483 | The argument STRING is ignored." | 483 | The argument STRING is ignored." |
| 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) | 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) |
| 485 | (save-excursion | 485 | (save-excursion |
| 486 | (goto-char (or comint-last-output-start (point-min))) | 486 | (goto-char (or (and (markerp comint-last-output-start) |
| 487 | (marker-position comint-last-output-start)) | ||
| 488 | (point-min))) | ||
| 487 | (while (re-search-forward "[\C-a\C-b]" pmark t) | 489 | (while (re-search-forward "[\C-a\C-b]" pmark t) |
| 488 | (replace-match ""))))) | 490 | (replace-match ""))))) |
| 489 | 491 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index a59eb6c9511..e53cb1fb3e8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2554,6 +2554,8 @@ text. See `insert-for-yank'." | |||
| 2554 | ;; Pass point first, then mark, because the order matters | 2554 | ;; Pass point first, then mark, because the order matters |
| 2555 | ;; when calling kill-append. | 2555 | ;; when calling kill-append. |
| 2556 | (interactive (list (point) (mark))) | 2556 | (interactive (list (point) (mark))) |
| 2557 | (unless (and beg end) | ||
| 2558 | (error "The mark is not set now, so there is no region")) | ||
| 2557 | (condition-case nil | 2559 | (condition-case nil |
| 2558 | (let ((string (filter-buffer-substring beg end t))) | 2560 | (let ((string (filter-buffer-substring beg end t))) |
| 2559 | (when string ;STRING is nil if BEG = END | 2561 | (when string ;STRING is nil if BEG = END |
| @@ -4982,6 +4984,12 @@ value of `completion-common-substring'. See also `display-completion-list'.") | |||
| 4982 | 4984 | ||
| 4983 | ;; Variables and faces used in `completion-setup-function'. | 4985 | ;; Variables and faces used in `completion-setup-function'. |
| 4984 | 4986 | ||
| 4987 | (defcustom completion-show-help t | ||
| 4988 | "Non-nil means show help message in *Completions* buffer." | ||
| 4989 | :type 'boolean | ||
| 4990 | :version "22.1" | ||
| 4991 | :group 'completion) | ||
| 4992 | |||
| 4985 | (defface completions-first-difference | 4993 | (defface completions-first-difference |
| 4986 | '((t (:inherit bold))) | 4994 | '((t (:inherit bold))) |
| 4987 | "Face put on the first uncommon character in completions in *Completions* buffer." | 4995 | "Face put on the first uncommon character in completions in *Completions* buffer." |
| @@ -5068,14 +5076,15 @@ of the minibuffer before point is always the common substring.)") | |||
| 5068 | (if (get-char-property element-common-end 'mouse-face) | 5076 | (if (get-char-property element-common-end 'mouse-face) |
| 5069 | (put-text-property element-common-end (1+ element-common-end) | 5077 | (put-text-property element-common-end (1+ element-common-end) |
| 5070 | 'font-lock-face 'completions-first-difference)))))) | 5078 | 'font-lock-face 'completions-first-difference)))))) |
| 5071 | ;; Insert help string. | 5079 | ;; Maybe insert help string. |
| 5072 | (goto-char (point-min)) | 5080 | (when completion-show-help |
| 5073 | (if (display-mouse-p) | 5081 | (goto-char (point-min)) |
| 5074 | (insert (substitute-command-keys | 5082 | (if (display-mouse-p) |
| 5075 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) | 5083 | (insert (substitute-command-keys |
| 5076 | (insert (substitute-command-keys | 5084 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) |
| 5077 | "In this buffer, type \\[choose-completion] to \ | 5085 | (insert (substitute-command-keys |
| 5078 | select the completion near point.\n\n"))))) | 5086 | "In this buffer, type \\[choose-completion] to \ |
| 5087 | select the completion near point.\n\n")))))) | ||
| 5079 | 5088 | ||
| 5080 | (add-hook 'completion-setup-hook 'completion-setup-function) | 5089 | (add-hook 'completion-setup-hook 'completion-setup-function) |
| 5081 | 5090 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index 5bc83e01e37..fb44e539b74 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1395,6 +1395,7 @@ mouse." | |||
| 1395 | (window-dedicated-p (selected-window))) | 1395 | (window-dedicated-p (selected-window))) |
| 1396 | (pop-to-buffer (current-buffer)) | 1396 | (pop-to-buffer (current-buffer)) |
| 1397 | (switch-to-buffer "GNU Emacs")) | 1397 | (switch-to-buffer "GNU Emacs")) |
| 1398 | (setq buffer-read-only nil) | ||
| 1398 | (erase-buffer) | 1399 | (erase-buffer) |
| 1399 | (if pure-space-overflow | 1400 | (if pure-space-overflow |
| 1400 | (insert "\ | 1401 | (insert "\ |
| @@ -1406,6 +1407,9 @@ Warning Warning!!! Pure space overflow !!!Warning Warning | |||
| 1406 | (apply #'fancy-splash-insert text)) | 1407 | (apply #'fancy-splash-insert text)) |
| 1407 | (fancy-splash-tail) | 1408 | (fancy-splash-tail) |
| 1408 | (set-buffer-modified-p nil) | 1409 | (set-buffer-modified-p nil) |
| 1410 | (setq buffer-read-only t) | ||
| 1411 | (if (and view-read-only (not view-mode)) | ||
| 1412 | (view-mode-enter nil 'kill-buffer)) | ||
| 1409 | (goto-char (point-min))))) | 1413 | (goto-char (point-min))))) |
| 1410 | 1414 | ||
| 1411 | (defun fancy-splash-frame () | 1415 | (defun fancy-splash-frame () |
| @@ -1442,6 +1446,7 @@ we put it on this frame." | |||
| 1442 | (let ((prev-buffer (current-buffer))) | 1446 | (let ((prev-buffer (current-buffer))) |
| 1443 | (unwind-protect | 1447 | (unwind-protect |
| 1444 | (with-current-buffer (get-buffer-create "GNU Emacs") | 1448 | (with-current-buffer (get-buffer-create "GNU Emacs") |
| 1449 | (setq buffer-read-only nil) | ||
| 1445 | (erase-buffer) | 1450 | (erase-buffer) |
| 1446 | (set (make-local-variable 'tab-width) 8) | 1451 | (set (make-local-variable 'tab-width) 8) |
| 1447 | (if hide-on-input | 1452 | (if hide-on-input |
| @@ -1581,6 +1586,9 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1581 | 1586 | ||
| 1582 | ;; Display the input that we set up in the buffer. | 1587 | ;; Display the input that we set up in the buffer. |
| 1583 | (set-buffer-modified-p nil) | 1588 | (set-buffer-modified-p nil) |
| 1589 | (setq buffer-read-only t) | ||
| 1590 | (if (and view-read-only (not view-mode)) | ||
| 1591 | (view-mode-enter nil 'kill-buffer)) | ||
| 1584 | (goto-char (point-min)) | 1592 | (goto-char (point-min)) |
| 1585 | (if (or (window-minibuffer-p) | 1593 | (if (or (window-minibuffer-p) |
| 1586 | (window-dedicated-p (selected-window))) | 1594 | (window-dedicated-p (selected-window))) |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 382a4d8736f..ec6c7fbf410 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1337,14 +1337,19 @@ correspoinding TextEncodingBase value." | |||
| 1337 | (find-coding-systems-string string))) | 1337 | (find-coding-systems-string string))) |
| 1338 | (setq coding-system | 1338 | (setq coding-system |
| 1339 | (coding-system-change-eol-conversion coding-system 'mac)) | 1339 | (coding-system-change-eol-conversion coding-system 'mac)) |
| 1340 | (when (and (eq system-type 'darwin) | 1340 | (let ((str string)) |
| 1341 | (eq coding-system 'japanese-shift-jis-mac)) | 1341 | (when (and (eq system-type 'darwin) |
| 1342 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | 1342 | (eq coding-system 'japanese-shift-jis-mac)) |
| 1343 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | 1343 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) |
| 1344 | (subst-char-in-string ?\¥ ?\x5c string t)) | 1344 | (setq str (subst-char-in-string ?\\ ?\x80 str)) |
| 1345 | (setq data (mac-code-convert-string | 1345 | (subst-char-in-string ?\¥ ?\x5c str t) |
| 1346 | (encode-coding-string string coding-system) | 1346 | ;; ASCII-only? |
| 1347 | (or encoding coding-system) nil))) | 1347 | (if (string-match "\\`[\x00-\x7f]*\\'" str) |
| 1348 | (setq str nil))) | ||
| 1349 | (and str | ||
| 1350 | (setq data (mac-code-convert-string | ||
| 1351 | (encode-coding-string str coding-system) | ||
| 1352 | (or encoding coding-system) nil))))) | ||
| 1348 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | 1353 | (or data (encode-coding-string string (if (eq (byteorder) ?B) |
| 1349 | 'utf-16be-mac | 1354 | 'utf-16be-mac |
| 1350 | 'utf-16le-mac))))) | 1355 | 'utf-16le-mac))))) |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 9ea51a2f774..73d26b56b74 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -231,17 +231,20 @@ | |||
| 231 | ;; These keys are available in xterm starting from version 216 | 231 | ;; These keys are available in xterm starting from version 216 |
| 232 | ;; if the modifyOtherKeys resource is set to 1. | 232 | ;; if the modifyOtherKeys resource is set to 1. |
| 233 | 233 | ||
| 234 | (define-key map "\e[27;5;9~" [C-tab]) | ||
| 235 | (define-key map "\e[27;5;13~" [C-return]) | ||
| 234 | (define-key map "\e[27;5;39~" [?\C-\']) | 236 | (define-key map "\e[27;5;39~" [?\C-\']) |
| 237 | (define-key map "\e[27;5;44~" [?\C-,]) | ||
| 235 | (define-key map "\e[27;5;45~" [?\C--]) | 238 | (define-key map "\e[27;5;45~" [?\C--]) |
| 236 | 239 | (define-key map "\e[27;5;46~" [?\C-.]) | |
| 240 | (define-key map "\e[27;5;47~" [?\C-/]) | ||
| 237 | (define-key map "\e[27;5;48~" [?\C-0]) | 241 | (define-key map "\e[27;5;48~" [?\C-0]) |
| 238 | (define-key map "\e[27;5;49~" [?\C-1]) | 242 | (define-key map "\e[27;5;49~" [?\C-1]) |
| 239 | ;; Not all C-DIGIT keys have a distinct binding. | 243 | ;; Not all C-DIGIT keys have a distinct binding. |
| 240 | (define-key map "\e[27;5;57~" [?\C-9]) | 244 | (define-key map "\e[27;5;57~" [?\C-9]) |
| 241 | 245 | (define-key map "\e[27;5;59~" [(C-\;)]) | |
| 242 | (define-key map "\e[27;5;59~" [?\C-\;]) | ||
| 243 | (define-key map "\e[27;5;61~" [?\C-=]) | 246 | (define-key map "\e[27;5;61~" [?\C-=]) |
| 244 | 247 | (define-key map "\e[27;5;92~" [?\C-\\]) | |
| 245 | 248 | ||
| 246 | (define-key map "\e[27;6;33~" [?\C-!]) | 249 | (define-key map "\e[27;6;33~" [?\C-!]) |
| 247 | (define-key map "\e[27;6;34~" [?\C-\"]) | 250 | (define-key map "\e[27;6;34~" [?\C-\"]) |
| @@ -253,26 +256,53 @@ | |||
| 253 | (define-key map "\e[27;6;41~" [?\C-)]) | 256 | (define-key map "\e[27;6;41~" [?\C-)]) |
| 254 | (define-key map "\e[27;6;42~" [?\C-*]) | 257 | (define-key map "\e[27;6;42~" [?\C-*]) |
| 255 | (define-key map "\e[27;6;43~" [?\C-+]) | 258 | (define-key map "\e[27;6;43~" [?\C-+]) |
| 256 | |||
| 257 | (define-key map "\e[27;6;58~" [?\C-:]) | 259 | (define-key map "\e[27;6;58~" [?\C-:]) |
| 258 | (define-key map "\e[27;6;60~" [?\C-<]) | 260 | (define-key map "\e[27;6;60~" [?\C-<]) |
| 259 | (define-key map "\e[27;6;62~" [?\C->]) | 261 | (define-key map "\e[27;6;62~" [?\C->]) |
| 260 | (define-key map "\e[27;6;63~" [(C-\?)]) | 262 | (define-key map "\e[27;6;63~" [(C-\?)]) |
| 261 | 263 | ||
| 262 | (define-key map "\e[27;5;9~" [C-tab]) | 264 | (define-key map "\e[27;13;9~" [(C-M-tab)]) |
| 263 | (define-key map "\e[27;5;13~" [C-return]) | 265 | (define-key map "\e[27;13;13~" [(C-M-return)]) |
| 264 | (define-key map "\e[27;5;44~" [?\C-,]) | ||
| 265 | (define-key map "\e[27;5;46~" [?\C-.]) | ||
| 266 | (define-key map "\e[27;5;47~" [?\C-/]) | ||
| 267 | (define-key map "\e[27;5;92~" [?\C-\\]) | ||
| 268 | |||
| 269 | (define-key map "\e[27;2;9~" [S-tab]) | ||
| 270 | (define-key map "\e[27;2;13~" [S-return]) | ||
| 271 | |||
| 272 | (define-key map "\e[27;6;9~" [(C-S-tab)]) | ||
| 273 | 266 | ||
| 267 | (define-key map "\e[27;13;39~" [?\C-\M-\']) | ||
| 268 | (define-key map "\e[27;13;44~" [?\C-\M-,]) | ||
| 269 | (define-key map "\e[27;13;45~" [?\C-\M--]) | ||
| 274 | (define-key map "\e[27;13;46~" [?\C-\M-.]) | 270 | (define-key map "\e[27;13;46~" [?\C-\M-.]) |
| 275 | 271 | (define-key map "\e[27;13;47~" [?\C-\M-/]) | |
| 272 | (define-key map "\e[27;13;48~" [?\C-\M-0]) | ||
| 273 | (define-key map "\e[27;13;49~" [?\C-\M-1]) | ||
| 274 | (define-key map "\e[27;13;50~" [?\C-\M-2]) | ||
| 275 | (define-key map "\e[27;13;51~" [?\C-\M-3]) | ||
| 276 | (define-key map "\e[27;13;52~" [?\C-\M-4]) | ||
| 277 | (define-key map "\e[27;13;53~" [?\C-\M-5]) | ||
| 278 | (define-key map "\e[27;13;54~" [?\C-\M-6]) | ||
| 279 | (define-key map "\e[27;13;55~" [?\C-\M-7]) | ||
| 280 | (define-key map "\e[27;13;56~" [?\C-\M-8]) | ||
| 281 | (define-key map "\e[27;13;57~" [?\C-\M-9]) | ||
| 282 | (define-key map "\e[27;13;59~" [?\C-\M-\;]) | ||
| 283 | (define-key map "\e[27;13;61~" [?\C-\M-=]) | ||
| 284 | (define-key map "\e[27;13;92~" [?\C-\M-\\]) | ||
| 285 | |||
| 286 | (define-key map "\e[27;14;33~" [?\C-\M-!]) | ||
| 287 | (define-key map "\e[27;14;34~" [?\C-\M-\"]) | ||
| 288 | (define-key map "\e[27;14;35~" [?\C-\M-#]) | ||
| 289 | (define-key map "\e[27;14;36~" [?\C-\M-$]) | ||
| 290 | (define-key map "\e[27;14;37~" [?\C-\M-%]) | ||
| 291 | (define-key map "\e[27;14;38~" [(C-M-&)]) | ||
| 292 | (define-key map "\e[27;14;40~" [?\C-\M-(]) | ||
| 293 | (define-key map "\e[27;14;41~" [?\C-\M-)]) | ||
| 294 | (define-key map "\e[27;14;42~" [?\C-\M-*]) | ||
| 295 | (define-key map "\e[27;14;43~" [?\C-\M-+]) | ||
| 296 | (define-key map "\e[27;14;58~" [?\C-\M-:]) | ||
| 297 | (define-key map "\e[27;14;60~" [?\C-\M-<]) | ||
| 298 | (define-key map "\e[27;14;62~" [?\C-\M->]) | ||
| 299 | (define-key map "\e[27;14;63~" [(C-M-\?)]) | ||
| 300 | |||
| 301 | (define-key map "\e[27;2;9~" [S-tab]) | ||
| 302 | (define-key map "\e[27;2;13~" [S-return]) | ||
| 303 | |||
| 304 | (define-key map "\e[27;6;9~" [(C-S-tab)]) | ||
| 305 | (define-key map "\e[27;6;13~" [(C-S-return)]) | ||
| 276 | 306 | ||
| 277 | ;; Other versions of xterm might emit these. | 307 | ;; Other versions of xterm might emit these. |
| 278 | (define-key map "\e[A" [up]) | 308 | (define-key map "\e[A" [up]) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index e4b54f9fc92..ad3912de67f 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2006-08-31 Diane Murray <disumu@x3y2z1.net> | ||
| 2 | |||
| 3 | * url-parse.el (url-recreate-url-attributes): New function, code | ||
| 4 | simply moved from `url-recreate-url'. | ||
| 5 | (url-recreate-url): Use it. | ||
| 6 | Put the `url-target' at the end of the URL after the attributes. | ||
| 7 | |||
| 8 | * url-http.el (url-http-create-request): | ||
| 9 | Use `url-recreate-url-attributes' when setting real-fname. | ||
| 10 | |||
| 11 | 2006-08-29 Diane Murray <disumu@x3y2z1.net> | ||
| 12 | |||
| 13 | * url-cookie.el (url-cookie-write-file): Really don't use versioned | ||
| 14 | backups. | ||
| 15 | |||
| 1 | 2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca> | 16 | 2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 17 | ||
| 3 | * url-handlers.el (url-file-local-copy): Tell url-copy-file that the | 18 | * url-handlers.el (url-file-local-copy): Tell url-copy-file that the |
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e74d4989117..f3902619c89 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -168,11 +168,11 @@ telling Microsoft that." | |||
| 168 | (insert ")\n(setq url-cookie-secure-storage\n '") | 168 | (insert ")\n(setq url-cookie-secure-storage\n '") |
| 169 | (pp url-cookie-secure-storage (current-buffer)) | 169 | (pp url-cookie-secure-storage (current-buffer)) |
| 170 | (insert ")\n") | 170 | (insert ")\n") |
| 171 | (insert ";; Local Variables:\n" | 171 | (insert "\n;; Local Variables:\n" |
| 172 | ";; version-control: never\n" | 172 | ";; version-control: never\n" |
| 173 | ";; no-byte-compile: t\n" | 173 | ";; no-byte-compile: t\n" |
| 174 | ";; End:\n") | 174 | ";; End:\n") |
| 175 | (set (make-local-variable 'version-control) t) | 175 | (set (make-local-variable 'version-control) 'never) |
| 176 | (write-file fname) | 176 | (write-file fname) |
| 177 | (setq url-cookies-changed-since-last-save nil) | 177 | (setq url-cookies-changed-since-last-save nil) |
| 178 | (kill-buffer (current-buffer)))))) | 178 | (kill-buffer (current-buffer)))))) |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index ae3a4b3e070..a1d87e1bd31 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -160,7 +160,8 @@ request.") | |||
| 160 | (let ((url-basic-auth-storage | 160 | (let ((url-basic-auth-storage |
| 161 | 'url-http-proxy-basic-auth-storage)) | 161 | 'url-http-proxy-basic-auth-storage)) |
| 162 | (url-get-authentication url nil 'any nil)))) | 162 | (url-get-authentication url nil 'any nil)))) |
| 163 | (real-fname (url-filename (or proxy-obj url))) | 163 | (real-fname (concat (url-filename (or proxy-obj url)) |
| 164 | (url-recreate-url-attributes (or proxy-obj url)))) | ||
| 164 | (host (url-host (or proxy-obj url))) | 165 | (host (url-host (or proxy-obj url))) |
| 165 | (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) | 166 | (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) |
| 166 | nil | 167 | nil |
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index f84bf1a7ba2..1e4d93a861e 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el | |||
| @@ -100,17 +100,20 @@ | |||
| 100 | (not (equal (url-port urlobj) | 100 | (not (equal (url-port urlobj) |
| 101 | (url-scheme-get-property (url-type urlobj) 'default-port)))) | 101 | (url-scheme-get-property (url-type urlobj) 'default-port)))) |
| 102 | (format ":%d" (url-port urlobj))) | 102 | (format ":%d" (url-port urlobj))) |
| 103 | (or (url-filename urlobj) "/") | 103 | (or (url-filename urlobj) "/") |
| 104 | (url-recreate-url-attributes urlobj) | ||
| 104 | (if (url-target urlobj) | 105 | (if (url-target urlobj) |
| 105 | (concat "#" (url-target urlobj))) | 106 | (concat "#" (url-target urlobj))))) |
| 106 | (if (url-attributes urlobj) | 107 | |
| 107 | (concat ";" | 108 | (defun url-recreate-url-attributes (urlobj) |
| 108 | (mapconcat | 109 | "Recreate the attributes of an URL string from the parsed URLOBJ." |
| 109 | (function | 110 | (when (url-attributes urlobj) |
| 110 | (lambda (x) | 111 | (concat ";" |
| 111 | (if (cdr x) | 112 | (mapconcat (lambda (x) |
| 112 | (concat (car x) "=" (cdr x)) | 113 | (if (cdr x) |
| 113 | (car x)))) (url-attributes urlobj) ";"))))) | 114 | (concat (car x) "=" (cdr x)) |
| 115 | (car x))) | ||
| 116 | (url-attributes urlobj) ";")))) | ||
| 114 | 117 | ||
| 115 | ;;;###autoload | 118 | ;;;###autoload |
| 116 | (defun url-generic-parse-url (url) | 119 | (defun url-generic-parse-url (url) |
diff --git a/lisp/woman.el b/lisp/woman.el index 2392d0bfa4c..3ee3e3f98d6 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -1196,7 +1196,7 @@ It is saved to the file named by the variable `woman-cache-filename'." | |||
| 1196 | (kill-buffer standard-output) | 1196 | (kill-buffer standard-output) |
| 1197 | )))) | 1197 | )))) |
| 1198 | 1198 | ||
| 1199 | (defvar woman-topic-history nil "Topic read history.") | 1199 | (defvaralias 'woman-topic-history 'Man-topic-history) |
| 1200 | (defvar woman-file-history nil "File-name read history.") | 1200 | (defvar woman-file-history nil "File-name read history.") |
| 1201 | 1201 | ||
| 1202 | (defun woman-file-name (topic &optional re-cache) | 1202 | (defun woman-file-name (topic &optional re-cache) |
| @@ -1750,7 +1750,18 @@ Leave point at end of new text. Return length of inserted text." | |||
| 1750 | (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) | 1750 | (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) |
| 1751 | 1751 | ||
| 1752 | ;; We don't need to call `man' when we are in `woman-mode'. | 1752 | ;; We don't need to call `man' when we are in `woman-mode'. |
| 1753 | (define-key woman-mode-map [remap man] 'woman)) | 1753 | (define-key woman-mode-map [remap man] 'woman) |
| 1754 | (define-key woman-mode-map [remap man-follow] 'woman-follow)) | ||
| 1755 | |||
| 1756 | (defun woman-follow (topic) | ||
| 1757 | "Get a Un*x manual page of the item under point and put it in a buffer." | ||
| 1758 | (interactive (list (Man-default-man-entry))) | ||
| 1759 | (if (or (not topic) | ||
| 1760 | (string= topic "")) | ||
| 1761 | (error "No item under point") | ||
| 1762 | (woman (if (string-match Man-reference-regexp topic) | ||
| 1763 | (substring topic 0 (match-end 1)) | ||
| 1764 | topic)))) | ||
| 1754 | 1765 | ||
| 1755 | (defun woman-follow-word (event) | 1766 | (defun woman-follow-word (event) |
| 1756 | "Run WoMan with word under mouse as topic. | 1767 | "Run WoMan with word under mouse as topic. |