Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103346. ------------------------------------------------------------ revno: 103346 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 20:12:23 -0800 message: Merge dired-x's redefinition of dired-initial-position into the main version. * lisp/dired-x.el (dired-initial-position): Merge into dired.el's version. * lisp/dired.el (dired-initial-position): Merge dired-x's version here. (dired-find-subdir): Declare. * doc/misc/dired-x.texi (Technical Details): No longer redefines dired-initial-position. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-19 03:53:35 +0000 +++ doc/misc/ChangeLog 2011-02-19 04:12:23 +0000 @@ -1,6 +1,7 @@ 2011-02-19 Glenn Morris - * dired-x.texi (Technical Details): No longer redefines dired-add-entry. + * dired-x.texi (Technical Details): No longer redefines dired-add-entry, + or dired-initial-position. 2011-02-18 Glenn Morris === modified file 'doc/misc/dired-x.texi' --- doc/misc/dired-x.texi 2011-02-19 03:53:35 +0000 +++ doc/misc/dired-x.texi 2011-02-19 04:12:23 +0000 @@ -185,14 +185,14 @@ @code{dired-clean-up-after-deletion} @item @code{dired-find-buffer-nocreate} -@item -@code{dired-initial-position} @end itemize @noindent and from @file{dired-aux.el} the function @code{dired-read-shell-command}. In addition, once @file{dired.el} is loaded, @code{dired-add-entry} obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active. +Similarly, @code{dired-initial-position} obeys @code{dired-find-subdir} +(@pxref{Miscellaneous Commands}). @node Installation, Omitting Files in Dired, Introduction, Top @chapter Installation === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-19 03:53:35 +0000 +++ lisp/ChangeLog 2011-02-19 04:12:23 +0000 @@ -1,5 +1,9 @@ 2011-02-19 Glenn Morris + * dired-x.el (dired-initial-position): Merge into dired.el's version. + * dired.el (dired-initial-position): Merge dired-x's version here. + (dired-find-subdir): Declare. + * dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry. * dired-aux.el (dired-add-entry): Give it a doc-string. Merge dired-x's dired-omit handling here. === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-19 03:53:35 +0000 +++ lisp/dired-x.el 2011-02-19 04:12:23 +0000 @@ -48,8 +48,7 @@ ;; User customization: M-x customize-group RET dired-x RET. ;; When loaded this code redefines the following functions of GNU Emacs: -;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate, -;; and dired-initial-position. +;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate. ;; From dired-aux.el: dired-read-shell-command. ;; *Please* see the `dired-x' info pages for more details. @@ -1408,16 +1407,6 @@ ;; (setq dired-buffers (delq elt dired-buffers))))) ;; result)) -;; REDEFINE. -;; Redefines dired.el's version of `dired-initial-position' -(defun dired-initial-position (dirname) - "Where point should go in a new listing of DIRNAME. -Point assumed at beginning of new subdir line. -You may redefine this function as you wish, e.g. like in `dired-x.el'." - (end-of-line) - (if dired-find-subdir (dired-goto-subdir dirname)) ; new - (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) - ;; Does anyone use this? - lrd 6/29/93. ;; Apparently people do use it. - lrd 12/22/97. === modified file 'lisp/dired.el' --- lisp/dired.el 2011-02-17 22:57:38 +0000 +++ lisp/dired.el 2011-02-19 04:12:23 +0000 @@ -2544,11 +2544,15 @@ ;; return value of point (i.e., FOUND): (goto-char found)))) +(defvar dired-find-subdir) + +;; FIXME document whatever dired-x is doing. (defun dired-initial-position (dirname) - ;; Where point should go in a new listing of DIRNAME. - ;; Point assumed at beginning of new subdir line. - ;; You may redefine this function as you wish, e.g. like in dired-x.el. + "Where point should go in a new listing of DIRNAME. +Point assumed at beginning of new subdir line." (end-of-line) + (and (featurep 'dired-x) dired-find-subdir + (dired-goto-subdir dirname)) (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) ;; These are hooks which make tree dired work. ------------------------------------------------------------ revno: 103345 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 19:53:35 -0800 message: Merge dired-x's dired-add-entry modifications into the main definition. * lisp/dired-aux.el (dired-add-entry): Give it a doc-string. Merge dired-x's dired-omit handling here. (dired-omit-mode, dired-omit-regexp, dired-omit-localp): Declare. * lisp/dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry. * doc/misc/dired-x.texi (Technical Details): No longer redefines dired-add-entry. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-18 07:54:28 +0000 +++ doc/misc/ChangeLog 2011-02-19 03:53:35 +0000 @@ -1,3 +1,7 @@ +2011-02-19 Glenn Morris + + * dired-x.texi (Technical Details): No longer redefines dired-add-entry. + 2011-02-18 Glenn Morris * dired-x.texi (Optional Installation File At Point): Simplify. === modified file 'doc/misc/dired-x.texi' --- doc/misc/dired-x.texi 2011-02-18 07:54:28 +0000 +++ doc/misc/dired-x.texi 2011-02-19 03:53:35 +0000 @@ -190,14 +190,9 @@ @end itemize @noindent -and the following functions from @file{dired-aux.el} - -@itemize @bullet -@item -@code{dired-add-entry} -@item -@code{dired-read-shell-command} -@end itemize +and from @file{dired-aux.el} the function @code{dired-read-shell-command}. +In addition, once @file{dired.el} is loaded, @code{dired-add-entry} +obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active. @node Installation, Omitting Files in Dired, Introduction, Top @chapter Installation === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-19 03:38:45 +0000 +++ lisp/ChangeLog 2011-02-19 03:53:35 +0000 @@ -1,5 +1,10 @@ 2011-02-19 Glenn Morris + * dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry. + * dired-aux.el (dired-add-entry): Give it a doc-string. + Merge dired-x's dired-omit handling here. + (dired-omit-mode, dired-omit-regexp, dired-omit-localp): Declare. + * international/mule-diag.el (list-input-methods-1): Indent all lines of multi-line doc-strings. (Bug#8066) === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2011-02-12 22:55:28 +0000 +++ lisp/dired-aux.el 2011-02-19 03:53:35 +0000 @@ -1039,92 +1039,124 @@ (file-name-directory filename) (file-name-nondirectory filename) (function dired-add-entry) filename marker-char)) +(defvar dired-omit-mode) +(declare-function dired-omit-regexp "dired-x" ()) +(defvar dired-omit-localp) + (defun dired-add-entry (filename &optional marker-char relative) - ;; Add a new entry for FILENAME, optionally marking it - ;; with MARKER-CHAR (a character, else dired-marker-char is used). - ;; Note that this adds the entry `out of order' if files sorted by - ;; time, etc. - ;; At least this version inserts in the right subdirectory (if present). - ;; And it skips "." or ".." (see `dired-trivial-filenames'). - ;; Hidden subdirs are exposed if a file is added there. - (setq filename (directory-file-name filename)) - ;; Entry is always for files, even if they happen to also be directories - (let* ((opoint (point)) - (cur-dir (dired-current-directory)) - (orig-file-name filename) - (directory (if relative cur-dir (file-name-directory filename))) - reason) - (setq filename - (if relative - (file-relative-name filename directory) - (file-name-nondirectory filename)) - reason - (catch 'not-found - (if (string= directory cur-dir) - (progn - (skip-chars-forward "^\r\n") - (if (eq (following-char) ?\r) - (dired-unhide-subdir)) - ;; We are already where we should be, except when - ;; point is before the subdir line or its total line. - (let ((p (dired-after-subdir-garbage cur-dir))) - (if (< (point) p) - (goto-char p)))) - ;; else try to find correct place to insert - (if (dired-goto-subdir directory) - (progn ;; unhide if necessary - (if (looking-at "\r") ;; point is at end of subdir line - (dired-unhide-subdir)) - ;; found - skip subdir and `total' line - ;; and uninteresting files like . and .. - ;; This better not moves into the next subdir! - (dired-goto-next-nontrivial-file)) - ;; not found - (throw 'not-found "Subdir not found"))) - (let (buffer-read-only opoint) - (beginning-of-line) - (setq opoint (point)) - ;; Don't expand `.'. Show just the file name within directory. - (let ((default-directory directory)) - (dired-insert-directory directory - (concat dired-actual-switches " -d") - (list filename))) - (goto-char opoint) - ;; Put in desired marker char. - (when marker-char - (let ((dired-marker-char - (if (integerp marker-char) marker-char dired-marker-char))) - (dired-mark nil))) - ;; Compensate for a bug in ange-ftp. - ;; It inserts the file's absolute name, rather than - ;; the relative one. That may be hard to fix since it - ;; is probably controlled by something in ftp. - (goto-char opoint) - (let ((inserted-name (dired-get-filename 'verbatim))) - (if (file-name-directory inserted-name) - (let (props) - (end-of-line) - (forward-char (- (length inserted-name))) - (setq props (text-properties-at (point))) - (delete-char (length inserted-name)) - (let ((pt (point))) - (insert filename) - (set-text-properties pt (point) props)) - (forward-char 1)) - (forward-line 1))) - (forward-line -1) - (if dired-after-readin-hook ;; the subdir-alist is not affected... - (save-excursion ;; ...so we can run it right now: - (save-restriction - (beginning-of-line) - (narrow-to-region (point) (line-beginning-position 2)) - (run-hooks 'dired-after-readin-hook)))) - (dired-move-to-filename)) - ;; return nil if all went well - nil)) - (if reason ; don't move away on failure - (goto-char opoint)) - (not reason))) ; return t on success, nil else + "Add a new dired entry for FILENAME. +Optionally mark it with MARKER-CHAR (a character, else uses +`dired-marker-char'). Note that this adds the entry `out of order' +if files are sorted by time, etc. +Skips files that match `dired-trivial-filenames'. +Exposes hidden subdirectories if a file is added there. + +If `dired-x' is loaded and `dired-omit-mode' is enabled, skips +files matching `dired-omit-regexp'." + (if (or (not (featurep 'dired-x)) + (not dired-omit-mode) + ;; Avoid calling ls for files that are going to be omitted anyway. + (let ((omit-re (dired-omit-regexp))) + (or (string= omit-re "") + (not (string-match omit-re + (cond + ((eq 'no-dir dired-omit-localp) + filename) + ((eq t dired-omit-localp) + (dired-make-relative filename)) + (t + (dired-make-absolute + filename + (file-name-directory filename))))))))) + ;; Do it! + (progn + (setq filename (directory-file-name filename)) + ;; Entry is always for files, even if they happen to also be directories + (let* ((opoint (point)) + (cur-dir (dired-current-directory)) + (orig-file-name filename) + (directory (if relative cur-dir (file-name-directory filename))) + reason) + (setq filename + (if relative + (file-relative-name filename directory) + (file-name-nondirectory filename)) + reason + (catch 'not-found + (if (string= directory cur-dir) + (progn + (skip-chars-forward "^\r\n") + (if (eq (following-char) ?\r) + (dired-unhide-subdir)) + ;; We are already where we should be, except when + ;; point is before the subdir line or its total line. + (let ((p (dired-after-subdir-garbage cur-dir))) + (if (< (point) p) + (goto-char p)))) + ;; else try to find correct place to insert + (if (dired-goto-subdir directory) + (progn ;; unhide if necessary + (if (looking-at "\r") + ;; Point is at end of subdir line. + (dired-unhide-subdir)) + ;; found - skip subdir and `total' line + ;; and uninteresting files like . and .. + ;; This better not move into the next subdir! + (dired-goto-next-nontrivial-file)) + ;; not found + (throw 'not-found "Subdir not found"))) + (let (buffer-read-only opoint) + (beginning-of-line) + (setq opoint (point)) + ;; Don't expand `.'. + ;; Show just the file name within directory. + (let ((default-directory directory)) + (dired-insert-directory + directory + (concat dired-actual-switches " -d") + (list filename))) + (goto-char opoint) + ;; Put in desired marker char. + (when marker-char + (let ((dired-marker-char + (if (integerp marker-char) marker-char + dired-marker-char))) + (dired-mark nil))) + ;; Compensate for a bug in ange-ftp. + ;; It inserts the file's absolute name, rather than + ;; the relative one. That may be hard to fix since it + ;; is probably controlled by something in ftp. + (goto-char opoint) + (let ((inserted-name (dired-get-filename 'verbatim))) + (if (file-name-directory inserted-name) + (let (props) + (end-of-line) + (forward-char (- (length inserted-name))) + (setq props (text-properties-at (point))) + (delete-char (length inserted-name)) + (let ((pt (point))) + (insert filename) + (set-text-properties pt (point) props)) + (forward-char 1)) + (forward-line 1))) + (forward-line -1) + (if dired-after-readin-hook + ;; The subdir-alist is not affected... + (save-excursion ; ...so we can run it right now: + (save-restriction + (beginning-of-line) + (narrow-to-region (point) + (line-beginning-position 2)) + (run-hooks 'dired-after-readin-hook)))) + (dired-move-to-filename)) + ;; return nil if all went well + nil)) + (if reason ; don't move away on failure + (goto-char opoint)) + (not reason))) ; return t on success, nil else + ;; Don't do it (dired-omit-mode). + ;; Return t for success (perhaps we should return file-exists-p). + t)) (defun dired-after-subdir-garbage (dir) ;; Return pos of first file line of DIR, skipping header and total === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-18 07:48:40 +0000 +++ lisp/dired-x.el 2011-02-19 03:53:35 +0000 @@ -50,7 +50,7 @@ ;; When loaded this code redefines the following functions of GNU Emacs: ;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate, ;; and dired-initial-position. -;; From dired-aux.el: dired-add-entry and dired-read-shell-command. +;; From dired-aux.el: dired-read-shell-command. ;; *Please* see the `dired-x' info pages for more details. @@ -589,45 +589,6 @@ (and fn (string-match regexp fn)))) msg))) -;; Compiler does not get fset. -(declare-function dired-omit-old-add-entry "dired-x") - -;; REDEFINE. -;; Redefine dired-aux.el's version of `dired-add-entry' -;; Save old defun if not already done: -(or (fboundp 'dired-omit-old-add-entry) - (fset 'dired-omit-old-add-entry (symbol-function 'dired-add-entry))) - -;; REDEFINE. -(defun dired-omit-new-add-entry (filename &optional marker-char relative) - ;; This redefines dired-aux.el's dired-add-entry to avoid calling ls for - ;; files that are going to be omitted anyway. - (if dired-omit-mode - ;; perhaps return t without calling ls - (let ((omit-re (dired-omit-regexp))) - (if (or (string= omit-re "") - (not - (string-match omit-re - (cond - ((eq 'no-dir dired-omit-localp) - filename) - ((eq t dired-omit-localp) - (dired-make-relative filename)) - (t - (dired-make-absolute - filename - (file-name-directory filename))))))) - ;; if it didn't match, go ahead and add the entry - (dired-omit-old-add-entry filename marker-char relative) - ;; dired-add-entry returns t for success, perhaps we should - ;; return file-exists-p - t)) - ;; omitting is not turned on at all - (dired-omit-old-add-entry filename marker-char relative))) - -;; Redefine it. -(fset 'dired-add-entry 'dired-omit-new-add-entry) - ;;; VIRTUAL DIRED MODE. ------------------------------------------------------------ revno: 103344 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 19:38:45 -0800 message: mule-diag.el fix for bug#8066. * lisp/international/mule-diag.el (list-input-methods-1): Indent all lines of multi-line doc-strings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 22:52:58 +0000 +++ lisp/ChangeLog 2011-02-19 03:38:45 +0000 @@ -1,3 +1,8 @@ +2011-02-19 Glenn Morris + + * international/mule-diag.el (list-input-methods-1): + Indent all lines of multi-line doc-strings. (Bug#8066) + 2011-02-18 Chong Yidong Fix 2011-02-02 changes. === modified file 'lisp/international/mule-diag.el' --- lisp/international/mule-diag.el 2011-01-25 04:08:28 +0000 +++ lisp/international/mule-diag.el 2011-02-19 03:38:45 +0000 @@ -1056,7 +1056,10 @@ (if (and (consp title) (stringp (car title))) (car title) title)) - (nth 4 elt))))))) + ;; If the doc is multi-line, indent all + ;; non-blank lines. (Bug#8066) + (replace-regexp-in-string "\n\\(.\\)" "\n \\1" + (or (nth 4 elt) "")))))))) ;;; DIAGNOSIS ------------------------------------------------------------ revno: 103343 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-02-18 23:15:24 +0000 message: auth-source.el (auth-source-search): If we don't find a match, don't bug out on non-bound variables. (auth-source-search): Only ask a single backend to create the credentials. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-18 01:48:21 +0000 +++ lisp/gnus/ChangeLog 2011-02-18 23:15:24 +0000 @@ -2,6 +2,10 @@ * auth-source.el (auth-source-search): Don't try to create credentials if the caller doesn't want that. + (auth-source-search): If we don't find a match, don't bug out on + non-bound variables. + (auth-source-search): Only ask a single backend to create the + credentials. * nnimap.el (nnimap-log-command): Add a newline to the inhibited logging. === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-18 01:48:21 +0000 +++ lisp/gnus/auth-source.el 2011-02-18 23:15:24 +0000 @@ -544,14 +544,16 @@ ;; create the entries. (when (and create (not matches)) - (let ((match (apply - (slot-value backend 'search-function) - :backend backend - :create create - :delete delete - spec))) - (when match - (push (list backend match) matches)))) + (dolist (backend filtered-backends) + (unless matches + (let ((match (apply + (slot-value backend 'search-function) + :backend backend + :create create + :delete delete + spec))) + (when match + (push (list backend match) matches)))))) (setq backend (caar matches) found-here (cadar matches)) ------------------------------------------------------------ revno: 103342 committer: Chong Yidong branch nick: trunk timestamp: Fri 2011-02-18 17:52:58 -0500 message: Fix incorrect changes introduced in r103083. * lisp/apropos.el (apropos-print): Call apropos-mode before setting up buffer variables. Use inhibit-read-only. * lisp/emacs-lisp/package.el (package--list-packages): Call package-menu-mode before setting up buffer variables. * lisp/play/solitaire.el (solitaire): Call solitaire-mode before setting up buffer variables. Use inhibit-read-only. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 21:46:08 +0000 +++ lisp/ChangeLog 2011-02-18 22:52:58 +0000 @@ -1,3 +1,16 @@ +2011-02-18 Chong Yidong + + Fix 2011-02-02 changes. + + * apropos.el (apropos-print): Call apropos-mode before setting up + buffer variables. Use inhibit-read-only. + + * emacs-lisp/package.el (package--list-packages): Call + package-menu-mode before setting up buffer variables. + + * play/solitaire.el (solitaire): Call solitaire-mode before + setting up buffer variables. Use inhibit-read-only. + 2011-02-18 Lawrence Mitchell * progmodes/sh-script.el (sh-syntax-propertize-here-doc): (bug#8053) === modified file 'lisp/apropos.el' --- lisp/apropos.el 2011-02-02 17:59:44 +0000 +++ lisp/apropos.el 2011-02-18 22:52:58 +0000 @@ -972,8 +972,10 @@ (with-output-to-temp-buffer "*Apropos*" (let ((p apropos-accumulator) (old-buffer (current-buffer)) + (inhibit-read-only t) symbol item) (set-buffer standard-output) + (apropos-mode) (if (display-mouse-p) (insert "If moving the mouse over text changes the text's color, " @@ -1064,8 +1066,7 @@ (apropos-print-doc 5 'apropos-widget t) (apropos-print-doc 4 'apropos-plist nil)) (set (make-local-variable 'truncate-partial-width-windows) t) - (set (make-local-variable 'truncate-lines) t) - (apropos-mode)))) + (set (make-local-variable 'truncate-lines) t)))) (prog1 apropos-accumulator (setq apropos-accumulator ()))) ; permit gc === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-02-12 01:18:15 +0000 +++ lisp/emacs-lisp/package.el 2011-02-18 22:52:58 +0000 @@ -1657,10 +1657,10 @@ (require 'finder-inf nil t) (let ((buf (get-buffer-create "*Packages*"))) (with-current-buffer buf + (package-menu-mode) (set (make-local-variable 'package-menu-package-list) packages) (set (make-local-variable 'package-menu-sort-key) nil) - (package--generate-package-list) - (package-menu-mode)) + (package--generate-package-list)) ;; The package menu buffer has keybindings. If the user types ;; `M-x list-packages', that suggests it should become current. (switch-to-buffer buf))) === modified file 'lisp/play/solitaire.el' --- lisp/play/solitaire.el 2011-02-10 16:56:00 +0000 +++ lisp/play/solitaire.el 2011-02-18 22:52:58 +0000 @@ -196,14 +196,15 @@ (interactive "P") (switch-to-buffer "*Solitaire*") - (setq buffer-read-only t) - (setq solitaire-stones 32) - (solitaire-insert-board) - (solitaire-build-modeline) - (goto-char (point-max)) - (setq solitaire-center (search-backward ".")) - (setq buffer-undo-list (list (point))) - (solitaire-mode)) + (let ((inhibit-read-only t)) + (solitaire-mode) + (setq buffer-read-only t) + (setq solitaire-stones 32) + (solitaire-insert-board) + (solitaire-build-modeline) + (goto-char (point-max)) + (setq solitaire-center (search-backward ".")) + (setq buffer-undo-list (list (point))))) (defun solitaire-build-modeline () (setq mode-line-format ------------------------------------------------------------ revno: 103341 author: Karl Chen committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-02-18 17:28:09 -0500 message: * lib-src/emacsclient.c (main): Loop while `recv' return EINTR. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-02-09 00:30:33 +0000 +++ lib-src/ChangeLog 2011-02-18 22:28:09 +0000 @@ -1,3 +1,7 @@ +2011-02-18 Karl Chen + + * emacsclient.c (main): Loop while `recv' return EINTR. + 2011-02-09 Paul Eggert * make-docfile.c (EMACS_INTEGER): Rename from EMACS_INT. @@ -26,8 +30,8 @@ 2011-02-02 Eli Zaretskii - * makefile.w32-in (ETAGS_CFLAGS, CTAGS_CFLAGS): Add - ``-DEMACS_NAME="\"GNU Emacs\""''. + * makefile.w32-in (ETAGS_CFLAGS, CTAGS_CFLAGS): + Add ``-DEMACS_NAME="\"GNU Emacs\""''. (obj): Remove strftime.o. 2011-01-31 Eli Zaretskii @@ -232,8 +236,8 @@ * movemail.c (fatal, error, concat): Use const char *. - * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): Use - const char *. + * make-docfile.c (error, fatal, scan_c_file, scan_lisp_file): + Use const char *. * etags.c (compressor, language, Ada_suffix, Ada_help, Asm_suffixes) (Asm_help, default_C_suffixes, default_C_help, Cplusplus_suffixes) @@ -551,8 +555,8 @@ 2010-04-02 Dan Rosenberg (tiny change) - * movemail.c (main): Check return values of setuid. Avoid - possibility of symlink attack when movemail is setgid mail + * movemail.c (main): Check return values of setuid. + Avoid possibility of symlink attack when movemail is setgid mail (CVE-2010-0825). 2010-04-02 Dan Nicolaescu @@ -2258,7 +2262,7 @@ (wchar.h): Include, maybe. (attribute_hidden): Define if not defined. (__getopt_initialized): Use attribute_hidden. - (__libc_argc, __libc_argv): Renamed from original_argc, etc. + (__libc_argc, __libc_argv): Rename from original_argc, etc. (__getopt_nonoption_flags, nonoption_flags_max_len) (nonoption_flags_len): Conditional on USE_NONOPTION_FLAGS. (SWAP_FLAGS): New definitions. @@ -2361,7 +2365,7 @@ 2002-08-29 Francesco Potortì * etags.c (C_entries): Correct a problem with const C++ funcs. - (ignoreindent): Renamed from noindentypedefs. + (ignoreindent): Rename from noindentypedefs. (cjava, cplpl): They are now macros instead of local vars. 2002-08-28 Francesco Potortì @@ -2377,7 +2381,7 @@ (strcaseeq): Make it into a macro. * etags.c (make_tag): Never generate null length tag names. - (linebuffer_init): Renamed from initbuffer. All callers changed. + (linebuffer_init): Rename from initbuffer. All callers changed. (pattern): Structure renamed to `regexp', member regex renamed to pattern. (node_st): Member pat renamed to regex. @@ -2534,8 +2538,8 @@ 2002-05-30 Richard M. Stallman - * Makefile.in (LIBS_MAIL): Renamed from LIB_MAIL. - (LIBS_MOVE): Renamed from MOVE_LIBS. + * Makefile.in (LIBS_MAIL): Rename from LIB_MAIL. + (LIBS_MOVE): Rename from MOVE_LIBS. 2002-05-26 Paul Eggert @@ -2816,21 +2820,21 @@ (get_tag): Return a pointer to the tag that is found. * etags.c (LOOKING_AT): Use !intoken instead of iswhite. - (F_takeprec): Renamed from takeprec. All callers changed. - (F_getit): Renamed from getit. All callers changed. - (nocase_tail): Renamed from tail. All callers changed. - (Ada_getit): Renamed from adagetit. All callers changed. + (F_takeprec): Rename from takeprec. All callers changed. + (F_getit): Rename from getit. All callers changed. + (nocase_tail): Rename from tail. All callers changed. + (Ada_getit): Rename from adagetit. All callers changed. (L_getit): Simplify by using get_tag. (Perl_functions, Postscript_functions, erlang_attribute): Use the modified LOOKING_AT. - (notinname): Removed '[' and added ')' to the recognised chars. + (notinname): Remove '[' and added ')' to the recognised chars. (LOOKING_AT, get_tag, PHP_functions): Use notinname. (Ada_getit, Ada_funcs, Python_functions, Scheme_functions): Clarified, using strneq or notinname. (L_isdef, L_isquote): Removed. (Lisp_functions, L_getit): Clarified. - * etags.c (P_): Renamed to __P for consistency with config.h. + * etags.c (P_): Rename to __P for consistency with config.h. [HAVE_CONFIG_H]: Let config.h deal with __P. [__STDC__] [!HAVE_CONFIG_H]: Define PTR as in config.h. [!__STDC__] [!HAVE_CONFIG_H]: Do not undefine static, because @@ -2889,7 +2893,7 @@ (Perl_functions, Python_functions, PHP_functions) (Scheme_functions, Texinfo_nodes): Use it. (Perl_functions): Use strneq. - (prolog_pred): Renamed to prolog_pr. + (prolog_pred): Rename to prolog_pr. (prolog_pr): Recognise Prolog rules in addition to predicates. [ETAGS_REGEXPS] [!HAVE_CONFIG_H] [__CYGWIN__]: Prevent unmodified compile, as Cygwin's regex.h is incompatible with us. @@ -2988,7 +2992,7 @@ 2001-10-13 Gerd Moellmann - * make-docfile.c (read_c_string_or_comment): Renamed from + * make-docfile.c (read_c_string_or_comment): Rename from read_c_string. Add parameter COMMENT. Read C-style comments. (scan_c_file): Handle doc strings in C comments. @@ -3247,12 +3251,12 @@ 2001-01-25 Francesco Potortì - * etags.c (struct tok): Renamed from struct token. - (token): Renamed from tok. + * etags.c (struct tok): Rename from struct token. + (token): Rename from tok. (structtype): Make it a local variable. [DEBUG]: Use assert. (xrnew): Change the synopsis. - (typedefs_or_cplusplus): Renamed from typedefs_and_cplusplus. + (typedefs_or_cplusplus): Rename from typedefs_and_cplusplus. (grow_linebuffer): Don't call xrnew when not needed. (token): Buffer renamed to line. (C_entries): Three calls to inibuffer moved here from main. @@ -3281,16 +3285,16 @@ 2001-01-14 Francesco Potortì - * etags.c (get_language_from_langname): Renamed from + * etags.c (get_language_from_langname): Rename from get_language_from_name. - (get_language_from_filename): Renamed from get_language_from_suffix. + (get_language_from_filename): Rename from get_language_from_suffix. Now first looks for the complete file name. (language): New member char **filenames. (Makefile_filenames): List of possible filenames for makefiles. (lang_names): Add a NULL member for every entry, added an entry for makefiles. (Makefile_targets): New function. - (Texinfo_nodes): Renamed from Texinfo_fuctions and made + (Texinfo_nodes): Rename from Texinfo_fuctions and made it conformant to the style of the rest of the code. 2001-01-13 Gerd Moellmann @@ -3429,7 +3433,7 @@ 2000-07-14 Gerd Moellmann - * ebrowse.c (xrealloc, xmalloc): Renamed from yrealloc and ymalloc. + * ebrowse.c (xrealloc, xmalloc): Rename from yrealloc and ymalloc. * etags.c (xmalloc, xrealloc): Make externally visible, for use by alloca.o. @@ -3466,8 +3470,8 @@ 2000-06-06 Gerd Moellmann - * ebrowse.c (ymalloc): Renamed from xmalloc. - (yrealloc): Renamed from xrealloc. + * ebrowse.c (ymalloc): Rename from xmalloc. + (yrealloc): Rename from xrealloc. 2000-05-21 Dave Love @@ -3690,7 +3694,7 @@ corrects a bug. All callers changed. (canonicalize_filename): New function. (process_file, etags_getcwd, absolute_dirname): Use it. - (relative_filename, absolute_filename): Removed var shadowing. + (relative_filename, absolute_filename): Remove var shadowing. (C_entries, Pascal_functions): Add fake initializations to keep compilers quiet. (TeX_functions, Prolog_functions, Erlang_functions): Cleanup. @@ -3980,8 +3984,8 @@ 1998-05-01 Andrew Innes - * movemail.c [WINDOWSNT]: Undefine DISABLE_DIRECT_ACCESS. Force - all file i/o to be in binary mode. Include ntlib.h. + * movemail.c [WINDOWSNT]: Undefine DISABLE_DIRECT_ACCESS. + Force all file i/o to be in binary mode. Include ntlib.h. 1998-04-27 Andreas Schwab @@ -4013,8 +4017,8 @@ return types. Add forward declarations. * emacsclient.c: Include and if available. Don't declare geteuid. - (print_help_and_exit): Change return type to void. Forward - declare it. + (print_help_and_exit): Change return type to void. + Forward declare it. * b2m.c: Include if available. (main): Explicitly declare return type. @@ -4026,7 +4030,7 @@ 1998-03-26 Richard Stallman - * pop.c (pop_getline): Renamed from getline. + * pop.c (pop_getline): Rename from getline. 1998-03-05 Richard Stallman @@ -4051,8 +4055,8 @@ with a '>' any lines starting with "From " read from the POP server, but leave the code in place, wrapped in #ifdef MOVEMAIL_QUOTE_POP_FROM_LINES, in case we have to restore it later - because it turns out that something is depending on it. Change - suggested by Paul Eggert . + because it turns out that something is depending on it. + Change suggested by Paul Eggert . Convert the character \037 (^_) at the beginning of a line into the character '^' followed by the character '_', because otherwise Emacs can't parse the resulting file as a valid BABYL file. @@ -4069,8 +4073,8 @@ quotes with a '>' any lines starting with "From " read from the POP server, but leave the code in place, wrapped in #ifdef MOVEMAIL_QUOTE_POP_FROM_LINES, in case we have to restore it later - because it turns out that something is depending on it. Change - suggested by Paul Eggert . + because it turns out that something is depending on it. + Change suggested by Paul Eggert . Convert the character \037 (^_) at the beginning of a line into the character '^' followed by the character '_', because otherwise @@ -4086,8 +4090,8 @@ 1997-10-31 Jonathan I. Kamens - * pop.c (fullwrite): Get rid of an extra call to write. Problem - pointed out by Chiaki Ishikawa. + * pop.c (fullwrite): Get rid of an extra call to write. + Problem pointed out by Chiaki Ishikawa. 1997-10-16 Dave Love @@ -4227,8 +4231,8 @@ (C_entries): Initialise tok.named. (sym_type, C_stab_entry, consider_token): st_C_ignore is used to get rid of "import", "package" and "friend". - (fvdef): Renamed from funcdef. Also some constants renamed. All - users changed. + (fvdef): Rename from funcdef. Also some constants renamed. + All users changed. (C_entries): Make separate tags for variables separated by comma. (globals, members): New flags. (main, C_entries): Use them. @@ -4242,7 +4246,7 @@ (consider_token, C_entries): Set the len member of token_name. (prolog_pred): Cleanup according to GNU coding standards. (Cobol_suffixes, lang_names, Cobol_paragraphs): Cobol support. - (prolog_white, erlang_white): Renamed to eat_white, callers changed. + (prolog_white, erlang_white): Rename to eat_white, callers changed. 1997-05-15 Francesco Potortì @@ -4445,7 +4449,7 @@ * etags.c (relative_filename): Bug corrected. (etags_getcwd): Avoid warning of unused variable. - (C_entries, consider_token): Added support for enum labels. + (C_entries, consider_token): Add support for enum labels. 1996-11-03 Paul Eggert @@ -4688,14 +4692,14 @@ 1996-04-29 Richard Stallman - * pop.c (SEND, RECV): Renamed from send, recv. + * pop.c (SEND, RECV): Rename from send, recv. (pop_open, pop_trash): Make the trash_started code unconditional. (socket_connection): Delete casts to void. 1996-04-28 Richard Stallman - * movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): Definitions - copied from lisp.h. + * movemail.c (DIRECTORY_SEP, IS_DIRECTORY_SEP): + Definitions copied from lisp.h. 1996-04-22 Andrew Innes @@ -4805,7 +4809,7 @@ (lang_names): Erlang entry added. (prolog_getit): Accepts headers spanning several lines. Always name tags. - (Prolog_functions): Removed incorrect compensation for + (Prolog_functions): Remove incorrect compensation for newline characters. (readline_internal): Zero-terminate last line. @@ -4870,7 +4874,7 @@ 1995-12-01 Richard Stallman - * Makefile.in (THIS_IS_MAKEFILE): Renamed from THIS_IS_YMAKEFILE. + * Makefile.in (THIS_IS_MAKEFILE): Rename from THIS_IS_YMAKEFILE. 1995-12-07 Francesco Potortì @@ -4887,11 +4891,11 @@ 1995-12-06 Francesco Potortì * etags.c (Cplusplus_suffixes): Add .M suffix for Objective C++. - (gperf): Added keywords for Objective C and GNU macros. - (sym_type): Added values to account for Objective C and GNU macros. + (gperf): Add keywords for Objective C and GNU macros. + (sym_type): Add values to account for Objective C and GNU macros. (begtk): The '@' character can start a token. (objdef, methodlen, objtag): New variables for Objective C. - (consider_token, C_entries): Added code for Objective C. + (consider_token, C_entries): Add code for Objective C. (plain_C_suffixes): Add .m and .lm for Objective C. (Yacc_suffixes): Add .ym for Objective yacc. (GROW_LINEBUFFER): New macro. @@ -4932,8 +4936,8 @@ 1995-11-06 Francesco Potortì (pot@cnuce.cnr.it) - * etags.c (get_lang_from_name, get_lang_from_interpreter, - get_lang_from_suffix): New functions. + * etags.c (get_lang_from_name, get_lang_from_interpreter) + (get_lang_from_suffix): New functions. (get_language): Function deleted. (lang_entry): Two members added to struct. (lang_names): Reflect the new layout of lang_entry. @@ -4948,12 +4952,12 @@ * etags.c (lowcase): Use the standard tolower function. (substitute): Remove some wrong and some useless code related with escape '\' character in regexp replacement string. - (TEX_defenv): Added part, appendix, entry, index. Removed typeout. + (TEX_defenv): Add part, appendix, entry, index. Remove typeout. (lang_suffixes): New suffixes: .hpp for C++; .f90 for Fortran; .bib, .ltx, .TeX for TeX (.bbl, .dtx removed); .ml for Lisp; .prolog for prolog (.pl removed). (massage_name, etags_getcwd): Use lowcase instead of tolower. - (C_entries, find_entries): Added comments about memory leakage. + (C_entries, find_entries): Add comments about memory leakage. (add_node): Dead code removed. 1995-10-29 Richard Stallman @@ -5195,7 +5199,7 @@ 1995-04-08 Richard Stallman - * Makefile.in.in (BASE_CFLAGS): Renamed from ALLOCA_CFLAGS. + * Makefile.in.in (BASE_CFLAGS): Rename from ALLOCA_CFLAGS. (alloca.o, regex.o): Use BASE_CFLAGS. 1995-04-06 Richard Stallman @@ -5205,7 +5209,7 @@ 1995-04-04 Karl Heuer * Makefile.in.in (aixcc, aixcc.c): Targets deleted. - (SOURCES, distclean): Removed obsolete references to aixcc. + (SOURCES, distclean): Remove obsolete references to aixcc. 1995-04-02 Richard Stallman @@ -5248,7 +5252,7 @@ savetok.valid. Mark token as valid when it is initialised. (make_tag): Make token only if token is valid and reset validity. (CNL_SAVE_DEFINEDEF): Test for savetok.valid instead of token_saved. - (TOKEN): Added a new member: valid. + (TOKEN): Add a new member: valid. 1995-02-15 Francesco Potortì (pot@cnuce.cnr.it) @@ -5270,12 +5274,12 @@ 1995-02-07 Richard Stallman - * Makefile.in.in (maintainer-clean): Renamed from realclean. + * Makefile.in.in (maintainer-clean): Rename from realclean. 1995-02-01 Francesco Potortì (pot@cnuce.cnr.it) * etags.c (pfnote): Initialise been_warned in the node. - (C_entries): Removed a speed hack for the sake of clarity. + (C_entries): Remove a speed hack for the sake of clarity. 1995-01-18 Francesco Potortì (pot@cnuce.cnr.it) @@ -5394,7 +5398,7 @@ (print_help): Help strings updated. Calls print_language_names. (argument_type, ARGUMENT): Typedefs for dealing with language and regex options intermixed with filenames. - (main): Changed the way of dealing with arguments on the command + (main): Change the way of dealing with arguments on the command line to deal with language and regex options intermixed with filenames. (get_language, default_C_entries, Cplusplus_entries, @@ -5483,8 +5487,8 @@ * pop.c: Don't include and . - * pop.c: Include before , rather than after. They - should be interchangeable, and indeed the inclusion is done in + * pop.c: Include before , rather than after. + They should be interchangeable, and indeed the inclusion is done in both orders in various files in the Kerberos 4 library sources, but djm@va.pubnix.com (David J. MacKenzie) reports that BSDI requires that be included first, and I don't see any harm @@ -5514,8 +5518,8 @@ 1994-10-17 Andreas Schwab - * emacsserver.c [SYSV_IPC] (main): Catch SIGHUP as well. Don't - call kill with pid 0. Handle EINTR when receiving messages. + * emacsserver.c [SYSV_IPC] (main): Catch SIGHUP as well. + Don't call kill with pid 0. Handle EINTR when receiving messages. 1994-10-17 Karl Heuer @@ -5546,7 +5550,7 @@ * Makefile.in.in (clean): rm DOC* and *.tab.[ch]. (distclean): Not here. - * Makefile.in.in (libexecdir): Renamed from libdir. + * Makefile.in.in (libexecdir): Rename from libdir. 1994-10-11 Francesco Potortì (pot@cnuce.cnr.it) @@ -5776,7 +5780,7 @@ print advice to run it, if it has anything significant to do. And only if MOVEMAIL_NEEDS_BLESSING. (blessmail): Use emacs, not temacs. - (configuration): Renamed from configname. + (configuration): Rename from configname. 1994-04-30 Morten Welinder (terra@diku.dk) @@ -5860,15 +5864,15 @@ 1994-04-08 Francesco Potortì (pot@fly.cnuce.cnr.it) - * etags.c (outf, outfiledir): Renamed to tagf, tagfiledir. + * etags.c (outf, outfiledir): Rename to tagf, tagfiledir. (PF_funcs, Asm_funcs, L_funcs, PAS_funcs, TEX_funcs) - (Scheme_funcs, prolog_funcs): Renamed to Fortran_functions, + (Scheme_funcs, prolog_funcs): Rename to Fortran_functions, Asm_labels, Lisp_functions, Pascal_functions, Scheme_functions, TeX_functions, Prolog_functions. (inf): No more a global variable. (C_entries): Take 2nd parameter `inf' instead of using the global one. - (find_entries): Added the cp1 var for optimisation. - (find_entries): Added more suffixes for assembler files. + (find_entries): Add the cp1 var for optimisation. + (find_entries): Add more suffixes for assembler files. (Asm_funcs): Now finds labels even without an ending colon. 1994-03-30 Francesco Potortì (pot@fly.cnuce.cnr.it) @@ -5896,7 +5900,7 @@ (process_file): Filenames in tags file are relative to the directory where the tags file is (useful with the -o option). (main): Initialise the outfiledir var. - (TYPEDST): Added the `tignore' value. + (TYPEDST): Add the `tignore' value. (C_entries): Corrected various small bugs. 1994-03-19 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -5912,7 +5916,7 @@ 1994-03-14 Francesco Potortì (pot@cnuce.cnr.it) - * etags.c (TYPEDST): Added the `tignore' value. + * etags.c (TYPEDST): Add the `tignore' value. (C_entries): Corrected various bugs, now correctly parses the `extern "C" {' construction (patch by Tom R.Hageman). @@ -5966,7 +5970,7 @@ 1994-02-14 Francesco Potortì (pot@fly) - * etags.c (absolute_pathnames, cwd): Added global vars. + * etags.c (absolute_pathnames, cwd): Add global vars. (longopts, print_help, main, process_file): Put absolute filenames in the tag file if the -A --absolute-pathnames option is used. (print_help): Alphabetically order the options. @@ -6003,7 +6007,7 @@ Use gperf generated hash table instead of linked list. (C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): Added. Mostly code generated by gperf. - (consider_token): Removed unused parameter `lp'. + (consider_token): Remove unused parameter `lp'. (PF_funcs, getit): Allow subroutine and similar declarations to span multiple lines. (C_entries): Check for newline if inchar to avoid bus errors. @@ -6150,7 +6154,7 @@ 1993-11-02 Francesco Potortì (pot@cnuce.cnr.it) - * etags.c (consider_token): Removed unused variable firsttok. + * etags.c (consider_token): Remove unused variable firsttok. (prolog_getit): Call pfnote with the right number of arguments. 1993-10-19 Paul Eggert (eggert@twinsun.com) @@ -6180,13 +6184,13 @@ from current directory. Only chmod and chgrp files that we installed, which excludes ${INSTALLABLE_SCRIPTS}. They go in ${bindir}. - (INSTALLFLAGS): Deleted definition, since it is an unused variable + (INSTALLFLAGS): Delete definition, since it is an unused variable now. 1993-09-27 Brian J. Fox (bfox@ai.mit.edu) - * Makefile.in (INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Let - configure figure out the correct values for these variables. + * Makefile.in (INSTALL, INSTALL_PROGRAM, INSTALL_DATA): + Let configure figure out the correct values for these variables. 1993-09-14 Brian J. Fox (bfox@ai.mit.edu) @@ -6271,7 +6275,7 @@ 1993-07-30 Francesco Potortì (pot@cnuce.cnr.it) - * etags.c (FINCST): Added the fignore status. Means we are + * etags.c (FINCST): Add the fignore status. Means we are after the parameter list and before the open curly brace. Allows correct parsing of C++ constructors. (C_entries, consider_token): Make use of fignore. @@ -6310,7 +6314,7 @@ 1993-07-08 Francesco Potortì (pot@cnuce.cnr.it) - * etags.c (alloca): Removed all references to it. + * etags.c (alloca): Remove all references to it. (main): Now calls xnew instead of alloca for portability. (../src/config.h): Included only if HAVE_CONFIG_H. (const): Void definition removed--config.h takes care of it. @@ -6322,7 +6326,7 @@ * etags.c (LEVEL_OK_FOR_FUNCDEF): Removed. (C_entries): Optimized the test that used LEVEL_OK_FOR_FUNCDEF. - (C_entries): Removed a piece of useless code. + (C_entries): Remove a piece of useless code. (C_entries): Making typedef tags is delayed until a semicolon is met. This handles "typedef int X, Y, Z;" correctly. @@ -6584,7 +6588,7 @@ 1993-04-09 Jim Blandy (jimb@totoro.cs.oberlin.edu) - * Makefile.in (DEFS): Renamed from CONFIG_CFLAGS. + * Makefile.in (DEFS): Rename from CONFIG_CFLAGS. 1993-04-07 Jim Blandy (jimb@churchy.gnu.ai.mit.edu) @@ -6606,7 +6610,7 @@ (get_C_stab): c_ext becomes c_ext&C_PLPL. (C_entries): Logical cplpl means c_ext&C_PLPL. (C_entries): Logical yacc_rules means we are after the first %%. - (C_entries): Added logic for yacc files. + (C_entries): Add logic for yacc files. 1993-03-16 Francesco Potortì (pot@cnuce.cnr.it) @@ -6624,7 +6628,7 @@ (TOKEN): Member linestart removed. (linepos, prev_linepos, lb1): Deleted. (main): Call initbuffer on lbs array instead of lb1. - (init): Removed the initialisation of the logical _gd array. + (init): Remove the initialisation of the logical _gd array. (find_entries): A .sa suffix means assembler file. (C_create_stab): "auto", "void", "extern", "static" are st_C_typespec. All C state machines rewritten. @@ -6634,7 +6638,7 @@ 1993-03-01 Francesco Potortì (pot@fly.CNUCE.CNR.IT) - * etags.c (C_entries): Added the quotednl logical variable. + * etags.c (C_entries): Add the quotednl logical variable. Used for parsing of #define's spanning multiple lines. 1993-02-23 Francesco Potortì (pot@fly.CNUCE.CNR.IT) @@ -6644,7 +6648,7 @@ 1993-03-19 Eric S. Raymond (eric@geech.gnu.ai.mit.edu) - * Makefile.in (EXECUTABLES): Added rcs-checkin. + * Makefile.in (EXECUTABLES): Add rcs-checkin. * Makefile.in (unlock, relock): New productions. @@ -6705,7 +6709,7 @@ * Makefile.in (CFLAGS): #define HAVE_CONFIG_H, too. * Makefile.in (libdir): Default to ${prefix}/lib. - (archlibdir): Adjusted to match. + (archlibdir): Adjust to match. * Makefile.in (distclean): Don't delete backup or autosave files. (extraclean): Like realclean, but does delete backup and autosave @@ -6740,7 +6744,7 @@ 1992-11-05 Jim Blandy (jimb@totoro.cs.oberlin.edu) - * Makefile.in (getdate.o): Added explicit target for this, so we + * Makefile.in (getdate.o): Add explicit target for this, so we can indicate that it depends on ../src/config.h. 1992-11-04 Jim Blandy (jimb@totoro.cs.oberlin.edu) @@ -6808,7 +6812,7 @@ array. When an event fires, move the last event in the array into its spot. Use num_events to determine whether or not there are any pending events, not wait_for. - (getevent): Deleted unused variable `ep'. + (getevent): Delete unused variable `ep'. (sigcatch): It's now easier to find all the active events. (main): Initialize num_events. @@ -6821,7 +6825,7 @@ (process_file, find_entries, pfnote, TEX_funcs, TEX_decode_env, TEX_getit, substr): Use the etags_*index functions, rather than the native *index functions. - (rindex, index): Renamed to etags_rindex and tags_rindex, and + (rindex, index): Rename to etags_rindex and tags_rindex, and made them unconditionally defined, rather than having them depend on NEED_*INDEX. @@ -6908,7 +6912,7 @@ 1992-05-10 Roland McGrath (roland@albert.gnu.ai.mit.edu) - * etags.c (C_entries): Fixed reading of "..." strings. + * etags.c (C_entries): Fix reading of "..." strings. (consider_token): Recognize `SYSCALL' and `PSEUDO' macros, used in the C library source. @@ -6936,7 +6940,7 @@ 1992-04-17 Jim Blandy (jimb@pogo.cs.oberlin.edu) - * timer.c (getevent): Removed declaration of memcpy; since + * timer.c (getevent): Remove declaration of memcpy; since different systems have different return types, and we're not even using the return type anyway, it wasn't doing us any good. @@ -6971,7 +6975,7 @@ 1992-04-06 Jim Blandy (jimb@pogo.cs.oberlin.edu) - * etags.c (C_entries): Removed comment saying that \" in a string + * etags.c (C_entries): Remove comment saying that \" in a string isn't recognized as magic, because it is correctly handled. * getopt.c, getopt.h: New files, from GNU C library. @@ -6981,8 +6985,8 @@ optind. (main): Argument processing loop rewritten to call getopt to get next option. Options which take parameters (-o and -i) rewritten - to get parameter from optarg instead of argv[1]. Filename - preprocessing loop and update command changed similarly. + to get parameter from optarg instead of argv[1]. + Filename preprocessing loop and update command changed similarly. * Makefile (etags, ctags): Depend on and link with getopt.h, getopt.o, and getopt1.o. (getopt.o, getopt1.o): New targets for the GNU getopt routines. @@ -7123,8 +7127,8 @@ 1991-01-25 Jim Blandy (jimb@churchy.ai.mit.edu) * make-docfile: Find the arguments to a C function correctly, - by not ignoring the character that read_c_string returns. Don't - even try to find argument names for functions that take MANY + by not ignoring the character that read_c_string returns. + Don't even try to find argument names for functions that take MANY or UNEVALLED arguments, since they're a figment of the docstring's imagination. @@ -7512,8 +7516,8 @@ 1988-05-13 Chris Hanson (cph@kleph) - * emacsclient.c: Delete references to unused variable `out'. This - caused a bus error when used under hp-ux. + * emacsclient.c: Delete references to unused variable `out'. + This caused a bus error when used under hp-ux. 1988-05-06 Richard Stallman (rms@frosted-flakes.ai.mit.edu) === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2011-02-05 07:18:46 +0000 +++ lib-src/emacsclient.c 2011-02-18 22:28:09 +0000 @@ -1708,10 +1708,21 @@ fsync (1); /* Now, wait for an answer and print any messages. */ - while (exit_status == EXIT_SUCCESS - && (rl = recv (emacs_socket, string, BUFSIZ, 0)) > 0) + while (exit_status == EXIT_SUCCESS) { char *p; + do + { + errno = 0; + rl = recv (emacs_socket, string, BUFSIZ, 0); + } + /* If we receive a signal (e.g. SIGWINCH, which we pass + through to Emacs), on some OSes we get EINTR and must retry. */ + while (rl < 0 && errno == EINTR); + + if (rl <= 0) + break; + string[rl] = '\0'; p = string + strlen (string) - 1; ------------------------------------------------------------ revno: 103340 author: Lawrence Mitchell committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-02-18 16:46:08 -0500 message: * lisp/progmodes/sh-script.el (sh-syntax-propertize-here-doc): Bind case-fold-search to nil when looking for end of here-doc. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 17:59:06 +0000 +++ lisp/ChangeLog 2011-02-18 21:46:08 +0000 @@ -1,7 +1,12 @@ +2011-02-18 Lawrence Mitchell + + * progmodes/sh-script.el (sh-syntax-propertize-here-doc): (bug#8053) + Bind case-fold-search to nil when looking for end of here-doc. + 2011-02-18 Eli Zaretskii - * image-mode.el (image-toggle-display-image): Set - find-file-literally non-nil in buffers visiting binary image + * image-mode.el (image-toggle-display-image): + Set find-file-literally non-nil in buffers visiting binary image files. (Bug#8047) 2011-02-18 Stefan Monnier @@ -111,8 +116,8 @@ allout-abbreviate-flattened-numbering. (allout-mode-p): Include among autoloads, for use by other modes with impunity. - (allout-listify-exposed): Use - allout-flattened-numbering-abbreviation. + (allout-listify-exposed): + Use allout-flattened-numbering-abbreviation. (allout-encrypt-string): Use set-buffer-multibyte directly. (allout-set-buffer-multibyte): Remove. @@ -189,8 +194,8 @@ * vc/vc-bzr.el (vc-bzr-log-view-mode): Truncate lines in root log. - * vc/log-view.el (log-view-mode-menu): Add - log-view-toggle-entry-display. + * vc/log-view.el (log-view-mode-menu): + Add log-view-toggle-entry-display. 2011-02-14 Glenn Morris @@ -215,8 +220,8 @@ * progmodes/cc-fonts.el (c-font-lock-declarations): Remove a narrow-to-region call that cuts context off the end (Bug#7722). - * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Refactor - nested if-forms with a simple cond. + * progmodes/cc-engine.el (c-forward-<>-arglist-recur): + Refactor nested if-forms with a simple cond. (c-forward-<>-arglist): Revert 2011-01-31 change. 2011-02-13 Chong Yidong === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-02-09 18:59:55 +0000 +++ lisp/progmodes/sh-script.el 2011-02-18 21:46:08 +0000 @@ -969,7 +969,8 @@ (defun sh-syntax-propertize-here-doc (end) (let ((ppss (syntax-ppss))) (when (eq t (nth 3 ppss)) - (let ((key (get-text-property (nth 8 ppss) 'sh-here-doc-marker))) + (let ((key (get-text-property (nth 8 ppss) 'sh-here-doc-marker)) + (case-fold-search nil)) (when (re-search-forward (concat "^\\([ \t]*\\)" (regexp-quote key) "\\(\n\\)") end 'move) ------------------------------------------------------------ revno: 103339 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-02-18 19:59:06 +0200 message: Fix bug #8047 with require-final-newline in binary image buffers. image-mode.el (image-toggle-display-image): Set find-file-literally non-nil in buffers visiting binary image files. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 17:18:16 +0000 +++ lisp/ChangeLog 2011-02-18 17:59:06 +0000 @@ -1,3 +1,9 @@ +2011-02-18 Eli Zaretskii + + * image-mode.el (image-toggle-display-image): Set + find-file-literally non-nil in buffers visiting binary image + files. (Bug#8047) + 2011-02-18 Stefan Monnier * files.el (cd): Make completion obey cd-path (bug#7924). === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2011-02-01 21:22:21 +0000 +++ lisp/image-mode.el 2011-02-18 17:59:06 +0000 @@ -505,6 +505,11 @@ ;; This just makes the arrow displayed in the right fringe ;; area look correct when the image is wider than the window. (setq truncate-lines t) + ;; Disable adding a newline at the end of the image file when it + ;; is written with, e.g., C-x C-w. + (if (coding-system-equal (coding-system-base buffer-file-coding-system) + 'no-conversion) + (set (make-local-variable 'find-file-literally) t)) ;; Allow navigation of large images (set (make-local-variable 'auto-hscroll-mode) nil) (setq image-type type) ------------------------------------------------------------ revno: 103338 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-02-18 12:37:30 -0500 message: * alloc.c (make_unibyte_string): Don't SET_UNIBYTE redundantly. * process.c (Fstart_process, Fmake_serial_process) (Fmake_network_process, server_accept_connection): Use empty_unibyte_string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-18 17:18:16 +0000 +++ src/ChangeLog 2011-02-18 17:37:30 +0000 @@ -1,5 +1,11 @@ 2011-02-18 Stefan Monnier + * process.c (Fstart_process, Fmake_serial_process) + (Fmake_network_process, server_accept_connection): + Use empty_unibyte_string. + + * alloc.c (make_unibyte_string): Don't SET_UNIBYTE redundantly. + * lread.c (Qdir_ok): New constant. (syms_of_lread): Initialize it. (openp): Don't ignore directories if the predicate returns dir-ok. === modified file 'src/alloc.c' --- src/alloc.c 2011-02-18 02:07:36 +0000 +++ src/alloc.c 2011-02-18 17:37:30 +0000 @@ -2301,7 +2301,6 @@ register Lisp_Object val; val = make_uninit_string (length); memcpy (SDATA (val), contents, length); - STRING_SET_UNIBYTE (val); return val; } === modified file 'src/process.c' --- src/process.c 2011-02-16 15:02:50 +0000 +++ src/process.c 2011-02-18 17:37:30 +0000 @@ -1660,9 +1660,9 @@ } - XPROCESS (proc)->decoding_buf = make_uninit_string (0); + XPROCESS (proc)->decoding_buf = empty_unibyte_string; XPROCESS (proc)->decoding_carryover = 0; - XPROCESS (proc)->encoding_buf = make_uninit_string (0); + XPROCESS (proc)->encoding_buf = empty_unibyte_string; XPROCESS (proc)->inherit_coding_system_flag = !(NILP (buffer) || !inherit_process_coding_system); @@ -2918,9 +2918,9 @@ p->encode_coding_system = val; setup_process_coding_systems (proc); - p->decoding_buf = make_uninit_string (0); + p->decoding_buf = empty_unibyte_string; p->decoding_carryover = 0; - p->encoding_buf = make_uninit_string (0); + p->encoding_buf = empty_unibyte_string; p->inherit_coding_system_flag = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); @@ -3787,9 +3787,9 @@ } setup_process_coding_systems (proc); - p->decoding_buf = make_uninit_string (0); + p->decoding_buf = empty_unibyte_string; p->decoding_carryover = 0; - p->encoding_buf = make_uninit_string (0); + p->encoding_buf = empty_unibyte_string; p->inherit_coding_system_flag = !(!NILP (tem) || NILP (buffer) || !inherit_process_coding_system); @@ -4364,9 +4364,9 @@ p->encode_coding_system = ps->encode_coding_system; setup_process_coding_systems (proc); - p->decoding_buf = make_uninit_string (0); + p->decoding_buf = empty_unibyte_string; p->decoding_carryover = 0; - p->encoding_buf = make_uninit_string (0); + p->encoding_buf = empty_unibyte_string; p->inherit_coding_system_flag = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag); ------------------------------------------------------------ revno: 103337 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-02-18 12:18:16 -0500 message: * lisp/files.el (cd): Make completion obey cd-path. * lread.c (Qdir_ok): New constant. (syms_of_lread): Initialize it. (openp): Don't ignore directories if the predicate returns dir-ok. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 08:42:21 +0000 +++ lisp/ChangeLog 2011-02-18 17:18:16 +0000 @@ -1,3 +1,7 @@ +2011-02-18 Stefan Monnier + + * files.el (cd): Make completion obey cd-path (bug#7924). + 2011-02-18 Glenn Morris * progmodes/prolog.el: Don't require compile when compiling. === modified file 'lisp/files.el' --- lisp/files.el 2011-02-12 23:40:43 +0000 +++ lisp/files.el 2011-02-18 17:18:16 +0000 @@ -681,26 +681,37 @@ `path-separator') when resolving a relative directory name. The path separator is colon in GNU and GNU-like systems." (interactive - (list (read-directory-name "Change default directory: " - default-directory default-directory - (and (member cd-path '(nil ("./"))) - (null (getenv "CDPATH")))))) - (if (file-name-absolute-p dir) - (cd-absolute (expand-file-name dir)) - (if (null cd-path) - (let ((trypath (parse-colon-path (getenv "CDPATH")))) - (setq cd-path (or trypath (list "./"))))) - (if (not (catch 'found - (mapc - (function (lambda (x) - (let ((f (expand-file-name (concat x dir)))) - (if (file-directory-p f) - (progn - (cd-absolute f) - (throw 'found t)))))) - cd-path) - nil)) - (error "No such directory found via CDPATH environment variable")))) + (list + ;; FIXME: There's a subtle bug in the completion below. Seems linked + ;; to a fundamental difficulty of implementing `predicate' correctly. + ;; The manifestation is that TAB may list non-directories in the case where + ;; those files also correspond to valid directories (if your cd-path is (A/ + ;; B/) and you have A/a a file and B/a a directory, then both `a' and `a/' + ;; will be listed as valid completions). + ;; This is because `a' (listed because of A/a) is indeed a valid choice + ;; (which will lead to the use of B/a). + (minibuffer-with-setup-hook + (lambda () + (setq minibuffer-completion-table + (apply-partially #'locate-file-completion-table + cd-path nil)) + (setq minibuffer-completion-predicate + (lambda (dir) + (locate-file dir cd-path nil + (lambda (f) (and (file-directory-p f) 'dir-ok)))))) + (unless cd-path + (setq cd-path (or (parse-colon-path (getenv "CDPATH")) + (list "./")))) + (read-directory-name "Change default directory: " + default-directory default-directory + t)))) + (unless cd-path + (setq cd-path (or (parse-colon-path (getenv "CDPATH")) + (list "./")))) + (cd-absolute + (or (locate-file dir cd-path nil + (lambda (f) (and (file-directory-p f) 'dir-ok))) + (error "No such directory found via CDPATH environment variable")))) (defun load-file (file) "Load the Lisp file named FILE." @@ -720,9 +731,12 @@ file name when searching. If SUFFIXES is nil, it is equivalent to '(\"\"). Use '(\"/\") to disable PATH search, but still try the suffixes in SUFFIXES. If non-nil, PREDICATE is used instead of `file-readable-p'. + +This function will normally skip directories, so if you want it to find +directories, make sure the PREDICATE function returns `dir-ok' for them. + PREDICATE can also be an integer to pass to the `access' system call, in which case file-name handlers are ignored. This usage is deprecated. - For compatibility, PREDICATE can also be one of the symbols `executable', `readable', `writable', or `exists', or a list of one or more of those symbols." === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-18 15:11:10 +0000 +++ src/ChangeLog 2011-02-18 17:18:16 +0000 @@ -1,3 +1,9 @@ +2011-02-18 Stefan Monnier + + * lread.c (Qdir_ok): New constant. + (syms_of_lread): Initialize it. + (openp): Don't ignore directories if the predicate returns dir-ok. + 2011-02-18 Eli Zaretskii * xdisp.c (display_line): Fix the change made for bug#7939. === modified file 'src/lread.c' --- src/lread.c 2011-02-16 15:02:50 +0000 +++ src/lread.c 2011-02-18 17:18:16 +0000 @@ -1250,7 +1250,9 @@ file name when searching. If non-nil, PREDICATE is used instead of `file-readable-p'. PREDICATE can also be an integer to pass to the access(2) function, -in which case file-name-handlers are ignored. */) +in which case file-name-handlers are ignored. +This function will normally skip directories, so if you want it to find +directories, make sure the PREDICATE function returns `dir-ok' for them. */) (Lisp_Object filename, Lisp_Object path, Lisp_Object suffixes, Lisp_Object predicate) { Lisp_Object file; @@ -1260,6 +1262,7 @@ return file; } +static Lisp_Object Qdir_ok; /* Search for a file whose name is STR, looking in directories in the Lisp list PATH, and trying suffixes from SUFFIX. @@ -1377,9 +1380,12 @@ if (NILP (predicate)) exists = !NILP (Ffile_readable_p (string)); else - exists = !NILP (call1 (predicate, string)); - if (exists && !NILP (Ffile_directory_p (string))) - exists = 0; + { + Lisp_Object tmp = call1 (predicate, string); + exists = !NILP (tmp) + && (EQ (tmp, Qdir_ok) + || !NILP (Ffile_directory_p (string))); + } if (exists) { @@ -4377,6 +4383,9 @@ Qfile_truename = intern_c_string ("file-truename"); staticpro (&Qfile_truename) ; + Qdir_ok = intern_c_string ("dir-ok"); + staticpro (&Qdir_ok); + Qdo_after_load_evaluation = intern_c_string ("do-after-load-evaluation"); staticpro (&Qdo_after_load_evaluation) ; ------------------------------------------------------------ revno: 103336 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-02-18 17:11:10 +0200 message: xdisp.c (display_line): Fix the change made for bug#7939. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-18 14:48:28 +0000 +++ src/ChangeLog 2011-02-18 15:11:10 +0000 @@ -1,5 +1,7 @@ 2011-02-18 Eli Zaretskii + * xdisp.c (display_line): Fix the change made for bug#7939. + * terminal.c (create_terminal): Use default-keyboard-coding-system and default-terminal-coding-system to initialize coding systems of the new terminal. (Bug#7840) === modified file 'src/xdisp.c' --- src/xdisp.c 2011-02-16 18:39:46 +0000 +++ src/xdisp.c 2011-02-18 15:11:10 +0000 @@ -17294,7 +17294,7 @@ if the first glyph is partially visible or if we hit a line end. */ if (it->current_x < it->first_visible_x) { - SET_TEXT_POS (this_line_min_pos, ZV + 1, ZV_BYTE + 1); + this_line_min_pos = row->start.pos; move_it_in_display_line_to (it, ZV, it->first_visible_x, MOVE_TO_POS | MOVE_TO_X); /* Record the smallest positions seen while we moved over ------------------------------------------------------------ revno: 103335 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2011-02-18 16:48:28 +0200 message: Fix bug #7840 with default terminal and keyboard encodings. terminal.c (create_terminal): Use default-keyboard-coding-system and default-terminal-coding-system to initialize coding systems of the new terminal. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-18 02:07:36 +0000 +++ src/ChangeLog 2011-02-18 14:48:28 +0000 @@ -1,3 +1,9 @@ +2011-02-18 Eli Zaretskii + + * terminal.c (create_terminal): Use default-keyboard-coding-system + and default-terminal-coding-system to initialize coding systems of + the new terminal. (Bug#7840) + 2011-02-18 Stefan Monnier * lisp.h (BYTE_MARK_STACK): New macro. === modified file 'src/terminal.c' --- src/terminal.c 2011-02-13 00:16:28 +0000 +++ src/terminal.c 2011-02-18 14:48:28 +0000 @@ -223,6 +223,7 @@ create_terminal (void) { struct terminal *terminal = allocate_terminal (); + Lisp_Object terminal_coding, keyboard_coding; terminal->name = NULL; terminal->next_terminal = terminal_list; @@ -235,8 +236,24 @@ terminal->terminal_coding = (struct coding_system *) xmalloc (sizeof (struct coding_system)); - setup_coding_system (Qno_conversion, terminal->keyboard_coding); - setup_coding_system (Qundecided, terminal->terminal_coding); + /* If default coding systems for the terminal and the keyboard are + already defined, use them in preference to the defaults. This is + needed when Emacs runs in daemon mode. */ + keyboard_coding = + find_symbol_value (intern ("default-keyboard-coding-system")); + if (NILP (keyboard_coding) + || EQ (keyboard_coding, Qunbound) + || NILP (Fcoding_system_p (keyboard_coding))) + keyboard_coding = Qno_conversion; + terminal_coding = + find_symbol_value (intern ("default-terminal-coding-system")); + if (NILP (terminal_coding) + || EQ (terminal_coding, Qunbound) + || NILP (Fcoding_system_p (terminal_coding))) + terminal_coding = Qundecided; + + setup_coding_system (keyboard_coding, terminal->keyboard_coding); + setup_coding_system (terminal_coding, terminal->terminal_coding); terminal->param_alist = Qnil; return terminal; ------------------------------------------------------------ revno: 103334 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 00:42:21 -0800 message: Silence prolog.el compilation. * lisp/progmodes/prolog.el: Don't require compile when compiling. -- not using any macros from it, it's just a cheap way to silence the compiler that actually produces one warning. (compilation-shell-minor-mode, compilation-error-regexp-alist) (compilation-forget-errors, compilation-fake-loc) (compilation-parse-errors-function, compilation-error-list): Declare. (prolog-inferior-mode): Require 'compile. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 08:17:20 +0000 +++ lisp/ChangeLog 2011-02-18 08:42:21 +0000 @@ -1,5 +1,11 @@ 2011-02-18 Glenn Morris + * progmodes/prolog.el: Don't require compile when compiling. + (compilation-shell-minor-mode, compilation-error-regexp-alist) + (compilation-forget-errors, compilation-fake-loc) + (compilation-parse-errors-function, compilation-error-list): Declare. + (prolog-inferior-mode): Require 'compile. + * emulation/cua-base.el (pc-selection-mode): Declare. * emacs-lisp/eieio-custom.el: Set generated-autoload-file. === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2011-02-17 05:16:12 +0000 +++ lisp/progmodes/prolog.el 2011-02-18 08:42:21 +0000 @@ -280,7 +280,6 @@ ;;; Code: (eval-when-compile - (require 'compile) (require 'font-lock) ;; We need imenu everywhere because of the predicate index! (require 'imenu) @@ -1126,6 +1125,8 @@ (comint-send-string proc (string last-command-event)) (call-interactively 'self-insert-command)))) +(declare-function 'compilation-shell-minor-mode "compile" (&optional arg)) +(defvar compilation-error-regexp-alist) (define-derived-mode prolog-inferior-mode comint-mode "Inferior Prolog" "Major mode for interacting with an inferior Prolog process. @@ -1156,6 +1157,7 @@ To find out what version of Prolog mode you are running, enter `\\[prolog-mode-version]'." + (require 'compile) (setq comint-input-filter 'prolog-input-filter) (setq mode-line-process '(": %s")) (prolog-mode-variables) @@ -1279,6 +1281,10 @@ ;; Old consulting and compiling functions ;;------------------------------------------------------------ +(declare-function compilation-forget-errors "compile" ()) +(declare-function compilation-fake-loc "compile" + (marker file &optional line col)) + (defun prolog-old-process-region (compilep start end) "Process the region limited by START and END positions. If COMPILEP is non-nil then use compilation, otherwise consulting." @@ -1480,6 +1486,8 @@ (defvar prolog-consult-compile-real-file nil "The file name of the buffer to compile/consult.") +(defvar compilation-parse-errors-function) + (defun prolog-consult-compile (compilep file &optional first-line) "Consult/compile FILE. If COMPILEP is non-nil, perform compilation, otherwise perform CONSULTING. @@ -1541,6 +1549,8 @@ "\nConsulted.\n")) (set-process-filter process old-filter)))) +(defvar compilation-error-list) + (defun prolog-parse-sicstus-compilation-errors (limit) "Parse the prolog compilation buffer for errors. Argument LIMIT is a buffer position limiting searching. ------------------------------------------------------------ revno: 103333 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 00:17:20 -0800 message: * lisp/emulation/cua-base.el (pc-selection-mode): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 08:00:08 +0000 +++ lisp/ChangeLog 2011-02-18 08:17:20 +0000 @@ -1,5 +1,7 @@ 2011-02-18 Glenn Morris + * emulation/cua-base.el (pc-selection-mode): Declare. + * emacs-lisp/eieio-custom.el: Set generated-autoload-file. (customize-object): Add autoload cookie. * emacs-lisp/eieio-opt.el: Set generated-autoload-file. === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2011-02-12 23:40:43 +0000 +++ lisp/emulation/cua-base.el 2011-02-18 08:17:20 +0000 @@ -1518,6 +1518,9 @@ c-beginning-of-statement c-end-of-statement)) (put cmd 'CUA 'move)) +;; Only called if pc-selection-mode is t, which means pc-select is loaded. +(declare-function pc-selection-mode "pc-select" (&optional arg)) + ;; State prior to enabling cua-mode ;; Value is a list with the following elements: ;; transient-mark-mode ------------------------------------------------------------ revno: 103332 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-02-18 00:00:08 -0800 message: Use generated-autoload-file for internal eieio autoloads. * lisp/emacs-lisp/eieio-custom.el: Set generated-autoload-file. (customize-object): Add autoload cookie. * lisp/emacs-lisp/eieio-opt.el: Set generated-autoload-file. (eieio-browse, describe-class, eieio-describe-class) (eieio-describe-constructor, describe-generic, eieio-describe-generic) (eieio-help-mode-augmentation-maybee): Add autoload cookies. * lisp/emacs-lisp/eieio.el: Regenerate with automatic autoloads. * lisp/Makefile.in (autoloads): Make eieio.el writable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 07:48:40 +0000 +++ lisp/ChangeLog 2011-02-18 08:00:08 +0000 @@ -1,5 +1,14 @@ 2011-02-18 Glenn Morris + * emacs-lisp/eieio-custom.el: Set generated-autoload-file. + (customize-object): Add autoload cookie. + * emacs-lisp/eieio-opt.el: Set generated-autoload-file. + (eieio-browse, describe-class, eieio-describe-class) + (eieio-describe-constructor, describe-generic, eieio-describe-generic) + (eieio-help-mode-augmentation-maybee): Add autoload cookies. + * emacs-lisp/eieio.el: Regenerate with automatic autoloads. + * Makefile.in (autoloads): Make eieio.el writable. + * dired-x.el (dired-clean-up-after-deletion, dired-do-relsymlink) (dired-do-relsymlink-regexp, dired-find-buffer-nocreate): Use #'. (dired-hack-local-variables): Use inhibit-read-only. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2011-02-13 12:25:45 +0000 +++ lisp/Makefile.in 2011-02-18 08:00:08 +0000 @@ -147,7 +147,8 @@ autoloads: $(LOADDEFS) doit chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \ $(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \ - $(lisp)/dired.el $(lisp)/ibuffer.el $(lisp)/htmlfontify.el + $(lisp)/dired.el $(lisp)/ibuffer.el $(lisp)/htmlfontify.el \ + $(lisp)/emacs-lisp/eieio.el cd $(lisp); $(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins === modified file 'lisp/emacs-lisp/eieio-custom.el' --- lisp/emacs-lisp/eieio-custom.el 2011-01-26 08:36:39 +0000 +++ lisp/emacs-lisp/eieio-custom.el 2011-02-18 08:00:08 +0000 @@ -326,6 +326,7 @@ Argument OBJ is the object that has been customized." nil) +;;;###autoload (defun customize-object (obj &optional group) "Customize OBJ in a custom buffer. Optional argument GROUP is the sub-group of slots to display." @@ -460,4 +461,8 @@ (provide 'eieio-custom) +;; Local variables: +;; generated-autoload-file: "eieio.el" +;; End: + ;;; eieio-custom.el ends here === modified file 'lisp/emacs-lisp/eieio-opt.el' --- lisp/emacs-lisp/eieio-opt.el 2011-01-26 08:36:39 +0000 +++ lisp/emacs-lisp/eieio-opt.el 2011-02-18 08:00:08 +0000 @@ -32,6 +32,7 @@ (require 'eieio) ;;; Code: +;;;###autoload (defun eieio-browse (&optional root-class) "Create an object browser window to show all objects. If optional ROOT-CLASS, then start with that, otherwise start with @@ -71,8 +72,10 @@ ;;; CLASS COMPLETION / DOCUMENTATION +;;;###autoload (defalias 'describe-class 'eieio-describe-class) +;;;###autoload (defun eieio-describe-class (class &optional headerfcn) "Describe a CLASS defined by a string or symbol. If CLASS is actually an object, then also display current values of that object. @@ -238,6 +241,7 @@ prot (cdr prot) i (1+ i))))) +;;;###autoload (defun eieio-describe-constructor (fcn) "Describe the constructor function FCN. Uses `eieio-describe-class' to describe the class being constructed." @@ -301,9 +305,11 @@ ;;; METHOD COMPLETION / DOC (defalias 'describe-method 'eieio-describe-generic) +;;;###autoload (defalias 'describe-generic 'eieio-describe-generic) (defalias 'eieio-describe-method 'eieio-describe-generic) +;;;###autoload (defun eieio-describe-generic (generic) "Describe the generic function GENERIC. Also extracts information about all methods specific to this generic." @@ -550,6 +556,7 @@ ;;; HELP AUGMENTATION ;; +;;;###autoload (defun eieio-help-mode-augmentation-maybee (&rest unused) "For buffers thrown into help mode, augment for EIEIO. Arguments UNUSED are not used." @@ -693,4 +700,8 @@ (provide 'eieio-opt) +;; Local variables: +;; generated-autoload-file: "eieio.el" +;; End: + ;;; eieio-opt.el ends here === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2011-01-25 04:08:28 +0000 +++ lisp/emacs-lisp/eieio.el 2011-02-18 08:00:08 +0000 @@ -2943,15 +2943,65 @@ ;;; Autoloading some external symbols, and hooking into the help system ;; -(autoload 'eieio-help-mode-augmentation-maybee "eieio-opt" "For buffers thrown into help mode, augment for EIEIO.") -(autoload 'eieio-browse "eieio-opt" "Create an object browser window." t) -(autoload 'eieio-describe-class "eieio-opt" "Describe CLASS defined by a string or symbol" t) -(autoload 'eieio-describe-constructor "eieio-opt" "Describe the constructor function FCN." t) -(autoload 'describe-class "eieio-opt" "Describe CLASS defined by a string or symbol." t) -(autoload 'eieio-describe-generic "eieio-opt" "Describe GENERIC defined by a string or symbol." t) -(autoload 'describe-generic "eieio-opt" "Describe GENERIC defined by a string or symbol." t) - -(autoload 'customize-object "eieio-custom" "Create a custom buffer editing OBJ.") + +;;; Start of automatically extracted autoloads. + +;;;### (autoloads (customize-object) "eieio-custom" "eieio-custom.el" +;;;;;; "cf1bd64c76a6e6406545e8c5a5530d43") +;;; Generated autoloads from eieio-custom.el + +(autoload 'customize-object "eieio-custom" "\ +Customize OBJ in a custom buffer. +Optional argument GROUP is the sub-group of slots to display. + +\(fn OBJ &optional GROUP)" nil nil) + +;;;*** + +;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic +;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse) +;;;;;; "eieio-opt" "eieio-opt.el" "1bed0a56310f402683419139ebc18d7f") +;;; Generated autoloads from eieio-opt.el + +(autoload 'eieio-browse "eieio-opt" "\ +Create an object browser window to show all objects. +If optional ROOT-CLASS, then start with that, otherwise start with +variable `eieio-default-superclass'. + +\(fn &optional ROOT-CLASS)" t nil) + +(defalias 'describe-class 'eieio-describe-class) + +(autoload 'eieio-describe-class "eieio-opt" "\ +Describe a CLASS defined by a string or symbol. +If CLASS is actually an object, then also display current values of that object. +Optional HEADERFCN should be called to insert a few bits of info first. + +\(fn CLASS &optional HEADERFCN)" t nil) + +(autoload 'eieio-describe-constructor "eieio-opt" "\ +Describe the constructor function FCN. +Uses `eieio-describe-class' to describe the class being constructed. + +\(fn FCN)" t nil) + +(defalias 'describe-generic 'eieio-describe-generic) + +(autoload 'eieio-describe-generic "eieio-opt" "\ +Describe the generic function GENERIC. +Also extracts information about all methods specific to this generic. + +\(fn GENERIC)" t nil) + +(autoload 'eieio-help-mode-augmentation-maybee "eieio-opt" "\ +For buffers thrown into help mode, augment for EIEIO. +Arguments UNUSED are not used. + +\(fn &rest UNUSED)" nil nil) + +;;;*** + +;;; End of automatically extracted autoloads. (provide 'eieio) ------------------------------------------------------------ revno: 103331 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-02-17 23:54:28 -0800 message: * doc/misc/dired-x.texi (Optional Installation File At Point): Simplify. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-17 23:46:18 +0000 +++ doc/misc/ChangeLog 2011-02-18 07:54:28 +0000 @@ -1,3 +1,7 @@ +2011-02-18 Glenn Morris + + * dired-x.texi (Optional Installation File At Point): Simplify. + 2011-02-17 Teodor Zlatanov * auth.texi (Help for users): Use :port instead of :protocol for all === modified file 'doc/misc/dired-x.texi' --- doc/misc/dired-x.texi 2011-02-16 08:46:13 +0000 +++ doc/misc/dired-x.texi 2011-02-18 07:54:28 +0000 @@ -264,22 +264,9 @@ @cindex Binding @code{dired-x-find-file} If you choose to have @file{dired-x.el} bind @code{dired-x-find-file} over @code{find-file} (@pxref{Find File At Point}), then you will need to set -@code{dired-x-hands-off-my-keys} and make a call to the function -@code{dired-x-bind-find-file} in the @code{dired-load-hook}: - -@example -(add-hook 'dired-load-hook - (lambda () - (load "dired-x") - ;; Bind dired-x-find-file. - (setq dired-x-hands-off-my-keys nil) - ;; Make sure our binding preference is invoked. - (dired-x-bind-find-file) - )) -@end example - -Alternatively, you can set the variable @emph{before} @file{dired-x.el} is -loaded +@code{dired-x-hands-off-my-keys}. To do this, either set it +@emph{before} @file{dired-x.el} is loaded, or use @kbd{M-x customize-variable}, +or call @code{dired-x-bind-find-file} after changing the value. @example (add-hook 'dired-load-hook ------------------------------------------------------------ revno: 103330 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-02-17 23:48:40 -0800 message: dired-x largely cosmetic changes. * lisp/dired-x.el (dired-clean-up-after-deletion, dired-do-relsymlink) (dired-do-relsymlink-regexp, dired-find-buffer-nocreate): Use #'. (dired-hack-local-variables): Use inhibit-read-only. (dired-guess-default): Simplify. (dired-make-relative-symlink): Use dotimes. (dired-simultaneous-find-file): Use dolist. (dired-mark-sexp): Remove unneeded `if'. Use line-end-position. (dired-x-hands-off-my-keys): Doc fix. (dired-x-bind-find-file): Doc fix. Use remapping. (after-init-hook): No need to add dired-x-bind-find-file. (dired-x-find-file, dired-x-find-file-other-window): Doc fixes. No need to call expand-file-name. (dired-filename-at-point): Remove unused locals `end', `filename'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 04:58:21 +0000 +++ lisp/ChangeLog 2011-02-18 07:48:40 +0000 @@ -1,3 +1,19 @@ +2011-02-18 Glenn Morris + + * dired-x.el (dired-clean-up-after-deletion, dired-do-relsymlink) + (dired-do-relsymlink-regexp, dired-find-buffer-nocreate): Use #'. + (dired-hack-local-variables): Use inhibit-read-only. + (dired-guess-default): Simplify. + (dired-make-relative-symlink): Use dotimes. + (dired-simultaneous-find-file): Use dolist. + (dired-mark-sexp): Remove unneeded `if'. Use line-end-position. + (dired-x-hands-off-my-keys): Doc fix. + (dired-x-bind-find-file): Doc fix. Use remapping. + (after-init-hook): No need to add dired-x-bind-find-file. + (dired-x-find-file, dired-x-find-file-other-window): Doc fixes. + No need to call expand-file-name. + (dired-filename-at-point): Remove unused locals `end', `filename'. + 2011-02-18 Stefan Monnier * emacs-lisp/pcase.el (pcase--u1): Understand non-linear patterns. === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-17 04:50:47 +0000 +++ lisp/dired-x.el 2011-02-18 07:48:40 +0000 @@ -337,7 +337,7 @@ (when dired-clean-up-buffers-too (let ((buf (get-file-buffer fn))) (and buf - (funcall (function y-or-n-p) + (funcall #'y-or-n-p (format "Kill buffer of %s, too? " (file-name-nondirectory fn))) (kill-buffer buf))) @@ -828,26 +828,25 @@ (defun dired-hack-local-variables () "Evaluate local variables in `dired-local-variables-file' for dired buffer." - (if (and dired-local-variables-file - (stringp dired-local-variables-file) - (file-exists-p dired-local-variables-file)) - (let ((opoint (point-max)) - buffer-read-only - ;; In case user has `enable-local-variables' set to nil we - ;; override it locally with dired's variable. - (enable-local-variables dired-enable-local-variables)) - ;; Insert 'em. - (save-excursion - (goto-char opoint) - (insert "\^L\n") - (insert-file-contents dired-local-variables-file)) - ;; Hack 'em. - (let ((buffer-file-name dired-local-variables-file)) - (hack-local-variables)) - ;; Make sure that the modeline shows the proper information. - (dired-sort-set-modeline) - ;; Delete this stuff: `eobp' is used to find last subdir by dired.el. - (delete-region opoint (point-max))))) + (and (stringp dired-local-variables-file) + (file-exists-p dired-local-variables-file) + (let ((opoint (point-max)) + (inhibit-read-only t) + ;; In case user has `enable-local-variables' set to nil we + ;; override it locally with dired's variable. + (enable-local-variables dired-enable-local-variables)) + ;; Insert 'em. + (save-excursion + (goto-char opoint) + (insert "\^L\n") + (insert-file-contents dired-local-variables-file)) + ;; Hack 'em. + (let ((buffer-file-name dired-local-variables-file)) + (hack-local-variables)) + ;; Make sure that the modeline shows the proper information. + (dired-sort-set-modeline) + ;; Delete this stuff: `eobp' is used to find last subdir by dired.el. + (delete-region opoint (point-max))))) (defun dired-omit-here-always () "Create `dired-local-variables-file' for omitting and reverts directory. @@ -856,14 +855,12 @@ (interactive) (if (file-exists-p dired-local-variables-file) (message "File `./%s' already exists." dired-local-variables-file) - ;; Create `dired-local-variables-file'. (with-current-buffer (get-buffer-create " *dot-dired*") (erase-buffer) (insert "Local Variables:\ndired-omit-mode: t\nEnd:\n") (write-file dired-local-variables-file) - (kill-buffer (current-buffer))) - + (kill-buffer)) ;; Run extra-hooks and revert directory. (dired-extra-startup) (dired-revert))) @@ -1134,10 +1131,9 @@ ;; Return commands or nil if flist is still non-nil. ;; Evaluate the commands in order that any logical testing will be done. - (cond ((not (cdr cmds)) - (eval (car cmds))) ; single command - (t - (mapcar (function eval) cmds))))) + (if (cdr cmds) + (mapcar #'eval cmds) + (eval (car cmds))))) ; single command (defun dired-guess-shell-command (prompt files) "Ask user with PROMPT for a shell command, guessing a default from FILES." @@ -1207,8 +1203,7 @@ ;; Find common initial file name components: (let (next) (while (and (setq next (string-match "/" file1 index)) - (setq next (1+ next)) - (< next (min len1 len2)) + (< (setq next (1+ next)) (min len1 len2)) ;; For the comparison, both substrings must end in ;; `/', so NEXT is *one plus* the result of the ;; string-match. @@ -1233,9 +1228,8 @@ (setq count (1+ count) start (1+ start))) ;; ... and prepend a "../" for each slash found: - (while (> count 0) - (setq count (1- count) - name1 (concat "../" name1))))) + (dotimes (n count) + (setq name1 (concat "../" name1))))) (make-symbolic-link (directory-file-name name1) ; must not link to foo/ ; (trailing slash!) @@ -1255,7 +1249,7 @@ For absolute symlinks, use \\[dired-do-symlink]." (interactive "P") - (dired-do-create-files 'relsymlink (function dired-make-relative-symlink) + (dired-do-create-files 'relsymlink #'dired-make-relative-symlink "RelSymLink" arg dired-keep-marker-relsymlink)) (defun dired-do-relsymlink-regexp (regexp newname &optional arg whole-name) @@ -1264,7 +1258,7 @@ for more info." (interactive (dired-mark-read-regexp "RelSymLink")) (dired-do-create-files-regexp - (function dired-make-relative-symlink) + #'dired-make-relative-symlink "RelSymLink" arg regexp newname whole-name dired-keep-marker-relsymlink)) @@ -1304,50 +1298,36 @@ To keep dired buffer displayed, type \\[split-window-vertically] first. To display just marked files, type \\[delete-other-windows] first." - (interactive "P") (dired-simultaneous-find-file (dired-get-marked-files) noselect)) (defun dired-simultaneous-find-file (file-list noselect) - "Visit all files in FILE-LIST and display them simultaneously. The current window is split across all files in FILE-LIST, as evenly as possible. Remaining lines go to the bottom-most window. The number of files that can be displayed this way is restricted by the height of the current window and the variable `window-min-height'. With non-nil NOSELECT the files are merely found but not selected." - ;; We don't make this function interactive because it is usually too clumsy ;; to specify FILE-LIST interactively unless via dired. - (let (size) - (if noselect ;; Do not select the buffer. (find-file-noselect (car file-list)) - ;; We will have to select the buffer. Calculate and check window size. (setq size (/ (window-height) (length file-list))) (or (<= window-min-height size) (error "Too many files to visit simultaneously. Try C-u prefix")) (find-file (car file-list))) - ;; Decrement. - (setq file-list (cdr file-list)) - - (while file-list - + (dolist (file (cdr file-list)) (if noselect ;; Do not select the buffer. - (find-file-noselect (car file-list)) - + (find-file-noselect file) ;; Vertically split off a window of desired size. Upper window will ;; have SIZE lines. Select lower (larger) window. We split it again. (select-window (split-window nil size)) - (find-file (car file-list))) - - ;; Decrement. - (setq file-list (cdr file-list))))) + (find-file file))))) ;;; MISCELLANEOUS COMMANDS. @@ -1431,7 +1411,7 @@ (equal dired-directory dirname)))) ;; We don't want to switch to the same buffer--- (setq buffers (delq cur-buf buffers));;need setq with delq - (or (car (sort buffers (function dired-buffer-more-recently-used-p))) + (or (car (sort buffers #'dired-buffer-more-recently-used-p)) ;; ---unless it's the only possibility: (and cur-buf-matches cur-buf))) (dired-old-find-buffer-nocreate dirname mode))) @@ -1522,65 +1502,65 @@ ;; there is no file line. Upon success, all variables are set, either ;; to nil or the appropriate value, so they need not be initialized. ;; Moves point within the current line. - (if (dired-move-to-filename) - (let (pos - (mode-len 10) ; length of mode string - ;; like in dired.el, but with subexpressions \1=inode, \2=s: - (dired-re-inode-size "\\s *\\([0-9]*\\)\\s *\\([0-9]*\\) ?")) - (beginning-of-line) - (forward-char 2) - (if (looking-at dired-re-inode-size) - (progn - (goto-char (match-end 0)) - (setq inode (string-to-number (buffer-substring (match-beginning 1) - (match-end 1))) - s (string-to-number (buffer-substring (match-beginning 2) - (match-end 2))))) - (setq inode nil - s nil)) - (setq mode (buffer-substring (point) (+ mode-len (point)))) - (forward-char mode-len) - (setq nlink (read (current-buffer))) - ;; Karsten Wenger fixed uid. - (setq uid (buffer-substring (1+ (point)) - (progn (forward-word 1) (point)))) - (re-search-forward directory-listing-before-filename-regexp) - (goto-char (match-beginning 1)) - (forward-char -1) - (setq size (string-to-number (buffer-substring (save-excursion - (backward-word 1) - (setq pos (point))) - (point)))) - (goto-char pos) - (backward-word 1) - ;; if no gid is displayed, gid will be set to uid - ;; but user will then not reference it anyway in PREDICATE. - (setq gid (buffer-substring (save-excursion - (forward-word 1) (point)) - (point)) - time (buffer-substring (match-beginning 1) - (1- (dired-move-to-filename))) - name (buffer-substring (point) - (or - (dired-move-to-end-of-filename t) - (point))) - sym (progn - (if (looking-at " -> ") - (buffer-substring - (progn (forward-char 4) (point)) - (progn (end-of-line) (point))) - ""))) - t) - nil) - (eval predicate))) + (dired-move-to-filename) + (let (pos + (mode-len 10) ; length of mode string + ;; like in dired.el, but with subexpressions \1=inode, \2=s: + (dired-re-inode-size "\\s *\\([0-9]*\\)\\s *\\([0-9]*\\) ?")) + (beginning-of-line) + (forward-char 2) + (if (looking-at dired-re-inode-size) + (progn + (goto-char (match-end 0)) + (setq inode (string-to-number + (buffer-substring (match-beginning 1) + (match-end 1))) + s (string-to-number + (buffer-substring (match-beginning 2) + (match-end 2))))) + (setq inode nil + s nil)) + (setq mode (buffer-substring (point) (+ mode-len (point)))) + (forward-char mode-len) + (setq nlink (read (current-buffer))) + ;; Karsten Wenger fixed uid. + (setq uid (buffer-substring (1+ (point)) + (progn (forward-word 1) (point)))) + (re-search-forward directory-listing-before-filename-regexp) + (goto-char (match-beginning 1)) + (forward-char -1) + (setq size (string-to-number + (buffer-substring (save-excursion + (backward-word 1) + (setq pos (point))) + (point)))) + (goto-char pos) + (backward-word 1) + ;; if no gid is displayed, gid will be set to uid + ;; but user will then not reference it anyway in PREDICATE. + (setq gid (buffer-substring (save-excursion + (forward-word 1) (point)) + (point)) + time (buffer-substring (match-beginning 1) + (1- (dired-move-to-filename))) + name (buffer-substring (point) + (or + (dired-move-to-end-of-filename t) + (point))) + sym (if (looking-at " -> ") + (buffer-substring (progn (forward-char 4) (point)) + (line-end-position)) + "")) + t) + (eval predicate))) (format "'%s file" predicate)))) ;;; FIND FILE AT POINT. (defcustom dired-x-hands-off-my-keys t - "Non-nil means don't bind `dired-x-find-file' over `find-file' on keyboard. -Similarly for `dired-x-find-file-other-window' over `find-file-other-window'. + "Non-nil means don't remap `find-file' to `dired-x-find-file'. +Similarly for `find-file-other-window' and `dired-x-find-file-other-window'. If you change this variable without using \\[customize] after `dired-x.el' is loaded then call \\[dired-x-bind-find-file]." :type 'boolean @@ -1590,62 +1570,37 @@ (dired-x-bind-find-file)) :group 'dired-x) -;; Bind `dired-x-find-file{-other-window}' over wherever -;; `find-file{-other-window}' is bound? (defun dired-x-bind-find-file () - "Bind `dired-x-find-file' in place of `find-file' \(or reverse\). + "Bind `dired-x-find-file' in place of `find-file' (or vice-versa). Similarly for `dired-x-find-file-other-window' and `find-file-other-window'. -Binding direction based on `dired-x-hands-off-my-keys'. -This function is part of `after-init-hook'." +Binding direction based on `dired-x-hands-off-my-keys'." (interactive) (if (called-interactively-p 'interactive) (setq dired-x-hands-off-my-keys (not (y-or-n-p "Bind dired-x-find-file over find-file? ")))) - (cond ((not dired-x-hands-off-my-keys) - (substitute-key-definition 'find-file - 'dired-x-find-file - (current-global-map)) - (substitute-key-definition 'find-file-other-window - 'dired-x-find-file-other-window - (current-global-map))) - (t - (substitute-key-definition 'dired-x-find-file - 'find-file - (current-global-map)) - (substitute-key-definition 'dired-x-find-file-other-window - 'find-file-other-window - (current-global-map)))) - ;; Clear mini-buffer. - (message nil)) + (define-key (current-global-map) [remap find-file] + (if (not dired-x-hands-off-my-keys) 'dired-x-find-file)) + (define-key (current-global-map) [remap find-file-other-window] + (if (not dired-x-hands-off-my-keys) 'dired-x-find-file-other-window))) -;; Now call it so binding is correct and put on `after-init-hook' in case -;; user changes binding. +;; Now call it so binding is correct. This could go in the :initialize +;; slot, but then dired-x-bind-find-file has to be defined before the +;; defcustom, and we get free variable warnings. (dired-x-bind-find-file) -(add-hook 'after-init-hook 'dired-x-bind-find-file) (defun dired-x-find-file (filename) "Edit file FILENAME. -May create a new window, or reuse an existing one. -See the function `display-buffer'. - -Identical to `find-file' except when called interactively, with a prefix arg -\(e.g., \\[universal-argument]\), in which case it guesses filename near point. -Useful for editing file mentioned in buffer you are viewing, -or to test if that file exists. Use minibuffer after snatching filename." +Like `find-file', except that when called interactively with a +prefix argument, it offers the filename near point as a default." (interactive (list (dired-x-read-filename-at-point "Find file: "))) - (find-file (expand-file-name filename))) + (find-file filename)) (defun dired-x-find-file-other-window (filename) "Edit file FILENAME, in another window. -May create a new window, or reuse an existing one. -See the function `display-buffer'. - -Identical to `find-file-other-window' except when called interactively, with -a prefix arg \(e.g., \\[universal-argument]\), in which case it guesses filename near point. -Useful for editing file mentioned in buffer you are viewing, -or to test if that file exists. Use minibuffer after snatching filename." +Like `find-file-other-window', except that when called interactively with +a prefix argument, when it offers the filename near point as a default." (interactive (list (dired-x-read-filename-at-point "Find file: "))) - (find-file-other-window (expand-file-name filename))) + (find-file-other-window filename)) ;;; Internal functions. @@ -1653,14 +1608,14 @@ (defun dired-filename-at-point () "Return the filename closest to point, expanded. Point should be in or after a filename." - (let ((filename-chars "-.[:alnum:]_/:$+@") - start end filename prefix) - (save-excursion - ;; First see if just past a filename. - (or (eobp) ; why? - (when (looking-at "[] \t\n[{}()]") ; whitespace or some parens - (skip-chars-backward " \n\t\r({[]})") - (or (bobp) (backward-char 1)))) + (save-excursion + ;; First see if just past a filename. + (or (eobp) ; why? + (when (looking-at "[] \t\n[{}()]") ; whitespace or some parens + (skip-chars-backward " \n\t\r({[]})") + (or (bobp) (backward-char 1)))) + (let ((filename-chars "-.[:alnum:]_/:$+@") + start prefix) (if (looking-at (format "[%s]" filename-chars)) (progn (skip-chars-backward filename-chars) ------------------------------------------------------------ revno: 103329 committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-02-17 23:41:43 -0800 message: Import IRIX 6.5 getloadavg fixes from gnulib. * configure, lib/getloadavg.c, m4/getloadavg.m4: Regenerate. diff: === modified file 'ChangeLog' --- ChangeLog 2011-02-16 00:33:44 +0000 +++ ChangeLog 2011-02-18 07:41:43 +0000 @@ -1,3 +1,8 @@ +2011-02-18 Paul Eggert + + Import IRIX 6.5 getloadavg fixes from gnulib. + * configure, lib/getloadavg.c, m4/getloadavg.m4: Regenerate. + 2011-02-16 Paul Eggert Import getloadavg module from gnulib. === modified file 'configure' --- configure 2011-02-16 08:39:19 +0000 +++ configure 2011-02-18 07:41:43 +0000 @@ -14475,6 +14475,8 @@ gl_save_LIBS=$LIBS +# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, +# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" if test "x$ac_cv_func_getloadavg" = xyes; then : === modified file 'lib/getloadavg.c' --- lib/getloadavg.c 2011-02-16 00:33:44 +0000 +++ lib/getloadavg.c 2011-02-18 07:41:43 +0000 @@ -508,7 +508,7 @@ elem = -1; # endif -# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) +# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) /* Solaris <= 2.6 */ /* Use libkstat because we don't have to be root. */ # define LDAV_DONE kstat_ctl_t *kc; @@ -559,6 +559,7 @@ # endif /* HAVE_LIBKSTAT */ # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC) + /* HP-UX */ /* Use pstat_getdynamic() because we don't have to be root. */ # define LDAV_DONE # undef LOAD_AVE_TYPE @@ -575,7 +576,7 @@ # endif /* hpux && HAVE_PSTAT_GETDYNAMIC */ -# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT +# if ! defined LDAV_DONE && defined HAVE_LIBPERFSTAT /* AIX */ # define LDAV_DONE # undef LOAD_AVE_TYPE /* Use perfstat_cpu_total because we don't have to be root. */ @@ -592,6 +593,7 @@ # endif # if !defined (LDAV_DONE) && (defined (__linux__) || defined (__CYGWIN__)) + /* Linux without glibc, Cygwin */ # define LDAV_DONE # undef LOAD_AVE_TYPE @@ -648,7 +650,7 @@ # endif /* __linux__ || __CYGWIN__ */ -# if !defined (LDAV_DONE) && defined (__NetBSD__) +# if !defined (LDAV_DONE) && defined (__NetBSD__) /* NetBSD < 0.9 */ # define LDAV_DONE # undef LOAD_AVE_TYPE @@ -680,7 +682,7 @@ # endif /* __NetBSD__ */ -# if !defined (LDAV_DONE) && defined (NeXT) +# if !defined (LDAV_DONE) && defined (NeXT) /* NeXTStep */ # define LDAV_DONE /* The NeXT code was adapted from iscreen 3.2. */ @@ -842,6 +844,7 @@ # endif /* OSF_MIPS */ # if !defined (LDAV_DONE) && (defined (__MSDOS__) || defined (WINDOWS32)) + /* DJGPP */ # define LDAV_DONE /* A faithful emulation is going to have to be saved for a rainy day. */ @@ -851,7 +854,7 @@ } # endif /* __MSDOS__ || WINDOWS32 */ -# if !defined (LDAV_DONE) && defined (OSF_ALPHA) +# if !defined (LDAV_DONE) && defined (OSF_ALPHA) /* OSF/1 */ # define LDAV_DONE struct tbl_loadavg load_ave; @@ -863,7 +866,7 @@ : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale)); # endif /* OSF_ALPHA */ -# if ! defined LDAV_DONE && defined __VMS +# if ! defined LDAV_DONE && defined __VMS /* VMS */ /* VMS specific code -- read from the Load Ave driver. */ LOAD_AVE_TYPE load_ave[3]; @@ -907,6 +910,7 @@ # endif /* ! defined LDAV_DONE && defined __VMS */ # if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS + /* IRIX, other old systems */ /* UNIX-specific code -- read the average from /dev/kmem. */ @@ -948,9 +952,7 @@ } # endif /* !SUNOS_5 */ # else /* sgi */ - int ldav_off; - - ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); + ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN); if (ldav_off != -1) offset = (long int) ldav_off & 0x7fffffff; # endif /* sgi */ === modified file 'm4/getloadavg.m4' --- m4/getloadavg.m4 2011-02-16 00:33:44 +0000 +++ m4/getloadavg.m4 2011-02-18 07:41:43 +0000 @@ -26,6 +26,8 @@ gl_save_LIBS=$LIBS +# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, +# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. AC_CHECK_FUNC([getloadavg], [], [gl_have_func=no ------------------------------------------------------------ revno: 103328 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-02-17 21:21:57 -0800 message: * lisp/.gitignore: Remove arch-tag. diff: === modified file 'lisp/.gitignore' --- lisp/.gitignore 2009-08-28 09:50:05 +0000 +++ lisp/.gitignore 2011-02-18 05:21:57 +0000 @@ -4,5 +4,3 @@ subdirs.el finder-inf.el cus-load.el - -# arch-tag: ab6e8f91-fb95-4efe-9c1b-68e21561e68a ------------------------------------------------------------ revno: 103327 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2011-02-17 23:58:21 -0500 message: * lisp/emacs-lisp/pcase.el (pcase--u1): Understand non-linear patterns. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-18 04:20:36 +0000 +++ lisp/ChangeLog 2011-02-18 04:58:21 +0000 @@ -1,3 +1,7 @@ +2011-02-18 Stefan Monnier + + * emacs-lisp/pcase.el (pcase--u1): Understand non-linear patterns. + 2011-02-18 Christian Ohler * emacs-lisp/ert.el (ert--setup-results-buffer) === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2011-01-25 04:08:28 +0000 +++ lisp/emacs-lisp/pcase.el 2011-02-18 04:58:21 +0000 @@ -61,6 +61,8 @@ `QPAT matches if the QPattern QPAT matches. (pred PRED) matches if PRED applied to the object returns non-nil. (guard BOOLEXP) matches if BOOLEXP evaluates to non-nil. +If a SYMBOL is used twice in the same pattern (i.e. the pattern is +\"non-linear\"), then the second occurrence is turned into an `eq'uality test. QPatterns can take the following forms: (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. @@ -457,7 +459,12 @@ (pcase--u1 matches code vars then-rest) (pcase--u else-rest)))) ((symbolp upat) - (pcase--u1 matches code (cons (cons upat sym) vars) rest)) + (if (not (assq upat vars)) + (pcase--u1 matches code (cons (cons upat sym) vars) rest) + ;; Non-linear pattern. Turn it into an `eq' test. + (pcase--u1 (cons `(match ,sym . (pred (eq ,(cdr (assq upat vars))))) + matches) + code vars rest))) ((eq (car-safe upat) '\`) (pcase--q1 sym (cadr upat) matches code vars rest)) ((eq (car-safe upat) 'or) ------------------------------------------------------------ revno: 103326 committer: Christian Ohler branch nick: trunk timestamp: Fri 2011-02-18 15:20:36 +1100 message: Fix ERT. * lisp/emacs-lisp/ert.el (ert--setup-results-buffer) (ert-results-pop-to-backtrace-for-test-at-point) (ert-results-pop-to-messages-for-test-at-point) (ert-results-pop-to-should-forms-for-test-at-point) (ert-results-pop-to-timings): Revert parts of change 103083 that were incorrect and unnecessary. This should make `make check' pass again. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-17 22:57:38 +0000 +++ lisp/ChangeLog 2011-02-18 04:20:36 +0000 @@ -1,3 +1,13 @@ +2011-02-18 Christian Ohler + + * emacs-lisp/ert.el (ert--setup-results-buffer) + (ert-results-pop-to-backtrace-for-test-at-point) + (ert-results-pop-to-messages-for-test-at-point) + (ert-results-pop-to-should-forms-for-test-at-point) + (ert-results-pop-to-timings): Revert parts of change 103083 that + were incorrect and unnecessary. This should make `make check' + pass again. + 2011-02-17 Ken Manheimer * lisp/allout-widgets.el: (allout-widgets-icons-light-subdir) === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2011-02-02 17:59:44 +0000 +++ lisp/emacs-lisp/ert.el 2011-02-18 04:20:36 +0000 @@ -1877,6 +1877,7 @@ (let ((inhibit-read-only t)) (buffer-disable-undo) (erase-buffer) + (ert-results-mode) ;; Erase buffer again in case switching out of the previous ;; mode inserted anything. (This happens e.g. when switching ;; from ert-results-mode to ert-results-mode when @@ -1895,9 +1896,8 @@ (ewoc-enter-last ewoc (make-ert--ewoc-entry :test test :hidden-p t))) (ert--results-update-ewoc-hf ert--results-ewoc ert--results-stats) - (goto-char (1- (point-max))))) - (ert-results-mode) - buffer))) + (goto-char (1- (point-max))) + buffer))))) (defvar ert--selector-history nil @@ -2343,6 +2343,7 @@ (let ((inhibit-read-only t)) (buffer-disable-undo) (erase-buffer) + (ert-simple-view-mode) ;; Use unibyte because `debugger-setup-buffer' also does so. (set-buffer-multibyte nil) (setq truncate-lines t) @@ -2351,8 +2352,7 @@ (goto-char (point-min)) (insert "Backtrace for test `") (ert-insert-test-name-button (ert-test-name test)) - (insert "':\n") - (ert-simple-view-mode))))))) + (insert "':\n"))))))) (defun ert-results-pop-to-messages-for-test-at-point () "Display the part of the *Messages* buffer generated during the test at point. @@ -2368,12 +2368,12 @@ (let ((inhibit-read-only t)) (buffer-disable-undo) (erase-buffer) + (ert-simple-view-mode) (insert (ert-test-result-messages result)) (goto-char (point-min)) (insert "Messages for test `") (ert-insert-test-name-button (ert-test-name test)) - (insert "':\n") - (ert-simple-view-mode))))) + (insert "':\n"))))) (defun ert-results-pop-to-should-forms-for-test-at-point () "Display the list of `should' forms executed during the test at point. @@ -2389,6 +2389,7 @@ (let ((inhibit-read-only t)) (buffer-disable-undo) (erase-buffer) + (ert-simple-view-mode) (if (null (ert-test-result-should-forms result)) (insert "\n(No should forms during this test.)\n") (loop for form-description in (ert-test-result-should-forms result) @@ -2406,8 +2407,7 @@ (insert (concat "(Values are shallow copies and may have " "looked different during the test if they\n" "have been modified destructively.)\n")) - (forward-line 1) - (ert-simple-view-mode))))) + (forward-line 1))))) (defun ert-results-toggle-printer-limits-for-test-at-point () "Toggle how much of the condition to print for the test at point. @@ -2442,6 +2442,7 @@ (let ((inhibit-read-only t)) (buffer-disable-undo) (erase-buffer) + (ert-simple-view-mode) (if (null data) (insert "(No data)\n") (insert (format "%-3s %8s %8s\n" "" "time" "cumul")) @@ -2454,8 +2455,7 @@ (insert "\n")))) (goto-char (point-min)) (insert "Tests by run time (seconds):\n\n") - (forward-line 1) - (ert-simple-view-mode)))) + (forward-line 1)))) ;;;###autoload (defun ert-describe-test (test-or-test-name) ------------------------------------------------------------ revno: 103325 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2011-02-17 21:07:36 -0500 message: Don't GC-scan stack data redundantly. * src/alloc.c (Fgarbage_collect): When using stack scanning, don't redundantly scan byte-code stacks, catchlist, and handlerlist. * src/bytecode.c (BYTE_MAINTAIN_TOP): New macros. (struct byte_stack): Only define `top' and `bottom' if used. (mark_byte_stack): Only define if used. (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): Nullify if BYTE_MAINTAIN_TOP is not set. (Fbyte_code): Don't set `bottom' unless BYTE_MAINTAIN_TOP is set. * src/lisp.h (BYTE_MARK_STACK): New macro. (mark_byte_stack): Only declare if BYTE_MARK_STACK is set. * src/term.c (OUTPUT_IF): Use OUTPUT. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-17 10:19:29 +0000 +++ src/ChangeLog 2011-02-18 02:07:36 +0000 @@ -1,3 +1,20 @@ +2011-02-18 Stefan Monnier + + * lisp.h (BYTE_MARK_STACK): New macro. + (mark_byte_stack): Only declare if BYTE_MARK_STACK is set. + + * bytecode.c (BYTE_MAINTAIN_TOP): New macros. + (struct byte_stack): Only define `top' and `bottom' if used. + (mark_byte_stack): Only define if used. + (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): Nullify if BYTE_MAINTAIN_TOP + is not set. + (Fbyte_code): Don't set `bottom' unless BYTE_MAINTAIN_TOP is set. + + * term.c (OUTPUT_IF): Use OUTPUT. + + * alloc.c (Fgarbage_collect): When using stack scanning, don't + redundantly scan byte-code stacks, catchlist, and handlerlist. + 2011-02-17 Jan Djärv * nsfns.m (Fx_create_frame, ns_set_name_as_filename) @@ -18,8 +35,8 @@ * xdisp.c (decode_mode_spec): Don't use MODE_LINE_BINARY_TEXT. - * fileio.c (Finsert_file_contents, Fwrite_region): Remove - references to buffer_file_type. + * fileio.c (Finsert_file_contents, Fwrite_region): + Remove references to buffer_file_type. (syms_of_fileio): Don't intern and staticpro find-buffer-file-type. @@ -112,8 +129,8 @@ (strout, print_string, temp_output_buffer_setup, print_object): Replace B_ with BVAR. * msdos.c (IT_frame_up_to_date): Replace B_ with BVAR. - * minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Replace - B_ with BVAR. + * minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): + Replace B_ with BVAR. * marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted) (set_marker_both, set_marker_restricted_both, unchain_marker): Replace B_ with BVAR. @@ -275,8 +292,8 @@ * xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font. (apply_systemfont_to_menu): Set resources *menubar*font and *popup*font. Remove defflt. - (set_frame_menubar, create_and_show_popup_menu): Call - apply_systemfont_to_menu before lw_create_widget. + (set_frame_menubar, create_and_show_popup_menu): + Call apply_systemfont_to_menu before lw_create_widget. 2011-02-14 Tom Tromey @@ -305,8 +322,8 @@ (PRINTPREPARE, PRINTFINISH, temp_output_buffer_setup) (print_object): Use B_. * font.c (font_at): Use B_. - * fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): Use - B_. + * fns.c (Fbase64_encode_region, Fbase64_decode_region, Fmd5): + Use B_. * callint.c (check_mark, Fcall_interactively): Use B_. * editfns.c (region_limit, Fmark_marker, save_excursion_save) (save_excursion_restore, Fprevious_char, Fchar_before) @@ -329,8 +346,8 @@ (Freplace_match): Use B_. * indent.c (buffer_display_table, recompute_width_table) (width_run_cache_on_off, current_column, scan_for_column) - (Findent_to, position_indentation, compute_motion, vmotion): Use - B_. + (Findent_to, position_indentation, compute_motion, vmotion): + Use B_. * casefiddle.c (casify_object, casify_region): Use B_. * casetab.c (Fcurrent_case_table, set_case_table): Use B_. * cmds.c (Fself_insert_command, internal_self_insert): Use B_. @@ -344,8 +361,8 @@ (Fdo_auto_save, Fset_buffer_auto_saved): Use B_. * minibuf.c (read_minibuf, get_minibuffer, Fread_buffer): Use B_. * marker.c (Fmarker_buffer, Fset_marker, set_marker_restricted) - (set_marker_both, set_marker_restricted_both, unchain_marker): Use - B_. + (set_marker_both, set_marker_restricted_both, unchain_marker): + Use B_. * insdel.c (check_markers, insert_char, insert_1_both) (insert_from_string_1, insert_from_gap, insert_from_buffer_1) (adjust_after_replace, replace_range, del_range_2) @@ -369,8 +386,8 @@ (make_conversion_work_buffer, decode_coding_gap) (decode_coding_object, encode_coding_object) (Fdetect_coding_region, Ffind_coding_systems_region_internal) - (Funencodable_char_position, Fcheck_coding_systems_region): Use - B_. + (Funencodable_char_position, Fcheck_coding_systems_region): + Use B_. * charset.c (Ffind_charset_region): Use B_. * window.c (window_display_table, unshow_buffer, window_loop) (window_min_size_2, set_window_buffer, Fset_window_buffer) @@ -601,8 +618,8 @@ callers changed. * editfns.c (general_insert_function): Change signature to match changes to insert functions' signatures. - * keymap.c (map_keymap_char_table_item, map_keymap_internal): Use - explicit cast when converting between void * and function pointer + * keymap.c (map_keymap_char_table_item, map_keymap_internal): + Use explicit cast when converting between void * and function pointer types, as C89 requires this. 2011-02-05 Paul Eggert @@ -722,7 +739,7 @@ 2011-02-01 Paul Eggert format-time-string now supports subsecond time stamp resolution - * editfns.c (emacs_nmemftime): Renamed from emacs_memftimeu, + * editfns.c (emacs_nmemftime): Rename from emacs_memftimeu, for consistency with its new argument and with gnulib nstrftime. All callers changed. New argument NS. (Fformat_time_string): Check that the time argument's microseconds @@ -1052,11 +1069,11 @@ (history_delete_duplicates, inhibit_x_resources) (last_nonmenu_event, load_in_progress, max_specpdl_size) (minibuffer_auto_raise, print_escape_newlines, scroll_margin) - (use_dialog_box, use_file_dialog): Remove declaration. Include - globals.h. + (use_dialog_box, use_file_dialog): Remove declaration. + Include globals.h. * keymap.h (Voverriding_local_map) - (Voverriding_local_map_menu_flag, meta_prefix_char): Remove - declaration. + (Voverriding_local_map_menu_flag, meta_prefix_char): + Remove declaration. * keyboard.h (Vdouble_click_time, Vfunction_key_map) (Vinput_method_function, Vkey_translation_map) (Vlucid_menu_bar_dirty_flag, Vthis_original_command) @@ -1074,16 +1091,16 @@ (focus_follows_mouse): Remove declaration. * fontset.h (Valternate_fontname_alist, Vfontset_alias_alist) (Vignore_relative_composition, Votf_script_alist) - (Vuse_default_ascent, Vvertical_centering_font_regexp): Remove - declaration. + (Vuse_default_ascent, Vvertical_centering_font_regexp): + Remove declaration. * font.h (Vfont_log): Remove declaration. * dosfns.h (Vdos_display_scancodes, Vdos_version) (Vdos_windows_version, dos_codepage, dos_country_code) (dos_decimal_point, dos_hyper_key, dos_keyboard_layout) - (dos_keypad_mode, dos_super_key, dos_timezone_offset): Remove - declaration. - * disptab.h (Vglyph_table, Vstandard_display_table): Remove - declaration. + (dos_keypad_mode, dos_super_key, dos_timezone_offset): + Remove declaration. + * disptab.h (Vglyph_table, Vstandard_display_table): + Remove declaration. * dispextern.h (Vface_remapping_alist, Vglyphless_char_display) (Vmouse_autoselect_window, Voverflow_newline_into_fringe) (Vshow_trailing_whitespace, Vtool_bar_button_margin) @@ -1111,10 +1128,10 @@ (Vselect_safe_coding_system_function) (Vtranslation_table_for_input, coding_system_require_warning) (eol_mnemonic_dos, eol_mnemonic_mac, eol_mnemonic_undecided) - (eol_mnemonic_unix, inherit_process_coding_system): Remove - declaration. - * charset.h (Vcharset_list, Vcurrent_iso639_language): Remove - declaration. + (eol_mnemonic_unix, inherit_process_coding_system): + Remove declaration. + * charset.h (Vcharset_list, Vcurrent_iso639_language): + Remove declaration. * character.h (Vauto_fill_chars, Vchar_direction_table) (Vchar_script_table, Vchar_width_table, Vprintable_chars) (Vscript_representative_chars, Vtranslation_table_vector) @@ -1229,8 +1246,8 @@ (w32_strict_fontnames, w32_strict_painting): Remove. (Vhourglass_delay, Vmenu_bar_mode, Vtool_bar_mode) (Vw32_recognize_altgr, Vwindow_system_version) - (w32_num_mouse_buttons, w32_use_visible_system_caret): Remove - declaration. + (w32_num_mouse_buttons, w32_use_visible_system_caret): + Remove declaration. * w32console.c (syms_of_ntterm): Update. (w32_use_full_screen_buffer): Remove. (Vtty_defined_color_alist): Remove declaration. === modified file 'src/alloc.c' --- src/alloc.c 2011-02-14 15:39:19 +0000 +++ src/alloc.c 2011-02-18 02:07:36 +0000 @@ -4842,8 +4842,6 @@ (void) { register struct specbinding *bind; - struct catchtag *catch; - struct handler *handler; char stack_top_variable; register int i; int message_p; @@ -4972,9 +4970,11 @@ for (i = 0; i < tail->nvars; i++) mark_object (tail->var[i]); } -#endif - mark_byte_stack (); + { + struct catchtag *catch; + struct handler *handler; + for (catch = catchlist; catch; catch = catch->next) { mark_object (catch->tag); @@ -4985,7 +4985,9 @@ mark_object (handler->handler); mark_object (handler->var); } + } mark_backtrace (); +#endif #ifdef HAVE_WINDOW_SYSTEM mark_fringe_data (); === modified file 'src/bytecode.c' --- src/bytecode.c 2011-02-16 15:02:50 +0000 +++ src/bytecode.c 2011-02-18 02:07:36 +0000 @@ -229,6 +229,8 @@ #define Bconstant 0300 #define CONSTANTLIM 0100 +/* Whether to maintain a `top' and `bottom' field in the stack frame. */ +#define BYTE_MAINTAIN_TOP (BYTE_CODE_SAFE || BYTE_MARK_STACK) /* Structure describing a value stack used during byte-code execution in Fbyte_code. */ @@ -241,7 +243,9 @@ /* Top and bottom of stack. The bottom points to an area of memory allocated with alloca in Fbyte_code. */ +#if BYTE_MAINTAIN_TOP Lisp_Object *top, *bottom; +#endif /* The string containing the byte-code, and its current address. Storing this here protects it from GC because mark_byte_stack @@ -268,6 +272,7 @@ /* Mark objects on byte_stack_list. Called during GC. */ +#if BYTE_MARK_STACK void mark_byte_stack (void) { @@ -292,7 +297,7 @@ mark_object (stack->constants); } } - +#endif /* Unmark objects in the stacks on byte_stack_list. Relocate program counters. Called when GC has completed. */ @@ -346,8 +351,13 @@ /* Actions that must be performed before and after calling a function that might GC. */ +#if !BYTE_MAINTAIN_TOP +#define BEFORE_POTENTIAL_GC() ((void)0) +#define AFTER_POTENTIAL_GC() ((void)0) +#else #define BEFORE_POTENTIAL_GC() stack.top = top #define AFTER_POTENTIAL_GC() stack.top = NULL +#endif /* Garbage collect if we have consed enough since the last time. We do this at every branch, to avoid loops that never GC. */ @@ -447,10 +457,13 @@ stack.byte_string = bytestr; stack.pc = stack.byte_string_start = SDATA (bytestr); stack.constants = vector; - stack.bottom = (Lisp_Object *) alloca (XFASTINT (maxdepth) + top = (Lisp_Object *) alloca (XFASTINT (maxdepth) * sizeof (Lisp_Object)); - top = stack.bottom - 1; +#if BYTE_MAINTAIN_TOP + stack.bottom = top; stack.top = NULL; +#endif + top -= 1; stack.next = byte_stack_list; byte_stack_list = &stack; === modified file 'src/lisp.h' --- src/lisp.h 2011-02-16 16:35:16 +0000 +++ src/lisp.h 2011-02-18 02:07:36 +0000 @@ -2145,6 +2145,11 @@ #define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE #endif +/* Whether we do the stack marking manually. */ +#define BYTE_MARK_STACK !(GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ + || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) + + #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS /* Do something silly with gcproN vars just so gcc shuts up. */ @@ -3253,7 +3258,9 @@ EXFUN (Fbyte_code, 3); extern void syms_of_bytecode (void); extern struct byte_stack *byte_stack_list; +#ifdef BYTE_MARK_STACK extern void mark_byte_stack (void); +#endif extern void unmark_byte_stack (void); /* Defined in macros.c */ === modified file 'src/term.c' --- src/term.c 2011-02-16 16:35:16 +0000 +++ src/term.c 2011-02-18 02:07:36 +0000 @@ -112,10 +112,7 @@ #define OUTPUT_IF(tty, a) \ do { \ if (a) \ - emacs_tputs ((tty), a, \ - (int) (FRAME_LINES (XFRAME (selected_frame)) \ - - curY (tty) ), \ - cmputc); \ + OUTPUT (tty, a); \ } while (0) #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) ------------------------------------------------------------ revno: 103324 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-02-18 01:48:21 +0000 message: auth-source.el (auth-source-search): Don't try to create credentials if the caller doesn't want that. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-18 00:41:50 +0000 +++ lisp/gnus/ChangeLog 2011-02-18 01:48:21 +0000 @@ -1,5 +1,8 @@ 2011-02-18 Lars Ingebrigtsen + * auth-source.el (auth-source-search): Don't try to create credentials + if the caller doesn't want that. + * nnimap.el (nnimap-log-command): Add a newline to the inhibited logging. (nnimap-credentials): Protect against auth-source-search returning nil. === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-17 23:48:59 +0000 +++ lisp/gnus/auth-source.el 2011-02-18 01:48:21 +0000 @@ -542,7 +542,8 @@ (push (list backend match) matches))))) ;; If we didn't find anything, then we allow the backend(s) to ;; create the entries. - (unless matches + (when (and create + (not matches)) (let ((match (apply (slot-value backend 'search-function) :backend backend ------------------------------------------------------------ revno: 103323 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-02-18 00:41:50 +0000 message: nnimap.el (nnimap-log-command): Add a newline to the inhibited logging. (nnimap-credentials): Protect against auth-source-search returning nil. (nnimap-request-list): Protect against not being able to open the server. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-17 23:48:59 +0000 +++ lisp/gnus/ChangeLog 2011-02-18 00:41:50 +0000 @@ -1,3 +1,11 @@ +2011-02-18 Lars Ingebrigtsen + + * nnimap.el (nnimap-log-command): Add a newline to the inhibited + logging. + (nnimap-credentials): Protect against auth-source-search returning nil. + (nnimap-request-list): Protect against not being able to open the + server. + 2011-02-17 Lars Ingebrigtsen * auth-source.el (auth-source-search): Do a two-phase search, one with === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-02-17 23:46:18 +0000 +++ lisp/gnus/nnimap.el 2011-02-18 00:41:50 +0000 @@ -277,15 +277,16 @@ (current-buffer))) (defun nnimap-credentials (address ports) - (let* ((found (nth 0 (auth-source-search :max 1 - :host address - :port ports - :create t))) - (user (plist-get found :user)) - (secret (plist-get found :secret)) - (secret (if (functionp secret) (funcall secret) secret))) + (let ((found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :create t)))) (if found - (list user secret) + (list (plist-get found :user) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret))) nil))) (defun nnimap-keepalive () @@ -1074,60 +1075,62 @@ (nreverse groups))) (deffoo nnimap-request-list (&optional server) - (nnimap-possibly-change-group nil server) - (with-current-buffer nntp-server-buffer - (erase-buffer) - (let ((groups - (with-current-buffer (nnimap-buffer) - (nnimap-get-groups))) - sequences responses) - (when groups - (with-current-buffer (nnimap-buffer) - (setf (nnimap-group nnimap-object) nil) - (dolist (group groups) - (setf (nnimap-examined nnimap-object) group) - (push (list (nnimap-send-command "EXAMINE %S" (utf7-encode group t)) - group) - sequences)) - (nnimap-wait-for-response (caar sequences)) - (setq responses - (nnimap-get-responses (mapcar #'car sequences)))) - (dolist (response responses) - (let* ((sequence (car response)) - (response (cadr response)) - (group (cadr (assoc sequence sequences)))) - (when (and group - (equal (caar response) "OK")) - (let ((uidnext (nnimap-find-parameter "UIDNEXT" response)) - highest exists) - (dolist (elem response) - (when (equal (cadr elem) "EXISTS") - (setq exists (string-to-number (car elem))))) - (when uidnext - (setq highest (1- (string-to-number (car uidnext))))) - (cond - ((null highest) - (insert (format "%S 0 1 y\n" (utf7-decode group t)))) - ((zerop exists) - ;; Empty group. - (insert (format "%S %d %d y\n" - (utf7-decode group t) highest (1+ highest)))) - (t - ;; Return the widest possible range. - (insert (format "%S %d 1 y\n" (utf7-decode group t) - (or highest exists))))))))) - t)))) + (when (nnimap-possibly-change-group nil server) + (with-current-buffer nntp-server-buffer + (erase-buffer) + (let ((groups + (with-current-buffer (nnimap-buffer) + (nnimap-get-groups))) + sequences responses) + (when groups + (with-current-buffer (nnimap-buffer) + (setf (nnimap-group nnimap-object) nil) + (dolist (group groups) + (setf (nnimap-examined nnimap-object) group) + (push (list (nnimap-send-command "EXAMINE %S" + (utf7-encode group t)) + group) + sequences)) + (nnimap-wait-for-response (caar sequences)) + (setq responses + (nnimap-get-responses (mapcar #'car sequences)))) + (dolist (response responses) + (let* ((sequence (car response)) + (response (cadr response)) + (group (cadr (assoc sequence sequences)))) + (when (and group + (equal (caar response) "OK")) + (let ((uidnext (nnimap-find-parameter "UIDNEXT" response)) + highest exists) + (dolist (elem response) + (when (equal (cadr elem) "EXISTS") + (setq exists (string-to-number (car elem))))) + (when uidnext + (setq highest (1- (string-to-number (car uidnext))))) + (cond + ((null highest) + (insert (format "%S 0 1 y\n" (utf7-decode group t)))) + ((zerop exists) + ;; Empty group. + (insert (format "%S %d %d y\n" + (utf7-decode group t) + highest (1+ highest)))) + (t + ;; Return the widest possible range. + (insert (format "%S %d 1 y\n" (utf7-decode group t) + (or highest exists))))))))) + t))))) (deffoo nnimap-request-newgroups (date &optional server) - (nnimap-possibly-change-group nil server) - (with-current-buffer nntp-server-buffer - (erase-buffer) - (dolist (group (with-current-buffer (nnimap-buffer) - (nnimap-get-groups))) - (unless (assoc group nnimap-current-infos) - ;; Insert dummy numbers here -- they don't matter. - (insert (format "%S 0 1 y\n" group)))) - t)) + (when (nnimap-possibly-change-group nil server) + (with-current-buffer nntp-server-buffer + (erase-buffer) + (dolist (group (with-current-buffer (nnimap-buffer) + (nnimap-get-groups))) + (unless (assoc group nnimap-current-infos) + ;; Insert dummy numbers here -- they don't matter. + (insert (format "%S 0 1 y\n" group)))) + t))) (deffoo nnimap-retrieve-group-data-early (server infos) (when (nnimap-possibly-change-group nil server) @@ -1588,7 +1591,7 @@ (goto-char (point-max)) (insert (format-time-string "%H:%M:%S") " " (if nnimap-inhibit-logging - "(inhibited)" + "(inhibited)\n" command))) command) ------------------------------------------------------------ revno: 103322 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-02-17 23:48:59 +0000 message: auth-source.el (auth-source-search): Do a two-phase search, one with no :create to get the responses from all backends. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-17 23:46:18 +0000 +++ lisp/gnus/ChangeLog 2011-02-17 23:48:59 +0000 @@ -1,5 +1,8 @@ 2011-02-17 Lars Ingebrigtsen + * auth-source.el (auth-source-search): Do a two-phase search, one with + no :create to get the responses from all backends. + * nnimap.el (nnimap-open-connection-1): Delete duplicate server names when getting credentials. === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-17 23:46:18 +0000 +++ lisp/gnus/auth-source.el 2011-02-17 23:48:59 +0000 @@ -500,7 +500,7 @@ unless (memq (nth i spec) ignored-keys) collect (nth i spec))) (found (auth-source-recall spec)) - filtered-backends accessor-key found-here goal) + filtered-backends accessor-key found-here goal matches) (if (and found auth-source-do-cache) (auth-source-do-debug @@ -529,38 +529,57 @@ ;; (debug spec "filtered" filtered-backends) (setq goal max) - (dolist (backend filtered-backends) - (setq found-here (apply - (slot-value backend 'search-function) - :backend backend - :create create - :delete delete - spec)) - - ;; if max is 0, as soon as we find something, return it - (when (and (zerop max) (> 0 (length found-here))) - (return t)) - - ;; decrement the goal by the number of new results - (decf goal (length found-here)) - ;; and append the new results to the full list - (setq found (append found found-here)) - - (auth-source-do-debug - "auth-source-search: found %d results (max %d/%d) in %S matching %S" - (length found-here) max goal backend spec) - - ;; return full list if the goal is 0 or negative - (when (zerop (max 0 goal)) - (return found)) - - ;; change the :max parameter in the spec to the goal - (setq spec (plist-put spec :max goal))) - - (when (and found auth-source-do-cache) - (auth-source-remember spec found))) - - found)) + ;; First go through all the backends without :create, so we can + ;; query them all. + (let ((uspec (copy-sequence spec))) + (plist-put uspec :create nil) + (dolist (backend filtered-backends) + (let ((match (apply + (slot-value backend 'search-function) + :backend backend + uspec))) + (when match + (push (list backend match) matches))))) + ;; If we didn't find anything, then we allow the backend(s) to + ;; create the entries. + (unless matches + (let ((match (apply + (slot-value backend 'search-function) + :backend backend + :create create + :delete delete + spec))) + (when match + (push (list backend match) matches)))) + + (setq backend (caar matches) + found-here (cadar matches)) + + (block nil + ;; if max is 0, as soon as we find something, return it + (when (and (zerop max) (> 0 (length found-here))) + (return t)) + + ;; decrement the goal by the number of new results + (decf goal (length found-here)) + ;; and append the new results to the full list + (setq found (append found found-here)) + + (auth-source-do-debug + "auth-source-search: found %d results (max %d/%d) in %S matching %S" + (length found-here) max goal backend spec) + + ;; return full list if the goal is 0 or negative + (when (zerop (max 0 goal)) + (return found)) + + ;; change the :max parameter in the spec to the goal + (setq spec (plist-put spec :max goal)) + + (when (and found auth-source-do-cache) + (auth-source-remember spec found)))) + + found)) ;;; (auth-source-search :max 1) ;;; (funcall (plist-get (nth 0 (auth-source-search :max 1)) :secret)) ------------------------------------------------------------ revno: 103321 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-02-17 23:46:18 +0000 message: Merge chagnes made in Gnus trunk. auth.texi (GnuPG and EasyPG Assistant Configuration): Mention the default now is to have two files in `auth-sources'. nnimap.el (nnimap-open-connection-1): Delete duplicate server names when getting credentials. gnus-util.el (gnus-delete-duplicates): New function. nnimap.el (nnimap-credentials): Instead of picking the first port as a creation default, pass the whole port list down. It will be completed. auth-source.el (auth-source-search): Updated docs to talk about multiple creation choices. (auth-source-netrc-create): Accept a list as a value (from the search parameters) and do completion on that list. Keep a separate netrc line with the password obscured for showing the user. nnimap.el (nnimap-open-connection-1): Make the `nnimap-address' the first choice to `auth-source-search' so it will be used for entry creation instead of the server's Gnus-specific name. (nnimap-credentials): Rely on the auth-source library to select which port is actually wanted in the new netrc entry, so don't override `auth-source-creation-defaults'. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-17 12:08:48 +0000 +++ doc/misc/ChangeLog 2011-02-17 23:46:18 +0000 @@ -2,6 +2,8 @@ * auth.texi (Help for users): Use :port instead of :protocol for all auth-source docs. + (GnuPG and EasyPG Assistant Configuration): Mention the default now is + to have two files in `auth-sources'. 2011-02-16 Glenn Morris === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2011-02-17 12:08:48 +0000 +++ doc/misc/auth.texi 2011-02-17 23:46:18 +0000 @@ -262,7 +262,9 @@ @appendix GnuPG and EasyPG Assistant Configuration If you don't customize @code{auth-sources}, the auth-source library -reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. +reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. Then +it will check @code{~/.authinfo} but it's not recommended to use such +an unencrypted file. In Emacs 23 or later there is an option @code{auto-encryption-mode} to automatically decrypt @code{*.gpg} files. It is enabled by default. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-17 12:50:01 +0000 +++ lisp/gnus/ChangeLog 2011-02-17 23:46:18 +0000 @@ -1,5 +1,29 @@ +2011-02-17 Lars Ingebrigtsen + + * nnimap.el (nnimap-open-connection-1): Delete duplicate server names + when getting credentials. + + * gnus-util.el (gnus-delete-duplicates): New function. + 2011-02-17 Teodor Zlatanov + * nnimap.el (nnimap-credentials): Instead of picking the first port as + a creation default, pass the whole port list down. It will be + completed. + + * auth-source.el (auth-source-search): Updated docs to talk about + multiple creation choices. + (auth-source-netrc-create): Accept a list as a value (from the search + parameters) and do completion on that list. Keep a separate netrc line + with the password obscured for showing the user. + + * nnimap.el (nnimap-open-connection-1): Make the `nnimap-address' the + first choice to `auth-source-search' so it will be used for entry + creation instead of the server's Gnus-specific name. + (nnimap-credentials): Rely on the auth-source library to select which + port is actually wanted in the new netrc entry, so don't override + `auth-source-creation-defaults'. + * auth-source.el (auth-source-netrc-parse): Use :port instead of :protocol and accept a missing user, host, or port as a wildcard match. (auth-source-debug): Default to off. === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-17 12:50:01 +0000 +++ lisp/gnus/auth-source.el 2011-02-17 23:46:18 +0000 @@ -453,8 +453,8 @@ search to find only entries that have P set to 'pppp'.\" When multiple values are specified in the search parameter, the -first one is used for creation. So :host (X Y Z) would create a -token for host X, for instance. +user is prompted for which one. So :host (X Y Z) would ask the +user to choose between X, Y, and Z. This creation can fail if the search was not specific enough to create a new token (it's up to the backend to decide that). You @@ -851,6 +851,7 @@ (required (append base-required create-extra)) (file (oref backend source)) (add "") + (show "") ;; `valist' is an alist valist ;; `artificial' will be returned if no creation is needed @@ -858,12 +859,16 @@ ;; only for base required elements (defined as function parameters): ;; fill in the valist with whatever data we may have from the search - ;; we take the first value if it's a list, the whole value otherwise + ;; we complete the first value if it's a list and use the value otherwise (dolist (br base-required) (when (symbol-value br) - (aput 'valist br (if (listp (symbol-value br)) - (nth 0 (symbol-value br)) - (symbol-value br))))) + (let ((br-choice (cond + ;; all-accepting choice (predicate is t) + ((eq t (symbol-value br)) nil) + ;; just the value otherwise + (t (symbol-value br))))) + (when br-choice + (aput 'valist br br-choice))))) ;; for extra required elements, see if the spec includes a value for them (dolist (er create-extra) @@ -894,6 +899,8 @@ (user-value (aget valist 'user)) (host-value (aget valist 'host)) (port-value (aget valist 'port)) + ;; note this handles lists by just printing them + ;; later we allow the user to use completing-read to pick (info-so-far (concat (if user-value (format "%s@" user-value) "[USER?]") @@ -921,6 +928,16 @@ (format "Enter %s for %s%s: " r info-so-far default-string) nil nil default)) + ((listp data) + (completing-read + (format "Enter %s for %s (TAB to see the choices): " + r info-so-far) + data + nil ; no predicate + t ; require a match + ;; note the default is nil, but if the user + ;; hits RET we'll get "", which is handled OK later + nil)) (t data)))) (when data @@ -934,20 +951,25 @@ ;; when r is not an empty string... (when (and (stringp data) (< 0 (length data))) - ;; append the key (the symbol name of r) and the value in r - (setq add (concat add - (format "%s%s %S" - ;; prepend a space - (if (zerop (length add)) "" " ") - ;; remap auth-source tokens to netrc - (case r + (let ((printer (lambda (hide) + ;; append the key (the symbol name of r) + ;; and the value in r + (format "%s%s %S" + ;; prepend a space + (if (zerop (length add)) "" " ") + ;; remap auth-source tokens to netrc + (case r ('user "login") ('host "machine") ('secret "password") ('port "port") ; redundant but clearer (t (symbol-name r))) - ;; the value will be printed in %S format - data)))))) + ;; the value will be printed in %S format + (if (and hide (eq r 'secret)) + "HIDDEN_SECRET" + data))))) + (setq add (concat add (funcall printer nil))) + (setq show (concat show (funcall printer t))))))) (with-temp-buffer (when (file-exists-p file) @@ -964,7 +986,7 @@ (goto-char (point-max)) ;; ask AFTER we've successfully opened the file - (if (y-or-n-p (format "Add to file %s: line [%s]" file add)) + (if (y-or-n-p (format "Add to file %s: line [%s]" file show)) (progn (unless (bolp) (insert "\n")) === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2011-02-03 23:43:22 +0000 +++ lisp/gnus/gnus-util.el 2011-02-17 23:46:18 +0000 @@ -871,6 +871,15 @@ (when (file-exists-p file) (delete-file file))) +(defun gnus-delete-duplicates (list) + "Remove duplicate entries from LIST." + (let ((result nil)) + (while list + (unless (member (car list) result) + (push (car list) result)) + (pop list)) + (nreverse result))) + (defun gnus-delete-directory (directory) "Delete files in DIRECTORY. Subdirectories remain. If there's no subdirectory, delete DIRECTORY as well." === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-02-17 12:08:48 +0000 +++ lisp/gnus/nnimap.el 2011-02-17 23:46:18 +0000 @@ -277,8 +277,7 @@ (current-buffer))) (defun nnimap-credentials (address ports) - (let* ((auth-source-creation-defaults `((port . ,(nth 0 ports)))) - (found (nth 0 (auth-source-search :max 1 + (let* ((found (nth 0 (auth-source-search :max 1 :host address :port ports :create t))) @@ -385,9 +384,10 @@ ;; Look for the credentials based on ;; the virtual server name and the address (nnimap-credentials - (list - (nnoo-current-server 'nnimap) - nnimap-address) + (gnus-delete-duplicates + (list + nnimap-address + (nnoo-current-server 'nnimap))) ports)))) (setq nnimap-object nil) (let ((nnimap-inhibit-logging t)) ------------------------------------------------------------ revno: 103320 committer: Ken Manheimer branch nick: trunk timestamp: Thu 2011-02-17 17:57:38 -0500 message: (allout-encrypt-string): Recognize epg failure to decrypt gpg2 armored text using gpg1, and add indication the gpg version *might* be the problem in the error message. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-17 21:47:18 +0000 +++ lisp/ChangeLog 2011-02-17 22:57:38 +0000 @@ -4,6 +4,9 @@ (allout-widgets-icons-dark-subdir): Track relocations of icons * lisp/allout.el: Remove commentary about remove encryption passphrase mnemonic support and verification. + (allout-encrypt-string): (allout-encrypt-string): Recognize epg + failure to decrypt gpg2 armored text using gpg1, and indicate that + the gpg version *might* be the problem in the error message. 2011-02-17 Deniz Dogan === modified file 'lisp/allout.el' --- lisp/allout.el 2011-02-17 21:47:18 +0000 +++ lisp/allout.el 2011-02-17 22:57:38 +0000 @@ -6086,9 +6086,14 @@ (setq result-text (if decrypt - (epg-decrypt-string epg-context - (encode-coding-string massaged-text - (or encoding 'utf-8))) + (condition-case err + (epg-decrypt-string epg-context + (encode-coding-string massaged-text + (or encoding 'utf-8))) + (epg-error + (signal 'egp-error + (cons (concat (cadr err) " - gpg version problem?") + (cddr err))))) (replace-regexp-in-string "\n$" "" (epg-encrypt-string epg-context (encode-coding-string massaged-text === modified file 'lisp/dired.el' --- lisp/dired.el 2011-02-14 17:35:21 +0000 +++ lisp/dired.el 2011-02-17 22:57:38 +0000 @@ -4029,7 +4029,7 @@ ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "d35468f85920d324895b0c04bb703328") +;;;;;; "a2af6147cf06b53166d9e1a3bb200675") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ ------------------------------------------------------------ revno: 103319 committer: Ken Manheimer branch nick: trunk timestamp: Thu 2011-02-17 16:47:18 -0500 message: * lisp/allout-widgets.el: (allout-widgets-icons-light-subdir) (allout-widgets-icons-dark-subdir): Track relocations of icons * lisp/allout.el: Remove commentary about remove encryption passphrase mnemonic support and verification. * etc/images/icons/allout-widgets/dark-bg, etc/images/icons/allout-widgets/light-bg, encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}: Reorganize icon directories and files to reconcile against windows short-filename clashes. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-02-16 22:10:43 +0000 +++ etc/ChangeLog 2011-02-17 21:47:18 +0000 @@ -1,3 +1,11 @@ +2011-02-17 Ken Manheimer + + * etc/images/icons/allout-widgets/dark-bg, + etc/images/icons/allout-widgets/light-bg, + encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}: + Reorganize icon directories and files to reconcile against windows + short-filename clashes. + 2011-02-16 Ken Manheimer * etc/images/icons/allout-widgets-dark-bg, === added directory 'etc/images/icons/allout-widgets' === renamed directory 'etc/images/icons/allout-widgets-dark-bg' => 'etc/images/icons/allout-widgets/dark-bg' === renamed file 'etc/images/icons/allout-widgets-dark-bg/encrypted-locked.png' => 'etc/images/icons/allout-widgets/dark-bg/locked-encrypted.png' === renamed file 'etc/images/icons/allout-widgets-dark-bg/encrypted-locked.xpm' => 'etc/images/icons/allout-widgets/dark-bg/locked-encrypted.xpm' === renamed file 'etc/images/icons/allout-widgets-dark-bg/encrypted-unlocked.png' => 'etc/images/icons/allout-widgets/dark-bg/unlocked-encrypted.png' === renamed file 'etc/images/icons/allout-widgets-dark-bg/encrypted-unlocked.xpm' => 'etc/images/icons/allout-widgets/dark-bg/unlocked-encrypted.xpm' === renamed directory 'etc/images/icons/allout-widgets-light-bg' => 'etc/images/icons/allout-widgets/light-bg' === renamed file 'etc/images/icons/allout-widgets-light-bg/encrypted-locked.png' => 'etc/images/icons/allout-widgets/light-bg/locked-encrypted.png' === renamed file 'etc/images/icons/allout-widgets-light-bg/encrypted-locked.xpm' => 'etc/images/icons/allout-widgets/light-bg/locked-encrypted.xpm' === renamed file 'etc/images/icons/allout-widgets-light-bg/encrypted-unlocked.png' => 'etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.png' === renamed file 'etc/images/icons/allout-widgets-light-bg/encrypted-unlocked.xpm' => 'etc/images/icons/allout-widgets/light-bg/unlocked-encrypted.xpm' === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-17 11:41:49 +0000 +++ lisp/ChangeLog 2011-02-17 21:47:18 +0000 @@ -1,3 +1,10 @@ +2011-02-17 Ken Manheimer + + * lisp/allout-widgets.el: (allout-widgets-icons-light-subdir) + (allout-widgets-icons-dark-subdir): Track relocations of icons + * lisp/allout.el: Remove commentary about remove encryption + passphrase mnemonic support and verification. + 2011-02-17 Deniz Dogan * net/rcirc.el (rcirc-float-time): New function. === modified file 'lisp/allout-widgets.el' --- lisp/allout-widgets.el 2011-02-16 22:10:43 +0000 +++ lisp/allout-widgets.el 2011-02-17 21:47:18 +0000 @@ -154,12 +154,12 @@ ;; (make-variable-buffer-local 'allout-widgets-allow-unruly-edits) ;;;_ = allout-widgets-auto-activation - below, for eval-order dependencies ;;;_ = allout-widgets-icons-dark-subdir -(defcustom allout-widgets-icons-dark-subdir "icons/allout-widgets-dark-bg/" +(defcustom allout-widgets-icons-dark-subdir "icons/allout-widgets/dark-bg/" "Directory on `image-load-path' holding allout icons for dark backgrounds." :type 'string :group 'allout-widgets) ;;;_ = allout-widgets-icons-light-subdir -(defcustom allout-widgets-icons-light-subdir "icons/allout-widgets-light-bg/" +(defcustom allout-widgets-icons-light-subdir "icons/allout-widgets/light-bg/" "Directory on `image-load-path' holding allout icons for light backgrounds." :type 'string :group 'allout-widgets) @@ -1923,8 +1923,8 @@ (setq icon-state (cond (does-encrypt (if is-encrypted - 'encrypted-locked - 'encrypted-unlocked)) + 'locked-encrypted + 'unlocked-encrypted)) (expanded 'opened) (has-subitems 'closed) (t 'empty))) === modified file 'lisp/allout.el' --- lisp/allout.el 2011-02-16 21:29:32 +0000 +++ lisp/allout.el 2011-02-17 21:47:18 +0000 @@ -39,11 +39,9 @@ ;; emacs local file variables need to be enabled when the ;; file was visited -- see `enable-local-variables'.) ;; - Configurable per-file initial exposure settings -;; - Symmetric-key and key-pair topic encryption, plus symmetric passphrase -;; mnemonic support, with verification against an established passphrase -;; (using a stashed encrypted dummy string) and user-supplied hint -;; maintenance. Encryption is via the Emacs 'epg' library. See -;; allout-toggle-current-subtree-encryption docstring. +;; - Symmetric-key and key-pair topic encryption. Encryption is via the +;; Emacs 'epg' library. See allout-toggle-current-subtree-encryption +;; docstring. ;; - Automatic topic-number maintenance ;; - "Hot-spot" operation, for single-keystroke maneuvering and ;; exposure control (see the allout-mode docstring) ------------------------------------------------------------ revno: 103318 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-02-17 12:50:01 +0000 message: auth-source.el (auth-source-debug): Default to off. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-17 12:08:48 +0000 +++ lisp/gnus/ChangeLog 2011-02-17 12:50:01 +0000 @@ -2,6 +2,7 @@ * auth-source.el (auth-source-netrc-parse): Use :port instead of :protocol and accept a missing user, host, or port as a wildcard match. + (auth-source-debug): Default to off. (auth-source-netrc-search, auth-source-netrc-create) (auth-source-secrets-search, auth-source-secrets-create) === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-17 12:08:48 +0000 +++ lisp/gnus/auth-source.el 2011-02-17 12:50:01 +0000 @@ -148,7 +148,7 @@ :version "23.2" ;; No Gnus :type `boolean) -(defcustom auth-source-debug t +(defcustom auth-source-debug nil "Whether auth-source should log debug messages. If the value is nil, debug messages are not logged. ------------------------------------------------------------ revno: 103317 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-02-17 12:08:48 +0000 message: auth.texi (Help for users): Use :port instead of :protocol for all auth-source docs. auth-source.el (auth-source-netrc-parse): Use :port instead of :protocol and accept a missing user, host, or port as a wildcard match. (auth-source-netrc-search, auth-source-netrc-create) (auth-source-secrets-search, auth-source-secrets-create) (auth-source-user-or-password, auth-source-backend, auth-sources) (auth-source-backend-parse-parameters, auth-source-search): Use :port instead of :protocol. nnimap.el (nnimap-credentials): Pass a port default to `auth-source-search' in case an entry needs to be created. (nnimap-open-connection-1): Use :port instead of :protocol. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-16 08:46:13 +0000 +++ doc/misc/ChangeLog 2011-02-17 12:08:48 +0000 @@ -1,3 +1,8 @@ +2011-02-17 Teodor Zlatanov + + * auth.texi (Help for users): Use :port instead of :protocol for all + auth-source docs. + 2011-02-16 Glenn Morris * dired-x.texi: Use emacsver.texi to get Emacs version. === modified file 'doc/misc/auth.texi' --- doc/misc/auth.texi 2011-02-15 11:24:37 +0000 +++ doc/misc/auth.texi 2011-02-17 12:08:48 +0000 @@ -105,8 +105,7 @@ can also use @code{host}. The @code{port} is the connection port or protocol. It's known as -@var{:port} in @code{auth-source-search} queries. You can also use -@code{protocol}. +@var{:port} in @code{auth-source-search} queries. The @code{user} is the user name. It's known as @var{:user} in @code{auth-source-search} queries. You can also use @code{login} and @@ -155,8 +154,8 @@ and simplest configuration is: @lisp -;;; old default: required :host and :protocol, not needed anymore -(setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) +;;; old default: required :host and :port, not needed anymore +(setq auth-sources '((:source "~/.authinfo.gpg" :host t :port t))) ;;; mostly equivalent (see below about fallbacks) but shorter: (setq auth-sources '((:source "~/.authinfo.gpg"))) ;;; even shorter and the @emph{default}: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-17 05:09:02 +0000 +++ lisp/gnus/ChangeLog 2011-02-17 12:08:48 +0000 @@ -1,3 +1,18 @@ +2011-02-17 Teodor Zlatanov + + * auth-source.el (auth-source-netrc-parse): Use :port instead of + :protocol and accept a missing user, host, or port as a wildcard match. + + (auth-source-netrc-search, auth-source-netrc-create) + (auth-source-secrets-search, auth-source-secrets-create) + (auth-source-user-or-password, auth-source-backend, auth-sources) + (auth-source-backend-parse-parameters, auth-source-search): Use :port + instead of :protocol. + + * nnimap.el (nnimap-credentials): Pass a port default to + `auth-source-search' in case an entry needs to be created. + (nnimap-open-connection-1): Use :port instead of :protocol. + 2011-02-17 Katsumi Yamaoka * auth-source.el (auth-source-secrets-search): Use mm-delete-duplicates === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2011-02-17 05:09:02 +0000 +++ lisp/gnus/auth-source.el 2011-02-17 12:08:48 +0000 @@ -94,11 +94,11 @@ :type t :custom string :documentation "The backend user.") - (protocol :initarg :protocol - :initform t - :type t - :custom string - :documentation "The backend protocol.") + (port :initarg :port + :initform t + :type t + :custom string + :documentation "The backend protocol.") (create-function :initarg :create-function :initform ignore :type function @@ -213,7 +213,7 @@ :tag "Regular expression"))) (list :tag "Protocol" - (const :format "" :value :protocol) + (const :format "" :value :port) (choice :tag "Protocol" (const :tag "Any" t) @@ -266,19 +266,19 @@ msg)) -;; (auth-source-pick nil :host "any" :protocol 'imap :user "joe") -;; (auth-source-pick t :host "any" :protocol 'imap :user "joe") -;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") -;; (:source (:secrets "session") :host t :protocol t :user "joe") -;; (:source (:secrets "Login") :host t :protocol t) -;; (:source "~/.authinfo.gpg" :host t :protocol t))) +;; (auth-source-pick nil :host "any" :port 'imap :user "joe") +;; (auth-source-pick t :host "any" :port 'imap :user "joe") +;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe") +;; (:source (:secrets "session") :host t :port t :user "joe") +;; (:source (:secrets "Login") :host t :port t) +;; (:source "~/.authinfo.gpg" :host t :port t))) -;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe") -;; (:source (:secrets "session") :host t :protocol t :user "joe") -;; (:source (:secrets "Login") :host t :protocol t) +;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe") +;; (:source (:secrets "session") :host t :port t :user "joe") +;; (:source (:secrets "Login") :host t :port t) ;; )) -;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) +;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :port t))) ;; (auth-source-backend-parse "myfile.gpg") ;; (auth-source-backend-parse 'default) @@ -355,8 +355,8 @@ (defun auth-source-backend-parse-parameters (entry backend) "Fills in the extra auth-source-backend parameters of ENTRY. -Using the plist ENTRY, get the :host, :protocol, and :user search -parameters. Accepts :port as an alias to :protocol." +Using the plist ENTRY, get the :host, :port, and :user search +parameters." (let ((entry (if (stringp entry) nil entry)) @@ -365,15 +365,14 @@ (oset backend host val)) (when (setq val (plist-get entry :user)) (oset backend user val)) - ;; accept :port as an alias for :protocol - (when (setq val (or (plist-get entry :protocol) (plist-get entry :port))) - (oset backend protocol val))) + (when (setq val (plist-get entry :port)) + (oset backend port val))) backend) ;; (mapcar 'auth-source-backend-parse auth-sources) (defun* auth-source-search (&rest spec - &key type max host user protocol secret + &key type max host user port secret create delete &allow-other-keys) "Search or modify authentication backends according to SPEC. @@ -386,7 +385,7 @@ Typically the :secret property, if present, contains a password. -Common search keys are :max, :host, :protocol, and :user. In +Common search keys are :max, :host, :port, and :user. In addition, :create specifies how tokens will be or created. Finally, :type can specify which backend types you want to check. @@ -400,7 +399,7 @@ A new token will be created if no matching tokens were found. The new token will have only the keys the backend requires. For the netrc backend, for instance, that's the user, host, and -protocol keys. +port keys. Here's an example: @@ -416,11 +415,11 @@ 'netrc', maximum one result. Create a new entry if you found none. The netrc backend will - automatically require host, user, and protocol. The host will be + automatically require host, user, and port. The host will be 'mine'. We prompt for the user with default 'defaultUser' and - for the protocol without a default. We will not prompt for A, Q, + for the port without a default. We will not prompt for A, Q, or P. The resulting token will only have keys user, host, and - protocol.\" + port.\" :create '(A B C) also means to create a token if possible. @@ -445,11 +444,11 @@ or 'twosuch' in backends of type 'netrc', maximum one result. Create a new entry if you found none. The netrc backend will - automatically require host, user, and protocol. The host will be + automatically require host, user, and port. The host will be 'nonesuch' and Q will be 'qqqq'. We prompt for A with default - 'default A', for B and protocol with default nil, and for the + 'default A', for B and port with default nil, and for the user with default 'defaultUser'. We will not prompt for Q. The - resulting token will have keys user, host, protocol, A, B, and Q. + resulting token will have keys user, host, port, A, B, and Q. It will not have P with any value, even though P is used in the search to find only entries that have P set to 'pppp'.\" @@ -481,14 +480,14 @@ :user (X Y Z) means to match only users X, Y, or Z according to the match rules above. Defaults to t. -:protocol (P Q R) means to match only protocols P, Q, or R. +:port (P Q R) means to match only protocols P, Q, or R. Defaults to t. :K (V1 V2 V3) for any other key K will match values V1, V2, or V3 (note the match rules above). The return value is a list with at most :max tokens. Each token -is a plist with keys :backend :host :protocol :user, plus any other +is a plist with keys :backend :host :port :user, plus any other keys provided by the backend (notably :secret). But note the exception for :max 0, which see above. @@ -662,7 +661,7 @@ ;;; (auth-source-netrc-parse "~/.authinfo.gpg") (defun* auth-source-netrc-parse (&rest spec - &key file max host user protocol delete + &key file max host user port delete &allow-other-keys) "Parse FILE and return a list of all entries in the file. Note that the MAX parameter is used so we can exit the parse early." @@ -724,18 +723,21 @@ host (or (aget alist "machine") - (aget alist "host"))) + (aget alist "host") + t)) (auth-source-search-collection user (or (aget alist "login") (aget alist "account") - (aget alist "user"))) + (aget alist "user") + t)) (auth-source-search-collection - protocol + port (or (aget alist "port") - (aget alist "protocol")))) + (aget alist "protocol") + t))) (decf max) (push (nreverse alist) result) ;; to delete a line, we just comment it out @@ -801,7 +803,7 @@ (defun* auth-source-netrc-search (&rest spec &key backend create delete - type max host user protocol + type max host user port &allow-other-keys) "Given a property list SPEC, return search matches from the :backend. See `auth-source-search' for details on SPEC." @@ -816,7 +818,7 @@ :file (oref backend source) :host (or host t) :user (or user t) - :protocol (or protocol t))))) + :port (or port t))))) ;; if we need to create an entry AND none were found to match (when (and create @@ -840,9 +842,9 @@ (defun* auth-source-netrc-create (&rest spec &key backend - secret host user protocol create + secret host user port create &allow-other-keys) - (let* ((base-required '(host user protocol secret)) + (let* ((base-required '(host user port secret)) ;; we know (because of an assertion in auth-source-search) that the ;; :create parameter is either t or a list (which includes nil) (create-extra (if (eq t create) nil create)) @@ -881,7 +883,7 @@ ((and (not given-default) (eq r 'user)) (user-login-name)) ;; note we need this empty string - ((and (not given-default) (eq r 'protocol)) + ((and (not given-default) (eq r 'port)) "") (t given-default))) ;; the prompt's default string depends on the data so far @@ -891,20 +893,20 @@ ;; the prompt should also show what's entered so far (user-value (aget valist 'user)) (host-value (aget valist 'host)) - (protocol-value (aget valist 'protocol)) + (port-value (aget valist 'port)) (info-so-far (concat (if user-value (format "%s@" user-value) "[USER?]") (if host-value (format "%s" host-value) "[HOST?]") - (if protocol-value + (if port-value ;; this distinguishes protocol between - (if (zerop (length protocol-value)) + (if (zerop (length port-value)) "" ; 'entered as "no default"' vs. - (format ":%s" protocol-value)) ; given + (format ":%s" port-value)) ; given ;; and this is when the protocol is unknown - "[PROTOCOL?]")))) + "[PORT?]")))) ;; now prompt if the search SPEC did not include a required key; ;; take the result and put it in `data' AND store it in `valist' @@ -942,7 +944,7 @@ ('user "login") ('host "machine") ('secret "password") - ('protocol "port") + ('port "port") ; redundant but clearer (t (symbol-name r))) ;; the value will be printed in %S format data)))))) @@ -986,7 +988,7 @@ (defun* auth-source-secrets-search (&rest spec &key backend create delete label - type max host user protocol + type max host user port &allow-other-keys) "Search the Secrets API; spec is like `auth-source'. @@ -1042,9 +1044,9 @@ nil (list k (plist-get spec k)))) search-keys))) - ;; needed keys (always including host, login, protocol, and secret) + ;; needed keys (always including host, login, port, and secret) (returned-keys (mm-delete-duplicates (append - '(:host :login :protocol :secret) + '(:host :login :port :secret) search-keys))) (items (loop for item in (apply 'secrets-search-items coll search-spec) unless (and (stringp label) @@ -1081,7 +1083,7 @@ (defun* auth-source-secrets-create (&rest spec - &key backend type max host user protocol + &key backend type max host user port &allow-other-keys) ;; TODO ;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec) @@ -1098,8 +1100,8 @@ 'auth-source-forget "Emacs 24.1") (defun auth-source-user-or-password - (mode host protocol &optional username create-missing delete-existing) - "Find MODE (string or list of strings) matching HOST and PROTOCOL. + (mode host port &optional username create-missing delete-existing) + "Find MODE (string or list of strings) matching HOST and PORT. DEPRECATED in favor of `auth-source-search'! @@ -1122,14 +1124,14 @@ MODE can be \"login\" or \"password\"." (auth-source-do-debug "auth-source-user-or-password: DEPRECATED get %s for %s (%s) + user=%s" - mode host protocol username) + mode host port username) (let* ((listy (listp mode)) (mode (if listy mode (list mode))) (cname (if username - (format "%s %s:%s %s" mode host protocol username) - (format "%s %s:%s" mode host protocol))) - (search (list :host host :protocol protocol)) + (format "%s %s:%s %s" mode host port username) + (format "%s %s:%s" mode host port))) + (search (list :host host :port port)) (search (if username (append search (list :user username)) search)) (search (if create-missing (append search (list :create t)) @@ -1151,7 +1153,7 @@ (if (and (member "password" mode) t) "SECRET" found) - host protocol username) + host port username) found) ; return the found data ;; else, if not found, search with a max of 1 (let ((choice (nth 0 (apply 'auth-source-search === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-02-16 23:12:47 +0000 +++ lisp/gnus/nnimap.el 2011-02-17 12:08:48 +0000 @@ -277,7 +277,8 @@ (current-buffer))) (defun nnimap-credentials (address ports) - (let* ((found (nth 0 (auth-source-search :max 1 + (let* ((auth-source-creation-defaults `((port . ,(nth 0 ports)))) + (found (nth 0 (auth-source-search :max 1 :host address :port ports :create t))) @@ -398,7 +399,7 @@ (dolist (host (list (nnoo-current-server 'nnimap) nnimap-address)) (dolist (port ports) - (auth-source-forget+ :host host :protocol port))) + (auth-source-forget+ :host host :port port))) (delete-process (nnimap-process nnimap-object)) (setq nnimap-object nil)))) (when nnimap-object ------------------------------------------------------------ revno: 103316 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Thu 2011-02-17 12:41:49 +0100 message: * lisp/net/rcirc.el (rcirc-float-time): New function. (rcirc-keepalive, rcirc-handler-ctcp-KEEPALIVE) (rcirc-ctcp-sender-PING): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-17 05:13:17 +0000 +++ lisp/ChangeLog 2011-02-17 11:41:49 +0000 @@ -1,3 +1,9 @@ +2011-02-17 Deniz Dogan + + * net/rcirc.el (rcirc-float-time): New function. + (rcirc-keepalive, rcirc-handler-ctcp-KEEPALIVE) + (rcirc-ctcp-sender-PING): Use it. + 2011-02-17 Glenn Morris * speedbar.el (speedbar-ignored-modes, speedbar-file-unshown-regexp) === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-02-11 06:19:34 +0000 +++ lisp/net/rcirc.el 2011-02-17 11:41:49 +0000 @@ -556,6 +556,11 @@ `(with-current-buffer rcirc-server-buffer ,@body)) +(defun rcirc-float-time () + (if (featurep 'xemacs) + (time-to-seconds (current-time)) + (float-time))) + (defun rcirc-keepalive () "Send keep alive pings to active rcirc processes. Kill processes that have not received a server message since the @@ -567,10 +572,7 @@ (rcirc-send-ctcp process rcirc-nick (format "KEEPALIVE %f" - (if (featurep 'xemacs) - (time-to-seconds - (current-time)) - (float-time))))))) + (rcirc-float-time)))))) (rcirc-process-list)) ;; no processes, clean up timer (cancel-timer rcirc-keepalive-timer) @@ -578,10 +580,7 @@ (defun rcirc-handler-ctcp-KEEPALIVE (process target sender message) (with-rcirc-process-buffer process - (setq header-line-format (format "%f" (- (if (featurep 'xemacs) - (time-to-seconds - (current-time)) - (float-time)) + (setq header-line-format (format "%f" (- (rcirc-float-time) (string-to-number message)))))) (defvar rcirc-debug-buffer " *rcirc debug*") @@ -2209,7 +2208,7 @@ (defun rcirc-ctcp-sender-PING (process target request) "Send a CTCP PING message to TARGET." - (let ((timestamp (format "%.0f" (float-time)))) + (let ((timestamp (format "%.0f" (rcirc-float-time)))) (rcirc-send-ctcp process target "PING" timestamp))) (defun rcirc-cmd-me (args &optional process target) ------------------------------------------------------------ revno: 103315 committer: Jan D. branch nick: trunk timestamp: Thu 2011-02-17 11:19:29 +0100 message: Fix KVAR/BVAR, * nsfns.m (Fx_create_frame, ns_set_name_as_filename) (Fns_read_file_name): Replace B_ with BVAR. * nsterm.m (ns_term_init): Use KVAR. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-16 19:09:20 +0000 +++ src/ChangeLog 2011-02-17 10:19:29 +0000 @@ -1,3 +1,10 @@ +2011-02-17 Jan Djärv + + * nsfns.m (Fx_create_frame, ns_set_name_as_filename) + (Fns_read_file_name): Replace B_ with BVAR. + + * nsterm.m (ns_term_init): Use KVAR. + 2011-02-16 Eli Zaretskii * msdos.c (internal_terminal_init): Use KVAR. === modified file 'src/nsfns.m' --- src/nsfns.m 2011-02-15 03:57:00 +0000 +++ src/nsfns.m 2011-02-17 10:19:29 +0000 @@ -605,8 +605,8 @@ BLOCK_INPUT; pool = [[NSAutoreleasePool alloc] init]; - filename = B_ (XBUFFER (buf), filename); - name = B_ (XBUFFER (buf), name); + filename = BVAR (XBUFFER (buf), filename); + name = BVAR (XBUFFER (buf), name); if (NILP (name)) { @@ -1329,9 +1329,9 @@ } if (FRAME_HAS_MINIBUF_P (f) - && (!FRAMEP (kb->Vdefault_minibuffer_frame) - || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame)))) - kb->Vdefault_minibuffer_frame = frame; + && (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame)) + || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame))))) + KVAR (kb, Vdefault_minibuffer_frame) = frame; /* All remaining specified parameters, which have not been "used" by x_get_arg and friends, now go in the misc. alist of the frame. */ @@ -1428,7 +1428,7 @@ NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil : [NSString stringWithUTF8String: SDATA (prompt)]; NSString *dirS = NILP (dir) || !STRINGP (dir) ? - [NSString stringWithUTF8String: SDATA (B_ (current_buffer, directory))] : + [NSString stringWithUTF8String: SDATA (BVAR (current_buffer, directory))] : [NSString stringWithUTF8String: SDATA (dir)]; NSString *initS = NILP (init) || !STRINGP (init) ? nil : [NSString stringWithUTF8String: SDATA (init)]; === modified file 'src/nsterm.m' --- src/nsterm.m 2011-02-12 23:40:43 +0000 +++ src/nsterm.m 2011-02-17 10:19:29 +0000 @@ -3762,7 +3762,7 @@ terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); init_kboard (terminal->kboard); - terminal->kboard->Vwindow_system = Qns; + KVAR (terminal->kboard, Vwindow_system) = Qns; terminal->kboard->next_kboard = all_kboards; all_kboards = terminal->kboard; /* Don't let the initial kboard remain current longer than necessary. ------------------------------------------------------------ revno: 103314 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-02-16 21:16:12 -0800 message: * lisp/progmodes/prolog.el: Header comment fix. diff: === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2011-01-28 19:46:58 +0000 +++ lisp/progmodes/prolog.el 2011-02-17 05:16:12 +0000 @@ -5,8 +5,9 @@ ;; Authors: Emil Åström ;; Milan Zamazal -;; Stefan Bruda (current maintainer) +;; Stefan Bruda ;; * See below for more details +;; Maintainer: Stefan Bruda ;; Keywords: prolog major mode sicstus swi mercury (defvar prolog-mode-version "1.22"