Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102608. ------------------------------------------------------------ revno: 102608 committer: Glenn Morris branch nick: trunk timestamp: Tue 2010-12-07 21:00:12 -0800 message: In gdb, try to init comint history from gdbhist. * lisp/progmodes/gdb-mi.el (gdb): Try to initialize comint input history from gdb's history file. (Bug#7575) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-08 03:47:27 +0000 +++ lisp/ChangeLog 2010-12-08 05:00:12 +0000 @@ -1,5 +1,8 @@ 2010-12-08 Glenn Morris + * progmodes/gdb-mi.el (gdb): Try to initialize comint input history + from gdb's history file. (Bug#7575) + * mail/emacsbug.el (report-emacs-bug): Try to handle some other mail clients. === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2010-09-25 12:04:35 +0000 +++ lisp/progmodes/gdb-mi.el 2010-12-08 05:00:12 +0000 @@ -647,7 +647,22 @@ (gud-common-init command-line nil 'gud-gdbmi-marker-filter) (set (make-local-variable 'gud-minor-mode) 'gdbmi) (setq comint-input-sender 'gdb-send) - + (when (ring-empty-p comint-input-ring) ; cf shell-mode + (let (hfile) + (when (catch 'done + (dolist (file '(".gdbinit" "~/.gdbinit")) + (if (file-readable-p (setq file (expand-file-name file))) + (with-temp-buffer + (insert-file-contents file) + (and (re-search-forward + "^ *set history filename *\\(.*\\)" nil t) + (file-readable-p + (setq hfile (expand-file-name + (match-string 1) + (file-name-directory file)))) + (throw 'done t)))))) + (set (make-local-variable 'comint-input-ring-file-name) hfile) + (comint-read-input-ring t)))) (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") (gud-def gud-jump @@ -4191,5 +4206,4 @@ (provide 'gdb-mi) -;; arch-tag: 1b41ea2b-f364-4cec-8f35-e02e4fe01912 ;;; gdb-mi.el ends here ------------------------------------------------------------ revno: 102607 committer: Glenn Morris branch nick: trunk timestamp: Tue 2010-12-07 19:47:27 -0800 message: * mail/emacsbug.el (report-emacs-bug): Try to handle some other mail clients. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-08 02:18:02 +0000 +++ lisp/ChangeLog 2010-12-08 03:47:27 +0000 @@ -1,3 +1,8 @@ +2010-12-08 Glenn Morris + + * mail/emacsbug.el (report-emacs-bug): + Try to handle some other mail clients. + 2010-12-08 Stefan Monnier * files.el (dir-locals-collect-variables): Don't let errors stop us. === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2010-12-03 03:03:06 +0000 +++ lisp/mail/emacsbug.el 2010-12-08 03:47:27 +0000 @@ -288,7 +288,13 @@ report-emacs-bug-send-hook 'mail-send-hook)) ((eq mail-user-agent 'mh-e-user-agent) (setq report-emacs-bug-send-command "mh-send-letter" - report-emacs-bug-send-hook 'mh-before-send-letter-hook))) + report-emacs-bug-send-hook 'mh-before-send-letter-hook)) + ((eq mail-user-agent 'vm-user-agent) + (setq report-emacs-bug-send-command "vm-mail-send-and-exit" + report-emacs-bug-send-hook 'vm-mail-send-hook)) + ((eq mail-user-agent 'wl-user-agent) + (setq report-emacs-bug-send-command "wl-draft-send-and-exit" + report-emacs-bug-send-hook 'wl-draft-send-hook))) (unless report-emacs-bug-no-explanations (with-output-to-temp-buffer "*Bug Help*" (princ "While in the mail buffer:\n\n") ------------------------------------------------------------ revno: 102606 committer: Glenn Morris branch nick: trunk timestamp: Tue 2010-12-07 19:45:45 -0800 message: Make verify-visited-file-modtime default to the current buffer. * src/fileio.c (Fverify_visited_file_modtime): Default to current buffer. * doc/lispref/buffers.texi (Modification Time): verify-visited-file-modtime now defaults to the current buffer. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-11-27 20:04:57 +0000 +++ doc/lispref/ChangeLog 2010-12-08 03:45:45 +0000 @@ -1,7 +1,11 @@ +2010-12-08 Glenn Morris + + * buffers.texi (Modification Time): + verify-visited-file-modtime now defaults to the current buffer. + 2010-11-27 Chong Yidong - * nonascii.texi (Converting Representations): Document - byte-to-string. + * nonascii.texi (Converting Representations): Document byte-to-string. * strings.texi (Creating Strings): Don't mention semi-obsolete function char-to-string. === modified file 'doc/lispref/buffers.texi' --- doc/lispref/buffers.texi 2010-04-14 22:41:21 +0000 +++ doc/lispref/buffers.texi 2010-12-08 03:45:45 +0000 @@ -1,7 +1,8 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002, -@c 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +@c 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/buffers @node Buffers, Windows, Backups and Auto-Saving, Top @@ -594,12 +595,12 @@ described below before saving the file. (@xref{File Attributes}, for how to examine a file's modification time.) -@defun verify-visited-file-modtime buffer -This function compares what @var{buffer} has recorded for the -modification time of its visited file against the actual modification -time of the file as recorded by the operating system. The two should be -the same unless some other process has written the file since Emacs -visited or saved it. +@defun verify-visited-file-modtime &optional buffer +This function compares what @var{buffer} (by default, the +current-buffer) has recorded for the modification time of its visited +file against the actual modification time of the file as recorded by the +operating system. The two should be the same unless some other process +has written the file since Emacs visited or saved it. The function returns @code{t} if the last actual modification time and Emacs's recorded modification time are the same, @code{nil} otherwise. @@ -1223,6 +1224,3 @@ This function returns the current gap size of the current buffer. @end defun -@ignore - arch-tag: 2e53cfab-5691-41f6-b5a8-9c6a3462399c -@end ignore === modified file 'src/ChangeLog' --- src/ChangeLog 2010-12-06 16:59:52 +0000 +++ src/ChangeLog 2010-12-08 03:45:45 +0000 @@ -1,3 +1,7 @@ +2010-12-08 Glenn Morris + + * fileio.c (Fverify_visited_file_modtime): Default to current buffer. + 2010-12-06 Lars Magne Ingebrigtsen * xml.c (parse_region): Ignore blank HTML nodes. === modified file 'src/fileio.c' --- src/fileio.c 2010-10-04 17:22:57 +0000 +++ src/fileio.c 2010-12-08 03:45:45 +0000 @@ -5044,9 +5044,10 @@ } DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, - Sverify_visited_file_modtime, 1, 1, 0, + Sverify_visited_file_modtime, 0, 1, 0, doc: /* Return t if last mod time of BUF's visited file matches what BUF records. This means that the file has not been changed since it was visited or saved. +If BUF is omitted or nil, it defaults to the current buffer. See Info node `(elisp)Modification Time' for more details. */) (Lisp_Object buf) { @@ -5055,8 +5056,13 @@ Lisp_Object handler; Lisp_Object filename; - CHECK_BUFFER (buf); - b = XBUFFER (buf); + if (NILP (buf)) + b = current_buffer; + else + { + CHECK_BUFFER (buf); + b = XBUFFER (buf); + } if (!STRINGP (b->filename)) return Qt; if (b->modtime == 0) return Qt; @@ -5863,5 +5869,3 @@ #endif } -/* arch-tag: 64ba3fd7-f844-4fb2-ba4b-427eb928786c - (do not change this comment) */ ------------------------------------------------------------ revno: 102605 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2010-12-07 21:18:02 -0500 message: * lisp/files.el (dir-locals-collect-variables): Don't let errors stop us. Use string-prefix-p. (file-name-version-regexp): New var. (file-name-sans-versions): * lisp/jka-cmpr-hook.el (jka-compr-build-file-regexp): Use it, (jka-compr-get-compression-info): Use dolist. (jka-compr-compression-info-list): Don't bother specifying version/backup regexps. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-07 19:38:38 +0000 +++ lisp/ChangeLog 2010-12-08 02:18:02 +0000 @@ -1,3 +1,14 @@ +2010-12-08 Stefan Monnier + + * files.el (dir-locals-collect-variables): Don't let errors stop us. + Use string-prefix-p. + (file-name-version-regexp): New var. + (file-name-sans-versions): + * jka-cmpr-hook.el (jka-compr-build-file-regexp): Use it, + (jka-compr-get-compression-info): Use dolist. + (jka-compr-compression-info-list): Don't bother specifying + version/backup regexps. + 2010-12-07 Tassilo Horn * simple.el (just-one-space): Make argument n default to 1 if === modified file 'lisp/files.el' --- lisp/files.el 2010-11-22 19:22:03 +0000 +++ lisp/files.el 2010-12-08 02:18:02 +0000 @@ -3370,22 +3370,29 @@ Return the new variables list." (let* ((file-name (buffer-file-name)) (sub-file-name (if file-name + ;; FIXME: Why not use file-relative-name? (substring file-name (length root))))) - (dolist (entry class-variables variables) - (let ((key (car entry))) - (cond - ((stringp key) - ;; Don't include this in the previous condition, because we - ;; want to filter all strings before the next condition. - (when (and sub-file-name - (>= (length sub-file-name) (length key)) - (string= key (substring sub-file-name 0 (length key)))) - (setq variables (dir-locals-collect-variables - (cdr entry) root variables)))) - ((or (not key) - (derived-mode-p key)) - (setq variables (dir-locals-collect-mode-variables - (cdr entry) variables)))))))) + (condition-case err + (dolist (entry class-variables variables) + (let ((key (car entry))) + (cond + ((stringp key) + ;; Don't include this in the previous condition, because we + ;; want to filter all strings before the next condition. + (when (and sub-file-name + (>= (length sub-file-name) (length key)) + (string-prefix-p key sub-file-name)) + (setq variables (dir-locals-collect-variables + (cdr entry) root variables)))) + ((or (not key) + (derived-mode-p key)) + (setq variables (dir-locals-collect-mode-variables + (cdr entry) variables)))))) + (error + ;; The file's content might be invalid (e.g. have a merge conflict), but + ;; that shouldn't prevent the user from opening the file. + (message ".dir-locals error: %s" (error-message-string err)) + nil)))) (defun dir-locals-set-directory-class (directory class &optional mtime) "Declare that the DIRECTORY root is an instance of CLASS. @@ -3516,7 +3523,9 @@ (dir-name nil)) (cond ((stringp variables-file) - (setq dir-name (if (buffer-file-name) (file-name-directory (buffer-file-name)) default-directory)) + (setq dir-name (if (buffer-file-name) + (file-name-directory (buffer-file-name)) + default-directory)) (setq class (dir-locals-read-from-file variables-file))) ((consp variables-file) (setq dir-name (nth 0 variables-file)) @@ -3826,21 +3835,25 @@ (and context (set-file-selinux-context to-name context))) +(defvar file-name-version-regexp + "\\(?:~\\|\\.~[-[:alnum:]:#@^._]+~\\)" + "Regular expression matching the backup/version part of a file name. +Used by `file-name-sans-versions'.") + (defun file-name-sans-versions (name &optional keep-backup-version) "Return file NAME sans backup versions or strings. This is a separate procedure so your site-init or startup file can redefine it. If the optional argument KEEP-BACKUP-VERSION is non-nil, -we do not remove backup version numbers, only true file version numbers." +we do not remove backup version numbers, only true file version numbers. +See also `file-name-version-regexp'." (let ((handler (find-file-name-handler name 'file-name-sans-versions))) (if handler (funcall handler 'file-name-sans-versions name keep-backup-version) (substring name 0 - (if keep-backup-version - (length name) - (or (string-match "\\.~[-[:alnum:]:#@^._]+~\\'" name) - (string-match "~\\'" name) - (length name))))))) + (unless keep-backup-version + (string-match (concat file-name-version-regexp "\\'") + name)))))) (defun file-ownership-preserved-p (file) "Return t if deleting FILE and rewriting it would preserve the owner." === modified file 'lisp/jka-cmpr-hook.el' --- lisp/jka-cmpr-hook.el 2010-08-30 13:03:05 +0000 +++ lisp/jka-cmpr-hook.el 2010-12-08 02:18:02 +0000 @@ -73,10 +73,18 @@ (defun jka-compr-build-file-regexp () (purecopy - (mapconcat - 'jka-compr-info-regexp - jka-compr-compression-info-list - "\\|"))) + (let ((re-anchored '()) + (re-free '())) + (dolist (e jka-compr-compression-info-list) + (let ((re (jka-compr-info-regexp e))) + (if (string-match "\\\\'\\'" re) + (push (substring re 0 (match-beginning 0)) re-anchored) + (push re re-free)))) + (concat + (if re-free (concat (mapconcat 'identity re-free "\\|") "\\|")) + "\\(?:" + (mapconcat 'identity re-anchored "\\|") + "\\)" file-name-version-regexp "?\\'")))) ;; Functions for accessing the return value of jka-compr-get-compression-info (defun jka-compr-info-regexp (info) (aref info 0)) @@ -97,11 +105,9 @@ based on the filename itself and `jka-compr-compression-info-list'." (catch 'compression-info (let ((case-fold-search nil)) - (mapc - (function (lambda (x) - (and (string-match (jka-compr-info-regexp x) filename) - (throw 'compression-info x)))) - jka-compr-compression-info-list) + (dolist (x jka-compr-compression-info-list) + (and (string-match (jka-compr-info-regexp x) filename) + (throw 'compression-info x))) nil))) (defun jka-compr-install () @@ -198,7 +204,7 @@ ;; uncomp-message uncomp-prog uncomp-args ;; can-append strip-extension-flag file-magic-bytes] (mapcar 'purecopy - '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" + '(["\\.Z\\'" "compressing" "compress" ("-c") ;; gzip is more common than uncompress. It can only read, not write. "uncompressing" "gzip" ("-c" "-q" "-d") @@ -206,7 +212,7 @@ ;; Formerly, these had an additional arg "-c", but that fails with ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and ;; "Version 0.9.0b, 9-Sept-98". - ["\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" + ["\\.bz2\\'" "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2" ("-d") nil t "BZh"] @@ -214,15 +220,15 @@ "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2" ("-d") nil nil "BZh"] - ["\\.\\(?:tgz\\|svgz\\|sifz\\)\\(~\\|\\.~[0-9]+~\\)?\\'" + ["\\.\\(?:tgz\\|svgz\\|sifz\\)\\'" "compressing" "gzip" ("-c" "-q") "uncompressing" "gzip" ("-c" "-q" "-d") t nil "\037\213"] - ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" + ["\\.g?z\\'" "compressing" "gzip" ("-c" "-q") "uncompressing" "gzip" ("-c" "-q" "-d") t t "\037\213"] - ["\\.xz\\(~\\|\\.~[0-9]+~\\)?\\'" + ["\\.xz\\'" "XZ compressing" "xz" ("-c" "-q") "XZ uncompressing" "xz" ("-c" "-q" "-d") t t "\3757zXZ\0"] ------------------------------------------------------------ revno: 102604 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-12-07 22:12:50 +0000 message: shr.el (shr-tag-table-1): Use bg/gfcolor specs on tables. (shr-render-td): Handle td style="" better. (shr-tag-table): Use the color from the style sheet. (shr-render-td): Make sure we copy over all the overlays, too. nnimap.el (nnimap-parse-flags): Tweak VANISHED regexp to avoid regexp overflow, possibly. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-12-07 14:10:11 +0000 +++ lisp/gnus/ChangeLog 2010-12-07 22:12:50 +0000 @@ -1,3 +1,13 @@ +2010-12-07 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-parse-flags): Tweak VANISHED regexp to avoid regexp + overflow, possibly. + + * shr.el (shr-tag-table-1): Use bg/gfcolor specs on tables. + (shr-render-td): Handle td style="" better. + (shr-tag-table): Use the color from the style sheet. + (shr-render-td): Make sure we copy over all the overlays, too. + 2010-12-07 Andrew Cohen * nnir.el (nnir-run-gmane): Restore sub-optimal test for gmane server. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-12-06 22:16:10 +0000 +++ lisp/gnus/nnimap.el 2010-12-07 22:12:50 +0000 @@ -1384,7 +1384,7 @@ (goto-char start) (setq vanished (and (eq flag-sequence 'qresync) - (re-search-forward "VANISHED.* \\([0-9:,]+\\)" + (re-search-forward "^\\* VANISHED .* \\([0-9:,]+\\)" (or end (point-min)) t) (match-string 1))) (goto-char start) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-12-07 01:21:09 +0000 +++ lisp/gnus/shr.el 2010-12-07 22:12:50 +0000 @@ -589,7 +589,8 @@ (when (or fg bg) (let ((new-colors (shr-color-check fg bg))) (when new-colors - (shr-put-color start end :foreground (cadr new-colors)) + (when fg + (shr-put-color start end :foreground (cadr new-colors))) (when bg (shr-put-color start end :background (car new-colors))))))) @@ -896,6 +897,9 @@ (body (or (cdr (assq 'tbody cont)) cont)) (footer (cdr (assq 'tfoot cont))) (bgcolor (cdr (assq :bgcolor cont))) + (start (point)) + (shr-stylesheet (nconc (list (cons 'background-color bgcolor)) + shr-stylesheet)) (nheader (if header (shr-max-columns header))) (nbody (if body (shr-max-columns body))) (nfooter (if footer (shr-max-columns footer)))) @@ -936,7 +940,10 @@ `((tr (td (table (tbody ,@footer)))))))) (if caption `((tr (td (table (tbody ,@body))))) - body))))))) + body))))) + (when bgcolor + (shr-colorize-region start (point) (cdr (assq 'color shr-stylesheet)) + bgcolor)))) (defun shr-find-elements (cont type) (let (result) @@ -1042,43 +1049,73 @@ (defun shr-render-td (cont width fill) (with-temp-buffer - (let ((cache (cdr (assoc (cons width cont) shr-content-cache)))) - (if cache - (insert cache) - (let ((shr-width width) - (shr-indentation 0)) - (shr-descend (cons 'td cont))) - (delete-region - (point) - (+ (point) - (skip-chars-backward " \t\n"))) - (push (cons (cons width cont) (buffer-string)) - shr-content-cache))) - (goto-char (point-min)) - (let ((max 0)) - (while (not (eobp)) - (end-of-line) - (setq max (max max (current-column))) - (forward-line 1)) - (when fill - (goto-char (point-min)) - ;; If the buffer is totally empty, then put a single blank - ;; line here. - (if (zerop (buffer-size)) - (insert (make-string width ? )) - ;; Otherwise, fill the buffer. - (while (not (eobp)) - (end-of-line) - (when (> (- width (current-column)) 0) - (insert (make-string (- width (current-column)) ? ))) - (forward-line 1)))) - (if fill + (let ((bgcolor (cdr (assq :bgcolor cont))) + (fgcolor (cdr (assq :fgcolor cont))) + (style (cdr (assq :style cont))) + (shr-stylesheet shr-stylesheet) + overlays) + (when style + (setq style (and (string-match "color" style) + (shr-parse-style style)))) + (when bgcolor + (setq style (nconc (list (cons 'background-color bgcolor)) style))) + (when fgcolor + (setq style (nconc (list (cons 'color fgcolor)) style))) + (when style + (setq shr-stylesheet (append style shr-stylesheet))) + (let ((cache (cdr (assoc (cons width cont) shr-content-cache)))) + (if cache + (progn + (insert (car cache)) + (let ((end (length (car cache)))) + (dolist (overlay (cadr cache)) + (let ((new-overlay + (make-overlay (1+ (- end (nth 0 overlay))) + (1+ (- end (nth 1 overlay))))) + (properties (nth 2 overlay))) + (while properties + (overlay-put new-overlay + (pop properties) (pop properties))))))) + (let ((shr-width width) + (shr-indentation 0)) + (shr-descend (cons 'td cont))) + (delete-region + (point) + (+ (point) + (skip-chars-backward " \t\n"))) + (push (list (cons width cont) (buffer-string) + (shr-overlays-in-region (point-min) (point-max))) + shr-content-cache))) + (goto-char (point-min)) + (let ((max 0)) + (while (not (eobp)) + (end-of-line) + (setq max (max max (current-column))) + (forward-line 1)) + (when fill + (goto-char (point-min)) + ;; If the buffer is totally empty, then put a single blank + ;; line here. + (if (zerop (buffer-size)) + (insert (make-string width ? )) + ;; Otherwise, fill the buffer. + (while (not (eobp)) + (end-of-line) + (when (> (- width (current-column)) 0) + (insert (make-string (- width (current-column)) ? ))) + (forward-line 1)))) + (when style + (shr-colorize-region + (point-min) (point-max) + (cdr (assq 'color shr-stylesheet)) + (cdr (assq 'background-color shr-stylesheet)))) + (if fill + (list max + (count-lines (point-min) (point-max)) + (split-string (buffer-string) "\n") + (shr-collect-overlays)) (list max - (count-lines (point-min) (point-max)) - (split-string (buffer-string) "\n") - (shr-collect-overlays)) - (list max - (shr-natural-width)))))) + (shr-natural-width))))))) (defun shr-natural-width () (goto-char (point-min)) ------------------------------------------------------------ revno: 102603 committer: Tassilo Horn branch nick: trunk timestamp: Tue 2010-12-07 20:38:38 +0100 message: * simple.el (just-one-space): Make argument n default to 1 if omitted. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-07 15:36:08 +0000 +++ lisp/ChangeLog 2010-12-07 19:38:38 +0000 @@ -1,3 +1,8 @@ +2010-12-07 Tassilo Horn + + * simple.el (just-one-space): Make argument n default to 1 if + omitted. + 2010-12-07 Stefan Monnier * electric.el (electric-indent-post-self-insert-function): === modified file 'lisp/simple.el' --- lisp/simple.el 2010-12-06 18:21:42 +0000 +++ lisp/simple.el 2010-12-07 19:38:38 +0000 @@ -764,6 +764,7 @@ "Delete all spaces and tabs around point, leaving one space (or N spaces). If N is negative, deletes carriage return and linefeed characters as well." (interactive "*p") + (unless n (setq n 1)) (let ((orig-pos (point)) (skip-characters (if (< n 0) " \t\n\r" " \t")) (n (abs n))) ------------------------------------------------------------ revno: 102602 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2010-12-07 10:36:08 -0500 message: * lisp/electric.el (electric-indent-post-self-insert-function): Delete trailing newlines even if we don't reindent. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-06 18:21:42 +0000 +++ lisp/ChangeLog 2010-12-07 15:36:08 +0000 @@ -1,5 +1,15 @@ +2010-12-07 Stefan Monnier + + * electric.el (electric-indent-post-self-insert-function): + Delete trailing newlines even if we don't reindent. + 2010-12-06 Stefan Monnier + * minibuffer.el (completion-at-point): Remove the `arg'. + * bindings.el (complete-symbol): Move back from minibuffer.el. + +2010-12-06 Deniz Dogan + * simple.el (just-one-space): Delete newlines for negative arg. 2010-12-06 Stefan Monnier === modified file 'lisp/electric.el' --- lisp/electric.el 2010-11-18 02:43:42 +0000 +++ lisp/electric.el 2010-12-07 15:36:08 +0000 @@ -217,15 +217,15 @@ (not (nth 8 (save-excursion (syntax-ppss pos))))) ;; For newline, we want to reindent both lines and basically behave like ;; reindent-then-newline-and-indent (whose code we hence copied). - (when (and (< (1- pos) (line-beginning-position)) - ;; Don't reindent the previous line if the indentation - ;; function is not a real one. - (not (memq indent-line-function - '(indent-relative indent-relative-maybe)))) + (when (< (1- pos) (line-beginning-position)) (let ((before (copy-marker (1- pos) t))) (save-excursion - (goto-char before) - (indent-according-to-mode) + (unless (memq indent-line-function + '(indent-relative indent-relative-maybe)) + ;; Don't reindent the previous line if the indentation function + ;; is not a real one. + (goto-char before) + (indent-according-to-mode)) ;; We are at EOL before the call to indent-according-to-mode, and ;; after it we usually are as well, but not always. We tried to ;; address it with `save-excursion' but that uses a normal marker ------------------------------------------------------------ revno: 102601 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-12-07 14:10:11 +0000 message: nnir.el (nnir-run-gmane): Restore sub-optimal test for gmane server. (nnir-request-article): Improve article retrieval. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-12-07 05:06:56 +0000 +++ lisp/gnus/ChangeLog 2010-12-07 14:10:11 +0000 @@ -1,3 +1,8 @@ +2010-12-07 Andrew Cohen + + * nnir.el (nnir-run-gmane): Restore sub-optimal test for gmane server. + (nnir-request-article): Improve article retrieval. + 2010-12-07 Katsumi Yamaoka * mm-util.el (mm-extra-numeric-entities): New variable. === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2010-12-06 03:59:56 +0000 +++ lisp/gnus/nnir.el 2010-12-07 14:10:11 +0000 @@ -656,17 +656,14 @@ article) (save-excursion (let ((artfullgroup (nnir-article-group article)) - (artno (nnir-article-number article)) - ;; Bug? - ;; Why must we bind nntp-server-buffer here? It won't - ;; work if `buf' is used, say. (Of course, the set-buffer - ;; line below must then be updated, too.) - (nntp-server-buffer (or to-buffer nntp-server-buffer))) - (set-buffer nntp-server-buffer) - (erase-buffer) + (artno (nnir-article-number article))) (message "Requesting article %d from group %s" artno artfullgroup) - (gnus-request-article artno artfullgroup nntp-server-buffer) + (if to-buffer + (with-current-buffer to-buffer + (let ((gnus-article-decode-hook nil)) + (gnus-request-article-this-buffer artno artfullgroup))) + (gnus-request-article artno artfullgroup)) (cons artfullgroup artno))))) (deffoo nnir-request-move-article (article group server accept-form @@ -1378,10 +1375,7 @@ ;; gmane interface (defun nnir-run-gmane (query srv &optional groups) "Run a search against a gmane back-end server." - (if (gnus-string-match-p - "gmane.org$" - (or (cadr (assoc 'nntp-address (cddr (gnus-server-to-method srv)))) - "")) + (if (gnus-string-match-p "gmane" srv) (let* ((case-fold-search t) (qstring (cdr (assq 'query query))) (server (cadr (gnus-server-to-method srv))) ------------------------------------------------------------ revno: 102600 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-12-07 05:06:56 +0000 message: Decode extra numeric entities. mm-util.el (mm-extra-numeric-entities): New variable. mm-url.el (mm-url-decode-entities): mm-decode.el (mm-shr): Use it to decode extra numeric entities. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-12-07 02:01:00 +0000 +++ lisp/gnus/ChangeLog 2010-12-07 05:06:56 +0000 @@ -1,3 +1,10 @@ +2010-12-07 Katsumi Yamaoka + + * mm-util.el (mm-extra-numeric-entities): New variable. + + * mm-url.el (mm-url-decode-entities): + * mm-decode.el (mm-shr): Use it to decode extra numeric entities. + 2010-12-07 Stefan Monnier * message.el: Use completion-at-point. === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-11-19 04:55:16 +0000 +++ lisp/gnus/mm-decode.el 2010-12-07 05:06:56 +0000 @@ -1699,7 +1699,7 @@ (when handle (mm-with-part handle (buffer-string)))))) - shr-inhibit-images shr-blocked-images charset) + shr-inhibit-images shr-blocked-images charset char) (if (and (boundp 'gnus-summary-buffer) (buffer-name gnus-summary-buffer)) (with-current-buffer gnus-summary-buffer @@ -1714,13 +1714,25 @@ (narrow-to-region (point) (point)) (shr-insert-document (mm-with-part handle - (when (and charset - (setq charset (mm-charset-to-coding-system charset)) - (not (eq charset 'ascii))) - (insert (prog1 - (mm-decode-coding-string (buffer-string) charset) - (erase-buffer) - (mm-enable-multibyte)))) + (insert (prog1 + (if (and charset + (setq charset + (mm-charset-to-coding-system charset)) + (not (eq charset 'ascii))) + (mm-decode-coding-string (buffer-string) charset) + (mm-string-as-multibyte (buffer-string))) + (erase-buffer) + (mm-enable-multibyte))) + (goto-char (point-min)) + (setq case-fold-search t) + (while (re-search-forward + "&#\\(?:x\\([89][0-9a-f]\\)\\|\\(1[2-5][0-9]\\)\\);" nil t) + (when (setq char + (cdr (assq (if (match-beginning 1) + (string-to-number (match-string 1) 16) + (string-to-number (match-string 2))) + mm-extra-numeric-entities))) + (replace-match (char-to-string char)))) (libxml-parse-html-region (point-min) (point-max)))) (mm-handle-set-undisplayer handle === modified file 'lisp/gnus/mm-url.el' --- lisp/gnus/mm-url.el 2010-09-02 00:55:51 +0000 +++ lisp/gnus/mm-url.el 2010-12-07 05:06:56 +0000 @@ -365,16 +365,19 @@ (defun mm-url-decode-entities () "Decode all HTML entities." (goto-char (point-min)) - (while (re-search-forward "&\\(#[0-9]+\\|#x[0-9a-f]+\\|[a-z]+[0-9]*\\);" nil t) + (while (re-search-forward "&\\(#[0-9]+\\|#x[0-9a-f]+\\|[a-z]+[0-9]*\\);" + nil t) (let* ((entity (match-string 1)) (elem (if (eq (aref entity 0) ?\#) - (let ((c (mm-ucs-to-char - ;; Hex number: ㈒ - (if (eq (aref entity 1) ?x) - (string-to-number (substring entity 2) - 16) - ;; Decimal number:  - (string-to-number (substring entity 1)))))) + (let ((c + ;; Hex number: ㈒ + (if (eq (aref entity 1) ?x) + (string-to-number (substring entity 2) + 16) + ;; Decimal number:  + (string-to-number (substring entity 1))))) + (setq c (or (cdr (assq c mm-extra-numeric-entities)) + (mm-ucs-to-char c))) (if (mm-char-or-char-int-p c) c ?#)) (or (cdr (assq (intern entity) mm-url-html-entities)) === modified file 'lisp/gnus/mm-util.el' --- lisp/gnus/mm-util.el 2010-12-02 22:21:31 +0000 +++ lisp/gnus/mm-util.el 2010-12-07 05:06:56 +0000 @@ -866,6 +866,21 @@ Setting it to nil is useful on Emacsen supporting Unicode if sending mail with multiple parts is preferred to sending a Unicode one.") +(defvar mm-extra-numeric-entities + (mapcar + (lambda (item) + (cons (car item) (mm-ucs-to-char (cdr item)))) + '((#x80 . #x20AC) (#x82 . #x201A) (#x83 . #x0192) (#x84 . #x201E) + (#x85 . #x2026) (#x86 . #x2020) (#x87 . #x2021) (#x88 . #x02C6) + (#x89 . #x2030) (#x8A . #x0160) (#x8B . #x2039) (#x8C . #x0152) + (#x8E . #x017D) (#x91 . #x2018) (#x92 . #x2019) (#x93 . #x201C) + (#x94 . #x201D) (#x95 . #x2022) (#x96 . #x2013) (#x97 . #x2014) + (#x98 . #x02DC) (#x99 . #x2122) (#x9A . #x0161) (#x9B . #x203A) + (#x9C . #x0153) (#x9E . #x017E) (#x9F . #x0178))) + "*Alist of extra numeric entities and characters other than ISO 10646. +This table is used for decoding extra numeric entities to characters, +like \"€\" to the euro sign, mainly in html messages.") + ;;; Internal variables: ;;; Functions: