summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog204
-rw-r--r--lisp/cus-edit.el33
-rw-r--r--lisp/cus-start.el10
-rw-r--r--lisp/custom.el16
-rw-r--r--lisp/dired-x.el168
-rw-r--r--lisp/emacs-lisp/checkdoc.el3
-rw-r--r--lisp/emacs-lisp/easy-mmode.el3
-rw-r--r--lisp/emacs-lisp/trace.el13
-rw-r--r--lisp/emulation/viper-cmd.el11
-rw-r--r--lisp/find-dired.el18
-rw-r--r--lisp/gnus/ChangeLog44
-rw-r--r--lisp/gnus/gnus-art.el25
-rw-r--r--lisp/gnus/gnus-sum.el23
-rw-r--r--lisp/gnus/mail-parse.el2
-rw-r--r--lisp/gnus/message.el12
-rw-r--r--lisp/gnus/rfc2047.el114
-rw-r--r--lisp/hl-line.el34
-rw-r--r--lisp/ibuffer.el4
-rw-r--r--lisp/image-mode.el13
-rw-r--r--lisp/imenu.el8
-rw-r--r--lisp/international/quail.el4
-rw-r--r--lisp/mail/feedmail.el10
-rw-r--r--lisp/mail/rmail-spam-filter.el19
-rw-r--r--lisp/mail/sendmail.el10
-rw-r--r--lisp/man.el4
-rw-r--r--lisp/net/rcirc.el376
-rw-r--r--lisp/net/tramp.el98
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/paths.el10
-rw-r--r--lisp/pgg-gpg.el35
-rw-r--r--lisp/progmodes/python.el97
-rw-r--r--lisp/shell.el4
-rw-r--r--lisp/simple.el25
-rw-r--r--lisp/startup.el8
-rw-r--r--lisp/term/mac-win.el21
-rw-r--r--lisp/term/xterm.el64
-rw-r--r--lisp/url/ChangeLog15
-rw-r--r--lisp/url/url-cookie.el4
-rw-r--r--lisp/url/url-http.el3
-rw-r--r--lisp/url/url-parse.el23
-rw-r--r--lisp/woman.el15
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 @@
+2006-09-04 John Paul Wallington <jpw@pobox.com>
+
+ * simple.el (completion-show-help): New defcustom.
+ (completion-setup-function): Heed it.
+
+2006-09-04 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * term/xterm.el (terminal-init-xterm): Add C-M- bindings.
+
+2006-09-04 Richard Stallman <rms@gnu.org>
+
+ * mail/rmail-spam-filter.el (rsf-scanning-messages-now): Doc fix.
+ (rsf-min-region-to-spam-list): Doc fix.
+ (rsf-add-content-type-field): Doc fix.
+
+ * simple.el (kill-region): Explicitly test there is a region.
+
+2006-09-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * mail/feedmail.el (feedmail-buffer-to-sendmail): Look for
+ sendmail in several common directories.
+
+ * mail/sendmail.el (sendmail-program): Moved here from pathe.el.
+
+ * paths.el (sendmail-program): Removed.
+
+2006-09-04 Daiki Ueno <ueno@unixuser.org>
+
+ * pgg-gpg.el (pgg-gpg-process-region): Revert two patches from Satyaki
+ Das. http://article.gmane.org/gmane.emacs.gnus.general/49947
+ http://article.gmane.org/gmane.emacs.gnus.general/50457
+
+2006-09-03 Chong Yidong <cyd@stupidchicken.com>
+
+ * cus-edit.el (custom-group-menu-create): Avoid deactivating the
+ mark after running the menu filter.
+
+2006-09-03 Juri Linkov <juri@jurta.org>
+
+ * international/quail.el (quail-defrule-internal): Add a check
+ if a key is a vector.
+
+2006-09-02 Juri Linkov <juri@jurta.org>
+
+ * man.el (Man-topic-history): New variable.
+ (man): Use it.
+
+ * woman.el (woman-topic-history): Change defvar to defvaralias
+ for symbol `Man-topic-history'.
+
+ * shell.el (shell-filter-ctrl-a-ctrl-b): Check if
+ `comint-last-output-start' is a marker by using `markerp' and
+ check if it has a position by using `marker-position', and use
+ this position for `goto-char'.
+
+ * international/quail.el (quail-defrule-internal): Add missing
+ `error' call for null key.
+
+2006-09-02 Ryan Yeske <rcyeske@gmail.com>
+
+ * rcirc.el (rcirc-keywords): New variable.
+ (rcirc-bright-nicks, rcirc-dim-nicks): New variables.
+ (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Remove
+ variables.
+ (rcirc-responses-no-activity): New function.
+ (rcirc-handler-generic): Check for responses in above.
+ (rcirc-process-command): Add ?: character to arguments of raw
+ server commands.
+ (rcirc-format-response-string): Use `rcirc-bright-nicks' and
+ `rcirc-dim-nicks'.
+ (rcirc-gray-toggle): Remove unused variable.
+ (rcirc-print): Remove some tracking logic, which is moved into
+ markup functions.
+ (rcirc-activity-types): Was `rcirc-activity-type', now a list of
+ types.
+ (rcirc-activity-string): Look for 'keyword in activity-types.
+ (rcirc-window-configuration-change): Don't erase overlay-arrow
+ unnecessarily.
+ (rcirc-add-or-remove): New function.
+ (rcirc-cmd-ignore): Use it.
+ (rcirc-message-leader): Remove unused function.
+ (rcicr-cmd-bright, rcirc-cmd-dim, rcirc-cmd-keyword): New commands.
+ (rcirc-add-face): New function.
+ (rcirc-facify): Use rcirc-add-face.
+ (rcirc-url-regexp): Add parens.
+ (rcirc-map-regexp): Remove function.
+ (rcirc-mangle-regexp): Remove function.
+ (rcirc-markup-text-functions): New variable.
+ (rcirc-markup-text): New function (replaces `rcirc-mangle-text').
+ (rcirc-markup-body-text, rcirc-markup-attributes)
+ (rcirc-markup-my-nick, rcirc-markup-urls, rcirc-markup-keywords)
+ (rcirc-markup-bright-nicks): New markup handler functions.
+ (rcirc-nick-in-message-full-line): New face.
+ (rcirc-track-nick): Rename from `rcirc-mode-line-nick'.
+ (rcirc-track-keyword, rcirc-url, rcirc-keyword): New faces.
+
+2006-09-02 Martin Rudalics <rudalics@gmx.at>
+
+ * cus-start.el (hscroll-margin, hscroll-step)
+ (mode-line-in-non-selected-windows, mouse-autoselect-window)
+ (x-use-underline-position-properties): Change version to "22.1"
+ since they will appear there for the first time.
+
+2006-09-01 Chong Yidong <cyd@stupidchicken.com>
+
+ * imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick.
+
+2006-08-31 Richard Stallman <rms@gnu.org>
+
+ * cus-edit.el (custom-save-variables): Slight cleanup.
+ (Custom-no-edit): Renamed from custom-no-edit.
+ (Custom-newline): Renamed from custom-newline.
+ (custom-mode-map): Use new names.
+
+ * emacs-lisp/easy-mmode.el (define-minor-mode): Reference manual
+ about customization, rather than M-x customize, in the doc string
+ made for the defcustom.
+
+ * emacs-lisp/trace.el (trace-function-background): Doc fix.
+
+2006-08-31 Romain Francoise <romain@orebokech.com>
+
+ * dired-x.el (dired-guess-shell-alist-default): Update.
+
+2006-08-31 Michael Mauger <mmaug@yahoo.com>
+
+ * custom.el (custom-theme-set-variables): Autoload packages before
+ sorting the variables.
+
+2006-08-30 Michael Kifer <kifer@cs.stonybrook.edu>
+
+ * viper-cmd.el (viper-special-read-and-insert-char): Convert events to
+ chars if XEmacs.
+ (viper-after-change-undo-hook): Check if undo-in-progress is bound.
+
+2006-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/python.el (python-eldoc-function): Re-enable quit while
+ waiting for process.
+
+2006-08-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * term/mac-win.el (mac-string-to-utxt): If adjustment for MacJapanese
+ results in ASCII-only string, encode original one directly.
+
+2006-08-29 Romain Francoise <romain@orebokech.com>
+
+ * startup.el (normal-splash-screen, fancy-splash-screens):
+ Make buffer read-only and arrange to enter view mode if necessary.
+
+2006-08-29 Chong Yidong <cyd@stupidchicken.com>
+
+ * hl-line.el (hl-line): New face.
+ (hl-line-face): Use it.
+
+ * image-mode.el (image-mode): Fix last fix.
+ Suggested by Kim F. Storm.
+
+2006-08-29 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.0.54.
+
+ * net/tramp.el (tramp-convert-file-attributes): Call `eql' instead
+ of `=', because `tramp-get-remote-gid' might not always return an
+ integer when expected.
+ (tramp-register-file-name-handlers): `partial-completion-mode' is
+ unknown to XEmacs.
+ (tramp-time-diff): Don't use `floor', it might fail for large
+ differences.
+ (tramp-handle-make-auto-save-file-name): For Emacs 21, set
+ `tramp-auto-save-directory' if unset in order to guarantee unique
+ auto-save file names.
+
+2006-08-28 Chong Yidong <cyd@stupidchicken.com>
+
+ * image-mode.el (image-mode): Display image as text on a terminal.
+
+2006-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/python.el (python-send-command): Simplify.
+ (run-python): Don't generate a new buffer unless `new' was specified.
+ Make sure we send `import emacs' to the proper process.
+
+ * progmodes/python.el (python-send-command): Don't wait for the command
+ to terminate. Don't fiddle with compilation-parsing-end.
+
+2006-08-28 Chong Yidong <cyd@stupidchicken.com>
+
+ * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
+ Insert commentary after first line summary.
+
+ * woman.el (woman-follow): New function, based on `man-follow'.
+ (woman-mode-map): Use it.
+
+ * ibuffer.el (ibuffer-do-sort-by-recency): Perform full update
+ since ibuffer-do-sort-by-recency does not define a sorter.
+
+2006-08-28 Kim F. Storm <storm@cua.dk>
+
+ * find-dired.el (find-dired): Use shell-quote-argument to properly
+ escape ( and ) args. Also use it on {} and ; args in default
+ value of find-ls-option string.
+ (find-grep-dired): Use shell-quote-argument on {} and ; args.
+
2006-08-27 Michael Olson <mwolson@gnu.org>
* 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."
(let ((spec (car-safe (get symbol 'theme-value)))
(value (get symbol 'saved-value))
(requests (get symbol 'custom-requests))
- (now (not (or (custom-variable-p symbol)
- (and (not (boundp symbol))
- (not (eq (get symbol 'force-value)
- 'rogue))))))
+ (now (and (not (custom-variable-p symbol))
+ (or (boundp symbol)
+ (eq (get symbol 'force-value)
+ 'rogue))))
(comment (get symbol 'saved-variable-comment)))
- ;; Check `requests'.
+ ;; Check REQUESTS for validity.
(dolist (request requests)
(when (and (symbolp request) (not (featurep request)))
(message "Unknown requested feature: %s" request)
(setq requests (delq request requests))))
+ ;; Is there anything customized about this variable?
(when (or (and spec (eq (car spec) 'user))
comment
(and (null spec) (get symbol 'saved-value)))
+ ;; Output an element for this variable.
+ ;; It has the form (SYMBOL VALUE-FORM NOW REQUESTS COMMENT).
+ ;; SYMBOL is the variable name.
+ ;; VALUE-FORM is an expression to return the customized value.
+ ;; NOW if non-nil means always set the variable immediately
+ ;; when the customizations are reloaded. This is used
+ ;; for rogue variables
+ ;; REQUESTS is a list of packages to load before setting the
+ ;; variable. Each element of it will be passed to `require'.
+ ;; COMMENT is whatever comment the user has specified
+ ;; with the customize facility.
(unless (bolp)
(princ "\n"))
(princ " '(")
@@ -4383,7 +4395,8 @@ This function does not save the buffer."
"Ignoring WIDGET, create a menu entry for customization group SYMBOL."
`( ,(custom-unlispify-menu-entry symbol t)
:filter (lambda (&rest junk)
- (let ((menu (custom-menu-create ',symbol)))
+ (let* ((deactivate-mark nil)
+ (menu (custom-menu-create ',symbol)))
(if (consp menu) (cdr menu) menu)))))
;;;###autoload
@@ -4435,8 +4448,8 @@ The format is suitable for use with `easy-menu-define'."
;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26.
(let ((map (make-keymap)))
(set-keymap-parent map widget-keymap)
- (define-key map [remap self-insert-command] 'custom-no-edit)
- (define-key map "\^m" 'custom-newline)
+ (define-key map [remap self-insert-command] 'Custom-no-edit)
+ (define-key map "\^m" 'Custom-newline)
(define-key map " " 'scroll-up)
(define-key map "\177" 'scroll-down)
(define-key map "\C-c\C-c" 'Custom-set)
@@ -4448,12 +4461,12 @@ The format is suitable for use with `easy-menu-define'."
map)
"Keymap for `custom-mode'.")
-(defun custom-no-edit (pos &optional event)
+(defun Custom-no-edit (pos &optional event)
"Invoke button at POS, or refuse to allow editing of Custom buffer."
(interactive "@d")
(error "You can't edit this part of the Custom buffer"))
-(defun custom-newline (pos &optional event)
+(defun Custom-newline (pos &optional event)
"Invoke button at POS, or refuse to allow editing of Custom buffer."
(interactive "@d")
(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."
(scroll-step windows integer)
(scroll-conservatively windows integer)
(scroll-margin windows integer)
- (hscroll-margin windows integer "21.3")
- (hscroll-step windows number "21.3")
+ (hscroll-margin windows integer "22.1")
+ (hscroll-step windows number "22.1")
(truncate-partial-width-windows display boolean)
(mode-line-inverse-video modeline boolean)
- (mode-line-in-non-selected-windows modeline boolean "21.3")
+ (mode-line-in-non-selected-windows modeline boolean "22.1")
(line-number-display-limit display
(choice integer
(const :tag "No limit" nil)))
@@ -373,8 +373,8 @@ since it could result in memory overflow and make Emacs crash."
(x-gtk-show-hidden-files menu boolean "22.1")
(x-gtk-whole-detached-tool-bar x boolean "22.1")
;; xterm.c
- (mouse-autoselect-window display boolean "21.3")
- (x-use-underline-position-properties display boolean "21.3")
+ (mouse-autoselect-window display boolean "22.1")
+ (x-use-underline-position-properties display boolean "22.1")
(x-underline-at-descent-line display boolean "22.1")
(x-stretch-cursor display boolean "21.1")))
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.
EXP itself is saved unevaluated as SYMBOL property `saved-value' and
in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
(custom-check-theme theme)
+
+ ;; Process all the needed autoloads before anything else, so that the
+ ;; subsequent code has all the info it needs (e.g. which var corresponds
+ ;; to a minor mode), regardless of the ordering of the variables.
+ (dolist (entry args)
+ (let* ((symbol (indirect-variable (nth 0 entry))))
+ (unless (or (get symbol 'standard-value)
+ (memq (get symbol 'custom-autoload) '(nil noset)))
+ ;; This symbol needs to be autoloaded, even just for a `set'.
+ (custom-load-symbol symbol))))
+
+ ;; Move minor modes and variables with explicit requires to the end.
(setq args
(sort args
(lambda (a1 a2)
@@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
(when requests
(put symbol 'custom-requests requests)
(mapc 'require requests))
- (unless (or (get symbol 'standard-value)
- (memq (get symbol 'custom-autoload) '(nil noset)))
- ;; This symbol needs to be autoloaded, even just for a `set'.
- (custom-load-symbol symbol))
(setq set (or (get symbol 'custom-set) 'custom-set-default))
(put symbol 'saved-value (list value))
(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."
(defvar dired-guess-shell-alist-default
(list
(list "\\.tar$"
- '(if dired-guess-shell-gnutar
- (concat dired-guess-shell-gnutar " xvf")
- "tar xvf")
- ;; Extract files into a separate subdirectory
- '(if dired-guess-shell-gnutar
- (concat "mkdir " (file-name-sans-extension file)
- "; " dired-guess-shell-gnutar " -C "
- (file-name-sans-extension file) " -xvf")
- (concat "mkdir " (file-name-sans-extension file)
- "; tar -C " (file-name-sans-extension file) " -xvf")))
+ '(if dired-guess-shell-gnutar
+ (concat dired-guess-shell-gnutar " xvf")
+ "tar xvf")
+ ;; Extract files into a separate subdirectory
+ '(if dired-guess-shell-gnutar
+ (concat "mkdir " (file-name-sans-extension file)
+ "; " dired-guess-shell-gnutar " -C "
+ (file-name-sans-extension file) " -xvf")
+ (concat "mkdir " (file-name-sans-extension file)
+ "; tar -C " (file-name-sans-extension file) " -xvf"))
+ ;; List archive contents.
+ '(if dired-guess-shell-gnutar
+ (concat dired-guess-shell-gnutar " tvf")
+ "tar tvf"))
;; REGEXPS for compressed archives must come before the .Z rule to
;; be recognized:
(list "\\.tar\\.Z$"
- ;; Untar it.
- '(if dired-guess-shell-gnutar
- (concat dired-guess-shell-gnutar " zxvf")
- (concat "zcat * | tar xvf -"))
- ;; Optional conversion to gzip format.
- '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
- " " dired-guess-shell-znew-switches))
+ ;; Untar it.
+ '(if dired-guess-shell-gnutar
+ (concat dired-guess-shell-gnutar " zxvf")
+ (concat "zcat * | tar xvf -"))
+ ;; Optional conversion to gzip format.
+ '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
+ " " dired-guess-shell-znew-switches))
;; gzip'ed archives
(list "\\.t\\(ar\\.\\)?gz$"
- '(if dired-guess-shell-gnutar
- (concat dired-guess-shell-gnutar " zxvf")
- (concat "gunzip -qc * | tar xvf -"))
- ;; Extract files into a separate subdirectory
- '(if dired-guess-shell-gnutar
- (concat "mkdir " (file-name-sans-extension file)
- "; " dired-guess-shell-gnutar " -C "
- (file-name-sans-extension file) " -zxvf")
- (concat "mkdir " (file-name-sans-extension file)
- "; gunzip -qc * | tar -C "
- (file-name-sans-extension file) " -xvf -"))
- ;; Optional decompression.
- '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" "")))
+ '(if dired-guess-shell-gnutar
+ (concat dired-guess-shell-gnutar " zxvf")
+ (concat "gunzip -qc * | tar xvf -"))
+ ;; Extract files into a separate subdirectory
+ '(if dired-guess-shell-gnutar
+ (concat "mkdir " (file-name-sans-extension file)
+ "; " dired-guess-shell-gnutar " -C "
+ (file-name-sans-extension file) " -zxvf")
+ (concat "mkdir " (file-name-sans-extension file)
+ "; gunzip -qc * | tar -C "
+ (file-name-sans-extension file) " -xvf -"))
+ ;; Optional decompression.
+ '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))
+ ;; List archive contents.
+ '(if dired-guess-shell-gnutar
+ (concat dired-guess-shell-gnutar " ztvf")
+ (concat "gunzip -qc * | tar tvf -")))
;; bzip2'ed archives
(list "\\.t\\(ar\\.bz2\\|bz\\)$"
"bunzip2 -c * | tar xvf -"
- ;; Extract files into a separate subdirectory
- '(concat "mkdir " (file-name-sans-extension file)
- "; bunzip2 -c * | tar -C "
- (file-name-sans-extension file) " -xvf -")
+ ;; Extract files into a separate subdirectory
+ '(concat "mkdir " (file-name-sans-extension file)
+ "; bunzip2 -c * | tar -C "
+ (file-name-sans-extension file) " -xvf -")
;; Optional decompression.
- "bunzip2")
+ "bunzip2")
'("\\.shar\\.Z$" "zcat * | unshar")
'("\\.shar\\.g?z$" "gunzip -qc * | unshar")
'("\\.e?ps$" "ghostview" "xloadimage" "lpr")
(list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -"
- ;; Optional decompression.
- '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
+ ;; Optional decompression.
+ '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.e?ps\\.Z$" "zcat * | ghostview -"
- ;; Optional conversion to gzip format.
- '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
- " " dired-guess-shell-znew-switches))
+ ;; Optional conversion to gzip format.
+ '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
+ " " dired-guess-shell-znew-switches))
'("\\.patch$" "cat * | patch")
(list "\\.patch\\.g?z$" "gunzip -qc * | patch"
- ;; Optional decompression.
- '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
+ ;; Optional decompression.
+ '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.patch\\.Z$" "zcat * | patch"
- ;; Optional conversion to gzip format.
- '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
- " " dired-guess-shell-znew-switches))
+ ;; Optional conversion to gzip format.
+ '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
+ " " dired-guess-shell-znew-switches))
;; The following four extensions are useful with dired-man ("N" key)
(list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man)
- (if (Man-support-local-filenames)
- "man -l"
- "cat * | tbl | nroff -man -h")))
+ (if (Man-support-local-filenames)
+ "man -l"
+ "cat * | tbl | nroff -man -h")))
(list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man)
- (if (Man-support-local-filenames)
- "man -l"
- "gunzip -qc * | tbl | nroff -man -h"))
- ;; Optional decompression.
- '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
+ (if (Man-support-local-filenames)
+ "man -l"
+ "gunzip -qc * | tbl | nroff -man -h"))
+ ;; Optional decompression.
+ '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
(list "\\.[0-9]\\.Z$" '(progn (require 'man)
- (if (Man-support-local-filenames)
- "man -l"
- "zcat * | tbl | nroff -man -h"))
- ;; Optional conversion to gzip format.
- '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
- " " dired-guess-shell-znew-switches))
+ (if (Man-support-local-filenames)
+ "man -l"
+ "zcat * | tbl | nroff -man -h"))
+ ;; Optional conversion to gzip format.
+ '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
+ " " dired-guess-shell-znew-switches))
'("\\.pod$" "perldoc" "pod2man * | nroff -man")
- '("\\.dvi$" "xdvi" "dvips") ; preview and printing
- '("\\.au$" "play") ; play Sun audiofiles
- '("\\.mpg$" "mpeg_play")
- '("\\.uu$" "uudecode") ; for uudecoded files
+ '("\\.dvi$" "xdvi" "dvips") ; preview and printing
+ '("\\.au$" "play") ; play Sun audiofiles
+ '("\\.mpe?g$\\|\\.avi$" "xine -p")
+ '("\\.wav$" "play")
+ '("\\.uu$" "uudecode") ; for uudecoded files
'("\\.hqx$" "mcvert")
- '("\\.sh$" "sh") ; execute shell scripts
- '("\\.xbm$" "bitmap") ; view X11 bitmaps
+ '("\\.sh$" "sh") ; execute shell scripts
+ '("\\.xbm$" "bitmap") ; view X11 bitmaps
'("\\.gp$" "gnuplot")
'("\\.p[bgpn]m$" "xloadimage")
- '("\\.gif$" "xloadimage") ; view gif pictures
+ '("\\.gif$" "xloadimage") ; view gif pictures
'("\\.tif$" "xloadimage")
'("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG
'("\\.jpe?g$" "xloadimage")
- '("\\.fig$" "xfig") ; edit fig pictures
- '("\\.out$" "xgraph") ; for plotting purposes.
+ '("\\.fig$" "xfig") ; edit fig pictures
+ '("\\.out$" "xgraph") ; for plotting purposes.
'("\\.tex$" "latex" "tex")
'("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi")
- '("\\.pdf$" "xpdf") ; edit PDF files
+ '("\\.pdf$" "xpdf")
+ '("\\.doc$" "antiword" "strings")
+ '("\\.rpm$" "rpm -qilp" "rpm -ivh")
+ '("\\.dia$" "dia")
+ '("\\.mgp$" "mgp")
;; Some other popular archivers.
- (list "\\.zip$" "unzip"
- ;; Extract files into a separate subdirectory
- '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q")
- " -d " (file-name-sans-extension file)))
+ (list "\\.zip$" "unzip" "unzip -l"
+ ;; Extract files into a separate subdirectory
+ '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q")
+ " -d " (file-name-sans-extension file)))
'("\\.zoo$" "zoo x//")
'("\\.lzh$" "lharc x")
'("\\.arc$" "arc x")
@@ -1081,10 +1094,11 @@ dired."
(list "\\.dz$" "dictunzip")
(list "\\.bz2$" "bunzip2")
(list "\\.Z$" "uncompress"
- ;; Optional conversion to gzip format.
- '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
- " " dired-guess-shell-znew-switches))
- )
+ ;; Optional conversion to gzip format.
+ '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
+ " " dired-guess-shell-znew-switches))
+
+ '("\\.sign?$" "gpg --verify"))
"Default alist used for shell command guessing.
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."
(re-search-forward "^;;; Code" nil t)
(re-search-forward "^(require" nil t)
(re-search-forward "^(" nil t))
- (beginning-of-line)))
+ (beginning-of-line))
+ (t (re-search-forward ";;; .* --- .*\n")))
(if (checkdoc-y-or-n-p
"You should have a \";;; Commentary:\", add one? ")
(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))
See the command `%s' for a description of this minor-mode."
(if body "
Setting this variable directly does not take effect;
-use either \\[customize] or the function `%s'."))))
+either customize it (see the info node `Easy Customization')
+or call the function `%s'."))))
`(defcustom ,mode ,init-value
,(format base-doc-string pretty-name mode mode)
,@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."
;;;###autoload
(defun trace-function-background (function &optional buffer)
"Traces FUNCTION with trace output going quietly to BUFFER.
-For every call of FUNCTION Lisp-style trace messages that display argument
-and return values will be inserted into BUFFER. This function generates the
-trace advice for FUNCTION and activates it together with any other advice
-there might be!! Trace output will quietly go to BUFFER without changing
-the window or buffer configuration at all."
+When this tracing is enabled, every call to FUNCTION writes
+a Lisp-style trace message (showing the arguments and return value)
+into BUFFER. This function generates advice to trace FUNCTION
+and activates it together with any other advice there might be.
+The trace output goes to BUFFER quietly, without changing
+the window or buffer configuration.
+
+BUFFER defaults to `trace-buffer'."
(interactive
(list
(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
(t
;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0))
+ (if viper-xemacs-p
+ (setq ch (event-to-character ch)))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
;; Make sure ^V and ^Q work as quotation chars
(if (memq ch '(?\C-v ?\C-q))
- ;;(setq ch (read-char-exclusive))
- (setq ch (aref (read-key-sequence nil) 0))
+ (progn
+ ;;(setq ch (read-char-exclusive))
+ (setq ch (aref (read-key-sequence nil) 0))
+ (if viper-xemacs-p
+ (setq ch (event-to-character ch))))
)
(insert ch))
)
@@ -1750,7 +1755,7 @@ invokes the command before that, etc."
;; Hook used in viper-undo
(defun viper-after-change-undo-hook (beg end len)
- (if undo-in-progress
+ (if (and (boundp 'undo-in-progress) undo-in-progress)
(setq undo-beg-posn beg
undo-end-posn (or end beg))
;; 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."
args (concat find-dired-find-program " . "
(if (string= args "")
""
- (concat "\\( " args " \\) "))
- (car find-ls-option)))
+ (concat
+ (shell-quote-argument "(")
+ " " args " "
+ (shell-quote-argument ")")
+ " "))
+ (if (equal (car find-ls-option) "-exec ls -ld {} \\;")
+ (concat "-exec ls -ld "
+ (shell-quote-argument "{}")
+ " "
+ (shell-quote-argument ";"))
+ (car find-ls-option))))
;; Start the find process.
(shell-command (concat args "&") (current-buffer))
;; The next statement will bomb in classic dired (no optional arg allowed)
@@ -215,7 +224,10 @@ Thus ARG can also contain additional grep options."
(find-dired dir
(concat "-type f -exec grep " find-grep-options " -e "
(shell-quote-argument regexp)
- " {} \\\; ")))
+ " "
+ (shell-quote-argument "{}")
+ " "
+ (shell-quote-argument ";"))))
(defun find-dired-filter (proc string)
;; 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 @@
+2006-09-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * message.el (message-send-mail-with-sendmail): Look for sendmail in
+ several common directories.
+
+2006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\'
+ in quoted string into `\'.
+
+2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings):
+ Use standard-syntax-table.
+
+2006-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-decode-address-function): New variable.
+ (article-decode-encoded-words): Use it to decode headers which are
+ assumed to contain addresses.
+ (gnus-mime-delete-part): Remove useless `or'.
+
+ * gnus-sum.el (gnus-decode-encoded-address-function): New variable.
+ (gnus-summary-from-or-to-or-newsgroups): Use it to decode To header.
+ (gnus-nov-parse-line): Use it to decode From header.
+ (gnus-get-newsgroup-headers): Ditto.
+ (gnus-summary-enter-digest-group): Use it to decode `to-address'.
+
+ * mail-parse.el (mail-decode-encoded-address-region): New alias.
+ (mail-decode-encoded-address-string): New alias.
+
+ * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings):
+ New function.
+ (rfc2047-encode-message-header, rfc2047-encode-region): Use it.
+ (rfc2047-strip-backslashes-in-quoted-strings): New fnction.
+ (rfc2047-decode-region): Use it; add optional argument `address-mime'.
+ (rfc2047-decode-string): Ditto.
+ (rfc2047-decode-address-region): New function.
+ (rfc2047-decode-address-string): New function.
+
2006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
[ Backported bug fix from No Gnus. ]
@@ -389,10 +429,6 @@
* gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an
optional parameter.
-2006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
-
- * pgg-gpg.el: Revert to revision 7.15 to allow the use of gpg-agent.
-
2006-04-06 Reiner Steib <Reiner.Steib@gmx.de>
* 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."
(defvar gnus-decode-header-function 'mail-decode-encoded-word-region
"Function used to decode headers.")
+(defvar gnus-decode-address-function 'mail-decode-encoded-address-region
+ "Function used to decode addresses.")
+
(defvar gnus-article-dumbquotes-map
'(("\200" "EUR")
("\202" ",")
@@ -2377,10 +2380,23 @@ If PROMPT (the prefix), prompt for a coding system to use."
(set-buffer gnus-summary-buffer)
(error))
gnus-newsgroup-ignored-charsets))
- (inhibit-read-only t))
+ (inhibit-read-only t)
+ start)
(save-restriction
(article-narrow-to-head)
- (funcall gnus-decode-header-function (point-min) (point-max)))))
+ (while (not (eobp))
+ (setq start (point))
+ (if (prog1
+ (looking-at "\
+\\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\
+\\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):")
+ (while (progn
+ (forward-line)
+ (if (eobp)
+ nil
+ (memq (char-after) '(?\t ? ))))))
+ (funcall gnus-decode-address-function start (point))
+ (funcall gnus-decode-header-function start (point)))))))
(defun article-decode-group-name ()
"Decode group names in `Newsgroups:'."
@@ -4324,9 +4340,8 @@ Deleting parts may malfunction or destroy the article; continue? ")
(handles gnus-article-mime-handles)
(none "(none)")
(description
- (or
- (mail-decode-encoded-word-string (or (mm-handle-description data)
- none))))
+ (mail-decode-encoded-word-string (or (mm-handle-description data)
+ none)))
(filename
(or (mail-content-type-get (mm-handle-disposition data) 'filename)
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."
:group 'gnus-summary)
(defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
- "Variable that says which function should be used to decode a string with encoded words.")
+ "Function used to decode a string with encoded words.")
+
+(defvar gnus-decode-encoded-address-function
+ 'mail-decode-encoded-address-string
+ "Function used to decode addresses with encoded words.")
(defcustom gnus-extra-headers '(To Newsgroups)
"*Extra headers to parse."
@@ -1001,7 +1005,7 @@ which it may alter in any way."
:type '(repeat symbol))
(defcustom gnus-ignored-from-addresses
- (and user-mail-address
+ (and user-mail-address
(not (string= user-mail-address ""))
(regexp-quote user-mail-address))
"*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."
(concat "-> "
(inline
(gnus-summary-extract-address-component
- (funcall gnus-decode-encoded-word-function to)))))
+ (funcall gnus-decode-encoded-address-function to)))))
((setq newsgroups (cdr (assq 'Newsgroups extra-headers)))
(concat "=> " newsgroups)))))
(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."
(error x))
(condition-case () ; from
(gnus-remove-odd-characters
- (funcall gnus-decode-encoded-word-function
+ (funcall gnus-decode-encoded-address-function
(setq x (nnheader-nov-field))))
(error x))
(nnheader-nov-field) ; date
@@ -5956,7 +5960,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
(progn
(goto-char p)
(if (search-forward "\nfrom:" nil t)
- (funcall gnus-decode-encoded-word-function
+ (funcall gnus-decode-encoded-address-function
(nnheader-header-value))
"(nobody)"))
;; Date.
@@ -8449,10 +8453,11 @@ to guess what the document format is."
;; the parent article.
(when (setq to-address (or (gnus-fetch-field "reply-to")
(gnus-fetch-field "from")))
- (setq params (append
- (list (cons 'to-address
- (funcall gnus-decode-encoded-word-function
- to-address))))))
+ (setq params
+ (append
+ (list (cons 'to-address
+ (funcall gnus-decode-encoded-address-function
+ to-address))))))
(setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
(insert-buffer-substring gnus-original-article-buffer)
;; 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 @@
(defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string)
(defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region)
(defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string)
+(defalias 'mail-decode-encoded-address-region 'rfc2047-decode-address-region)
+(defalias 'mail-decode-encoded-address-string 'rfc2047-decode-address-string)
(provide 'mail-parse)
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
'call-process-region
(append
(list (point-min) (point-max)
- (if (boundp 'sendmail-program)
- sendmail-program
- "/usr/lib/sendmail")
+ (cond ((boundp 'sendmail-program)
+ sendmail-program)
+ ((file-exists-p "/usr/sbin/sendmail")
+ "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail")
+ "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail")
+ "/usr/ucblib/sendmail")
+ (t "fakemail"))
nil errbuf nil "-oi")
;; Always specify who from,
;; 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'."
(re-search-forward ":[ \t\n]*" nil t)
(buffer-substring-no-properties (point) (point-max)))))
+(defun rfc2047-quote-special-characters-in-quoted-strings (&optional
+ encodable-regexp)
+ "Quote special characters with `\\'s in quoted strings.
+Quoting will not be done in a quoted string if it contains characters
+matching ENCODABLE-REGEXP."
+ (goto-char (point-min))
+ (let ((tspecials (concat "[" ietf-drums-tspecials "]"))
+ beg)
+ (with-syntax-table (standard-syntax-table)
+ (while (search-forward "\"" nil t)
+ (unless (eq (char-before) ?\\)
+ (setq beg (match-end 0))
+ (goto-char (match-beginning 0))
+ (condition-case nil
+ (progn
+ (forward-sexp)
+ (save-restriction
+ (narrow-to-region beg (1- (point)))
+ (goto-char beg)
+ (unless (and encodable-regexp
+ (re-search-forward encodable-regexp nil t))
+ (while (re-search-forward tspecials nil 'move)
+ (unless (and (eq (char-before) ?\\) ;; Already quoted.
+ (looking-at tspecials))
+ (goto-char (match-beginning 0))
+ (unless (or (eq (char-before) ?\\)
+ (and rfc2047-encode-encoded-words
+ (eq (char-after) ??)
+ (eq (char-before) ?=)))
+ (insert "\\")))
+ (forward-char)))))
+ (error
+ (goto-char beg))))))))
+
(defvar rfc2047-encoding-type 'address-mime
"The type of encoding done by `rfc2047-encode-region'.
This should be dynamically bound around calls to
@@ -187,8 +221,18 @@ Should be called narrowed to the head of the message."
(while (not (eobp))
(save-restriction
(rfc2047-narrow-to-field)
+ (setq method nil
+ alist rfc2047-header-encoding-alist)
+ (while (setq elem (pop alist))
+ (when (or (and (stringp (car elem))
+ (looking-at (car elem)))
+ (eq (car elem) t))
+ (setq alist nil
+ method (cdr elem))))
(if (not (rfc2047-encodable-p))
- (prog1
+ (prog2
+ (when (eq method 'address-mime)
+ (rfc2047-quote-special-characters-in-quoted-strings))
(if (and (eq (mm-body-7-or-8) '8bit)
(mm-multibyte-p)
(mm-coding-system-p
@@ -209,14 +253,6 @@ Should be called narrowed to the head of the message."
(point))
(point-max))))
;; We found something that may perhaps be encoded.
- (setq method nil
- alist rfc2047-header-encoding-alist)
- (while (setq elem (pop alist))
- (when (or (and (stringp (car elem))
- (looking-at (car elem)))
- (eq (car elem) t))
- (setq alist nil
- method (cdr elem))))
(re-search-forward "^[^:]+: *" nil t)
(cond
((eq method 'address-mime)
@@ -347,6 +383,7 @@ Dynamically bind `rfc2047-encoding-type' to change that."
(rfc2047-encode start (point))
(goto-char end))))
;; `address-mime' case -- take care of quoted words, comments.
+ (rfc2047-quote-special-characters-in-quoted-strings encodable-regexp)
(with-syntax-table rfc2047-syntax-table
(goto-char (point-min))
(condition-case err ; in case of unbalanced quotes
@@ -821,6 +858,29 @@ encoded-word, concatenate them, and decode it by charset. Otherwise,
the decoder will fully decode each encoded-word before concatenating
them.")
+(defun rfc2047-strip-backslashes-in-quoted-strings ()
+ "Strip backslashes in quoted strings. `\\\"' remains."
+ (goto-char (point-min))
+ (let (beg)
+ (with-syntax-table (standard-syntax-table)
+ (while (search-forward "\"" nil t)
+ (unless (eq (char-before) ?\\)
+ (setq beg (match-end 0))
+ (goto-char (match-beginning 0))
+ (condition-case nil
+ (progn
+ (forward-sexp)
+ (save-restriction
+ (narrow-to-region beg (1- (point)))
+ (goto-char beg)
+ (while (search-forward "\\" nil 'move)
+ (unless (memq (char-after) '(?\"))
+ (delete-backward-char 1))
+ (forward-char)))
+ (forward-char))
+ (error
+ (goto-char beg))))))))
+
(defun rfc2047-charset-to-coding-system (charset)
"Return coding-system corresponding to MIME CHARSET.
If your Emacs implementation can't decode CHARSET, return nil."
@@ -898,8 +958,10 @@ ENCODED-WORD)."
;; and worthwhile (is it more correct or not?), e.g. something like
;; `=?iso-8859-1?q?foo?=@'.
-(defun rfc2047-decode-region (start end)
- "Decode MIME-encoded words in region between START and END."
+(defun rfc2047-decode-region (start end &optional address-mime)
+ "Decode MIME-encoded words in region between START and END.
+If ADDRESS-MIME is non-nil, strip backslashes which precede characters
+other than `\"' and `\\' in quoted strings."
(interactive "r")
(let ((case-fold-search t)
(eword-regexp (eval-when-compile
@@ -910,6 +972,8 @@ ENCODED-WORD)."
(save-excursion
(save-restriction
(narrow-to-region start end)
+ (when address-mime
+ (rfc2047-strip-backslashes-in-quoted-strings))
(goto-char (setq b start))
;; Look for the encoded-words.
(while (setq match (re-search-forward eword-regexp nil t))
@@ -995,8 +1059,16 @@ ENCODED-WORD)."
(not (eq mail-parse-charset 'gnus-decoded)))
(mm-decode-coding-region b (point-max) mail-parse-charset))))))
-(defun rfc2047-decode-string (string)
- "Decode the quoted-printable-encoded STRING and return the results."
+(defun rfc2047-decode-address-region (start end)
+ "Decode MIME-encoded words in region between START and END.
+Backslashes which precede characters other than `\"' and `\\' in quoted
+strings are stripped."
+ (rfc2047-decode-region start end t))
+
+(defun rfc2047-decode-string (string &optional address-mime)
+ "Decode MIME-encoded STRING and return the result.
+If ADDRESS-MIME is non-nil, strip backslashes which precede characters
+other than `\"' and `\\' in quoted strings."
(let ((m (mm-multibyte-p)))
(if (string-match "=\\?" string)
(with-temp-buffer
@@ -1010,8 +1082,16 @@ ENCODED-WORD)."
(mm-enable-multibyte))
(insert string)
(inline
- (rfc2047-decode-region (point-min) (point-max)))
+ (rfc2047-decode-region (point-min) (point-max) address-mime))
(buffer-string))
+ (when address-mime
+ (setq string
+ (with-temp-buffer
+ (when (mm-multibyte-string-p string)
+ (mm-enable-multibyte))
+ (insert string)
+ (rfc2047-strip-backslashes-in-quoted-strings)
+ (buffer-string))))
;; Fixme: As above, `m' here is inappropriate.
(if (and m
mail-parse-charset
@@ -1033,6 +1113,12 @@ ENCODED-WORD)."
(mm-decode-coding-string string mail-parse-charset))
(mm-string-as-multibyte string)))))
+(defun rfc2047-decode-address-string (string)
+ "Decode MIME-encoded STRING and return the result.
+Backslashes which precede characters other than `\"' and `\\' in quoted
+strings are stripped."
+ (rfc2047-decode-string string t))
+
(defun rfc2047-pad-base64 (string)
"Pad STRING to quartets."
;; 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 @@
;;; Code:
+(defvar hl-line-overlay nil
+ "Overlay used by Hl-Line mode to highlight the current line.")
+(make-variable-buffer-local 'hl-line-overlay)
+
+(defvar global-hl-line-overlay nil
+ "Overlay used by Global-Hl-Line mode to highlight the current line.")
+
(defgroup hl-line nil
"Highlight the current line."
:version "21.1"
:group 'editing)
-(defcustom hl-line-face 'highlight
- "Face with which to highlight the current line."
- :type 'face
+(defface hl-line
+ '((t :inherit highlight))
+ "Default face for highlighting the current line in Hl-Line mode."
+ :version "22.1"
:group 'hl-line)
+(defcustom hl-line-face 'hl-line
+ "Face with which to highlight the current line in Hl-Line mode."
+ :type 'face
+ :group 'hl-line
+ :set (lambda (symbol value)
+ (set symbol value)
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when hl-line-overlay
+ (overlay-put hl-line-overlay 'face hl-line-face))))
+ (when global-hl-line-overlay
+ (overlay-put global-hl-line-overlay 'face hl-line-face))))
+
(defcustom hl-line-sticky-flag t
"*Non-nil means highlight the current line in all windows.
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.
This variable is expected to be made buffer-local by modes.")
-(defvar hl-line-overlay nil
- "Overlay used by Hl-Line mode to highlight the current line.")
-(make-variable-buffer-local 'hl-line-overlay)
-
-(defvar global-hl-line-overlay nil
- "Overlay used by Global-Hl-Line mode to highlight the current line.")
-
;;;###autoload
(define-minor-mode hl-line-mode
"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."
(not (eq ibuffer-buf buf))))))
;; This function is a special case; it's not defined by
-;; `ibuffer-define-sorter'.
+;; `define-ibuffer-sorter'.
(defun ibuffer-do-sort-by-recency ()
"Sort the buffers by last view time."
(interactive)
(setq ibuffer-sorting-mode 'recency)
- (ibuffer-redisplay t))
+ (ibuffer-update nil t))
(defun ibuffer-update-format ()
(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."
(setq major-mode 'image-mode)
(use-local-map image-mode-map)
(add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
- (if (not (get-text-property (point-min) 'display))
+ (if (and (display-images-p)
+ (not (get-text-property (point-min) 'display)))
(image-toggle-display)
;; Set next vars when image is already displayed but local
;; variables were cleared by kill-all-local-variables
(setq cursor-type nil truncate-lines t))
(run-mode-hooks 'image-mode-hook)
- (message "%s" (concat (substitute-command-keys
- "Type \\[image-toggle-display] to view the image as ")
- (if (get-text-property (point-min) 'display)
- "text" "an image") ".")))
+ (if (display-images-p)
+ (message "%s" (concat
+ (substitute-command-keys
+ "Type \\[image-toggle-display] to view the image as ")
+ (if (get-text-property (point-min) 'display)
+ "text" "an image") "."))))
;;;###autoload
(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."
(defvar imenu-buffer-menubar nil)
(defvar imenu-menubar-modified-tick 0
- "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.")
+ "The value of (buffer-chars-modified-tick) as of the last call
+to `imenu-update-menubar'.")
(make-variable-buffer-local 'imenu-menubar-modified-tick)
(defun imenu-update-menubar ()
(when (and (current-local-map)
(keymapp (lookup-key (current-local-map) [menu-bar index]))
- (not (eq (buffer-modified-tick)
- imenu-menubar-modified-tick)))
- (setq imenu-menubar-modified-tick (buffer-modified-tick))
+ (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick))
+ (setq imenu-menubar-modified-tick (buffer-chars-modified-tick))
(let ((index-alist (imenu--make-index-alist t)))
;; Don't bother updating if the index-alist has not changed
;; 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.
Optional 6th arg PROPS is a property list annotating TRANS. See the
function `quail-define-rules' for the detail."
- (if (null (stringp key))
- "Invalid Quail key `%s'" key)
+ (if (not (or (stringp key) (vectorp key)))
+ (error "Invalid Quail key `%s'" key))
(if (not (or (numberp trans) (stringp trans) (vectorp trans)
(consp trans)
(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."
(set-buffer prepped)
(apply 'call-process-region
(append (list (point-min) (point-max)
- (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail")
+ (cond ((boundp 'sendmail-program)
+ sendmail-program)
+ ((file-exists-p "/usr/sbin/sendmail")
+ "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail")
+ "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail")
+ "/usr/ucblib/sendmail")
+ (t "fakemail"))
nil errors-to nil "-oi" "-t")
;; provide envelope "from" to sendmail; results will vary
(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'"
:group 'rmail-spam-filter )
(defcustom rsf-min-region-to-spam-list 7
- "*User may highlight a region in an incomming message and use
- the menubar to add this region to the spam definitions. This
- variable specifies the minimum size of region that may be added
- to spam list, to avoid accidentally adding a too short region
- which would result in false positive identification of spam
- messages."
+ "*Minimum size of region that you can add to the spam list.
+This is a size limit on text that you can specify as
+indicating a message is spam. The aim is to avoid
+accidentally adding a too short region, which would result
+in false positive identification of spam."
:type 'integer
:group 'rmail-spam-filter )
@@ -212,8 +211,8 @@ specify 'this\\&that' in the appropriate spam definition field."
:group 'rmail-spam-filter)
(defvar rsf-scanning-messages-now nil
- "Non nil when rmail-spam-filter scans messages,
-for interaction with `rsf-bbdb-auto-delete-spam-entries'")
+ "Non nil when `rmail-spam-filter' scans messages.
+This is for interaction with `rsf-bbdb-auto-delete-spam-entries'.")
;; the advantage over the automatic filter definitions is the AND conjunction
;; of in-one-definition-elements
@@ -596,8 +595,8 @@ Added to spam definitions as a contents field."
(define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list)
(defun rsf-add-content-type-field ()
- "Maintain backward compatibility with previous versions of rmail-spam-filter.
-The most recent version of rmai-spam-filter checks the contents
+ "Maintain backward compatibility for `rmail-spam-filter'.
+The most recent version of `rmail-spam-filter' checks the contents
field of the incoming mail to see if it spam. The format of
`rsf-definitions-alist' has therefore changed. This function
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 @@
:group 'sendmail
:version "22.1")
+(defcustom sendmail-program
+ (cond
+ ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
+ ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
+ ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
+ (t "fakemail")) ;In ../etc, to interface to /bin/mail.
+ "Program used to send messages."
+ :group 'mail
+ :type 'file)
+
;;;###autoload
(defcustom mail-from-style 'angles
"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
/\e\\[[0-9][0-9]*m/ s///g"
"Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.")
+(defvar Man-topic-history nil "Topic read history.")
+
(defvar man-mode-syntax-table
(let ((table (copy-syntax-table (standard-syntax-table))))
(modify-syntax-entry ?. "w" table)
@@ -686,7 +688,7 @@ all sections related to a subject, put something appropriate into the
(if (string= default-entry "")
": "
(format " (default %s): " default-entry)))
- nil nil default-entry)))
+ nil 'Man-topic-history default-entry)))
(if (string= input "")
(error "No man args given")
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."
(defcustom rcirc-show-maximum-output t
"*If non-nil, scroll buffer to keep the point at the bottom of
-the window.")
+the window."
+ :type 'boolean
+ :group 'rcirc)
(defcustom rcirc-authinfo nil
"List of authentication passwords.
@@ -200,6 +202,11 @@ use either M-x customize or also call `rcirc-update-prompt'."
:initialize 'custom-initialize-default
:group 'rcirc)
+(defcustom rcirc-keywords nil
+ "List of keywords to highlight in message text."
+ :type '(repeat string)
+ :group 'rcirc)
+
(defcustom rcirc-ignore-list ()
"List of ignored nicks.
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.
Nicks will be removed from the automatic list on follow-up renamings or
parts.")
-(defcustom rcirc-bright-nick-regexp nil
- "Regexp matching nicks to be emphasized.
+(defcustom rcirc-bright-nicks nil
+ "List of nicks to be emphasized.
See `rcirc-bright-nick' face."
- :type 'regexp
+ :type '(repeat string)
:group 'rcirc)
-(defcustom rcirc-dim-nick-regexp nil
- "Regexp matching nicks to be deemphasized.
+(defcustom rcirc-dim-nicks nil
+ "List of nicks to be deemphasized.
See `rcirc-dim-nick' face."
- :type 'regexp
+ :type '(repeat string)
:group 'rcirc)
(defcustom rcirc-print-hooks nil
@@ -246,7 +253,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
:group 'rcirc)
(defcustom rcirc-coding-system-alist nil
- "Alist to decide a coding system to use for a file I/O operation.
+ "Alist to decide a coding system to use for a channel I/O operation.
The format is ((PATTERN . VAL) ...).
PATTERN is either a string or a cons of strings.
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.")
process cmd sender args text)))
(message "UNHANDLED: %s" text)))
-(defun rcirc-handler-generic (process command sender args text)
+(defvar rcirc-responses-no-activity '("305" "306")
+ "Responses that don't trigger activity in the mode-line indicator.")
+
+(defun rcirc-handler-generic (process response sender args text)
"Generic server response handler."
- (rcirc-print process sender command nil
- (mapconcat 'identity (cdr args) " ") t))
+ (rcirc-print process sender response nil
+ (mapconcat 'identity (cdr args) " ")
+ (not (member response rcirc-responses-no-activity))))
(defun rcirc-send-string (process string)
"Send PROCESS a STRING plus a newline."
@@ -748,13 +759,10 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
;; if the user changes the major mode or kills the buffer, there is
;; cleanup work to do
- (make-local-variable 'change-major-mode-hook)
- (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook)
- (make-local-variable 'kill-buffer-hook)
- (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook)
+ (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t)
+ (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t)
- (make-local-variable 'window-scroll-functions)
- (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom)
+ (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom nil t)
;; add to buffer list, and update buffer abbrevs
(when target ; skip server buffer
@@ -941,7 +949,7 @@ Create the buffer if it doesn't exist."
(if (fboundp fun)
(funcall fun args process rcirc-target)
(rcirc-send-string process
- (concat command " " args)))))))
+ (concat command " :" args)))))))
(defvar rcirc-parent-buffer nil)
(defvar rcirc-window-configuration nil)
@@ -1073,7 +1081,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
"%")
((or (eq key ?n) (eq key ?N))
;; %n/%N -- nick
- (let ((nick (concat (if (string= (with-rcirc-process-buffer process
+ (let ((nick (concat (if (string= (with-rcirc-process-buffer
+ process
rcirc-server)
sender)
""
@@ -1084,26 +1093,26 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
face
(cond ((string= sender (rcirc-nick process))
'rcirc-my-nick)
- ((and rcirc-bright-nick-regexp
- (string-match rcirc-bright-nick-regexp sender))
+ ((and rcirc-bright-nicks
+ (string-match
+ (regexp-opt rcirc-bright-nicks)
+ sender))
'rcirc-bright-nick)
- ((and rcirc-dim-nick-regexp
- (string-match rcirc-dim-nick-regexp sender))
+ ((and rcirc-dim-nicks
+ (string-match
+ (regexp-opt rcirc-dim-nicks)
+ sender))
'rcirc-dim-nick)
(t
'rcirc-other-nick))))))
- ((eq key ?T)
+ ((eq key ?T)
;; %T -- timestamp
(rcirc-facify
(format-time-string rcirc-time-format (current-time))
'rcirc-timestamp))
((eq key ?m)
;; %m -- message text
- ;; We add the text property `rcirc-text' to identify this
- ;; as the body text.
- (propertize
- (rcirc-mangle-text process (rcirc-facify text face))
- 'rcirc-text text))
+ (rcirc-markup-text process sender response (rcirc-facify text face)))
((eq key ?t)
;; %t -- target
(rcirc-facify (or rcirc-target "") face))
@@ -1152,12 +1161,10 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
((or (rcirc-get-buffer process target)
(rcirc-any-buffer process))))))
-(defvar rcirc-activity-type nil)
-(make-variable-buffer-local 'rcirc-activity-type)
+(defvar rcirc-activity-types nil)
+(make-variable-buffer-local 'rcirc-activity-types)
(defvar rcirc-last-sender nil)
(make-variable-buffer-local 'rcirc-last-sender)
-(defvar rcirc-gray-toggle nil)
-(make-variable-buffer-local 'rcirc-gray-toggle)
(defun rcirc-scroll-to-bottom (window display-start)
"Scroll window to show maximum output if `rcirc-show-maximum-output' is
@@ -1261,26 +1268,13 @@ record activity."
(buffer-enable-undo))
;; record modeline activity
- (when activity
- (let ((nick-match
- (with-syntax-table rcirc-nick-syntax-table
- (string-match (concat "\\b"
- (regexp-quote (rcirc-nick process))
- "\\b")
- text))))
- (when (if rcirc-ignore-buffer-activity-flag
- ;; - Always notice when our nick is mentioned
- nick-match
- ;; - unless our nick is mentioned, don't bother us
- ;; - with dim-nicks
- (or nick-match
- (not (and rcirc-dim-nick-regexp sender
- (string-match rcirc-dim-nick-regexp sender)))))
- (rcirc-record-activity
- (current-buffer)
- (when (or nick-match (and (not (rcirc-channel-p rcirc-target))
- (not rcirc-low-priority-flag)))
- 'nick)))))
+ (when (and activity
+ (not rcirc-ignore-buffer-activity-flag)
+ (not (and rcirc-dim-nicks sender
+ (string-match (regexp-opt rcirc-dim-nicks) sender))))
+ (rcirc-record-activity (current-buffer)
+ (when (not (rcirc-channel-p rcirc-target))
+ 'nick)))
(sit-for 0) ; displayed text before hook
(run-hook-with-args 'rcirc-print-hooks
@@ -1501,8 +1495,7 @@ activity. Only run if the buffer is not visible and
(let ((t1 (with-current-buffer b1 rcirc-last-post-time))
(t2 (with-current-buffer b2 rcirc-last-post-time)))
(time-less-p t2 t1)))))
- (if (not rcirc-activity-type)
- (setq rcirc-activity-type type))
+ (pushnew type rcirc-activity-types)
(rcirc-update-activity-string)))
(run-hook-with-args 'rcirc-activity-hooks buffer))
@@ -1510,7 +1503,7 @@ activity. Only run if the buffer is not visible and
"Clear the BUFFER activity."
(setq rcirc-activity (delete buffer rcirc-activity))
(with-current-buffer buffer
- (setq rcirc-activity-type nil)))
+ (setq rcirc-activity-types nil)))
(defun rcirc-split-activity (activity)
"Return a cons cell with ACTIVITY split into (lopri . hipri)."
@@ -1518,7 +1511,7 @@ activity. Only run if the buffer is not visible and
(dolist (buf rcirc-activity)
(with-current-buffer buf
(if (and rcirc-low-priority-flag
- (not (eq rcirc-activity-type 'nick)))
+ (not (member 'nick rcirc-activity-types)))
(add-to-list 'lopri buf t)
(add-to-list 'hipri buf t))))
(cons lopri hipri)))
@@ -1547,11 +1540,15 @@ activity. Only run if the buffer is not visible and
(defun rcirc-activity-string (buffers)
(mapconcat (lambda (b)
- (let ((s (rcirc-short-buffer-name b)))
+ (let ((s (substring-no-properties (rcirc-short-buffer-name b))))
(with-current-buffer b
- (if (not (eq rcirc-activity-type 'nick))
- s
- (rcirc-facify s 'rcirc-mode-line-nick)))))
+ (dolist (type rcirc-activity-types)
+ (rcirc-add-face 0 (length s)
+ (case type
+ ('nick 'rcirc-track-nick)
+ ('keyword 'rcirc-track-keyword))
+ s)))
+ s))
buffers ","))
(defun rcirc-short-buffer-name (buffer)
@@ -1566,15 +1563,18 @@ Also, clear the overlay arrow if the current buffer is now hidden."
(let ((current-now-hidden t))
(walk-windows (lambda (w)
(let ((buf (window-buffer w)))
- (when (eq major-mode 'rcirc-mode)
- (rcirc-clear-activity buf)
+ (with-current-buffer buf
+ (when (eq major-mode 'rcirc-mode)
+ (rcirc-clear-activity buf)))
(when (eq buf rcirc-current-buffer)
- (setq current-now-hidden nil))))))
+ (setq current-now-hidden nil)))))
;; add overlay arrow if the buffer isn't displayed
- (when (and rcirc-current-buffer current-now-hidden)
+ (when (and current-now-hidden
+ rcirc-current-buffer
+ (buffer-live-p rcirc-current-buffer))
(with-current-buffer rcirc-current-buffer
- (when (eq major-mode 'rcirc-mode)
- (marker-position overlay-arrow-position)
+ (when (and (eq major-mode 'rcirc-mode)
+ (marker-position overlay-arrow-position))
(set-marker overlay-arrow-position nil)))))
;; remove any killed buffers from list
@@ -1792,17 +1792,21 @@ With a prefix arg, prompt for new topic."
(rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a"
target args)))
+(defun rcirc-add-or-remove (set &optional elt)
+ (if (and elt (not (string= "" elt)))
+ (if (member-ignore-case elt set)
+ (delete elt set)
+ (cons elt set))
+ set))
+
(defun-rcirc-command ignore (nick)
"Manage the ignore list.
Ignore NICK, unignore NICK if already ignored, or list ignored
nicks when no NICK is given. When listing ignored nicks, the
ones added to the list automatically are marked with an asterisk."
(interactive "sToggle ignoring of nick: ")
- (when (not (string= "" nick))
- (if (member-ignore-case nick rcirc-ignore-list)
- (setq rcirc-ignore-list (delete nick rcirc-ignore-list))
- (setq rcirc-ignore-list (cons nick rcirc-ignore-list))))
- (rcirc-print process (rcirc-nick process) "IGNORE" target
+ (setq rcirc-ignore-list (rcirc-add-or-remove rcirc-ignore-list nick))
+ (rcirc-print process nil "IGNORE" target
(mapconcat
(lambda (nick)
(concat nick
@@ -1810,14 +1814,47 @@ ones added to the list automatically are marked with an asterisk."
"*" "")))
rcirc-ignore-list " ")))
+(defun-rcirc-command bright (nick)
+ "Manage the bright nick list."
+ (interactive "sToggle emphasis of nick: ")
+ (setq rcirc-bright-nicks (rcirc-add-or-remove rcirc-bright-nicks nick))
+ (rcirc-print process nil "BRIGHT" target
+ (mapconcat 'identity rcirc-bright-nicks " ")))
+
+(defun-rcirc-command dim (nick)
+ "Manage the dim nick list."
+ (interactive "sToggle deemphasis of nick: ")
+ (setq rcirc-dim-nicks (rcirc-add-or-remove rcirc-dim-nicks nick))
+ (rcirc-print process nil "DIM" target
+ (mapconcat 'identity rcirc-dim-nicks " ")))
+
+(defun-rcirc-command keyword (keyword)
+ "Manage the keyword list.
+Mark KEYWORD, unmark KEYWORD if already marked, or list marked
+keywords when no KEYWORD is given."
+ (interactive "sToggle highlighting of keyword: ")
+ (setq rcirc-keywords (rcirc-add-or-remove rcirc-keywords keyword))
+ (rcirc-print process nil "KEYWORD" target
+ (mapconcat 'identity rcirc-keywords " ")))
+
-(defun rcirc-message-leader (sender face)
- "Return a string with SENDER propertized with FACE."
- (rcirc-facify (concat "<" sender "> ") face))
+(defun rcirc-add-face (start end name &optional object)
+ "Add face NAME to the face text property of the text from START to END."
+ (when name
+ (let ((pos start)
+ next prop)
+ (while (< pos end)
+ (setq prop (get-text-property pos 'face object)
+ next (next-single-property-change pos 'face object end))
+ (unless (member name (get-text-property pos 'face object))
+ (add-text-properties pos next (list 'face (cons name prop)) object))
+ (setq pos next)))))
(defun rcirc-facify (string face)
"Return a copy of STRING with FACE property added."
- (propertize (or string "") 'face face 'rear-nonsticky t))
+ (let ((string (or string "")))
+ (rcirc-add-face 0 (length string) face string)
+ string))
(defvar rcirc-url-regexp
(rx-to-string
@@ -1835,8 +1872,8 @@ ones added to the list automatically are marked with an asterisk."
word-boundary))
(optional
(and "/"
- (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]"))
- (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]")))))
+ (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]()"))
+ (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()")))))
"Regexp matching URLs. Set to nil to disable URL features in rcirc.")
(defun rcirc-browse-url (&optional arg)
@@ -1863,68 +1900,99 @@ ones added to the list automatically are marked with an asterisk."
(with-current-buffer (window-buffer (posn-window position))
(rcirc-browse-url-at-point (posn-point position)))))
-(defun rcirc-map-regexp (function regexp string)
- "Return a copy of STRING after calling FUNCTION for each REGEXP match.
-FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
- (let ((start 0))
- (while (string-match regexp string start)
- (setq start (match-end 0))
- (funcall function (match-beginning 0) (match-end 0) string)))
- string)
-
-(defun rcirc-mangle-text (process text)
+
+(defvar rcirc-markup-text-functions
+ '(rcirc-markup-body-text
+ rcirc-markup-attributes
+ rcirc-markup-my-nick
+ rcirc-markup-urls
+ rcirc-markup-keywords
+ rcirc-markup-bright-nicks)
+ "List of functions used to manipulate text before it is printed.
+
+Each function takes three arguments, PROCESS, SENDER, RESPONSE
+and CHANNEL-BUFFER. The current buffer is temporary buffer that
+contains the text to manipulate. Each function works on the text
+in this buffer.")
+
+(defun rcirc-markup-text (process sender response text)
"Return TEXT with properties added based on various patterns."
- ;; ^B
- (setq text
- (rcirc-map-regexp
- (lambda (start end string)
- (let ((orig-face (get-text-property start 'face string)))
- (add-text-properties
- start end
- (list 'face (if (listp orig-face)
- (append orig-face
- (list 'bold))
- (list orig-face 'bold))
- 'rear-nonsticky t)
- string)))
- ".*?"
- text))
- ;; TODO: deal with ^_ and ^C colors sequences
- (while (string-match "\\(.*\\)[]\\(.*\\)" text)
- (setq text (concat (match-string 1 text)
- (match-string 2 text))))
- ;; my nick
- (setq text
- (with-syntax-table rcirc-nick-syntax-table
- (rcirc-map-regexp (lambda (start end string)
- (add-text-properties
- start end
- (list 'face 'rcirc-nick-in-message
- 'rear-nonsticky t)
- string))
- (concat "\\b"
- (regexp-quote (rcirc-nick process))
- "\\b")
- text)))
- ;; urls
- (setq text
- (rcirc-map-regexp
- (lambda (start end string)
- (let ((orig-face (get-text-property start 'face string)))
- (add-text-properties start end
- (list 'face (if (listp orig-face)
- (append orig-face
- (list 'bold))
- (list orig-face 'bold))
- 'rear-nonsticky t
- 'mouse-face 'highlight
- 'keymap rcirc-browse-url-map)
- string))
- (push (substring-no-properties string start end) rcirc-urls))
- rcirc-url-regexp
- text))
- text)
-
+ (let ((channel-buffer (current-buffer)))
+ (with-temp-buffer
+ (insert text)
+ (goto-char (point-min))
+ (dolist (fn rcirc-markup-text-functions)
+ (save-excursion
+ (funcall fn process sender response channel-buffer)))
+ (buffer-substring (point-min) (point-max)))))
+
+(defun rcirc-markup-body-text (process sender response channel-buffer)
+ ;; We add the text property `rcirc-text' to identify this as the
+ ;; body text.
+ (add-text-properties (point-min) (point-max)
+ (list 'rcirc-text (buffer-substring-no-properties
+ (point-min) (point-max)))))
+
+(defun rcirc-markup-attributes (process sender response channel-buffer)
+ (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t)
+ (rcirc-add-face (match-beginning 0) (match-end 0)
+ (case (char-after (match-beginning 1))
+ (?\C-b 'bold)
+ (?\C-v 'italic)
+ (?\C-_ 'underline)))
+ ;; keep the ^O since it could terminate other attributes
+ (when (not (eq ?\C-o (char-before (match-end 2))))
+ (delete-region (match-beginning 2) (match-end 2)))
+ (delete-region (match-beginning 1) (match-end 1))
+ (goto-char (1+ (match-beginning 1))))
+ ;; remove the ^O characters now
+ (while (re-search-forward "\C-o+" nil t)
+ (delete-region (match-beginning 0) (match-end 0))))
+
+(defun rcirc-markup-my-nick (process sender response channel-buffer)
+ (with-syntax-table rcirc-nick-syntax-table
+ (while (re-search-forward (concat "\\b"
+ (regexp-quote (rcirc-nick process))
+ "\\b")
+ nil t)
+ (rcirc-add-face (match-beginning 0) (match-end 0)
+ 'rcirc-nick-in-message)
+ (when (string= response "PRIVMSG")
+ (rcirc-add-face (point-min) (point-max) 'rcirc-nick-in-message-full-line)
+ (rcirc-record-activity channel-buffer 'nick)))))
+
+(defun rcirc-markup-urls (process sender response channel-buffer)
+ (while (re-search-forward rcirc-url-regexp nil t)
+ (let ((start (match-beginning 0))
+ (end (match-end 0)))
+ (rcirc-add-face start end 'rcirc-url)
+ (add-text-properties start end (list 'mouse-face 'highlight
+ 'keymap rcirc-browse-url-map))
+ ;; record the url
+ (let ((url (buffer-substring-no-properties start end)))
+ (with-current-buffer channel-buffer
+ (push url rcirc-urls))))))
+
+(defun rcirc-markup-keywords (process sender response channel-buffer)
+ (let* ((target (with-current-buffer channel-buffer (or rcirc-target "")))
+ (keywords (delq nil (mapcar (lambda (keyword)
+ (when (not (string-match keyword target))
+ keyword))
+ rcirc-keywords))))
+ (when keywords
+ (while (re-search-forward (regexp-opt keywords 'words) nil t)
+ (rcirc-add-face (match-beginning 0) (match-end 0) 'rcirc-keyword)
+ (when (and (string= response "PRIVMSG")
+ (not (string= sender (rcirc-nick process))))
+ (rcirc-record-activity channel-buffer 'keyword))))))
+
+(defun rcirc-markup-bright-nicks (process sender response channel-buffer)
+ (when (and rcirc-bright-nicks
+ (string= response "NAMES"))
+ (with-syntax-table rcirc-nick-syntax-table
+ (while (re-search-forward (regexp-opt rcirc-bright-nicks 'words) nil t)
+ (rcirc-add-face (match-beginning 0) (match-end 0)
+ 'rcirc-bright-nick)))))
;;; handlers
;; these are called with the server PROCESS, the SENDER, which is a
@@ -2275,12 +2343,12 @@ Passwords are stored in `rcirc-authinfo' (which see)."
(((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
(((class color) (min-colors 8)) (:foreground "magenta"))
(t (:weight bold :underline t)))
- "Face used for nicks matched by `rcirc-bright-nick-regexp'."
+ "Face used for nicks matched by `rcirc-bright-nicks'."
:group 'rcirc-faces)
(defface rcirc-dim-nick
'((t :inherit default))
- "Face used for nicks matched by `rcirc-dim-nick-regexp'."
+ "Face used for nicks in `rcirc-dim-nicks'."
:group 'rcirc-faces)
(defface rcirc-server ; font-lock-comment-face
@@ -2329,9 +2397,14 @@ Passwords are stored in `rcirc-authinfo' (which see)."
(((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
(((class color) (min-colors 8)) (:foreground "cyan" :weight bold))
(t (:weight bold)))
- "The face used to highlight instances of nick within messages."
+ "The face used to highlight instances of your nick within messages."
:group 'rcirc-faces)
+(defface rcirc-nick-in-message-full-line
+ '((t (:bold t)))
+ "The face used emphasize the entire message when your nick is mentioned."
+ :group 'rcirc-faces)
+
(defface rcirc-prompt ; comint-highlight-prompt
'((((min-colors 88) (background dark)) (:foreground "cyan1"))
(((background dark)) (:foreground "cyan"))
@@ -2339,9 +2412,24 @@ Passwords are stored in `rcirc-authinfo' (which see)."
"The face used to highlight prompts."
:group 'rcirc-faces)
-(defface rcirc-mode-line-nick
+(defface rcirc-track-nick
+ '((t (:inverse-video t)))
+ "The face used in the mode-line when your nick is mentioned."
+ :group 'rcirc-faces)
+
+(defface rcirc-track-keyword
+ '((t (:bold t )))
+ "The face used in the mode-line when keywords are mentioned."
+ :group 'rcirc-faces)
+
+(defface rcirc-url
'((t (:bold t)))
- "The face used indicate activity directed at you."
+ "The face used to highlight urls."
+ :group 'rcirc-faces)
+
+(defface rcirc-keyword
+ '((t (:inherit highlight)))
+ "The face used to highlight keywords."
:group 'rcirc-faces)
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
(defun tramp-handle-make-auto-save-file-name ()
"Like `make-auto-save-file-name' for tramp files.
Returns a file name in `tramp-auto-save-directory' for autosaving this file."
- (when tramp-auto-save-directory
- (unless (file-exists-p tramp-auto-save-directory)
- (make-directory tramp-auto-save-directory t)))
- ;; jka-compr doesn't like auto-saving, so by appending "~" to the
- ;; file name we make sure that jka-compr isn't used for the
- ;; auto-save file.
- (let ((buffer-file-name
- (if tramp-auto-save-directory
- (expand-file-name
- (tramp-subst-strs-in-string
- '(("_" . "|")
- ("/" . "_a")
- (":" . "_b")
- ("|" . "__")
- ("[" . "_l")
- ("]" . "_r"))
- (buffer-file-name))
- tramp-auto-save-directory)
- (buffer-file-name))))
- ;; Run plain `make-auto-save-file-name'. There might be an advice when
- ;; it is not a magic file name operation (since Emacs 22).
- ;; We must deactivate it temporarily.
- (if (not (ad-is-active 'make-auto-save-file-name))
- (tramp-run-real-handler
- 'make-auto-save-file-name nil)
- ;; else
- (ad-deactivate 'make-auto-save-file-name)
- (prog1
- (tramp-run-real-handler
- 'make-auto-save-file-name nil)
- (ad-activate 'make-auto-save-file-name)))))
+ (let ((tramp-auto-save-directory tramp-auto-save-directory))
+ ;; File name must be unique. This is ensured with Emacs 22 (see
+ ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
+ ;; all other cases we must do it ourselves.
+ (when (boundp 'auto-save-file-name-transforms)
+ (mapcar
+ '(lambda (x)
+ (when (and (string-match (car x) buffer-file-name)
+ (not (car (cddr x))))
+ (setq tramp-auto-save-directory
+ (or tramp-auto-save-directory temporary-file-directory))))
+ (symbol-value 'auto-save-file-name-transforms)))
+ ;; Create directory.
+ (when tramp-auto-save-directory
+ (unless (file-exists-p tramp-auto-save-directory)
+ (make-directory tramp-auto-save-directory t)))
+ ;; jka-compr doesn't like auto-saving, so by appending "~" to the
+ ;; file name we make sure that jka-compr isn't used for the
+ ;; auto-save file.
+ (let ((buffer-file-name
+ (if tramp-auto-save-directory
+ (expand-file-name
+ (tramp-subst-strs-in-string
+ '(("_" . "|")
+ ("/" . "_a")
+ (":" . "_b")
+ ("|" . "__")
+ ("[" . "_l")
+ ("]" . "_r"))
+ (buffer-file-name))
+ tramp-auto-save-directory)
+ (buffer-file-name))))
+ ;; Run plain `make-auto-save-file-name'. There might be an advice when
+ ;; it is not a magic file name operation (since Emacs 22).
+ ;; We must deactivate it temporarily.
+ (if (not (ad-is-active 'make-auto-save-file-name))
+ (tramp-run-real-handler
+ 'make-auto-save-file-name nil)
+ ;; else
+ (ad-deactivate 'make-auto-save-file-name)
+ (prog1
+ (tramp-run-real-handler
+ 'make-auto-save-file-name nil)
+ (ad-activate 'make-auto-save-file-name))))))
;; CCC grok APPEND, LOCKNAME, CONFIRM
@@ -4333,7 +4346,12 @@ Falls back to normal file name handler if no tramp file name handler exists."
"Add tramp file name handlers to `file-name-handler-alist'."
(add-to-list 'file-name-handler-alist
(cons tramp-file-name-regexp 'tramp-file-name-handler))
- (when (or partial-completion-mode (featurep 'ido))
+ ;; `partial-completion-mode' is unknown in XEmacs. So we should
+ ;; load it unconditionally there. In the GNU Emacs case, method/
+ ;; user/host name completion shall be bound to `partial-completion-mode'.
+ (when (or (not (boundp 'partial-completion-mode))
+ (symbol-value 'partial-completion-mode)
+ (featurep 'ido))
(add-to-list 'file-name-handler-alist
(cons tramp-completion-file-name-regexp
'tramp-completion-file-name-handler))
@@ -6749,8 +6767,8 @@ Return ATTR."
;; Set file's gid change bit. Possible only when id-format is 'integer.
(when (numberp (nth 3 attr))
(setcar (nthcdr 9 attr)
- (not (= (nth 3 attr)
- (tramp-get-remote-gid multi-method method user host)))))
+ (not (eql (nth 3 attr)
+ (tramp-get-remote-gid multi-method method user host)))))
;; Set virtual device number.
(setcar (nthcdr 11 attr)
(tramp-get-device multi-method method user host))
@@ -7200,10 +7218,7 @@ Invokes `password-read' if available, `read-passwd' else."
(defun tramp-time-diff (t1 t2)
"Return the difference between the two times, in seconds.
-T1 and T2 are time values (as returned by `current-time' for example).
-
-NOTE: This function will fail if the time difference is too large to
-fit in an integer."
+T1 and T2 are time values (as returned by `current-time' for example)."
;; Pacify byte-compiler with `symbol-function'.
(cond ((and (fboundp 'subtract-time)
(fboundp 'float-time))
@@ -7214,10 +7229,9 @@ fit in an integer."
(funcall (symbol-function 'time-to-seconds)
(funcall (symbol-function 'subtract-time) t1 t2)))
((fboundp 'itimer-time-difference)
- (floor (funcall
- (symbol-function 'itimer-time-difference)
- (if (< (length t1) 3) (append t1 '(0)) t1)
- (if (< (length t2) 3) (append t2 '(0)) t2))))
+ (funcall (symbol-function 'itimer-time-difference)
+ (if (< (length t1) 3) (append t1 '(0)) t1)
+ (if (< (length t2) 3) (append t2 '(0)) t2)))
(t
;; snarfed from Emacs 21 time-date.el; combining
;; 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 @@
;; are auto-frobbed from configure.ac, so you should edit that file and run
;; "autoconf && ./configure" to change them.
-(defconst tramp-version "2.0.53"
+(defconst tramp-version "2.0.54"
"This version of Tramp.")
(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.")
"Name of directory used by system mailer for delivering new mail.
Its name should end with a slash.")
-(defcustom sendmail-program
- (cond
- ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
- ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
- ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
- (t "fakemail")) ;In ../etc, to interface to /bin/mail.
- "Program used to send messages."
- :group 'mail
- :type 'file)
-
(defcustom remote-shell-program
(cond
;; 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 @@
(errors-buffer pgg-errors-buffer)
(orig-mode (default-file-modes))
(process-connection-type nil)
- exit-status)
+ process status exit-status)
(with-current-buffer (get-buffer-create errors-buffer)
(buffer-disable-undo)
(erase-buffer))
(unwind-protect
(progn
(set-default-file-modes 448)
- (let ((coding-system-for-write 'binary)
- (input (buffer-substring-no-properties start end))
- (default-enable-multibyte-characters nil))
- (with-temp-buffer
- (when passphrase
- (insert passphrase "\n"))
- (insert input)
- (setq exit-status
- (apply #'call-process-region (point-min) (point-max) program
- nil errors-buffer nil args))))
+ (let ((coding-system-for-write 'binary))
+ (setq process
+ (apply #'start-process "*GnuPG*" errors-buffer
+ program args)))
+ (set-process-sentinel process #'ignore)
+ (when passphrase
+ (process-send-string process (concat passphrase "\n")))
+ (process-send-region process start end)
+ (process-send-eof process)
+ (while (eq 'run (process-status process))
+ (accept-process-output process 5))
+ (setq status (process-status process)
+ exit-status (process-exit-status process))
+ (delete-process process)
(with-current-buffer (get-buffer-create output-buffer)
(buffer-disable-undo)
(erase-buffer)
@@ -100,9 +104,12 @@
'binary)))
(insert-file-contents output-file-name)))
(set-buffer errors-buffer)
- (if (not (equal exit-status 0))
- (insert (format "\n%s exited abnormally: '%s'\n"
- program exit-status)))))
+ (if (memq status '(stop signal))
+ (error "%s exited abnormally: '%s'" program exit-status))
+ (if (= 127 exit-status)
+ (error "%s could not be found" program))))
+ (if (and process (eq 'run (process-status process)))
+ (interrupt-process process))
(if (file-exists-p output-file-name)
(delete-file output-file-name))
(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.)"
;; (not a name) in Python buffers from which `run-python' &c is
;; invoked. Would support multiple processes better.
(when (or new (not (comint-check-proc python-buffer)))
- (save-current-buffer
- (let* ((cmdlist (append (python-args-to-list cmd) '("-i")))
- (path (getenv "PYTHONPATH"))
- (process-environment ; to import emacs.py
- (cons (concat "PYTHONPATH=" data-directory
- (if path (concat ":" path)))
- process-environment)))
- (set-buffer (apply 'make-comint-in-buffer "Python"
- (generate-new-buffer "*Python*")
- (car cmdlist) nil (cdr cmdlist)))
- (setq-default python-buffer (current-buffer))
- (setq python-buffer (current-buffer)))
+ (with-current-buffer
+ (let* ((cmdlist (append (python-args-to-list cmd) '("-i")))
+ (path (getenv "PYTHONPATH"))
+ (process-environment ; to import emacs.py
+ (cons (concat "PYTHONPATH=" data-directory
+ (if path (concat ":" path)))
+ process-environment)))
+ (apply 'make-comint-in-buffer "Python"
+ (if new (generate-new-buffer "*Python*") "*Python*")
+ (car cmdlist) nil (cdr cmdlist)))
+ (setq-default python-buffer (current-buffer))
+ (setq python-buffer (current-buffer))
(accept-process-output (get-buffer-process python-buffer) 5)
- (inferior-python-mode)))
+ (inferior-python-mode)
+ ;; Load function definitions we need.
+ ;; Before the preoutput function was used, this was done via -c in
+ ;; cmdlist, but that loses the banner and doesn't run the startup
+ ;; file. The code might be inline here, but there's enough that it
+ ;; seems worth putting in a separate file, and it's probably cleaner
+ ;; to put it in a module.
+ ;; Ensure we're at a prompt before doing anything else.
+ (python-send-receive "import emacs; print '_emacs_out ()'")))
(if (derived-mode-p 'python-mode)
(setq python-buffer (default-value 'python-buffer))) ; buffer-local
- ;; Load function definitions we need.
- ;; Before the preoutput function was used, this was done via -c in
- ;; cmdlist, but that loses the banner and doesn't run the startup
- ;; file. The code might be inline here, but there's enough that it
- ;; seems worth putting in a separate file, and it's probably cleaner
- ;; to put it in a module.
- ;; Ensure we're at a prompt before doing anything else.
- (python-send-receive "import emacs; print '_emacs_out ()'")
;; Without this, help output goes into the inferior python buffer if
;; the process isn't already running.
(sit-for 1 t) ;Should we use accept-process-output instead? --Stef
@@ -1369,15 +1369,20 @@ buffer for a list of commands.)"
(defun python-send-command (command)
"Like `python-send-string' but resets `compilation-shell-minor-mode'.
COMMAND should be a single statement."
- (assert (not (string-match "\n" command)))
- (let ((end (marker-position (process-mark (python-proc)))))
+ ;; (assert (not (string-match "\n" command)))
+ ;; (let ((end (marker-position (process-mark (python-proc)))))
(with-current-buffer python-buffer (goto-char (point-max)))
(compilation-forget-errors)
- ;; Must wait until this has completed before re-setting variables below.
- (python-send-receive (concat command "; print '_emacs_out ()'"))
+ (python-send-string command)
(with-current-buffer python-buffer
- (set-marker compilation-parsing-end end)
- (setq compilation-last-buffer (current-buffer)))))
+ (setq compilation-last-buffer (current-buffer)))
+ ;; No idea what this is for but it breaks the call to
+ ;; compilation-fake-loc in python-send-region. -- Stef
+ ;; Must wait until this has completed before re-setting variables below.
+ ;; (python-send-receive "print '_emacs_out ()'")
+ ;; (with-current-buffer python-buffer
+ ;; (set-marker compilation-parsing-end end))
+ ) ;;)
(defun python-send-region (start end)
"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
instance. Assumes an inferior Python is running."
(let ((symbol (with-syntax-table python-dotty-syntax-table
(current-word))))
- ;; First try the symbol we're on.
- (or (and symbol
- (python-send-receive (format "emacs.eargs(%S, %s)"
- symbol python-imports)))
- ;; Try moving to symbol before enclosing parens.
- (let ((s (syntax-ppss)))
- (unless (zerop (car s))
- (when (eq ?\( (char-after (nth 1 s)))
- (save-excursion
- (goto-char (nth 1 s))
- (skip-syntax-backward "-")
- (let ((point (point)))
- (skip-chars-backward "a-zA-Z._")
- (if (< (point) point)
- (python-send-receive
- (format "emacs.eargs(%S, %s)"
- (buffer-substring-no-properties (point) point)
- python-imports)))))))))))
+ ;; This is run from timers, so inhibit-quit tends to be set.
+ (with-local-quit
+ ;; First try the symbol we're on.
+ (or (and symbol
+ (python-send-receive (format "emacs.eargs(%S, %s)"
+ symbol python-imports)))
+ ;; Try moving to symbol before enclosing parens.
+ (let ((s (syntax-ppss)))
+ (unless (zerop (car s))
+ (when (eq ?\( (char-after (nth 1 s)))
+ (save-excursion
+ (goto-char (nth 1 s))
+ (skip-syntax-backward "-")
+ (let ((point (point)))
+ (skip-chars-backward "a-zA-Z._")
+ (if (< (point) point)
+ (python-send-receive
+ (format "emacs.eargs(%S, %s)"
+ (buffer-substring-no-properties (point) point)
+ python-imports))))))))))))
;;;; Info-look functionality.
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'.
The argument STRING is ignored."
(let ((pmark (process-mark (get-buffer-process (current-buffer)))))
(save-excursion
- (goto-char (or comint-last-output-start (point-min)))
+ (goto-char (or (and (markerp comint-last-output-start)
+ (marker-position comint-last-output-start))
+ (point-min)))
(while (re-search-forward "[\C-a\C-b]" pmark t)
(replace-match "")))))
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'."
;; Pass point first, then mark, because the order matters
;; when calling kill-append.
(interactive (list (point) (mark)))
+ (unless (and beg end)
+ (error "The mark is not set now, so there is no region"))
(condition-case nil
(let ((string (filter-buffer-substring beg end t)))
(when string ;STRING is nil if BEG = END
@@ -4982,6 +4984,12 @@ value of `completion-common-substring'. See also `display-completion-list'.")
;; Variables and faces used in `completion-setup-function'.
+(defcustom completion-show-help t
+ "Non-nil means show help message in *Completions* buffer."
+ :type 'boolean
+ :version "22.1"
+ :group 'completion)
+
(defface completions-first-difference
'((t (:inherit bold)))
"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.)")
(if (get-char-property element-common-end 'mouse-face)
(put-text-property element-common-end (1+ element-common-end)
'font-lock-face 'completions-first-difference))))))
- ;; Insert help string.
- (goto-char (point-min))
- (if (display-mouse-p)
- (insert (substitute-command-keys
- "Click \\[mouse-choose-completion] on a completion to select it.\n")))
- (insert (substitute-command-keys
- "In this buffer, type \\[choose-completion] to \
-select the completion near point.\n\n")))))
+ ;; Maybe insert help string.
+ (when completion-show-help
+ (goto-char (point-min))
+ (if (display-mouse-p)
+ (insert (substitute-command-keys
+ "Click \\[mouse-choose-completion] on a completion to select it.\n")))
+ (insert (substitute-command-keys
+ "In this buffer, type \\[choose-completion] to \
+select the completion near point.\n\n"))))))
(add-hook 'completion-setup-hook 'completion-setup-function)
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."
(window-dedicated-p (selected-window)))
(pop-to-buffer (current-buffer))
(switch-to-buffer "GNU Emacs"))
+ (setq buffer-read-only nil)
(erase-buffer)
(if pure-space-overflow
(insert "\
@@ -1406,6 +1407,9 @@ Warning Warning!!! Pure space overflow !!!Warning Warning
(apply #'fancy-splash-insert text))
(fancy-splash-tail)
(set-buffer-modified-p nil)
+ (setq buffer-read-only t)
+ (if (and view-read-only (not view-mode))
+ (view-mode-enter nil 'kill-buffer))
(goto-char (point-min)))))
(defun fancy-splash-frame ()
@@ -1442,6 +1446,7 @@ we put it on this frame."
(let ((prev-buffer (current-buffer)))
(unwind-protect
(with-current-buffer (get-buffer-create "GNU Emacs")
+ (setq buffer-read-only nil)
(erase-buffer)
(set (make-local-variable 'tab-width) 8)
(if hide-on-input
@@ -1581,6 +1586,9 @@ Type \\[describe-distribution] for information on getting the latest version."))
;; Display the input that we set up in the buffer.
(set-buffer-modified-p nil)
+ (setq buffer-read-only t)
+ (if (and view-read-only (not view-mode))
+ (view-mode-enter nil 'kill-buffer))
(goto-char (point-min))
(if (or (window-minibuffer-p)
(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."
(find-coding-systems-string string)))
(setq coding-system
(coding-system-change-eol-conversion coding-system 'mac))
- (when (and (eq system-type 'darwin)
- (eq coding-system 'japanese-shift-jis-mac))
- (setq encoding mac-text-encoding-mac-japanese-basic-variant)
- (setq string (subst-char-in-string ?\\ ?\x80 string))
- (subst-char-in-string ?\¥ ?\x5c string t))
- (setq data (mac-code-convert-string
- (encode-coding-string string coding-system)
- (or encoding coding-system) nil)))
+ (let ((str string))
+ (when (and (eq system-type 'darwin)
+ (eq coding-system 'japanese-shift-jis-mac))
+ (setq encoding mac-text-encoding-mac-japanese-basic-variant)
+ (setq str (subst-char-in-string ?\\ ?\x80 str))
+ (subst-char-in-string ?\¥ ?\x5c str t)
+ ;; ASCII-only?
+ (if (string-match "\\`[\x00-\x7f]*\\'" str)
+ (setq str nil)))
+ (and str
+ (setq data (mac-code-convert-string
+ (encode-coding-string str coding-system)
+ (or encoding coding-system) nil)))))
(or data (encode-coding-string string (if (eq (byteorder) ?B)
'utf-16be-mac
'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 @@
;; These keys are available in xterm starting from version 216
;; if the modifyOtherKeys resource is set to 1.
+ (define-key map "\e[27;5;9~" [C-tab])
+ (define-key map "\e[27;5;13~" [C-return])
(define-key map "\e[27;5;39~" [?\C-\'])
+ (define-key map "\e[27;5;44~" [?\C-,])
(define-key map "\e[27;5;45~" [?\C--])
-
+ (define-key map "\e[27;5;46~" [?\C-.])
+ (define-key map "\e[27;5;47~" [?\C-/])
(define-key map "\e[27;5;48~" [?\C-0])
(define-key map "\e[27;5;49~" [?\C-1])
;; Not all C-DIGIT keys have a distinct binding.
(define-key map "\e[27;5;57~" [?\C-9])
-
- (define-key map "\e[27;5;59~" [?\C-\;])
+ (define-key map "\e[27;5;59~" [(C-\;)])
(define-key map "\e[27;5;61~" [?\C-=])
-
+ (define-key map "\e[27;5;92~" [?\C-\\])
(define-key map "\e[27;6;33~" [?\C-!])
(define-key map "\e[27;6;34~" [?\C-\"])
@@ -253,26 +256,53 @@
(define-key map "\e[27;6;41~" [?\C-)])
(define-key map "\e[27;6;42~" [?\C-*])
(define-key map "\e[27;6;43~" [?\C-+])
-
(define-key map "\e[27;6;58~" [?\C-:])
(define-key map "\e[27;6;60~" [?\C-<])
(define-key map "\e[27;6;62~" [?\C->])
(define-key map "\e[27;6;63~" [(C-\?)])
- (define-key map "\e[27;5;9~" [C-tab])
- (define-key map "\e[27;5;13~" [C-return])
- (define-key map "\e[27;5;44~" [?\C-,])
- (define-key map "\e[27;5;46~" [?\C-.])
- (define-key map "\e[27;5;47~" [?\C-/])
- (define-key map "\e[27;5;92~" [?\C-\\])
-
- (define-key map "\e[27;2;9~" [S-tab])
- (define-key map "\e[27;2;13~" [S-return])
-
- (define-key map "\e[27;6;9~" [(C-S-tab)])
+ (define-key map "\e[27;13;9~" [(C-M-tab)])
+ (define-key map "\e[27;13;13~" [(C-M-return)])
+ (define-key map "\e[27;13;39~" [?\C-\M-\'])
+ (define-key map "\e[27;13;44~" [?\C-\M-,])
+ (define-key map "\e[27;13;45~" [?\C-\M--])
(define-key map "\e[27;13;46~" [?\C-\M-.])
-
+ (define-key map "\e[27;13;47~" [?\C-\M-/])
+ (define-key map "\e[27;13;48~" [?\C-\M-0])
+ (define-key map "\e[27;13;49~" [?\C-\M-1])
+ (define-key map "\e[27;13;50~" [?\C-\M-2])
+ (define-key map "\e[27;13;51~" [?\C-\M-3])
+ (define-key map "\e[27;13;52~" [?\C-\M-4])
+ (define-key map "\e[27;13;53~" [?\C-\M-5])
+ (define-key map "\e[27;13;54~" [?\C-\M-6])
+ (define-key map "\e[27;13;55~" [?\C-\M-7])
+ (define-key map "\e[27;13;56~" [?\C-\M-8])
+ (define-key map "\e[27;13;57~" [?\C-\M-9])
+ (define-key map "\e[27;13;59~" [?\C-\M-\;])
+ (define-key map "\e[27;13;61~" [?\C-\M-=])
+ (define-key map "\e[27;13;92~" [?\C-\M-\\])
+
+ (define-key map "\e[27;14;33~" [?\C-\M-!])
+ (define-key map "\e[27;14;34~" [?\C-\M-\"])
+ (define-key map "\e[27;14;35~" [?\C-\M-#])
+ (define-key map "\e[27;14;36~" [?\C-\M-$])
+ (define-key map "\e[27;14;37~" [?\C-\M-%])
+ (define-key map "\e[27;14;38~" [(C-M-&)])
+ (define-key map "\e[27;14;40~" [?\C-\M-(])
+ (define-key map "\e[27;14;41~" [?\C-\M-)])
+ (define-key map "\e[27;14;42~" [?\C-\M-*])
+ (define-key map "\e[27;14;43~" [?\C-\M-+])
+ (define-key map "\e[27;14;58~" [?\C-\M-:])
+ (define-key map "\e[27;14;60~" [?\C-\M-<])
+ (define-key map "\e[27;14;62~" [?\C-\M->])
+ (define-key map "\e[27;14;63~" [(C-M-\?)])
+
+ (define-key map "\e[27;2;9~" [S-tab])
+ (define-key map "\e[27;2;13~" [S-return])
+
+ (define-key map "\e[27;6;9~" [(C-S-tab)])
+ (define-key map "\e[27;6;13~" [(C-S-return)])
;; Other versions of xterm might emit these.
(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 @@
+2006-08-31 Diane Murray <disumu@x3y2z1.net>
+
+ * url-parse.el (url-recreate-url-attributes): New function, code
+ simply moved from `url-recreate-url'.
+ (url-recreate-url): Use it.
+ Put the `url-target' at the end of the URL after the attributes.
+
+ * url-http.el (url-http-create-request):
+ Use `url-recreate-url-attributes' when setting real-fname.
+
+2006-08-29 Diane Murray <disumu@x3y2z1.net>
+
+ * url-cookie.el (url-cookie-write-file): Really don't use versioned
+ backups.
+
2006-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
* 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."
(insert ")\n(setq url-cookie-secure-storage\n '")
(pp url-cookie-secure-storage (current-buffer))
(insert ")\n")
- (insert " ;; Local Variables:\n"
+ (insert " \n;; Local Variables:\n"
";; version-control: never\n"
";; no-byte-compile: t\n"
";; End:\n")
- (set (make-local-variable 'version-control) t)
+ (set (make-local-variable 'version-control) 'never)
(write-file fname)
(setq url-cookies-changed-since-last-save nil)
(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.")
(let ((url-basic-auth-storage
'url-http-proxy-basic-auth-storage))
(url-get-authentication url nil 'any nil))))
- (real-fname (url-filename (or proxy-obj url)))
+ (real-fname (concat (url-filename (or proxy-obj url))
+ (url-recreate-url-attributes (or proxy-obj url))))
(host (url-host (or proxy-obj url)))
(auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers))
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 @@
(not (equal (url-port urlobj)
(url-scheme-get-property (url-type urlobj) 'default-port))))
(format ":%d" (url-port urlobj)))
- (or (url-filename urlobj) "/")
+ (or (url-filename urlobj) "/")
+ (url-recreate-url-attributes urlobj)
(if (url-target urlobj)
- (concat "#" (url-target urlobj)))
- (if (url-attributes urlobj)
- (concat ";"
- (mapconcat
- (function
- (lambda (x)
- (if (cdr x)
- (concat (car x) "=" (cdr x))
- (car x)))) (url-attributes urlobj) ";")))))
+ (concat "#" (url-target urlobj)))))
+
+(defun url-recreate-url-attributes (urlobj)
+ "Recreate the attributes of an URL string from the parsed URLOBJ."
+ (when (url-attributes urlobj)
+ (concat ";"
+ (mapconcat (lambda (x)
+ (if (cdr x)
+ (concat (car x) "=" (cdr x))
+ (car x)))
+ (url-attributes urlobj) ";"))))
;;;###autoload
(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'."
(kill-buffer standard-output)
))))
-(defvar woman-topic-history nil "Topic read history.")
+(defvaralias 'woman-topic-history 'Man-topic-history)
(defvar woman-file-history nil "File-name read history.")
(defun woman-file-name (topic &optional re-cache)
@@ -1750,7 +1750,18 @@ Leave point at end of new text. Return length of inserted text."
(define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
;; We don't need to call `man' when we are in `woman-mode'.
- (define-key woman-mode-map [remap man] 'woman))
+ (define-key woman-mode-map [remap man] 'woman)
+ (define-key woman-mode-map [remap man-follow] 'woman-follow))
+
+(defun woman-follow (topic)
+ "Get a Un*x manual page of the item under point and put it in a buffer."
+ (interactive (list (Man-default-man-entry)))
+ (if (or (not topic)
+ (string= topic ""))
+ (error "No item under point")
+ (woman (if (string-match Man-reference-regexp topic)
+ (substring topic 0 (match-end 1))
+ topic))))
(defun woman-follow-word (event)
"Run WoMan with word under mouse as topic.