diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 146 | ||||
-rw-r--r-- | lisp/calendar/diary-lib.el | 2 | ||||
-rw-r--r-- | lisp/comint.el | 37 | ||||
-rw-r--r-- | lisp/cus-edit.el | 4 | ||||
-rw-r--r-- | lisp/dired-aux.el | 6 | ||||
-rw-r--r-- | lisp/dired.el | 5 | ||||
-rw-r--r-- | lisp/files.el | 23 | ||||
-rw-r--r-- | lisp/format.el | 3 | ||||
-rw-r--r-- | lisp/frame.el | 2 | ||||
-rw-r--r-- | lisp/ido.el | 12 | ||||
-rw-r--r-- | lisp/image-dired.el | 8 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 4 | ||||
-rw-r--r-- | lisp/mail/rmailmm.el | 81 | ||||
-rw-r--r-- | lisp/mail/smtpmail.el | 1 | ||||
-rw-r--r-- | lisp/mouse.el | 3 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 114 | ||||
-rw-r--r-- | lisp/net/tramp.el | 41 | ||||
-rw-r--r-- | lisp/ps-print.el | 10 | ||||
-rw-r--r-- | lisp/subr.el | 29 | ||||
-rw-r--r-- | lisp/url/ChangeLog | 37 | ||||
-rw-r--r-- | lisp/url/url-cookie.el | 5 | ||||
-rw-r--r-- | lisp/vc/diff-mode.el | 7 | ||||
-rw-r--r-- | lisp/vc/log-edit.el | 2 |
23 files changed, 403 insertions, 179 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b0fab21cc9..e4310dd5fe8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,137 @@ +2010-12-13 Eli Zaretskii <eliz@gnu.org> + + * subr.el (posn-col-row): Evaluate header-line-format in the + context of the POSITION window's buffer. + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) + (with-silent-modifications): Doc fixes. + +2010-12-13 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-action-password, tramp-process-actions): + Revert patch from 2010-12-08. Use `save-restriction'. + +2010-12-13 Stephen Berman <stephen.berman@gmx.net> + + * calendar/diary-lib.el (diary-list-sexp-entries): + Handle case of no newline at end of file. (Bug#7536) + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * mail/smtpmail.el (smtpmail-send-it): Revert previous change. + +2010-12-13 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-action-password): Delete region, do not narrow. + (tramp-process-actions): Do not widen. + * net/tramp-sh.el (tramp-sh-handle-start-file-process): + Protect buffer-modified value. (Bug#7557) + +2010-12-13 Jan Moringen <jmoringe@techfak.uni-bielefeld.de> + + * log-edit.el (log-edit-changelog-entries): + Regexp quote filename. (Bug#7505) + +2010-12-13 Tom Breton <tehom@panix.com> + + * cus-edit.el (custom-save-all): + Bind print-length and print-level to nil. (Bug#7581) + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): + Run hooks to update menu contents. (Bug#7586) + + * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued + file names, for the sake of MS Windows. (Bug#7588) + +2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains + empty lines without a leading space. + +2010-12-13 Leo <sdl.web@gmail.com> + + * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook + while mapping over marks (Bug#6810). + +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * image-dired.el (image-dired-db-file) + (image-dired-temp-image-file, image-dired-gallery-dir) + (image-dired-temp-rotate-image-file): Set default values relative + to image-dired-dir (Bug#7518). + +2010-12-13 Lawrence Mitchell <wence@gmx.li> + + * format.el (format-decode-run-method): Pass args FROM and TO, not + point-min and point-max, to shell-command-on-region (Bug#7488). + +2010-12-13 Jan Djärv <jan.h.d@swipnet.se> + + * frame.el (blink-cursor-mode): Make default t for ns. + +2010-12-13 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> + + * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). + +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * comint.el (comint-dynamic-list-input-ring) + (comint-dynamic-complete-filename) + (comint-replace-by-expanded-filename) + (comint-dynamic-simple-complete) + (comint-dynamic-list-filename-completions) + (comint-dynamic-list-completions): Doc fix (Bug#7499). + + * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): + Doc fix (Bug#7471). + +2010-12-13 Martin Rudalics <rudalics@gmx.at> + + * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil + (Bug#7533). + +2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change) + + * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. + (Bug#7491). + +2010-12-13 Eli Zaretskii <eliz@gnu.org> + + * files.el (file-relative-name): Handle UNC file names on + DOS/Windows. (Bug#4674) + +2010-12-13 Daiki Ueno <ueno@unixuser.org> + + * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with + "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor. + (epg-context-set-passphrase-callback): Mention that the callback + is not called when used with GnuPG 2.x. + +2010-12-13 Glenn Morris <rgm@gnu.org> + + * ps-print.el (ps-line-lengths-internal, ps-nb-pages): + Ensure ps-footer-font-size-internal is initialized. + Call ps-get-page-dimensions before trying to use ps-font-for-text. + +2010-12-13 Kenichi Handa <handa@m17n.org> + + * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process + within condition-case. + (rmail-show-mime): Don't use condition-case. + (rmail-search-mime-message): New function. + (rmail-search-mime-message-function): Set to + rmail-search-mime-message. + +2010-12-13 Leo <sdl.web@gmail.com> + + * ido.el (ido-common-initialization): New function. (bug#3274) + (ido-mode): Use it. + (ido-completing-read): Call it. + 2010-12-12 Karl Fogel <kfogel@red-bean.com> * bookmark.el (bookmark-name-from-full-record): Rename back to @@ -437,17 +571,15 @@ (rmail-mime-save): Handle the case that the button's `data' is a MIME entity. (rmail-mime-insert-text): New function. - (rmail-mime-insert-image): Handle the case that DATA is a MIME - entity. + (rmail-mime-insert-image): Handle the case that DATA is a MIME entity. (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. (rmail-mime-insert-bulk): New function mostly copied from the old rmail-mime-bulk-handler. - (rmail-mime-multipart-handler): Just call - rmail-mime-process-multipart. - (rmail-mime-process-multipart): New funciton mostly copied from + (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart. + (rmail-mime-process-multipart): New function mostly copied from the old rmail-mime-multipart-handler. (rmail-mime-show): Just call rmail-mime-process. - (rmail-mime-process): New funciton mostly copied from the old + (rmail-mime-process): New function mostly copied from the old rmail-mime-show. (rmail-mime-insert-multipart, rmail-mime-parse) (rmail-mime-insert, rmail-show-mime) @@ -5911,7 +6043,7 @@ 2010-07-20 Michael R. Mauger <mmaug@yahoo.com> * progmodes/sql.el: Version 2.3. - (sql-connection-alist): Changed keys from symbols to strings; + (sql-connection-alist): Change keys from symbols to strings; enhanced the widget definition. (sql-mode-menu): Add submenu to select connections. (sql-interactive-mode-menu): Add "Save Connection" item. diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 231c92f417d..869d69fd8b7 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1764,7 +1764,7 @@ best if they are non-marking." (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) - (backward-char 1) + (if (bolp) (backward-char 1)) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation diff --git a/lisp/comint.el b/lisp/comint.el index b4d06cefafb..bd563ee4592 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1009,7 +1009,7 @@ See also `comint-read-input-ring'." (choose-completion-string completion buffer))) (defun comint-dynamic-list-input-ring () - "List in help buffer the buffer's input history." + "Display a list of recent inputs entered into the current buffer." (interactive) (if (or (not (ring-p comint-input-ring)) (ring-empty-p comint-input-ring)) @@ -3003,7 +3003,7 @@ Completes if after a filename. See `comint-match-partial-filename' and This function is similar to `comint-replace-by-expanded-filename', except that it won't change parts of the filename already entered in the buffer; it just adds completion characters to the end of the filename. A completions listing -may be shown in a help buffer if completion is ambiguous. +may be shown in a separate buffer if completion is ambiguous. Completion is dependent on the value of `comint-completion-addsuffix', `comint-completion-recexact' and `comint-completion-fignore', and the timing of @@ -3090,11 +3090,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful." (defun comint-replace-by-expanded-filename () "Dynamically expand and complete the filename at point. -Replace the filename with an expanded, canonicalized and completed replacement. -\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced -with the corresponding directories. \"Canonicalized\" means `..' and `.' are -removed, and the filename is made absolute instead of relative. For expansion -see `expand-file-name' and `substitute-in-file-name'. For completion see +Replace the filename with an expanded, canonicalized and +completed replacement, i.e. substituting environment +variables (e.g. $HOME), `~'s, `..', and `.', and making the +filename absolute. For expansion see `expand-file-name' and +`substitute-in-file-name'. For completion see `comint-dynamic-complete-filename'." (interactive) (let ((filename (comint-match-partial-filename))) @@ -3105,15 +3105,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see (defun comint-dynamic-simple-complete (stub candidates) "Dynamically complete STUB from CANDIDATES list. -This function inserts completion characters at point by completing STUB from -the strings in CANDIDATES. A completions listing may be shown in a help buffer -if completion is ambiguous. +This function inserts completion characters at point by +completing STUB from the strings in CANDIDATES. If completion is +ambiguous, possibly show a completions listing in a separate +buffer. -Returns nil if no completion was inserted. -Returns `sole' if completed with the only completion match. -Returns `shortest' if completed with the shortest of the completion matches. -Returns `partial' if completed as far as possible with the completion matches. -Returns `listed' if a completion listing was shown. +Return nil if no completion was inserted. +Return `sole' if completed with the only completion match. +Return `shortest' if completed with the shortest match. +Return `partial' if completed as far as possible. +Return `listed' if a completion listing was shown. See also `comint-dynamic-complete-filename'." (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) @@ -3161,7 +3162,7 @@ See also `comint-dynamic-complete-filename'." (defun comint-dynamic-list-filename-completions () - "List in help buffer possible completions of the filename at point." + "Display a list of possible completions for the filename at point." (interactive) (let* ((completion-ignore-case read-file-name-completion-ignore-case) ;; If we bind this, it breaks remote directory tracking in rlogin.el. @@ -3190,9 +3191,9 @@ See also `comint-dynamic-complete-filename'." (defvar comint-dynamic-list-completions-config nil) (defun comint-dynamic-list-completions (completions &optional common-substring) - "List in help buffer sorted COMPLETIONS. + "Display a list of sorted COMPLETIONS. The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. -Typing SPC flushes the help buffer." +Typing SPC flushes the completions buffer." (let ((window (get-buffer-window "*Completions*" 0))) (setq completions (sort completions 'string-lessp)) (if (and (eq last-command this-command) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 61e6881139a..edb299f86ed 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4426,7 +4426,9 @@ if only the first line of the docstring is shown.")) (unless (eq major-mode 'emacs-lisp-mode) (emacs-lisp-mode)) - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (print-length nil) + (print-level nil)) (custom-save-variables) (custom-save-faces)) (let ((file-precious-flag t)) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 764d13f5a9c..f269d89b1bd 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1019,10 +1019,14 @@ See Info node `(emacs)Subdir switches' for more details." ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename))) + (dired-map-over-marks (let ((fname (dired-get-filename)) + ;; Postphone readin hook till we map + ;; over all marked files (Bug#6810). + (dired-after-readin-hook nil)) (message "Redisplaying... %s" fname) (dired-update-file-line fname)) arg) + (run-hooks 'dired-after-readin-hook) (dired-move-to-filename) (message "Redisplaying...done"))) diff --git a/lisp/dired.el b/lisp/dired.el index 8012fcb472d..56030feae8b 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2775,7 +2775,8 @@ name, or the marker and a count of marked files." ;; that's possible. (Bug#1806) (split-window-vertically)) ;; Otherwise, try to split WINDOW sensibly. - (split-window-sensibly window))))) + (split-window-sensibly window)))) + pop-up-frames) (pop-to-buffer (get-buffer-create buf))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit @@ -3557,7 +3558,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "1628b7a7d379fb4da8ae4bf29faad4b5") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2e8658304f56098052e312d01c8763a2") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ diff --git a/lisp/files.el b/lisp/files.el index 460b005b9ef..e89c3075397 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2337,6 +2337,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ("\\.oak\\'" . scheme-mode) ("\\.sgml?\\'" . sgml-mode) ("\\.x[ms]l\\'" . xml-mode) + ("\\.dbk\\'" . xml-mode) ("\\.dtd\\'" . sgml-mode) ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) ("\\.js\\'" . js-mode) ; javascript-mode would be better @@ -4167,11 +4168,29 @@ on a DOS/Windows machine, it returns FILENAME in expanded form." (dremote (file-remote-p directory))) (if ;; Conditions for separate trees (or - ;; Test for different drives on DOS/Windows + ;; Test for different filesystems on DOS/Windows (and ;; Should `cygwin' really be included here? --stef (memq system-type '(ms-dos cygwin windows-nt)) - (not (eq t (compare-strings filename 0 2 directory 0 2)))) + (or + ;; Test for different drive letters + (not (eq t (compare-strings filename 0 2 directory 0 2))) + ;; Test for UNCs on different servers + (not (eq t (compare-strings + (progn + (if (string-match "\\`//\\([^:/]+\\)/" filename) + (match-string 1 filename) + ;; Windows file names cannot have ? in + ;; them, so use that to detect when + ;; neither FILENAME nor DIRECTORY is a + ;; UNC. + "?")) + 0 nil + (progn + (if (string-match "\\`//\\([^:/]+\\)/" directory) + (match-string 1 directory) + "?")) + 0 nil t))))) ;; Test for different remote file system identification (not (equal fremote dremote))) filename diff --git a/lisp/format.el b/lisp/format.el index 0436187d984..b4277ef6df0 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -181,8 +181,7 @@ it should be a Lisp function. Decoding is done for the given BUFFER." ;; We should perhaps go via a temporary buffer and copy it ;; back, in case of errors. (if (and (zerop (save-window-excursion - (shell-command-on-region (point-min) (point-max) - method t t + (shell-command-on-region from to method t t error-buff))) ;; gzip gives zero exit status with bad args, for instance. (zerop (with-current-buffer error-buff diff --git a/lisp/frame.el b/lisp/frame.el index b133851b440..969a02debe9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1545,7 +1545,7 @@ cursor display. On a text-only terminal, this is not implemented." :init-value (not (or noninteractive no-blinking-cursor (eq system-type 'ms-dos) - (not (memq window-system '(x w32))))) + (not (memq window-system '(x w32 ns))))) :initialize 'custom-initialize-delay :group 'cursor :global t diff --git a/lisp/ido.el b/lisp/ido.el index 2df9b8666af..306485de1ad 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1467,6 +1467,11 @@ Removes badly formatted data and ignored directories." ;; ido kill emacs hook (ido-save-history)) +(defun ido-common-initialization () + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) + (define-minor-mode ido-everywhere "Toggle using ido speed-ups everywhere file and directory names are read. With ARG, turn ido speed-up on if arg is positive, off otherwise." @@ -1510,12 +1515,9 @@ This function also adds a hook to the minibuffer." (t nil))) (ido-everywhere (if ido-everywhere 1 -1)) - (when ido-mode - (ido-init-completion-maps)) (when ido-mode - (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) + (ido-common-initialization) (ido-load-history) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) @@ -4759,6 +4761,8 @@ DEF, if non-nil, is the default value." (ido-directory-too-big nil) (ido-context-switch-command 'ignore) (ido-choice-list choices)) + ;; Initialize ido before invoking ido-read-internal + (ido-common-initialization) (ido-read-internal 'list prompt hist def require-match initial-input))) (defun ido-unload-function () diff --git a/lisp/image-dired.el b/lisp/image-dired.el index a74ddd312d5..565448c854e 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -187,19 +187,19 @@ that allows sharing of thumbnails across different programs." :group 'image-dired) (defcustom image-dired-db-file - (locate-user-emacs-file "image-dired/.image-dired_db") + (expand-file-name ".image-dired_db" image-dired-dir) "Database file where file names and their associated tags are stored." :type 'string :group 'image-dired) (defcustom image-dired-temp-image-file - (locate-user-emacs-file "image-dired/.image-dired_temp") + (expand-file-name ".image-dired_temp" image-dired-dir) "Name of temporary image file used by various commands." :type 'string :group 'image-dired) (defcustom image-dired-gallery-dir - (locate-user-emacs-file "image-dired/.image-dired_gallery") + (expand-file-name ".image-dired_gallery" image-dired-dir) "Directory to store generated gallery html pages. This path needs to be \"shared\" to the public so that it can access the index.html page that image-dired creates." @@ -344,7 +344,7 @@ original image file name and %t which is replaced by :group 'image-dired) (defcustom image-dired-temp-rotate-image-file - (locate-user-emacs-file "image-dired/.image-dired_rotate_temp") + (expand-file-name ".image-dired_rotate_temp" image-dired-dir) "Temporary file for rotate operations." :type 'string :group 'image-dired) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index ffb52683bd7..139b7cf926a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4289,7 +4289,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "ec0bed149baed671125f623e5b012f6f") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "b1ce015fd919b54cc7b1d0b2155489f9") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4380,7 +4380,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "666a5db1021cdcba6e68a18a553d65f1") +;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 918d2dfc365..708ec64706e 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -691,7 +691,9 @@ modified." The value is a MIME-entiy object (see `rmail-mime-enty-new')." (save-excursion (goto-char (point-min)) - (rmail-mime-process nil t))) + (condition-case nil + (rmail-mime-process nil t) + (error nil)))) (defun rmail-mime-insert (entity &optional content-type disposition) "Insert a MIME-entity ENTITY in the current buffer. @@ -744,30 +746,31 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." message type disposition encoding)) (defun rmail-show-mime () - (let ((mbox-buf rmail-buffer)) - (condition-case nil - (let ((entity (rmail-mime-parse))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t) - (rmail-buffer mbox-buf)) - (erase-buffer) - (rmail-mime-insert entity)))) - (error - ;; Decoding failed. Insert the original message body as is. - (let ((region (with-current-buffer mbox-buf - (goto-char (point-min)) - (re-search-forward "^$" nil t) - (forward-line 1) - (cons (point) (point-max))))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t)) - (erase-buffer) - (insert-buffer-substring mbox-buf (car region) (cdr region)))) - (message "MIME decoding failed")))))) + "Function to set in `rmail-show-mime-function' (which see)." + (let ((mbox-buf rmail-buffer) + (entity (rmail-mime-parse))) + (if entity + (with-current-buffer rmail-view-buffer + (let ((inhibit-read-only t) + (rmail-buffer mbox-buf)) + (erase-buffer) + (rmail-mime-insert entity))) + ;; Decoding failed. Insert the original message body as is. + (let ((region (with-current-buffer mbox-buf + (goto-char (point-min)) + (re-search-forward "^$" nil t) + (forward-line 1) + (cons (point) (point-max))))) + (with-current-buffer rmail-view-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (insert-buffer-substring mbox-buf (car region) (cdr region)))) + (message "MIME decoding failed"))))) (setq rmail-show-mime-function 'rmail-show-mime) (defun rmail-insert-mime-forwarded-message (forward-buffer) + "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)." (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) (save-restriction (narrow-to-region (point) (point)) @@ -777,6 +780,7 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." 'rmail-insert-mime-forwarded-message) (defun rmail-insert-mime-resent-message (forward-buffer) + "Function to set in `rmail-insert-mime-resent-message-function' (which see)." (insert-buffer-substring (with-current-buffer forward-buffer rmail-view-buffer)) (goto-char (point-min)) @@ -787,6 +791,41 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." (setq rmail-insert-mime-resent-message-function 'rmail-insert-mime-resent-message) +(defun rmail-search-mime-message (msg regexp) + "Function to set in `rmail-search-mime-message-function' (which see)." + (save-restriction + (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg)) + (let ((mbox-buf (current-buffer)) + (header-end (save-excursion + (re-search-forward "^$" nil 'move) (point))) + (body-end (point-max)) + (entity (rmail-mime-parse))) + (or + ;; At first, just search the headers. + (with-temp-buffer + (insert-buffer-substring mbox-buf nil header-end) + (rfc2047-decode-region (point-min) (point)) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Next, search the body. + (if (and entity + (let* ((content-type (rmail-mime-entity-type entity)) + (charset (cdr (assq 'charset (cdr content-type))))) + (or (not (string-match "text/.*" (car content-type))) + (and charset + (not (string= (downcase charset) "us-ascii")))))) + ;; Search the decoded MIME message. + (with-temp-buffer + (let ((rmail-buffer mbox-buf)) + (rmail-mime-insert entity)) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Search the body without decoding. + (goto-char header-end) + (re-search-forward regexp nil t)))))) + +(setq rmail-search-mime-message-function 'rmail-search-mime-message) + (provide 'rmailmm) ;; Local Variables: diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 4e76de60188..62bfbb740c4 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -1007,5 +1007,4 @@ many continuation lines." (provide 'smtpmail) -;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 ;;; smtpmail.el ends here diff --git a/lisp/mouse.el b/lisp/mouse.el index 40e0c14c064..aa5dadf84ff 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -185,6 +185,7 @@ items `Turn Off' and `Help'." (minor-mode-menu-from-indicator indicator))) (defun mouse-menu-major-mode-map () + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* (;; Keymap from which to inherit; may be null. (ancestor (mouse-menu-non-singleton (and (current-local-map) @@ -217,6 +218,7 @@ Otherwise return the whole menu." "Return a keymap equivalent to the menu bar. The contents are the items that would be in the menu bar whether or not it is actually displayed." + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* ((local-menu (and (current-local-map) (lookup-key (current-local-map) [menu-bar]))) (global-menu (lookup-key global-map [menu-bar])) @@ -2130,5 +2132,4 @@ choose a font." (provide 'mouse) -;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 ;;; mouse.el ends here diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1501868a6b5..92f6c2a0335 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2637,61 +2637,65 @@ the result will be a local, non-Tramp, filename." (defun tramp-sh-handle-start-file-process (name buffer program &rest args) "Like `start-file-process' for Tramp files." (with-parsed-tramp-file-name default-directory nil - (unwind-protect - ;; When PROGRAM is nil, we just provide a tty. - (let ((command - (when (stringp program) - (format "cd %s; exec %s" - (tramp-shell-quote-argument localname) - (mapconcat 'tramp-shell-quote-argument - (cons program args) " ")))) - (tramp-process-connection-type - (or (null program) tramp-process-connection-type)) - (name1 name) - (i 0)) - (unless buffer - ;; BUFFER can be nil. We use a temporary buffer. - (setq buffer (generate-new-buffer tramp-temp-buffer-name))) - (while (get-process name1) - ;; NAME must be unique as process name. - (setq i (1+ i) - name1 (format "%s<%d>" name i))) - (setq name name1) - ;; Set the new process properties. - (tramp-set-connection-property v "process-name" name) - (tramp-set-connection-property v "process-buffer" buffer) - ;; Activate narrowing in order to save BUFFER contents. - ;; Clear also the modification time; otherwise we might be - ;; interrupted by `verify-visited-file-modtime'. - (with-current-buffer (tramp-get-connection-buffer v) - (clear-visited-file-modtime) - (narrow-to-region (point-max) (point-max))) - (if command - ;; Send the command. - (tramp-send-command v command nil t) ; nooutput - ;; Check, whether a pty is associated. - (tramp-maybe-open-connection v) - (unless (tramp-compat-process-get - (tramp-get-connection-process v) 'remote-tty) - (tramp-error - v 'file-error "pty association is not supported for `%s'" name))) - (let ((p (tramp-get-connection-process v))) - ;; Set sentinel and query flag for this process. - (tramp-set-connection-property p "vector" v) - (set-process-sentinel p 'tramp-process-sentinel) - (tramp-compat-set-process-query-on-exit-flag p t) - ;; Return process. - p)) - ;; Save exit. - (with-current-buffer (tramp-get-connection-buffer v) - (if (string-match tramp-temp-buffer-name (buffer-name)) - (progn - (set-process-buffer (tramp-get-connection-process v) nil) - (kill-buffer (current-buffer))) - (widen) - (goto-char (point-max)))) - (tramp-set-connection-property v "process-name" nil) - (tramp-set-connection-property v "process-buffer" nil)))) + ;; When PROGRAM is nil, we just provide a tty. + (let ((command + (when (stringp program) + (format "cd %s; exec %s" + (tramp-shell-quote-argument localname) + (mapconcat 'tramp-shell-quote-argument + (cons program args) " ")))) + (tramp-process-connection-type + (or (null program) tramp-process-connection-type)) + (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) + (name1 name) + (i 0)) + (unwind-protect + (save-excursion + (save-restriction + (unless buffer + ;; BUFFER can be nil. We use a temporary buffer. + (setq buffer (generate-new-buffer tramp-temp-buffer-name))) + (while (get-process name1) + ;; NAME must be unique as process name. + (setq i (1+ i) + name1 (format "%s<%d>" name i))) + (setq name name1) + ;; Set the new process properties. + (tramp-set-connection-property v "process-name" name) + (tramp-set-connection-property v "process-buffer" buffer) + ;; Activate narrowing in order to save BUFFER contents. + ;; Clear also the modification time; otherwise we might + ;; be interrupted by `verify-visited-file-modtime'. + (with-current-buffer (tramp-get-connection-buffer v) + (let ((buffer-undo-list t)) + (clear-visited-file-modtime) + (narrow-to-region (point-max) (point-max)) + (if command + ;; Send the command. + (tramp-send-command v command nil t) ; nooutput + ;; Check, whether a pty is associated. + (tramp-maybe-open-connection v) + (unless (tramp-compat-process-get + (tramp-get-connection-process v) 'remote-tty) + (tramp-error + v 'file-error + "pty association is not supported for `%s'" name))))) + (let ((p (tramp-get-connection-process v))) + ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) + (set-process-sentinel p 'tramp-process-sentinel) + (tramp-compat-set-process-query-on-exit-flag p t) + ;; Return process. + p))) + ;; Save exit. + (with-current-buffer (tramp-get-connection-buffer v) + (if (string-match tramp-temp-buffer-name (buffer-name)) + (progn + (set-process-buffer (tramp-get-connection-process v) nil) + (kill-buffer (current-buffer))) + (set-buffer-modified-p bmp))) + (tramp-set-connection-property v "process-name" nil) + (tramp-set-connection-property v "process-buffer" nil))))) (defun tramp-sh-handle-process-file (program &optional infile destination display &rest args) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f7d3b81039e..abcb6ae7d77 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3077,26 +3077,27 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-compat-with-temp-message "" ;; Enable auth-source and password-cache. (tramp-set-connection-property vec "first-password-request" t) - (let (exit) - (while (not exit) - (tramp-message proc 3 "Waiting for prompts from remote shell") - (setq exit - (catch 'tramp-action - (if timeout - (with-timeout (timeout) - (tramp-process-one-action proc vec actions)) - (tramp-process-one-action proc vec actions))))) - (with-current-buffer (tramp-get-connection-buffer vec) - (widen) - (tramp-message vec 6 "\n%s" (buffer-string))) - (unless (eq exit 'ok) - (tramp-clear-passwd vec) - (tramp-error-with-buffer - nil vec 'file-error - (cond - ((eq exit 'permission-denied) "Permission denied") - ((eq exit 'process-died) "Process died") - (t "Login failed"))))))) + (save-restriction + (let (exit) + (while (not exit) + (tramp-message proc 3 "Waiting for prompts from remote shell") + (setq exit + (catch 'tramp-action + (if timeout + (with-timeout (timeout) + (tramp-process-one-action proc vec actions)) + (tramp-process-one-action proc vec actions))))) + (with-current-buffer (tramp-get-connection-buffer vec) + (widen) + (tramp-message vec 6 "\n%s" (buffer-string))) + (unless (eq exit 'ok) + (tramp-clear-passwd vec) + (tramp-error-with-buffer + nil vec 'file-error + (cond + ((eq exit 'permission-denied) "Permission denied") + ((eq exit 'process-died) "Process died") + (t "Login failed")))))))) :;; Utility functions: diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 885fe68be26..4e13ae07624 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4328,14 +4328,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) (buf (get-buffer-create "*Line-lengths*")) (ifs ps-font-size-internal) ; initial font size - (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (print-width (progn (ps-get-page-dimensions) ps-print-width)) + (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 5) ; minimum font size cw-min ; minimum character width @@ -4375,6 +4378,9 @@ and on the current ps-print setup." (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) @@ -4384,9 +4390,9 @@ and on the current ps-print setup." (buf (get-buffer-create "*Nb-Pages*")) (ils ps-line-spacing-internal) ; initial line spacing (ifs ps-font-size-internal) ; initial font size - (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (page-height (progn (ps-get-page-dimensions) ps-print-height)) + (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 4) ; minimum font size lh-min ; minimum line height diff --git a/lisp/subr.el b/lisp/subr.el index ff65997c68c..8a7ef7069c2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -417,7 +417,7 @@ Unibyte strings are converted to multibyte for comparison." (assoc-string key alist nil)) (defun member-ignore-case (elt list) - "Like `member', but ignores differences in case and text representation. + "Like `member', but ignore differences in case and text representation. ELT must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison. Non-strings in LIST are ignored." @@ -915,8 +915,9 @@ Select the corresponding window as well." (defsubst posn-x-y (position) "Return the x and y coordinates in POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (X . Y), where X and Y are given in +pixels. POSITION should be a list of the form returned by +`event-start' and `event-end'." (nth 2 position)) (declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) @@ -955,7 +956,9 @@ and `event-end' functions." (setq spacing 0))) (cons (/ (car pair) (frame-char-width frame)) (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) - (if (null header-line-format) 0 1)))))))) + (if (null (with-current-buffer (window-buffer window) + header-line-format)) + 0 1)))))))) (defun posn-actual-col-row (position) "Return the actual column and row in POSITION, measured in characters. @@ -996,14 +999,15 @@ and `event-end' functions." (defsubst posn-object-x-y (position) "Return the x and y coordinates relative to the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (DX . DY), where DX and DY are +given in pixels. POSITION should be a list of the form returned +by `event-start' and `event-end'." (nth 8 position)) (defsubst posn-object-width-height (position) "Return the pixel width and height of the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (WIDTH . HEIGHT). POSITION should +be a list of the form returned by `event-start' and `event-end'." (nth 9 position)) @@ -1355,9 +1359,8 @@ if it is empty or a duplicate." (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. -Execution is delayed if `delay-mode-hooks' is non-nil. -If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' -after running the mode hooks. +Execution is delayed if the variable `delay-mode-hooks' is non-nil. +Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. Major mode functions should use this instead of `run-hooks' when running their FOO-mode-hook." (if delay-mode-hooks @@ -2458,7 +2461,7 @@ If PARAM is present and non-nil, it replaces STRING as the object `yank-rectangle', PARAM may be a list of strings to insert as a rectangle. If NOEXCLUDE is present and non-nil, the normal removal of the - yank-excluded-properties is not performed; instead FUNCTION is + `yank-excluded-properties' is not performed; instead FUNCTION is responsible for removing those properties. This may be necessary if FUNCTION adjusts point before or after inserting the object. If UNDO is present and non-nil, it is a function that will be called @@ -3818,9 +3821,9 @@ which is higher than \"1alpha\"." ;; The following statement ought to be in print.c, but `provide' can't ;; be used there. +;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html (when (hash-table-p (car (read-from-string (prin1-to-string (make-hash-table))))) (provide 'hashtable-print-readable)) -;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 44cc511c99c..5fd96e43b6b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2010-12-13 Chong Yidong <cyd@stupidchicken.com> + + * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. + Suggested by Lennart Borgman (Bug#7543). + 2010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> * url-file.el (url-file-build-filename): Avoid interpreting @@ -14,8 +19,8 @@ 2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> - * url-http.el (url-http-wait-for-headers-change-function): Protect - against url-http-response-status for degenerate documents. + * url-http.el (url-http-wait-for-headers-change-function): + Protect against url-http-response-status for degenerate documents. (url-http-wait-for-headers-change-function): Revert previous change. It lead to really slow loads. @@ -31,7 +36,7 @@ 2010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org> - * url-vars.el (url-mime-charset-string): Changed the default to + * url-vars.el (url-mime-charset-string): Change the default to nil to avoid sending 1171 bytes of not very useful data to the HTTP server every request. @@ -119,8 +124,8 @@ 2010-07-01 Mark A. Hershberger <mah@everybody.org> * url-http.el (url-http-create-request): Add a CRLF on the end so - that POSTs with content to https urls work. See - <https://bugs.launchpad.net/mediawiki-el/+bug/540759> + that POSTs with content to https urls work. + See <https://bugs.launchpad.net/mediawiki-el/+bug/540759> 2010-06-22 Mark A. Hershberger <mah@everybody.org> @@ -602,8 +607,8 @@ * url-http.el (url-http-proxy): New variable. (url-http-create-request): Use it. Don't use `url-proxy-object'. (url-http): Treat `url' argument as resource to download, and - dynamic variable `url-using-proxy' as proxy to use. Set - `url-current-object' to actual URL, and `url-http-proxy' to proxy + dynamic variable `url-using-proxy' as proxy to use. + Set `url-current-object' to actual URL, and `url-http-proxy' to proxy used. (url-http-handle-cookies): Assume that `url-current-object' does not point to the proxy used. @@ -619,24 +624,24 @@ (url-proxy): Bind it instead of `proxy-object'. * url-http.el (url-http-create-request): Remove url argument, use - the buffer-local variable `url-http-target-url' instead. Both - callers updated. Simplify proxy handling. + the buffer-local variable `url-http-target-url' instead. + Both callers updated. Simplify proxy handling. (url-http): Don't make proxy-object buffer local. * url.el (url-retrieve-internal): Bind url-proxy-object to nil. 2006-11-26 Magnus Henoch <mange@freemail.hu> - * url-http.el (url-http-wait-for-headers-change-function): Use - `when' instead of `if' when possible. + * url-http.el (url-http-wait-for-headers-change-function): + Use `when' instead of `if' when possible. (url-http): Define url-http-response-version. (url-http-parse-response): Set it. (url-http-parse-headers): Use it to determine keep-alive behavior. 2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) - * url-http.el (url-http-content-length-after-change-function): Use - `url-lazy-message'. + * url-http.el (url-http-content-length-after-change-function): + Use `url-lazy-message'. * url-util.el (url-display-percentage): Only show a message if `url-show-status' is non-nil. @@ -1018,8 +1023,8 @@ (url-cookie-generate-header-lines): Likewise. (url-cookie-handle-set-cookie): Likewise. (url-cookie-create): Expect :localpart instead of :path. - (url-cookie-localpart): Renamed from url-cookie-path. - (url-cookie-set-localpart): Renamed from url-cookie-set-path. + (url-cookie-localpart): Rename from url-cookie-path. + (url-cookie-set-localpart): Rename from url-cookie-set-path. (url-cookie-file): Doc fix. (url-cookie-p): Add doc string. @@ -2236,7 +2241,7 @@ message when we have to contact a host so the user always gets at least some feedback. - * lisp/url-expand.el (url-expander-remove-relative-links): Moved and + * lisp/url-expand.el (url-expander-remove-relative-links): Move and renamed function. (url-default-expander): Use it. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e056db38a98..ec0974e9d76 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -198,7 +198,7 @@ telling Microsoft that." (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) - "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." + "Retrieve all cookies for a specified HOST and LOCALPART." (let ((storage (if secure (append url-cookie-secure-storage url-cookie-storage) url-cookie-storage)) @@ -226,7 +226,8 @@ telling Microsoft that." (setq cur (car cookies) cookies (cdr cookies) localpart-match (url-cookie-localpart cur)) - (if (and (if (stringp localpart-match) + (if (and (if (and (stringp localpart-match) + (stringp localpart)) (string-match (concat "^" (regexp-quote localpart-match)) localpart) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index cec4fb24616..c16c2460e75 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1829,10 +1829,13 @@ For use in `add-log-current-defun-function'." (eval-and-compile (require 'smerge-mode)) (save-excursion (diff-beginning-of-hunk 'try-harder) - (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. + (let* ((start (point)) + (style (diff-hunk-style)) ;Skips the hunk header as well. (beg (point)) (props '((diff-mode . fine) (face diff-refine-change))) - (end (progn (diff-end-of-hunk) (point)))) + ;; Be careful to go back to `start' so diff-end-of-hunk gets + ;; to read the hunk header's line info. + (end (progn (goto-char start) (diff-end-of-hunk) (point)))) (remove-overlays beg end 'diff-mode 'fine) diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 2bce58f50f2..c7f37c50011 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -774,7 +774,7 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each (setq pattern (file-name-nondirectory file))) (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" - pattern + (regexp-quote pattern) "\\($\\|[^[:alnum:]]\\)")) (let (texts |