From 7e116860bbae843e00c29b08919e10fc37f7aaa2 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 Nov 2010 21:22:39 +0900 Subject: [PATCH 01/58] Implement rmail-search-mime-message-function. --- lisp/ChangeLog | 9 +++++ lisp/mail/rmailmm.el | 81 ++++++++++++++++++++++++++++++++------------ 2 files changed, 69 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b35c13377c..c09e7a7a441 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2010-11-29 Kenichi Handa + + * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process + within condition-case. + (rmail-show-mime): Don't use condition-case. + (rmail-search-mime-message): New function. + (rmail-search-mime-message-function): Set to + rmail-search-mime-message. + 2010-11-26 Kenichi Handa * mail/rmailmm.el (rmail-mime-insert-multipart): For unsupported diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 2c1269ee3f1..1cd765cbf9f 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -690,7 +690,9 @@ modified." The value is a MIME-entiy object (see `rmail-mime-enty-new')." (save-excursion (goto-char (point-min)) - (rmail-mime-process nil t))) + (condition-case nil + (rmail-mime-process nil t) + (error nil)))) (defun rmail-mime-insert (entity &optional content-type disposition) "Insert a MIME-entity ENTITY in the current buffer. @@ -743,30 +745,31 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." message type disposition encoding)) (defun rmail-show-mime () - (let ((mbox-buf rmail-buffer)) - (condition-case nil - (let ((entity (rmail-mime-parse))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t) - (rmail-buffer mbox-buf)) - (erase-buffer) - (rmail-mime-insert entity)))) - (error - ;; Decoding failed. Insert the original message body as is. - (let ((region (with-current-buffer mbox-buf - (goto-char (point-min)) - (re-search-forward "^$" nil t) - (forward-line 1) - (cons (point) (point-max))))) - (with-current-buffer rmail-view-buffer - (let ((inhibit-read-only t)) - (erase-buffer) - (insert-buffer-substring mbox-buf (car region) (cdr region)))) - (message "MIME decoding failed")))))) + "Function to set in `rmail-show-mime-function' (which see)." + (let ((mbox-buf rmail-buffer) + (entity (rmail-mime-parse))) + (if entity + (with-current-buffer rmail-view-buffer + (let ((inhibit-read-only t) + (rmail-buffer mbox-buf)) + (erase-buffer) + (rmail-mime-insert entity))) + ;; Decoding failed. Insert the original message body as is. + (let ((region (with-current-buffer mbox-buf + (goto-char (point-min)) + (re-search-forward "^$" nil t) + (forward-line 1) + (cons (point) (point-max))))) + (with-current-buffer rmail-view-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (insert-buffer-substring mbox-buf (car region) (cdr region)))) + (message "MIME decoding failed"))))) (setq rmail-show-mime-function 'rmail-show-mime) (defun rmail-insert-mime-forwarded-message (forward-buffer) + "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)." (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) (save-restriction (narrow-to-region (point) (point)) @@ -776,6 +779,7 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." 'rmail-insert-mime-forwarded-message) (defun rmail-insert-mime-resent-message (forward-buffer) + "Function to set in `rmail-insert-mime-resent-message-function' (which see)." (insert-buffer-substring (with-current-buffer forward-buffer rmail-view-buffer)) (goto-char (point-min)) @@ -786,6 +790,41 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." (setq rmail-insert-mime-resent-message-function 'rmail-insert-mime-resent-message) +(defun rmail-search-mime-message (msg regexp) + "Function to set in `rmail-search-mime-message-function' (which see)." + (save-restriction + (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg)) + (let ((mbox-buf (current-buffer)) + (header-end (save-excursion + (re-search-forward "^$" nil 'move) (point))) + (body-end (point-max)) + (entity (rmail-mime-parse))) + (or + ;; At first, just search the headers. + (with-temp-buffer + (insert-buffer-substring mbox-buf nil header-end) + (rfc2047-decode-region (point-min) (point)) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Next, search the body. + (if (and entity + (let* ((content-type (rmail-mime-entity-type entity)) + (charset (cdr (assq 'charset (cdr content-type))))) + (or (not (string-match "text/.*" (car content-type))) + (and charset + (not (string= (downcase charset) "us-ascii")))))) + ;; Search the decoded MIME message. + (with-temp-buffer + (let ((rmail-buffer mbox-buf)) + (rmail-mime-insert entity)) + (goto-char (point-min)) + (re-search-forward regexp nil t)) + ;; Search the body without decoding. + (goto-char header-end) + (re-search-forward regexp nil t)))))) + +(setq rmail-search-mime-message-function 'rmail-search-mime-message) + (provide 'rmailmm) ;; Local Variables: From bd794450721142e5774cb28ac534aa565d130001 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 1 Dec 2010 17:34:09 -0500 Subject: [PATCH 02/58] * lisp/ido.el (ido-common-initilization): New function. (ido-mode): Use it. (ido-completing-read): Call it. Fixes: debbugs:3274 --- lisp/ChangeLog | 6 ++++++ lisp/ido.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6da166726b..12a1db25e0e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-12-01 Leo + + * ido.el (ido-common-initilization): New function. (bug#3274) + (ido-mode): Use it. + (ido-completing-read): Call it. + 2010-11-27 Chong Yidong * log-edit.el (log-edit-font-lock-keywords): Don't try matching diff --git a/lisp/ido.el b/lisp/ido.el index a4409775a86..ee8bd4961db 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1439,6 +1439,11 @@ Removes badly formatted data and ignored directories." ;; ido kill emacs hook (ido-save-history)) +(defun ido-common-initilization () + (ido-init-completion-maps) + (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) + (define-minor-mode ido-everywhere "Toggle using ido speed-ups everywhere file and directory names are read. With ARG, turn ido speed-up on if arg is positive, off otherwise." @@ -1482,12 +1487,9 @@ This function also adds a hook to the minibuffer." (t nil))) (ido-everywhere (if ido-everywhere 1 -1)) - (when ido-mode - (ido-init-completion-maps)) (when ido-mode - (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) + (ido-common-initilization) (ido-load-history) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) @@ -4679,6 +4681,8 @@ DEF, if non-nil, is the default value." (ido-directory-too-big nil) (ido-context-switch-command 'ignore) (ido-choice-list choices)) + ;; Initialize ido before invoking ido-read-internal + (ido-common-initilization) (ido-read-internal 'list prompt hist def require-match initial-input))) (defun ido-unload-function () From 769741e3d1ba0f22dd4619058185f294b3c189ea Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 1 Dec 2010 17:42:36 -0500 Subject: [PATCH 03/58] * doc/lispref/backups.texi (Making Backups): * doc/lispref/modes.texi (Example Major Modes): Use recommended coding style. (Major Mode Basics, Derived Modes): Encourge more strongly use of define-derived-mode. Mention completion-at-point-functions. --- doc/lispref/ChangeLog | 7 +++ doc/lispref/backups.texi | 6 +- doc/lispref/modes.texi | 129 ++++++++++++++++++--------------------- doc/lispref/text.texi | 2 +- 4 files changed, 71 insertions(+), 73 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 959f4844c1c..95973479225 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,10 @@ +2010-12-01 Stefan Monnier + + * backups.texi (Making Backups): + * modes.texi (Example Major Modes): Use recommended coding style. + (Major Mode Basics, Derived Modes): Encourge more strongly use of + define-derived-mode. Mention completion-at-point-functions. + 2010-11-21 Chong Yidong * nonascii.texi (Converting Representations): Document diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 7d6ae233f2b..349d0beb9c7 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -88,10 +88,8 @@ save disk space. (You would put this code in your init file.) @smallexample @group (add-hook 'rmail-mode-hook - (function (lambda () - (make-local-variable - 'make-backup-files) - (setq make-backup-files nil)))) + (lambda () + (set (make-local-variable 'make-backup-files) nil))) @end group @end smallexample @end defopt diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 12f16b67663..0ccb4ae04ed 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -20,10 +20,10 @@ user. For related topics such as keymaps and syntax tables, see @ref{Keymaps}, and @ref{Syntax Tables}. @menu -* Hooks:: How to use hooks; how to write code that provides hooks. -* Major Modes:: Defining major modes. -* Minor Modes:: Defining minor modes. -* Mode Line Format:: Customizing the text that appears in the mode line. +* Hooks:: How to use hooks; how to write code that provides hooks. +* Major Modes:: Defining major modes. +* Minor Modes:: Defining minor modes. +* Mode Line Format:: Customizing the text that appears in the mode line. * Imenu:: How a mode can provide a menu of definitions in the buffer. * Font Lock Mode:: How modes can highlight text according to syntax. @@ -78,8 +78,8 @@ convention. its value is just a single function, not a list of functions. @menu -* Running Hooks:: How to run a hook. -* Setting Hooks:: How to put functions on a hook, or remove them. +* Running Hooks:: How to run a hook. +* Setting Hooks:: How to put functions on a hook, or remove them. @end menu @node Running Hooks @@ -199,16 +199,16 @@ buffer, such as a local keymap. The effect lasts until you switch to another major mode in the same buffer. @menu -* Major Mode Basics:: -* Major Mode Conventions:: Coding conventions for keymaps, etc. -* Auto Major Mode:: How Emacs chooses the major mode automatically. -* Mode Help:: Finding out how to use a mode. -* Derived Modes:: Defining a new major mode based on another major +* Major Mode Basics:: +* Major Mode Conventions:: Coding conventions for keymaps, etc. +* Auto Major Mode:: How Emacs chooses the major mode automatically. +* Mode Help:: Finding out how to use a mode. +* Derived Modes:: Defining a new major mode based on another major mode. -* Generic Modes:: Defining a simple major mode that supports +* Generic Modes:: Defining a simple major mode that supports comment syntax and Font Lock mode. -* Mode Hooks:: Hooks run at the end of major mode functions. -* Example Major Modes:: Text mode and Lisp modes. +* Mode Hooks:: Hooks run at the end of major mode functions. +* Example Major Modes:: Text mode and Lisp modes. @end menu @node Major Mode Basics @@ -238,9 +238,8 @@ mode except that it provides two additional commands. Its definition is distinct from that of Text mode, but uses that of Text mode. Even if the new mode is not an obvious derivative of any other mode, -it is convenient to use @code{define-derived-mode} with a @code{nil} -parent argument, since it automatically enforces the most important -coding conventions for you. +we recommend to use @code{define-derived-mode}, since it automatically +enforces the most important coding conventions for you. For a very simple programming language major mode that handles comments and fontification, you can use @code{define-generic-mode}. @@ -428,6 +427,10 @@ The mode can specify a local value for @code{eldoc-documentation-function} to tell ElDoc mode how to handle this mode. +@item +The mode can specify how to complete various keywords by adding +to the special hook @code{completion-at-point-functions}. + @item Use @code{defvar} or @code{defcustom} to set mode-related variables, so that they are not reinitialized if they already have a value. (Such @@ -492,7 +495,7 @@ The @code{define-derived-mode} macro automatically marks the derived mode as special if the parent mode is special. The special mode @code{special-mode} provides a convenient parent for other special modes to inherit from; it sets @code{buffer-read-only} to @code{t}, -and does nothing else. +and does little else. @item If you want to make the new mode the default for files with certain @@ -737,8 +740,10 @@ documentation of the major mode. @subsection Defining Derived Modes @cindex derived mode - It's often useful to define a new major mode in terms of an existing -one. An easy way to do this is to use @code{define-derived-mode}. + The recommended way to define a new major mode is to derive it +from an existing one using @code{define-derived-mode}. If there is no +closely related mode, you can inherit from @code{text-mode}, +@code{special-mode}, or in the worst case @code{fundamental-mode}. @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} This macro defines @var{variant} as a major mode command, using @@ -979,8 +984,7 @@ You can thus get the full benefit of adaptive filling Turning on Text mode runs the normal hook `text-mode-hook'." @end group @group - (make-local-variable 'text-mode-variant) - (setq text-mode-variant t) + (set (make-local-variable 'text-mode-variant) t) ;; @r{These two lines are a feature added recently.} (set (make-local-variable 'require-final-newline) mode-require-final-newline) @@ -998,9 +1002,8 @@ the default value, and we'll delete it in a future version.) @smallexample @group ;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.} -(defvar text-mode-abbrev-table nil +(define-abbrev-table 'text-mode-abbrev-table () "Abbrev table used while in text mode.") -(define-abbrev-table 'text-mode-abbrev-table ()) @end group @group @@ -1022,12 +1025,10 @@ Turning on text-mode runs the hook `text-mode-hook'." ;; @r{These four lines are absent from the current version} ;; @r{not because this is done some other way, but rather} ;; @r{because nowadays Text mode uses the normal definition of paragraphs.} - (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter)) - (make-local-variable 'paragraph-separate) - (setq paragraph-separate paragraph-start) - (make-local-variable 'indent-line-function) - (setq indent-line-function 'indent-relative-maybe) + (set (make-local-variable 'paragraph-start) + (concat "[ \t]*$\\|" page-delimiter)) + (set (make-local-variable 'paragraph-separate) paragraph-start) + (set (make-local-variable 'indent-line-function) 'indent-relative-maybe) @end group @group (setq mode-name "Text") @@ -1115,15 +1116,12 @@ modes should understand the Lisp conventions for comments. The rest of @smallexample @group - (make-local-variable 'paragraph-start) - (setq paragraph-start (concat page-delimiter "\\|$" )) - (make-local-variable 'paragraph-separate) - (setq paragraph-separate paragraph-start) + (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$" )) + (set (make-local-variable 'paragraph-separate) paragraph-start) @dots{} @end group @group - (make-local-variable 'comment-indent-function) - (setq comment-indent-function 'lisp-comment-indent)) + (set (make-local-variable 'comment-indent-function) 'lisp-comment-indent)) @dots{} @end group @end smallexample @@ -1135,16 +1133,13 @@ common. The following code sets up the common commands: @smallexample @group -(defvar shared-lisp-mode-map () +(defvar shared-lisp-mode-map + (let ((map (make-sparse-keymap))) + (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) + (define-key shared-lisp-mode-map "\177" + 'backward-delete-char-untabify) + map) "Keymap for commands shared by all sorts of Lisp modes.") - -;; @r{Putting this @code{if} after the @code{defvar} is an older style.} -(if shared-lisp-mode-map - () - (setq shared-lisp-mode-map (make-sparse-keymap)) - (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) - (define-key shared-lisp-mode-map "\177" - 'backward-delete-char-untabify)) @end group @end smallexample @@ -1153,15 +1148,13 @@ And here is the code to set up the keymap for Lisp mode: @smallexample @group -(defvar lisp-mode-map () +(defvar lisp-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map shared-lisp-mode-map) + (define-key map "\e\C-x" 'lisp-eval-defun) + (define-key map "\C-c\C-z" 'run-lisp) + map) "Keymap for ordinary Lisp mode...") - -(if lisp-mode-map - () - (setq lisp-mode-map (make-sparse-keymap)) - (set-keymap-parent lisp-mode-map shared-lisp-mode-map) - (define-key lisp-mode-map "\e\C-x" 'lisp-eval-defun) - (define-key lisp-mode-map "\C-c\C-z" 'run-lisp)) @end group @end smallexample @@ -1192,11 +1185,9 @@ if that value is non-nil." ; @r{finds out what to describe.} (setq mode-name "Lisp") ; @r{This goes into the mode line.} (lisp-mode-variables t) ; @r{This defines various variables.} - (make-local-variable 'comment-start-skip) - (setq comment-start-skip - "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") - (make-local-variable 'font-lock-keywords-case-fold-search) - (setq font-lock-keywords-case-fold-search t) + (set (make-local-variable 'comment-start-skip) + "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") + (set (make-local-variable 'font-lock-keywords-case-fold-search) t) @end group @group (setq imenu-case-fold-search t) @@ -1580,14 +1571,14 @@ information displayed in the mode line relates to the enabled major and minor modes. @menu -* Base: Mode Line Basics. Basic ideas of mode line control. -* Data: Mode Line Data. The data structure that controls the mode line. -* Top: Mode Line Top. The top level variable, mode-line-format. -* Mode Line Variables:: Variables used in that data structure. -* %-Constructs:: Putting information into a mode line. -* Properties in Mode:: Using text properties in the mode line. -* Header Lines:: Like a mode line, but at the top. -* Emulating Mode Line:: Formatting text as the mode line would. +* Base: Mode Line Basics. Basic ideas of mode line control. +* Data: Mode Line Data. The data structure that controls the mode line. +* Top: Mode Line Top. The top level variable, mode-line-format. +* Mode Line Variables:: Variables used in that data structure. +* %-Constructs:: Putting information into a mode line. +* Properties in Mode:: Using text properties in the mode line. +* Header Lines:: Like a mode line, but at the top. +* Emulating Mode Line:: Formatting text as the mode line would. @end menu @node Mode Line Basics @@ -2361,7 +2352,7 @@ Search-based fontification happens second. * Other Font Lock Variables:: Additional customization facilities. * Levels of Font Lock:: Each mode can define alternative levels so that the user can select more or less. -* Precalculated Fontification:: How Lisp programs that produce the buffer +* Precalculated Fontification:: How Lisp programs that produce the buffer contents can also specify how to fontify it. * Faces for Font Lock:: Special faces specifically for Font Lock. * Syntactic Font Lock:: Fontification based on syntax tables. @@ -3276,5 +3267,7 @@ optionally bound to @code{desktop-save-buffer}. @end defvar @ignore - arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e + Local Variables: + fill-column: 72 + End: @end ignore diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 57bf4825887..4da94dacd71 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2205,7 +2205,7 @@ The functions in this section return unpredictable values. @defvar indent-line-function This variable's value is the function to be used by @key{TAB} (and various commands) to indent the current line. The command -@code{indent-according-to-mode} does no more than call this function. +@code{indent-according-to-mode} does little more than call this function. In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}. From ff80efe730ad17ad32f0aaa466c2da4619d292b0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Dec 2010 20:06:52 -0800 Subject: [PATCH 04/58] Small ps-print fixes. * lisp/ps-print.el (ps-line-lengths-internal, ps-nb-pages): Ensure ps-footer-font-size-internal is initialized. Call ps-get-page-dimensions before trying to use ps-font-for-text. --- lisp/ChangeLog | 7 ++++++- lisp/ps-print.el | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4588f02dbb9..668f22e502e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-12-02 Glenn Morris + + * ps-print.el (ps-line-lengths-internal, ps-nb-pages): + Ensure ps-footer-font-size-internal is initialized. + Call ps-get-page-dimensions before trying to use ps-font-for-text. + 2010-12-01 Kenichi Handa * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process @@ -35,7 +41,6 @@ (smie-next-sexp): Make it accept a "start token" as argument. (smie-indent-keyword): Be careful not to misidentify tokens that span more than one line, as empty lines. Add argument `token'. ->>>>>>> MERGE-SOURCE 2010-11-26 Kenichi Handa diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 69b32e5d52d..d26b3a5cc7b 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4331,14 +4331,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) (buf (get-buffer-create "*Line-lengths*")) (ifs ps-font-size-internal) ; initial font size - (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (print-width (progn (ps-get-page-dimensions) ps-print-width)) + (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 5) ; minimum font size cw-min ; minimum character width @@ -4378,6 +4381,9 @@ and on the current ps-print setup." (ps-header-font-size-internal (or ps-header-font-size-internal (ps-get-font-size 'ps-header-font-size))) + (ps-footer-font-size-internal + (or ps-footer-font-size-internal + (ps-get-font-size 'ps-footer-font-size))) (ps-header-title-font-size-internal (or ps-header-title-font-size-internal (ps-get-font-size 'ps-header-title-font-size))) @@ -4387,9 +4393,9 @@ and on the current ps-print setup." (buf (get-buffer-create "*Nb-Pages*")) (ils ps-line-spacing-internal) ; initial line spacing (ifs ps-font-size-internal) ; initial font size - (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (page-height (progn (ps-get-page-dimensions) ps-print-height)) + (ilh (ps-line-height 'ps-font-for-text)) ; initial line height (ps-setup (ps-setup)) ; setup for the current buffer (fs-min 4) ; minimum font size lh-min ; minimum line height @@ -6726,5 +6732,4 @@ Finish printing job for multi-byte chars. (provide 'ps-print) -;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579 ;;; ps-print.el ends here From 7dde1a86197ef1d165f5ab37088d0fb64e4a06b4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Dec 2010 20:09:20 -0800 Subject: [PATCH 05/58] * doc/misc/cl.texi (For Clauses): Small fixes for frames and windows. --- doc/misc/ChangeLog | 4 ++++ doc/misc/cl.texi | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index bb211e7ffca..89cc21c31de 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-12-02 Glenn Morris + + * cl.texi (For Clauses): Small fixes for frames and windows. + 2010-11-23 Glenn Morris James Clark diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 780d53c9017..e3a0dde3e47 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -2494,15 +2494,18 @@ term restricts the search to just the specified property. The @code{of} term may specify either a buffer or a string. @item for @var{var} being the frames -This clause iterates over all frames, i.e., X window system windows -open on Emacs files. The -clause @code{screens} is a synonym for @code{frames}. The frames -are visited in @code{next-frame} order starting from -@code{selected-frame}. +This clause iterates over all Emacs frames. The clause @code{screens} is +a synonym for @code{frames}. The frames are visited in +@code{next-frame} order starting from @code{selected-frame}. @item for @var{var} being the windows [of @var{frame}] This clause iterates over the windows (in the Emacs sense) of -the current frame, or of the specified @var{frame}. +the current frame, or of the specified @var{frame}. It visits windows +in @code{next-window} order starting from @code{selected-window} +(or @code{frame-selected-window} if you specify @var{frame}). +This clause treats the minibuffer window in the same way as +@code{next-window} does. For greater flexibility, consider using +@code{walk-windows} instead. @item for @var{var} being the buffers This clause iterates over all buffers in Emacs. It is equivalent @@ -5322,6 +5325,3 @@ recursion. @bye -@ignore - arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8 -@end ignore From 9e0ecdabca1627cec85a38dc48a30b6386036199 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Dec 2010 20:56:54 -0800 Subject: [PATCH 06/58] ChangeLog fixes. --- lisp/ChangeLog | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 668f22e502e..1985193af03 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -58,17 +58,15 @@ (rmail-mime-save): Handle the case that the button's `data' is a MIME entity. (rmail-mime-insert-text): New function. - (rmail-mime-insert-image): Handle the case that DATA is a MIME - entity. + (rmail-mime-insert-image): Handle the case that DATA is a MIME entity. (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. (rmail-mime-insert-bulk): New function mostly copied from the old rmail-mime-bulk-handler. - (rmail-mime-multipart-handler): Just call - rmail-mime-process-multipart. - (rmail-mime-process-multipart): New funciton mostly copied from + (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart. + (rmail-mime-process-multipart): New function mostly copied from the old rmail-mime-multipart-handler. (rmail-mime-show): Just call rmail-mime-process. - (rmail-mime-process): New funciton mostly copied from the old + (rmail-mime-process): New function mostly copied from the old rmail-mime-show. (rmail-mime-insert-multipart, rmail-mime-parse) (rmail-mime-insert, rmail-show-mime) @@ -12115,4 +12113,3 @@ See ChangeLog.14 for earlier changes. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . -;; arch-tag: d3e45e38-19e2-49b6-8dc2-7cb26adcc5a1 From 2a91a0b5c0d208696fc327373bc4d37fd376c59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 2 Dec 2010 08:12:54 +0100 Subject: [PATCH 07/58] Handle negative top/left in frame parameters (Bug#7510). * src/nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. * src/nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs): Use FRAME_TOOLBAR_HEIGHT. (x_set_offset): Handle XNegative and YNegative in f->size_hint_flags. --- src/ChangeLog | 9 +++++++++ src/nsterm.h | 2 +- src/nsterm.m | 45 ++++++++++++++++++++++++++++++--------------- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 45aed177ef2..025161cc395 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-12-02 Jan Djärv + + * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. + + * nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs): + Use FRAME_TOOLBAR_HEIGHT. + (x_set_offset): Handle XNegative and YNegative in + f->size_hint_flags (Bug#7510). + 2010-11-25 Kenichi Handa * charset.c (emacs_mule_charset): Make it an array of charset ID; diff --git a/src/nsterm.h b/src/nsterm.h index 01086e63b69..5b24eb6f289 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -606,7 +606,7 @@ struct x_output #define NS_FACE_FOREGROUND(f) ((f)->foreground) #define NS_FACE_BACKGROUND(f) ((f)->background) #define FRAME_NS_TITLEBAR_HEIGHT(f) ((f)->output_data.ns->titlebar_height) -#define FRAME_NS_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height) +#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height) #define FONT_WIDTH(f) ((f)->max_width) #define FONT_HEIGHT(f) ((f)->height) diff --git a/src/nsterm.m b/src/nsterm.m index d1b984d5382..43e53cb30e7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1082,16 +1082,31 @@ Free a pool and temporary objects it refers to (callable from C) f->left_pos = xoff; f->top_pos = yoff; -#ifdef NS_IMPL_GNUSTEP - if (xoff < 100) - f->left_pos = 100; /* don't overlap menu */ -#endif if (view != nil && (screen = [[view window] screen])) - [[view window] setFrameTopLeftPoint: - NSMakePoint (SCREENMAXBOUND (f->left_pos), - SCREENMAXBOUND ([screen frame].size.height - - NS_TOP_POS (f)))]; + { + f->left_pos = f->size_hint_flags & XNegative + ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) + : f->left_pos; + /* We use visibleFrame here to take menu bar into account. + Ideally we should also adjust left/top with visibleFrame.offset. */ + + f->top_pos = f->size_hint_flags & YNegative + ? ([screen visibleFrame].size.height + f->top_pos + - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) + - FRAME_TOOLBAR_HEIGHT (f)) + : f->top_pos; +#ifdef NS_IMPL_GNUSTEP + if (f->left_pos < 100) + f->left_pos = 100; /* don't overlap menu */ +#endif + [[view window] setFrameTopLeftPoint: + NSMakePoint (SCREENMAXBOUND (f->left_pos), + SCREENMAXBOUND ([screen frame].size.height + - NS_TOP_POS (f)))]; + f->size_hint_flags &= ~(XNegative|YNegative); + } + UNBLOCK_INPUT; } @@ -1148,15 +1163,15 @@ Free a pool and temporary objects it refers to (callable from C) /* NOTE: previously this would generate wrong result if toolbar not yet displayed and fixing toolbar_height=32 helped, but now (200903) seems no longer needed */ - FRAME_NS_TOOLBAR_HEIGHT (f) = + FRAME_TOOLBAR_HEIGHT (f) = NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)]) - FRAME_NS_TITLEBAR_HEIGHT (f); else - FRAME_NS_TOOLBAR_HEIGHT (f) = 0; + FRAME_TOOLBAR_HEIGHT (f) = 0; wr.size.width = pixelwidth + f->border_width; wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f) - + FRAME_NS_TOOLBAR_HEIGHT (f); + + FRAME_TOOLBAR_HEIGHT (f); /* constrain to screen if we can */ if (screen) @@ -4897,16 +4912,16 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (emacsframe, frameSize.height #ifdef NS_IMPL_GNUSTEP - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + 3 - - FRAME_NS_TOOLBAR_HEIGHT (emacsframe)); + - FRAME_TOOLBAR_HEIGHT (emacsframe)); #else - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) - - FRAME_NS_TOOLBAR_HEIGHT (emacsframe)); + - FRAME_TOOLBAR_HEIGHT (emacsframe)); #endif if (rows < MINHEIGHT) rows = MINHEIGHT; frameSize.height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (emacsframe, rows) + FRAME_NS_TITLEBAR_HEIGHT (emacsframe) - + FRAME_NS_TOOLBAR_HEIGHT (emacsframe); + + FRAME_TOOLBAR_HEIGHT (emacsframe); #ifdef NS_IMPL_COCOA { /* this sets window title to have size in it; the wm does this under GS */ @@ -5117,7 +5132,7 @@ - (BOOL)isOpaque [toggleButton setTarget: self]; [toggleButton setAction: @selector (toggleToolbar: )]; #endif - FRAME_NS_TOOLBAR_HEIGHT (f) = 0; + FRAME_TOOLBAR_HEIGHT (f) = 0; tem = f->icon_name; if (!NILP (tem)) From 0fdd1db7fd278b6ac13f2f2709940b04e16a492c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 1 Dec 2010 23:40:32 -0800 Subject: [PATCH 08/58] That's not how you spell "initialization". --- lisp/ChangeLog | 2 +- lisp/ido.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1985193af03..f6514c16577 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -15,7 +15,7 @@ 2010-12-01 Leo - * ido.el (ido-common-initilization): New function. (bug#3274) + * ido.el (ido-common-initialization): New function. (bug#3274) (ido-mode): Use it. (ido-completing-read): Call it. diff --git a/lisp/ido.el b/lisp/ido.el index ee8bd4961db..52661d9cf49 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1439,7 +1439,7 @@ Removes badly formatted data and ignored directories." ;; ido kill emacs hook (ido-save-history)) -(defun ido-common-initilization () +(defun ido-common-initialization () (ido-init-completion-maps) (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) @@ -1489,7 +1489,7 @@ This function also adds a hook to the minibuffer." (ido-everywhere (if ido-everywhere 1 -1)) (when ido-mode - (ido-common-initilization) + (ido-common-initialization) (ido-load-history) (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) @@ -4682,7 +4682,7 @@ DEF, if non-nil, is the default value." (ido-context-switch-command 'ignore) (ido-choice-list choices)) ;; Initialize ido before invoking ido-read-internal - (ido-common-initilization) + (ido-common-initialization) (ido-read-internal 'list prompt hist def require-match initial-input))) (defun ido-unload-function () From b8a9e13683bad70020e6f07af21b06e5c6edd7aa Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2010 12:22:45 +0200 Subject: [PATCH 09/58] msdog.texi (Windows HOME): Mention that HOME can also be set in the registry, with a cross-reference. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/msdog.texi | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 91cabc40c9d..fc9c34a296a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Eli Zaretskii + + * msdog.texi (Windows HOME): Mention that HOME can also be set in the + registry, with a cross-reference. + 2010-11-23 Bob Rogers * maintaining.texi (VC With A Locking VCS, VC Directory Commands): diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 3e8d5ef57c1..a38f23a65bd 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -341,6 +341,9 @@ Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data} or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the older Windows 9X/ME systems. + @code{HOME} can also be set in the system registry, for details see +@ref{MS-Windows Registry}. + @cindex init file @file{.emacs} on MS-Windows The home directory is where your init file @file{.emacs} is stored. When Emacs starts, it first checks whether the environment variable From 62d72a4a699e91940934bb607d932f263fd13beb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2010 13:25:09 +0200 Subject: [PATCH 10/58] Describe MS-Windows specific startup issues, incl. emacsclientw.exe msdog.texi (Windows Startup): New node. Move the stuff about the current directory from "Windows HOME", and explain all possible ways of invoking Emacs on Windows. --- doc/emacs/ChangeLog | 2 ++ doc/emacs/emacs.texi | 1 + doc/emacs/msdog.texi | 70 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 66 insertions(+), 7 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index fc9c34a296a..6f1f706fb58 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -2,6 +2,8 @@ * msdog.texi (Windows HOME): Mention that HOME can also be set in the registry, with a cross-reference. + (Windows Startup): New node. Move the stuff about the current + directory from "Windows HOME". 2010-11-23 Bob Rogers diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 91ce399d4c1..7f6321d44d3 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1191,6 +1191,7 @@ Emacs and Mac OS / GNUstep Emacs and Microsoft Windows/MS-DOS +* Windows Startup:: How to start Emacs on Windows. * Text and Binary:: Text files use CRLF to terminate lines. * Windows Files:: File-name conventions on Windows. * ls in Lisp:: Emulation of @code{ls} for Dired. diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index a38f23a65bd..22300267315 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -28,6 +28,7 @@ However, a few special considerations apply, and they are described here. @menu +* Windows Startup:: How to start Emacs on Windows. * Text and Binary:: Text files use CRLF to terminate lines. * Windows Files:: File-name conventions on Windows. * ls in Lisp:: Emulation of @code{ls} for Dired. @@ -44,6 +45,68 @@ here. @end ifnottex @end menu +@node Windows Startup +@section How to Start Emacs on MS-Windows +@cindex starting Emacs on MS-Windows + + There are several ways of starting Emacs on MS-Windows: + +@enumerate +@item +@pindex runemacs.exe +@cindex desktop shortcut, MS-Windows +@cindex start directory, MS-Windows +@cindex directory where Emacs starts on MS-Windows +From the desktop shortcut icon: either double-click the left mouse +button on the icon, or click once, then press @key{RET}. The desktop +shortcut should specify as its ``Target'' (in the ``Properties'' of +the shortcut) the full absolute file name of @file{runemacs.exe}, +@emph{not} of @file{emacs.exe}. This is because @file{runemacs.exe} +hides the console window that would have been created if the target of +the shortcut were @file{emacs.exe} (which is a console program, as far +as Windows is concerned). If you use this method, Emacs starts in the +directory specified by the shortcut. To control where that is, +right-click on the shortcut, select ``Properties'', and in the +``Shortcut'' tab modify the ``Start in'' field to your liking. + +@item +From the Command Prompt window, by typing @kbd{emacs @key{RET}} at the +prompt. The Command Prompt window where you did that will not be +available for invoking other commands until Emacs exits. In this +case, Emacs will start in the current directory of the Windows shell. + +@item +From the Command Prompt window, by typing @kbd{runemacs @key{RET}} at +the prompt. The Command Prompt window where you did that will be +immediately available for invoking other commands. In this case, +Emacs will start in the current directory of the Windows shell. + +@item +@cindex invoking Emacs from Windows Explorer +@pindex emacsclient.exe +@pindex emacsclientw.exe +Via the Emacs client program, @file{emacsclient.exe} or +@file{emacsclientw.exe}. This allows to invoke Emacs from other +programs, and to reuse a running Emacs process for serving editing +jobs required by other programs. @xref{Emacs Server}. The difference +between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the +former waits for Emacs to signal that the editing job is finished, +while the latter does not wait. Which one of them to use in each case +depends on the expectations of the program that needs editing +services. If the program will use the edited files, it needs to wait +for Emacs, so you should use @file{emacsclient.exe}. By contrast, if +the results of editing are not needed by the invoking program, you +will be better off using @file{emacsclientw.exe}. A notable situation +where you would want @file{emacsclientw.exe} is when you right-click +on a file in the Windows Explorer and select ``Open With'' from the +pop-up menu. Use the @samp{--alternate-editor=} or @samp{-a} options +if Emacs might not be running (or not running as a server) when +@command{emacsclient} is invoked---that will always give you an +editor. When invoked via @command{emacsclient}, Emacs will start in +the current directory of the program that invoked +@command{emacsclient}. +@end enumerate + @node Text and Binary @section Text Files and Binary Files @cindex text and binary files on MS-DOS/MS-Windows @@ -375,13 +438,6 @@ names, the Windows port of Emacs supports an alternative name @file{_emacs} as a fallback, if such a file exists in the home directory, whereas @file{.emacs} does not. -@cindex start directory, MS-Windows -@cindex directory where Emacs starts on MS-Windows - If you use a Windows desktop shortcut to start Emacs, it starts in -the directory specified by the shortcut. To control where that is, -right-click on the shortcut, select ``Properties'', and in the -``Shortcut'' tab modify the ``Start in'' field to your liking. - @node Windows Keyboard @section Keyboard Usage on MS-Windows @cindex keyboard, MS-Windows From 4f1948eb4c9e4ba07c50978363c565368d406de1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2010 13:45:59 +0200 Subject: [PATCH 11/58] display.texi (Optional Mode Line): Make the description of load-average more accurate. --- doc/emacs/ChangeLog | 3 +++ doc/emacs/display.texi | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 6f1f706fb58..ffaeafad015 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,8 @@ 2010-12-04 Eli Zaretskii + * display.texi (Optional Mode Line): Make the description of + load-average more accurate. + * msdog.texi (Windows HOME): Mention that HOME can also be set in the registry, with a cross-reference. (Windows Startup): New node. Move the stuff about the current diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 7946a451c54..cc251f2cc8e 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1007,11 +1007,12 @@ their parentheses. It looks like this: @noindent @vindex display-time-24hr-format Here @var{hh} and @var{mm} are the hour and minute, followed always by -@samp{am} or @samp{pm}. @var{l.ll} is the average number of running -processes in the whole system recently. (Some fields may be missing if -your operating system cannot support them.) If you prefer time display -in 24-hour format, set the variable @code{display-time-24hr-format} -to @code{t}. +@samp{am} or @samp{pm}. @var{l.ll} is the average number, collected +for the last few minutes, of processes in the whole system that were +either running or ready to run (i.e.@: were waiting for an available +processor). (Some fields may be missing if your operating system +cannot support them.) If you prefer time display in 24-hour format, +set the variable @code{display-time-24hr-format} to @code{t}. @cindex mail (on mode line) @vindex display-time-use-mail-icon From 2472c214a6fe78dcbb5eb6df9b6074fb31c0509c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2010 14:52:04 +0200 Subject: [PATCH 12/58] Fix bug #4674 with UNCs in file-relative-name. files.el (file-relative-name): Handle UNC file names on DOS/Windows. Also fixes bug#4673. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 22 ++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6514c16577..aaa55e9abfe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Eli Zaretskii + + * files.el (file-relative-name): Handle UNC file names on + DOS/Windows. (Bug#4674) + 2010-12-02 Glenn Morris * ps-print.el (ps-line-lengths-internal, ps-nb-pages): diff --git a/lisp/files.el b/lisp/files.el index 4901c3872cd..97dce0fc1e5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4054,11 +4054,29 @@ on a DOS/Windows machine, it returns FILENAME in expanded form." (dremote (file-remote-p directory))) (if ;; Conditions for separate trees (or - ;; Test for different drives on DOS/Windows + ;; Test for different filesystems on DOS/Windows (and ;; Should `cygwin' really be included here? --stef (memq system-type '(ms-dos cygwin windows-nt)) - (not (eq t (compare-strings filename 0 2 directory 0 2)))) + (or + ;; Test for different drive letters + (not (eq t (compare-strings filename 0 2 directory 0 2))) + ;; Test for UNCs on different servers + (not (eq t (compare-strings + (progn + (if (string-match "\\`//\\([^:/]+\\)/" filename) + (match-string 1 filename) + ;; Windows file names cannot have ? in + ;; them, so use that to detect when + ;; neither FILENAME nor DIRECTORY is a + ;; UNC. + "?")) + 0 nil + (progn + (if (string-match "\\`//\\([^:/]+\\)/" directory) + (match-string 1 directory) + "?")) + 0 nil t))))) ;; Test for different remote file system identification (not (equal fremote dremote))) filename From bdef6a77401ddff3bdbbeb3b7fcbbfa4c0d14152 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Dec 2010 18:01:30 +0200 Subject: [PATCH 13/58] display.texi (Other Display Specs): Document left-fringe and right-fringe display specs. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/display.texi | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 95973479225..6efa8466563 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Eli Zaretskii + + * display.texi (Other Display Specs): Document left-fringe and + right-fringe display specs. + 2010-12-01 Stefan Monnier * backups.texi (Making Backups): diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ba4cfca0854..9823ced2fad 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3890,6 +3890,13 @@ position as that text. It is equivalent to using just @var{string}, but it is done as a special case of marginal display (@pxref{Display Margins}). +@item (left-fringe @var{bitmap} @r{[}@var{face}@r{]}) +@itemx (right-fringe @var{bitmap} @r{[}@var{face}@r{]}) +This display specification on any character of a line of text causes +the specified @var{bitmap} be displayed in the left or right fringes +for that line. The optional @var{face} specifies the colors to be +used for the bitmap. @xref{Fringe Bitmaps}, for the details. + @item (space-width @var{factor}) This display specification affects all the space characters within the text that has the specification. It displays all of these spaces From e408289fa80874b9a4d6151bfe818b6300b9886f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 16:15:17 -0500 Subject: [PATCH 14/58] * simple.el (transient-mark-mode): Doc fix (Bug#7465). --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aaa55e9abfe..18bf0a40391 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-04 Chong Yidong + + * simple.el (transient-mark-mode): Doc fix (Bug#7465). + 2010-12-04 Eli Zaretskii * files.el (file-relative-name): Handle UNC file names on diff --git a/lisp/simple.el b/lisp/simple.el index 3f4e12133b5..2946da3cdc6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3916,15 +3916,17 @@ Non-nil also enables highlighting of the region whenever the mark is active. The variable `highlight-nonselected-windows' controls whether to highlight all windows or just the selected window. -If the value is `lambda', that enables Transient Mark mode temporarily. -After any subsequent action that would normally deactivate the mark -\(such as buffer modification), Transient Mark mode is turned off. +Lisp programs may give this variable certain special values: -If the value is (only . OLDVAL), that enables Transient Mark mode -temporarily. After any subsequent point motion command that is not -shift-translated, or any other action that would normally deactivate -the mark (such as buffer modification), the value of -`transient-mark-mode' is set to OLDVAL.") +- A value of `lambda' enables Transient Mark mode temporarily. + It is disabled again after any subsequent action that would + normally deactivate the mark (e.g. buffer modification). + +- A value of (only . OLDVAL) enables Transient Mark mode + temporarily. After any subsequent point motion command that is + not shift-translated, or any other action that would normally + deactivate the mark (e.g. buffer modification), the value of + `transient-mark-mode' is set to OLDVAL.") (defvar widen-automatically t "Non-nil means it is ok for commands to call `widen' when they want to. From 11cb1e35ff74fdff80d74ee3ec6d61e74b802cea Mon Sep 17 00:00:00 2001 From: "W. Martin Borgert" Date: Sat, 4 Dec 2010 16:45:17 -0500 Subject: [PATCH 15/58] * lisp/files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. * etc/schema/schemas.xml: Handle *.dbk as DocBook. --- etc/ChangeLog | 4 ++++ etc/schema/schemas.xml | 3 ++- lisp/ChangeLog | 5 +++++ lisp/files.el | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 384b276a285..738c63828fe 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2010-12-04 W. Martin Borgert (tiny change) + + * schema/schemas.xml: Add DocBook (Bug#7491). + 2010-11-21 Ulrich Mueller * HELLO: Add ancient Greek (Bug#7418). diff --git a/etc/schema/schemas.xml b/etc/schema/schemas.xml index 099df6b9436..6edc563b689 100644 --- a/etc/schema/schemas.xml +++ b/etc/schema/schemas.xml @@ -22,7 +22,8 @@ - + + diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18bf0a40391..95ee06e7812 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 W. Martin Borgert (tiny change) + + * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. + (Bug#7491). + 2010-12-04 Chong Yidong * simple.el (transient-mark-mode): Doc fix (Bug#7465). diff --git a/lisp/files.el b/lisp/files.el index 97dce0fc1e5..70d514d16ec 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2267,6 +2267,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" . archive-mode) ("\\.oak\\'" . scheme-mode) ("\\.sgml?\\'" . sgml-mode) ("\\.x[ms]l\\'" . xml-mode) + ("\\.dbk\\'" . xml-mode) ("\\.dtd\\'" . sgml-mode) ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) ("\\.js\\'" . js-mode) ; javascript-mode would be better From 37bf6ce2b49638516419b1cab86e2d891ade779e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 17:41:41 -0500 Subject: [PATCH 16/58] * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART (Bug#7543). Suggested by Lennart Borgman. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-cookie.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 90533fa297c..8fdd340da6c 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Chong Yidong + + * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. + Suggested by Lennart Borgman (Bug#7543). + 2010-09-18 Glenn Morris * url-cache.el (url-is-cached): Doc fix. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 2067f097224..dc7566c6d5e 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -198,7 +198,7 @@ telling Microsoft that." (and exp (> (float-time) (float-time (date-to-time exp)))))) (defun url-cookie-retrieve (host &optional localpart secure) - "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." + "Retrieve all cookies for a specified HOST and LOCALPART." (let ((storage (if secure (append url-cookie-secure-storage url-cookie-storage) url-cookie-storage)) @@ -226,7 +226,8 @@ telling Microsoft that." (setq cur (car cookies) cookies (cdr cookies) localpart-match (url-cookie-localpart cur)) - (if (and (if (stringp localpart-match) + (if (and (if (and (stringp localpart-match) + (stringp localpart)) (string-match (concat "^" (regexp-quote localpart-match)) localpart) From 6ed96c33f0fb05488bb45fc4ed5018a0cd3e45a7 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 4 Dec 2010 17:43:51 -0500 Subject: [PATCH 17/58] * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil (Bug#7533). --- lisp/ChangeLog | 5 +++++ lisp/dired.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95ee06e7812..300a5dd31d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-04 Martin Rudalics + + * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil + (Bug#7533). + 2010-12-04 W. Martin Borgert (tiny change) * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. diff --git a/lisp/dired.el b/lisp/dired.el index b2bd082b1a6..4472c13bab2 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2755,7 +2755,8 @@ name, or the marker and a count of marked files." ;; that's possible. (Bug#1806) (split-window-vertically)) ;; Otherwise, try to split WINDOW sensibly. - (split-window-sensibly window))))) + (split-window-sensibly window)))) + pop-up-frames) (pop-to-buffer (get-buffer-create buf))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit From 77f1ed6cb665b06fc1cdd4e2707932f0b499d481 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 19:32:32 -0500 Subject: [PATCH 18/58] Avoid infloop when scrolling conservatively (Bug#7537). * src/xdisp.c (try_scrolling): Avoid infloop if the first line is obscured due to a vscroll (Bug#7537). --- src/ChangeLog | 5 +++++ src/xdisp.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 025161cc395..95f7039eaf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-12-05 Chong Yidong + + * xdisp.c (try_scrolling): Avoid infloop if the first line is + obscured due to a vscroll (Bug#7537). + 2010-12-02 Jan Djärv * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. diff --git a/src/xdisp.c b/src/xdisp.c index a416c8ff435..dbe3e443c67 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12759,7 +12759,11 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, /* If cursor ends up on a partially visible line, treat that as being off the bottom of the screen. */ - if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) + if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0) + /* It's possible that the cursor is on the first line of the + buffer, which is partially obscured due to a vscroll + (Bug#7537). In that case, avoid looping forever . */ + && extra_scroll_margin_lines < w->desired_matrix->nrows - 1) { clear_glyph_matrix (w->desired_matrix); ++extra_scroll_margin_lines; From 74194465d771110242a989e527000cbb896a6af2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 19:43:18 -0500 Subject: [PATCH 19/58] Doc fix for posn-* functions (Bug#7471). * lisp/subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): Doc fix (Bug#7471). --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 300a5dd31d5..7dce76c1c22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-05 Chong Yidong + + * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): + Doc fix (Bug#7471). + 2010-12-04 Martin Rudalics * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil diff --git a/lisp/subr.el b/lisp/subr.el index 7449295421c..8404352636e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -916,8 +916,9 @@ Select the corresponding window as well." (defsubst posn-x-y (position) "Return the x and y coordinates in POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (X . Y), where X and Y are given in +pixels. POSITION should be a list of the form returned by +`event-start' and `event-end'." (nth 2 position)) (declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) @@ -997,14 +998,15 @@ and `event-end' functions." (defsubst posn-object-x-y (position) "Return the x and y coordinates relative to the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (DX . DY), where DX and DY are +given in pixels. POSITION should be a list of the form returned +by `event-start' and `event-end'." (nth 8 position)) (defsubst posn-object-width-height (position) "Return the pixel width and height of the object of POSITION. -POSITION should be a list of the form returned by the `event-start' -and `event-end' functions." +The return value has the form (WIDTH . HEIGHT). POSITION should +be a list of the form returned by `event-start' and `event-end'." (nth 9 position)) From 637c2c4396accc9734673751fe249c4914804477 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 19:55:00 -0500 Subject: [PATCH 20/58] Doc fixes for comint functions (Bug#7499). * lisp/comint.el (comint-dynamic-list-input-ring) (comint-dynamic-complete-filename) (comint-replace-by-expanded-filename) (comint-dynamic-simple-complete) (comint-dynamic-list-filename-completions) (comint-dynamic-list-completions): Doc fix (Bug#7499). --- lisp/ChangeLog | 7 +++++++ lisp/comint.el | 37 +++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7dce76c1c22..3f348399aca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2010-12-05 Chong Yidong + * comint.el (comint-dynamic-list-input-ring) + (comint-dynamic-complete-filename) + (comint-replace-by-expanded-filename) + (comint-dynamic-simple-complete) + (comint-dynamic-list-filename-completions) + (comint-dynamic-list-completions): Doc fix (Bug#7499). + * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): Doc fix (Bug#7471). diff --git a/lisp/comint.el b/lisp/comint.el index aa0e1599537..09c444187b4 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1000,7 +1000,7 @@ See also `comint-read-input-ring'." (choose-completion-string completion buffer))) (defun comint-dynamic-list-input-ring () - "List in help buffer the buffer's input history." + "Display a list of recent inputs entered into the current buffer." (interactive) (if (or (not (ring-p comint-input-ring)) (ring-empty-p comint-input-ring)) @@ -2996,7 +2996,7 @@ Completes if after a filename. See `comint-match-partial-filename' and This function is similar to `comint-replace-by-expanded-filename', except that it won't change parts of the filename already entered in the buffer; it just adds completion characters to the end of the filename. A completions listing -may be shown in a help buffer if completion is ambiguous. +may be shown in a separate buffer if completion is ambiguous. Completion is dependent on the value of `comint-completion-addsuffix', `comint-completion-recexact' and `comint-completion-fignore', and the timing of @@ -3083,11 +3083,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful." (defun comint-replace-by-expanded-filename () "Dynamically expand and complete the filename at point. -Replace the filename with an expanded, canonicalized and completed replacement. -\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced -with the corresponding directories. \"Canonicalized\" means `..' and `.' are -removed, and the filename is made absolute instead of relative. For expansion -see `expand-file-name' and `substitute-in-file-name'. For completion see +Replace the filename with an expanded, canonicalized and +completed replacement, i.e. substituting environment +variables (e.g. $HOME), `~'s, `..', and `.', and making the +filename absolute. For expansion see `expand-file-name' and +`substitute-in-file-name'. For completion see `comint-dynamic-complete-filename'." (interactive) (let ((filename (comint-match-partial-filename))) @@ -3098,15 +3098,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see (defun comint-dynamic-simple-complete (stub candidates) "Dynamically complete STUB from CANDIDATES list. -This function inserts completion characters at point by completing STUB from -the strings in CANDIDATES. A completions listing may be shown in a help buffer -if completion is ambiguous. +This function inserts completion characters at point by +completing STUB from the strings in CANDIDATES. If completion is +ambiguous, possibly show a completions listing in a separate +buffer. -Returns nil if no completion was inserted. -Returns `sole' if completed with the only completion match. -Returns `shortest' if completed with the shortest of the completion matches. -Returns `partial' if completed as far as possible with the completion matches. -Returns `listed' if a completion listing was shown. +Return nil if no completion was inserted. +Return `sole' if completed with the only completion match. +Return `shortest' if completed with the shortest match. +Return `partial' if completed as far as possible. +Return `listed' if a completion listing was shown. See also `comint-dynamic-complete-filename'." (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) @@ -3154,7 +3155,7 @@ See also `comint-dynamic-complete-filename'." (defun comint-dynamic-list-filename-completions () - "List in help buffer possible completions of the filename at point." + "Display a list of possible completions for the filename at point." (interactive) (let* ((completion-ignore-case read-file-name-completion-ignore-case) ;; If we bind this, it breaks remote directory tracking in rlogin.el. @@ -3183,9 +3184,9 @@ See also `comint-dynamic-complete-filename'." (defvar comint-dynamic-list-completions-config nil) (defun comint-dynamic-list-completions (completions &optional common-substring) - "List in help buffer sorted COMPLETIONS. + "Display a list of sorted COMPLETIONS. The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. -Typing SPC flushes the help buffer." +Typing SPC flushes the completions buffer." (let ((window (get-buffer-window "*Completions*" 0))) (setq completions (sort completions 'string-lessp)) (if (and (eq last-command this-command) From 5eae900ed6d7a87dc245dacbdb963a78666846ee Mon Sep 17 00:00:00 2001 From: Bob Rogers Date: Sat, 4 Dec 2010 19:59:37 -0500 Subject: [PATCH 21/58] * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). --- lisp/ChangeLog | 4 ++++ lisp/vc-dir.el | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f348399aca..747267b674b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-05 Bob Rogers + + * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). + 2010-12-05 Chong Yidong * comint.el (comint-dynamic-list-input-ring) diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 96eb67085b6..5931cbbff8e 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el @@ -748,12 +748,11 @@ To continue searching for next match, use command \\[tags-loop-continue]." (defun vc-dir-query-replace-regexp (from to &optional delimited) "Do `query-replace-regexp' of FROM with TO, on all marked files. -For marked directories, use the files displayed from those directories. If a directory is marked, then use the files displayed for that directory. Third arg DELIMITED (prefix arg) means replace only word-delimited matches. If you exit (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[tags-loop-continue]." - ;; FIXME: this is almost a copy of `dired-do-replace-regexp'. This + ;; FIXME: this is almost a copy of `dired-do-query-replace-regexp'. This ;; should probably be made generic and used in both places instead of ;; duplicating it here. (interactive From 2931c841a3ae5a83bb64c9b6525fa83c9326d55c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Dec 2010 20:16:01 -0500 Subject: [PATCH 22/58] Document behavior of lazy highlight in word search (Bug#7470). * doc/emacs/search.texi (Word Search): Note that the lazy highlight always matches to whole words (Bug#7470). --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/search.texi | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index ffaeafad015..dd03f0e4782 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2010-12-05 Chong Yidong + + * search.texi (Word Search): Note that the lazy highlight always + matches to whole words (Bug#7470). + 2010-12-04 Eli Zaretskii * display.texi (Optional Mode Line): Make the description of diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 0916c577ef0..e7e3a3afc24 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -459,11 +459,13 @@ for a forward search, or @kbd{M-s w C-r @key{RET}} for a backward search. These run the commands @code{word-search-forward} and @code{word-search-backward} respectively. - A nonincremental word search differs slightly from the incremental -version in the way it finds a match: the last word in the search -string must be an exact match for a whole word. In an incremental -word search, the last word in the search string can match part of a -word; this allows the matching to proceed incrementally as you type. + Incremental and nonincremental word searches differ slightly in the +way they find a match. In a nonincremental word search, the last word +in the search string must exactly match a whole word. In an +incremental word search, the matching is more lax: the last word in +the search string can match part of a word, so that the matching +proceeds incrementally as you type. This additional laxity does not +apply to the lazy highlight, which always matches whole words. @node Regexp Search @section Regular Expression Search From f9fe1af93762cdb8d4ea326c1ee6b8f46dec6cc9 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 5 Dec 2010 10:30:58 +0900 Subject: [PATCH 23/58] Trivial fixes for epg.el. * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor. (epg-context-set-passphrase-callback): Mention that the callback is not called when used with GnuPG 2.x. modified: lisp/ChangeLog lisp/epg.elk --- lisp/ChangeLog | 7 +++++++ lisp/epg.el | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 747267b674b..8e80a7a6e19 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -33,6 +33,13 @@ * files.el (file-relative-name): Handle UNC file names on DOS/Windows. (Bug#4674) +2010-12-03 Daiki Ueno + + * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with + "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor. + (epg-context-set-passphrase-callback): Mention that the callback + is not called when used with GnuPG 2.x. + 2010-12-02 Glenn Morris * ps-print.el (ps-line-lengths-internal, ps-nb-pages): diff --git a/lisp/epg.el b/lisp/epg.el index 9fde76d5f85..ad172dfbdcd 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -66,7 +66,7 @@ (defconst epg-digest-algorithm-alist '((1 . "MD5") (2 . "SHA1") - (3 . "RMD160") + (3 . "RIPEMD160") (8 . "SHA256") (9 . "SHA384") (10 . "SHA512") @@ -335,7 +335,13 @@ PASSPHRASE-CALLBACK is either a function, or a cons-cell whose car is a function and cdr is a callback data. The function gets three arguments: the context, the key-id in -question, and the callback data (if any)." +question, and the callback data (if any). + +The callback may not be called if you use GnuPG 2.x, which relies +on the external program called `gpg-agent' for passphrase query. +If you really want to intercept passphrase query, consider +installing GnuPG 1.x _along with_ GnuPG 2.x, which does passphrase +query by itself and Emacs can intercept them." (unless (eq (car-safe context) 'epg-context) (signal 'wrong-type-argument (list 'epg-context-p context))) (aset (cdr context) 7 (if (consp passphrase-callback) From a56d164e67624f351b2b89a340fa212f8c5b8efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 5 Dec 2010 11:33:48 +0100 Subject: [PATCH 24/58] Fix for 7412 (no cursor on image) backported from trunk. * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background with cursor color and draw a rectangle around the image. --- src/ChangeLog | 5 +++++ src/nsterm.m | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 95f7039eaf7..d10b5d194a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-12-05 Jan Djärv + + * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background + with cursor color and draw a rectangle around the image (Bug#7412). + 2010-12-05 Chong Yidong * xdisp.c (try_scrolling): Avoid infloop if the first line is diff --git a/src/nsterm.m b/src/nsterm.m index 43e53cb30e7..38376e4eb08 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2753,7 +2753,10 @@ Function modeled after x_draw_glyph_string_box (). else face = FACE_FROM_ID (s->f, s->first_glyph->face_id); - [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) set]; + if (s->hl == DRAW_CURSOR) + [FRAME_CURSOR_COLOR (s->f) set]; + else + [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) set]; if (bg_height > s->slice.height || s->img->hmargin || s->img->vmargin || s->img->mask || s->img->pixmap == 0 || s->width != s->background_width) @@ -2816,6 +2819,16 @@ Function modeled after x_draw_glyph_string_box (). s->slice.x == 0, s->slice.x + s->slice.width == s->img->width, s); } + + /* If there is no mask, the background won't be seen, + so draw a rectangle on the image for the cursor. + Do this for all images, getting trancparency right is not reliable. */ + if (s->hl == DRAW_CURSOR) + { + int thickness = abs (s->img->relief); + if (thickness == 0) thickness = 1; + ns_draw_box (br, thickness, FRAME_CURSOR_COLOR (s->f), 1, 1); + } } From 0afb6242c77237cd2cc1f0e623b08e20488c5b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 6 Dec 2010 07:51:06 +0100 Subject: [PATCH 25/58] * frame.el (blink-cursor-mode): Make default t for ns. --- lisp/ChangeLog | 4 ++++ lisp/frame.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e80a7a6e19..125ce3351ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-06 Jan Djärv + + * frame.el (blink-cursor-mode): Make default t for ns. + 2010-12-05 Bob Rogers * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). diff --git a/lisp/frame.el b/lisp/frame.el index 0628db7ee38..99f7a26d27a 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1614,7 +1614,7 @@ cursor display. On a text-only terminal, this is not implemented." :init-value (not (or noninteractive no-blinking-cursor (eq system-type 'ms-dos) - (not (memq window-system '(x w32))))) + (not (memq window-system '(x w32 ns))))) :initialize 'custom-initialize-delay :group 'cursor :global t From d8b2a96214c9b53ab914901fdde71f5b0a931678 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Dec 2010 01:54:52 -0500 Subject: [PATCH 26/58] Fix crash with invisible text and overlays (Bug#7016). * src/dispextern.h (struct it): New member overlay_strings_charpos. * src/xdisp.c (next_overlay_string, load_overlay_strings): Record the charpos where we computed n_overlay_strings. (next_overlay_string): Load overlay strings at recorded position, which may not be the same as the iterator's charpos (Bug#7016). --- lisp/mail/rmail.el | 4 ++-- src/ChangeLog | 9 +++++++++ src/dispextern.h | 6 ++++++ src/xdisp.c | 10 +++++++--- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index ff04b76bf82..3f5660e82cb 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4290,7 +4290,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "4a7502b4aeb3bd5f2111b48cc6512924") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "222ca7c1e672a08e5799e5a72fb25049") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4381,7 +4381,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "26b95919c7e1f8c5609ce7323aee77ae") +;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ diff --git a/src/ChangeLog b/src/ChangeLog index d10b5d194a9..3293ec08da5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-12-06 Chong Yidong + + * dispextern.h (struct it): New member overlay_strings_charpos. + + * xdisp.c (next_overlay_string, load_overlay_strings): Record the + charpos where we computed n_overlay_strings. + (next_overlay_string): Load overlay strings at recorded position, + which may not be the same as the iterator's charpos (Bug#7016). + 2010-12-05 Jan Djärv * nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background diff --git a/src/dispextern.h b/src/dispextern.h index bc34aec2dd5..b43565739ea 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1989,6 +1989,12 @@ struct it OVERLAY_STRING_CHUNK_SIZE. */ int n_overlay_strings; + /* The charpos where n_overlay_strings was calculated. This should + be set at the same time as n_overlay_strings. It is needed + because we show before-strings at the start of invisible text; + see handle_invisible_prop in xdisp.c. */ + int overlay_strings_charpos; + /* Vector of overlays to process. Overlay strings are processed OVERLAY_STRING_CHUNK_SIZE at a time. */ #define OVERLAY_STRING_CHUNK_SIZE 16 diff --git a/src/xdisp.c b/src/xdisp.c index dbe3e443c67..161e2b1cc4d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4717,6 +4717,7 @@ next_overlay_string (it) && it->stop_charpos <= it->end_charpos)); it->current.overlay_string_index = -1; it->n_overlay_strings = 0; + it->overlay_strings_charpos = -1; /* If we're at the end of the buffer, record that we have processed the overlay strings there already, so that @@ -4729,11 +4730,13 @@ next_overlay_string (it) /* There are more overlay strings to process. If IT->current.overlay_string_index has advanced to a position where we must load IT->overlay_strings with more strings, do - it. */ + it. We must load at the IT->overlay_strings_charpos where + IT->n_overlay_strings was originally computed; when invisible + text is present, this might not be IT_CHARPOS (Bug#7016). */ int i = it->current.overlay_string_index % OVERLAY_STRING_CHUNK_SIZE; if (it->current.overlay_string_index && i == 0) - load_overlay_strings (it, 0); + load_overlay_strings (it, it->overlay_strings_charpos); /* Initialize IT to deliver display elements from the overlay string. */ @@ -4949,8 +4952,9 @@ load_overlay_strings (it, charpos) if (n > 1) qsort (entries, n, sizeof *entries, compare_overlay_entries); - /* Record the total number of strings to process. */ + /* Record number of overlay strings, and where we computed it. */ it->n_overlay_strings = n; + it->overlay_strings_charpos = charpos; /* IT->current.overlay_string_index is the number of overlay strings that have already been consumed by IT. Copy some of the From 3ecba0495e877769d3b29f67f0648af39352edb8 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Mon, 6 Dec 2010 14:35:54 -0500 Subject: [PATCH 27/58] Fix arg usage of format-decode-run-method (Bug#7488). * lisp/format.el (format-decode-run-method): Pass args FROM and TO, not point-min and point-max, to shell-command-on-region (Bug#7488). --- lisp/ChangeLog | 5 +++++ lisp/format.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 125ce3351ba..88fcbc850be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-06 Lawrence Mitchell + + * format.el (format-decode-run-method): Pass args FROM and TO, not + point-min and point-max, to shell-command-on-region (Bug#7488). + 2010-12-06 Jan Djärv * frame.el (blink-cursor-mode): Make default t for ns. diff --git a/lisp/format.el b/lisp/format.el index d4262e2d0e6..8f2ef2c39a5 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -180,8 +180,7 @@ it should be a Lisp function. Decoding is done for the given BUFFER." ;; We should perhaps go via a temporary buffer and copy it ;; back, in case of errors. (if (and (zerop (save-window-excursion - (shell-command-on-region (point-min) (point-max) - method t t + (shell-command-on-region from to method t t error-buff))) ;; gzip gives zero exit status with bad args, for instance. (zerop (with-current-buffer error-buff From bc60f4de593965f51944d8916bba9311433d23db Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Dec 2010 14:45:31 -0500 Subject: [PATCH 28/58] Initialize image-dired auxilliary filenames relative to image-dired-dirs (Bug#7518). * image-dired.el (image-dired-db-file) (image-dired-temp-image-file, image-dired-gallery-dir) (image-dired-temp-rotate-image-file): Set default values relative to image-dired-dir (Bug#7518). --- lisp/ChangeLog | 7 +++++++ lisp/image-dired.el | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88fcbc850be..a758e7f0a7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-12-06 Chong Yidong + + * image-dired.el (image-dired-db-file) + (image-dired-temp-image-file, image-dired-gallery-dir) + (image-dired-temp-rotate-image-file): Set default values relative + to image-dired-dir (Bug#7518). + 2010-12-06 Lawrence Mitchell * format.el (format-decode-run-method): Pass args FROM and TO, not diff --git a/lisp/image-dired.el b/lisp/image-dired.el index f006e2e9edd..730dd1aadc8 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -186,19 +186,19 @@ that allows sharing of thumbnails across different programs." :group 'image-dired) (defcustom image-dired-db-file - (locate-user-emacs-file "image-dired/.image-dired_db") + (expand-file-name ".image-dired_db" image-dired-dir) "Database file where file names and their associated tags are stored." :type 'string :group 'image-dired) (defcustom image-dired-temp-image-file - (locate-user-emacs-file "image-dired/.image-dired_temp") + (expand-file-name ".image-dired_temp" image-dired-dir) "Name of temporary image file used by various commands." :type 'string :group 'image-dired) (defcustom image-dired-gallery-dir - (locate-user-emacs-file "image-dired/.image-dired_gallery") + (expand-file-name ".image-dired_gallery" image-dired-dir) "Directory to store generated gallery html pages. This path needs to be \"shared\" to the public so that it can access the index.html page that image-dired creates." @@ -343,7 +343,7 @@ original image file name and %t which is replaced by :group 'image-dired) (defcustom image-dired-temp-rotate-image-file - (locate-user-emacs-file "image-dired/.image-dired_rotate_temp") + (expand-file-name ".image-dired_rotate_temp" image-dired-dir) "Temporary file for rotate operations." :type 'string :group 'image-dired) From 86a6e8e02cf3462dd8a0b2660dce5b7c5a78b734 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 6 Dec 2010 14:55:21 -0500 Subject: [PATCH 29/58] * dired-aux.el (dired-do-redisplay): Postphone dired-after-readin-hook while mapping over marks (Bug#6810). --- lisp/ChangeLog | 5 +++++ lisp/dired-aux.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a758e7f0a7f..8609df4c053 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-06 Leo + + * dired-aux.el (dired-do-redisplay): Postphone + dired-after-readin-hook while mapping over marks (Bug#6810). + 2010-12-06 Chong Yidong * image-dired.el (image-dired-db-file) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 62d6928c024..b711934da21 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1017,10 +1017,14 @@ See Info node `(emacs)Subdir switches' for more details." ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename))) + (dired-map-over-marks (let ((fname (dired-get-filename)) + ;; Postphone readin hook till we map + ;; over all marked files (Bug#6810). + (dired-after-readin-hook nil)) (message "Redisplaying... %s" fname) (dired-update-file-line fname)) arg) + (run-hooks 'dired-after-readin-hook) (dired-move-to-filename) (message "Redisplaying...done"))) From e49fb298b820378512e01d9b84970decb3038f8c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 6 Dec 2010 15:07:48 -0500 Subject: [PATCH 30/58] Fix Lawrence Mitchell's email address in lisp/ChangeLog. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8609df4c053..e16bcdaabcc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,7 +10,7 @@ (image-dired-temp-rotate-image-file): Set default values relative to image-dired-dir (Bug#7518). -2010-12-06 Lawrence Mitchell +2010-12-06 Lawrence Mitchell * format.el (format-decode-run-method): Pass args FROM and TO, not point-min and point-max, to shell-command-on-region (Bug#7488). From 2b815743b24c79ae63863bd0f0ffcaf822d400a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 7 Dec 2010 07:36:25 +0100 Subject: [PATCH 31/58] * xsmfns.c (smc_die_CB): Call Fkill_emacs. Fixes: debbugs:7552 --- src/ChangeLog | 4 ++++ src/xsmfns.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3293ec08da5..9a92697b52d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-12-07 Jan Djärv + + * xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552). + 2010-12-06 Chong Yidong * dispextern.h (struct it): New member overlay_strings_charpos. diff --git a/src/xsmfns.c b/src/xsmfns.c index ec5ca3b1a9f..f6260d00a56 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -298,6 +298,10 @@ smc_die_CB (smcConn, clientData) SmcConn smcConn; SmPointer clientData; { + /* This may behave badly if desktop.el tries to ask questions. */ + Fkill_emacs (Qnil); + + /* This will not be reached, but we want kill-emacs-hook to be run. */ SmcCloseConnection (smcConn, 0, 0); ice_connection_closed (); } From 5dcb4c4e5d757099766f7147eace43f0b00c7fe4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Dec 2010 14:44:38 -0500 Subject: [PATCH 32/58] * doc/lispref/modes.texi (Auto-Indentation): New section to document SMIE. (Major Mode Conventions): * doc/lispref/text.texi (Mode-Specific Indent): Refer to it. --- doc/lispref/ChangeLog | 206 +++++++------ doc/lispref/modes.texi | 668 ++++++++++++++++++++++++++++++++++++++++- doc/lispref/text.texi | 2 +- 3 files changed, 771 insertions(+), 105 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 6efa8466563..b27efdda941 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2010-12-07 Stefan Monnier + + * modes.texi (Auto-Indentation): New section to document SMIE. + (Major Mode Conventions): + * text.texi (Mode-Specific Indent): Refer to it. + 2010-12-04 Eli Zaretskii * display.texi (Other Display Specs): Document left-fringe and @@ -12,8 +18,8 @@ 2010-11-21 Chong Yidong - * nonascii.texi (Converting Representations): Document - byte-to-string. + * nonascii.texi (Converting Representations): + Document byte-to-string. * strings.texi (Creating Strings): Don't mention semi-obsolete function char-to-string. @@ -44,8 +50,8 @@ * customize.texi (Composite Types): Lower-case index entry. - * loading.texi (How Programs Do Loading): Document - load-file-name. (Bug#7346) + * loading.texi (How Programs Do Loading): + Document load-file-name. (Bug#7346) 2010-11-10 Glenn Morris @@ -152,8 +158,8 @@ * keymaps.texi (Menu Bar): Document :advertised-binding property. - * functions.texi (Obsolete Functions): Document - set-advertised-calling-convention. + * functions.texi (Obsolete Functions): + Document set-advertised-calling-convention. * minibuf.texi (Basic Completion): Document completion-in-region. (Programmed Completion): Document completion-annotate-function. @@ -278,8 +284,8 @@ * minibuf.texi (Basic Completion): 4th arg to all-completions is obsolete. - * processes.texi (Process Buffers): Document - process-kill-buffer-query-function. + * processes.texi (Process Buffers): + Document process-kill-buffer-query-function. 2009-12-05 Glenn Morris @@ -726,8 +732,8 @@ (Suspending Emacs): Mark suspend-emacs as a command. (Processor Run Time): Mark emacs-uptime and emacs-init-time as commands. - (Terminal Output): Remove obsolete function baud-rate. Document - TERMINAL arg for send-string-to-terminal. + (Terminal Output): Remove obsolete function baud-rate. + Document TERMINAL arg for send-string-to-terminal. * nonascii.texi (Terminal I/O Encoding): Document TERMINAL arg for terminal-coding-system and set-terminal-coding-system. @@ -831,8 +837,8 @@ 2009-05-09 Eli Zaretskii * nonascii.texi (Default Coding Systems): Document - find-auto-coding, set-auto-coding, and auto-coding-alist. Add - indexing. + find-auto-coding, set-auto-coding, and auto-coding-alist. + Add indexing. (Lisp and Coding Systems): Add index entries. 2009-05-09 Martin Rudalics @@ -874,8 +880,8 @@ 2009-04-22 Chong Yidong - * os.texi (Command-Line Arguments): Document - command-line-args-left. + * os.texi (Command-Line Arguments): + Document command-line-args-left. (Suspending Emacs): Adapt text to multi-tty case. Document use of terminal objects for tty arguments. (Startup Summary): Add xref to Session Management. @@ -951,13 +957,13 @@ 2009-04-09 Chong Yidong * text.texi (Yank Commands): Note that yank uses push-mark. - (Filling): Clarify REGION argument of fill-paragraph. Document - fill-forward-paragraph-function. + (Filling): Clarify REGION argument of fill-paragraph. + Document fill-forward-paragraph-function. (Special Properties): Remove "new in Emacs 22" declaration. (Clickable Text): Merge with Links and Mouse-1 node. - * display.texi (Button Properties, Button Buffer Commands): Change - xref to Clickable Text. + * display.texi (Button Properties, Button Buffer Commands): + Change xref to Clickable Text. * tips.texi (Key Binding Conventions): Change xref to Clickable Text. @@ -1019,8 +1025,8 @@ 2009-03-29 Chong Yidong - * help.texi (Accessing Documentation, Help Functions): Remove - information about long-obsolete Emacs versions. + * help.texi (Accessing Documentation, Help Functions): + Remove information about long-obsolete Emacs versions. * modes.texi (Mode Line Variables): The default values of the mode line variables are now more complicated. @@ -1063,8 +1069,8 @@ 2009-03-23 Chong Yidong * minibuf.texi (Intro to Minibuffers): Remove long-obsolete info - about minibuffers in old Emacs versions. Copyedits. Emphasize - that enable-recursive-minibuffers defaults to nil. + about minibuffers in old Emacs versions. Copyedits. + Emphasize that enable-recursive-minibuffers defaults to nil. (Text from Minibuffer): Simplify introduction. 2009-03-22 Alan Mackenzie @@ -1118,8 +1124,8 @@ * customize.texi (Common Keywords): It's not necessary to use :tag to remove hyphens, as custom-unlispify-tag-name does it automatically. - (Variable Definitions): Link to File Local Variables. Document - customized-value symbol property. + (Variable Definitions): Link to File Local Variables. + Document customized-value symbol property. (Customization Types): Move menu to end of node. 2009-03-10 Chong Yidong @@ -1230,8 +1236,8 @@ * text.texi (Commands for Insertion): * commands.texi (Event Mod): * keymaps.texi (Searching Keymaps): - * nonascii.texi (Translation of Characters): Reinstate - documentation of translation-table-for-input. + * nonascii.texi (Translation of Characters): + Reinstate documentation of translation-table-for-input. (Explicit Encoding): Document the `charset' text property produced by decode-coding-region and decode-coding-string. @@ -1260,8 +1266,8 @@ 2009-01-22 Chong Yidong * files.texi (Format Conversion Piecemeal): Clarify behavior of - write-region-annotate-functions. Document - write-region-post-annotation-function. + write-region-annotate-functions. + Document write-region-post-annotation-function. 2009-01-19 Chong Yidong @@ -1328,8 +1334,8 @@ * processes.texi (Serial Ports): Improve wording, suggested by RMS. - * nonascii.texi (Lisp and Coding Systems): Document - inhibit-null-byte-detection and inhibit-iso-escape-detection. + * nonascii.texi (Lisp and Coding Systems): + Document inhibit-null-byte-detection and inhibit-iso-escape-detection. (Character Properties): Improve wording. 2009-01-09 Chong Yidong @@ -1337,8 +1343,8 @@ * display.texi (Font Lookup): Remove obsolete function x-font-family-list. x-list-fonts accepts Fontconfig/GTK syntax. (Low-Level Font): Rename from Fonts, move to end of Faces section. - (Font Selection): Reorder order of variable descriptions. Minor - clarifications. + (Font Selection): Reorder order of variable descriptions. + Minor clarifications. * elisp.texi (Top): Update node listing. @@ -1359,8 +1365,8 @@ * elisp.texi: Update node listing. * display.texi (Faces): Put Font Selection node after Auto Faces. - (Face Attributes): Don't link to Font Lookup. Document - font-family-list. + (Face Attributes): Don't link to Font Lookup. + Document font-family-list. (Fonts): New node. 2009-01-08 Jason Rumney @@ -1588,8 +1594,8 @@ * windows.texi (Window Hooks): Remove *-end-trigger-functions vars, which are obsolete. Mention jit-lock-register. - * modes.texi (Other Font Lock Variables): Document - jit-lock-register and jit-lock-unregister. + * modes.texi (Other Font Lock Variables): + Document jit-lock-register and jit-lock-unregister. * frames.texi (Color Parameters): Document alpha parameter. @@ -1661,8 +1667,8 @@ 2008-11-01 Eli Zaretskii * nonascii.texi (Text Representations): Rewrite to make consistent - with Emacs 23 internal representation of characters. Document - `unibyte-string'. + with Emacs 23 internal representation of characters. + Document `unibyte-string'. 2008-10-28 Chong Yidong @@ -1775,8 +1781,8 @@ * processes.texi (Synchronous Processes): Document `process-lines'. - * customize.texi (Variable Definitions): Document - `custom-reevaluate-setting'. + * customize.texi (Variable Definitions): + Document `custom-reevaluate-setting'. 2008-10-18 Martin Rudalics @@ -1792,13 +1798,13 @@ * maps.texi (Standard Keymaps): Document `multi-query-replace-map' and `search-map'. - * searching.texi (Search and Replace): Document - `replace-search-function' and `replace-re-search-function'. + * searching.texi (Search and Replace): + Document `replace-search-function' and `replace-re-search-function'. Document `multi-query-replace-map'. * minibuf.texi (Text from Minibuffer): Document `read-regexp'. - (Completion Commands, Reading File Names): Rename - `minibuffer-local-must-match-filename-map' to + (Completion Commands, Reading File Names): + Rename `minibuffer-local-must-match-filename-map' to `minibuffer-local-filename-must-match-map'. (Minibuffer Completion): The `require-match' argument to `completing-read' can now have the value `confirm-only'. @@ -2143,7 +2149,7 @@ 2007-12-30 Richard Stallman - * commands.texi (Accessing Mouse): Renamed from Accessing Events. + * commands.texi (Accessing Mouse): Rename from Accessing Events. (Accessing Scroll): New node broken out of Accessing Mouse. 2007-12-28 Richard Stallman @@ -2187,8 +2193,8 @@ 2007-11-29 Glenn Morris - * functions.texi (Declaring Functions): Add findex. Mention - `external' files. + * functions.texi (Declaring Functions): Add findex. + Mention `external' files. 2007-11-26 Juanma Barranquero @@ -2315,8 +2321,8 @@ * display.texi (Display Property): Explain some display specs don't let you move point in. - * frames.texi (Cursor Parameters): Describe - cursor-in-non-selected-windows here. Explain more values. + * frames.texi (Cursor Parameters): + Describe cursor-in-non-selected-windows here. Explain more values. * windows.texi (Basic Windows): Don't describe cursor-in-non-selected-windows here. @@ -2395,8 +2401,8 @@ 2007-08-16 Richard Stallman - * processes.texi (Asynchronous Processes): Clarify - doc of start-file-process. + * processes.texi (Asynchronous Processes): + Clarify doc of start-file-process. 2007-08-08 Martin Rudalics @@ -2463,8 +2469,8 @@ 2007-06-27 Richard Stallman - * files.texi (Format Conversion Piecemeal): Clarify - `after-insert-file-functions' calling convention. + * files.texi (Format Conversion Piecemeal): + Clarify `after-insert-file-functions' calling convention. 2007-06-27 Michael Albinus @@ -2519,8 +2525,8 @@ 2007-05-30 Nick Roberts - * commands.texi (Click Events): Layout more logically. Describe - width and height. + * commands.texi (Click Events): Layout more logically. + Describe width and height. (Drag Events, Motion Events): Update to new format for position. 2007-06-02 Richard Stallman @@ -2926,8 +2932,8 @@ 2007-03-05 Richard Stallman - * variables.texi (File Local Variables): Update - enable-local-variables values. + * variables.texi (File Local Variables): + Update enable-local-variables values. 2007-03-04 Richard Stallman @@ -2998,8 +3004,8 @@ 2007-02-03 Eli Zaretskii * elisp.texi (Top): Make the detailed menu headers compliant with - Texinfo guidelines and with what texnfo-upd.el expects. Add - comments to prevent people from inadvertently modifying the key + Texinfo guidelines and with what texnfo-upd.el expects. + Add comments to prevent people from inadvertently modifying the key parts needed by `texinfo-multiple-files-update'. 2007-02-02 Eli Zaretskii @@ -3086,8 +3092,8 @@ 2006-12-24 Richard Stallman - * customize.texi (Variable Definitions): Document - new name custom-add-frequent-value. + * customize.texi (Variable Definitions): + Document new name custom-add-frequent-value. 2006-12-19 Kim F. Storm @@ -3386,8 +3392,8 @@ 2006-09-01 Chong Yidong - * buffers.texi (Buffer Modification): Document - buffer-chars-modified-tick. + * buffers.texi (Buffer Modification): + Document buffer-chars-modified-tick. 2006-08-31 Richard Stallman @@ -3449,7 +3455,7 @@ 2006-08-12 Chong Yidong * text.texi (Near Point): Say "cursor" not "terminal cursor". - (Commands for Insertion): Removed split-line since it's not + (Commands for Insertion): Remove split-line since it's not relevant for Lisp programming. (Yank Commands): Rewrite introduction. (Undo): Clarify. @@ -3480,7 +3486,7 @@ (Major Mode Basics): Mention define-derived-mode explicitly. (Major Mode Conventions): Rebinding RET is OK for some modes. Mention change-major-mode-hook and after-change-major-mode-hook. - (Example Major Modes): Moved to end of Modes section. + (Example Major Modes): Move to end of Modes section. (Mode Line Basics): Clarify. (Mode Line Data): Mention help-echo and local-map in strings. Explain reason for treatment of non-risky variables. @@ -3979,7 +3985,7 @@ 2006-05-25 Chong Yidong - * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. + * keymaps.texi (Key Sequences): Rename from Keymap Terminology. Explain string and vector representations of key sequences. * keymaps.texi (Changing Key Bindings): @@ -4028,8 +4034,8 @@ 2006-05-15 Oliver Scholz (tiny change) - * nonascii.texi (Explicit Encoding): Fix - typo (encoding<->decoding). + * nonascii.texi (Explicit Encoding): + Fix typo (encoding<->decoding). 2006-05-14 Richard Stallman @@ -4079,8 +4085,8 @@ 2006-05-09 Richard Stallman - * variables.texi (File Local Variables): Document - safe-local-eval-forms and safe-local-eval-function. + * variables.texi (File Local Variables): + Document safe-local-eval-forms and safe-local-eval-function. 2006-05-07 Kim F. Storm @@ -4564,8 +4570,8 @@ 2005-12-03 Eli Zaretskii - * hooks.texi (Standard Hooks): Add index entries. Mention - `compilation-finish-functions'. + * hooks.texi (Standard Hooks): Add index entries. + Mention `compilation-finish-functions'. 2005-11-27 Richard M. Stallman @@ -4788,8 +4794,8 @@ buffer-local. (Undo): Note that buffer-undo-list is buffer-local. - * windows.texi (Buffers and Windows): Document - buffer-display-count. + * windows.texi (Buffers and Windows): + Document buffer-display-count. 2005-09-06 Richard M. Stallman @@ -5030,7 +5036,7 @@ * display.texi (Displaying Messages): New node, with most of what was in The Echo Area. - (Progress): Moved under The Echo Area. + (Progress): Move under The Echo Area. (Logging Messages): New node with new text. (Echo Area Customization): New node, the rest of what was in The Echo Area. Document message-truncate-lines with @defvar. @@ -6345,8 +6351,8 @@ (Scroll Bars): Add scroll-bar-mode and scroll-bar-width. (Usual Display): Move tab-width up. - * customize.texi (Variable Definitions): Replace - show-paren-mode example with tooltip-mode. + * customize.texi (Variable Definitions): + Replace show-paren-mode example with tooltip-mode. (Simple Types, Composite Types, Defining New Types): Minor cleanups. @@ -6582,8 +6588,8 @@ (Display Fringe Bitmaps): New node. (Images): Add 'Image Slices' to menu. (Image Descriptors): Add `:pointer' and `:map' properties. - (Showing Images): Add slice arg to `insert-image'. Add - 'insert-sliced-image'. + (Showing Images): Add slice arg to `insert-image'. + Add 'insert-sliced-image'. 2004-09-20 Richard M. Stallman @@ -6596,8 +6602,8 @@ 2004-09-07 Luc Teirlinck - * locals.texi (Standard Buffer-Local Variables): Add - `buffer-auto-save-file-format'. + * locals.texi (Standard Buffer-Local Variables): + Add `buffer-auto-save-file-format'. * internals.texi (Buffer Internals): Describe new auto_save_file_format field of the buffer structure. * files.texi (Format Conversion): `auto-save-file-format' has been @@ -6985,8 +6991,8 @@ 2004-04-05 Jesper Harder - * variables.texi (Variable Aliases): Mention - cyclic-variable-indirection. + * variables.texi (Variable Aliases): + Mention cyclic-variable-indirection. * errors.texi (Standard Errors): Ditto. @@ -7165,7 +7171,7 @@ 2004-02-07 Jan Djärv - * positions.texi (Text Lines): Added missing end defun. + * positions.texi (Text Lines): Add missing end defun. 2004-02-07 Kim F. Storm @@ -7188,12 +7194,12 @@ read-minibuffer. (Minibuffer History): Clarify description of cons values for HISTORY arguments. - (Basic Completion): Various corrections and clarifications. Add - completion-regexp-list. + (Basic Completion): Various corrections and clarifications. + Add completion-regexp-list. (Minibuffer Completion): Correct and clarify description of completing-read. - (Completion Commands): Mention Partial Completion mode. Various - other minor changes. + (Completion Commands): Mention Partial Completion mode. + Various other minor changes. (High-Level Completion): Various corrections and clarifications. (Reading File Names): Ditto. (Minibuffer Misc): Ditto. @@ -7268,8 +7274,8 @@ * functions.texi: Various small changes in addition to the following. - (What Is a Function): `functionp' returns nil for macros. Clarify - behavior of this and following functions for symbol arguments. + (What Is a Function): `functionp' returns nil for macros. + Clarify behavior of this and following functions for symbol arguments. (Function Documentation): Add `\' in front of (fn @var{arglist}) and explain why. (Defining Functions): Mention DOCSTRING argument to `defalias'. @@ -8065,7 +8071,7 @@ 2003-01-31 Joe Buehler - * os.texi (System Environment): Added cygwin system-type. + * os.texi (System Environment): Add cygwin system-type. 2003-01-25 Richard M. Stallman @@ -8098,7 +8104,7 @@ * README: Target for Info file is `make info'. - * files.texi (File Name Components): Fixed typos in + * files.texi (File Name Components): Fix typos in `file-name-sans-extension'. (Magic File Names): Complete list of operations for magic file name handlers. @@ -8114,7 +8120,7 @@ 2002-08-05 Per Abrahamsen - * customize.texi (Splicing into Lists): Fixed example. + * customize.texi (Splicing into Lists): Fix example. Reported by Fabrice Bauzac . 2002-06-17 Juanma Barranquero @@ -8154,8 +8160,8 @@ 2001-11-17 Eli Zaretskii - * permute-index: Don't depend on csh-specific features. Replace - the interpreter name with /bin/sh. + * permute-index: Don't depend on csh-specific features. + Replace the interpreter name with /bin/sh. * two-volume-cross-refs.txt: New file. * two.el: New file. @@ -8293,8 +8299,8 @@ * numbers.texi (Integer Basics): Document CL style read syntax for integers in bases other than 10. - * positions.texi (List Motion): Document - open-paren-in-column-0-is-defun-start. + * positions.texi (List Motion): + Document open-paren-in-column-0-is-defun-start. * lists.texi (Sets And Lists): Document member-ignore-case. @@ -8489,7 +8495,7 @@ 1995-06-19 Richard Stallman * Makefile (VERSION): Update version number. - (maintainer-clean): Renamed from realclean. + (maintainer-clean): Rename from realclean. 1995-06-07 Karl Heuer @@ -8561,11 +8567,11 @@ 1991-11-26 Richard Stallman (rms@mole.gnu.ai.mit.edu) - * Makefile (srcs): Added index.perm. + * Makefile (srcs): Add index.perm. (elisp.dvi): Remove erroneous shell comment. Expect output of permute-index in permuted.fns. Save old elisp.aux in elisp.oaux. - (clean): Added index.texi to be deleted. + (clean): Add index.texi to be deleted. 1990-08-11 Richard Stallman (rms@sugar-bombs.ai.mit.edu) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 0ccb4ae04ed..0b6547177e0 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -24,10 +24,11 @@ user. For related topics such as keymaps and syntax tables, see * Major Modes:: Defining major modes. * Minor Modes:: Defining minor modes. * Mode Line Format:: Customizing the text that appears in the mode line. -* Imenu:: How a mode can provide a menu +* Imenu:: How a mode can provide a menu of definitions in the buffer. -* Font Lock Mode:: How modes can highlight text according to syntax. -* Desktop Save Mode:: How modes can have buffer state saved between +* Font Lock Mode:: How modes can highlight text according to syntax. +* Auto-Indentation:: How to teach Emacs to indent for a major mode. +* Desktop Save Mode:: How modes can have buffer state saved between Emacs sessions. @end menu @@ -332,7 +333,7 @@ In a major mode for editing some kind of structured text, such as a programming language, indentation of text according to structure is probably useful. So the mode should set @code{indent-line-function} to a suitable function, and probably customize other variables -for indentation. +for indentation. @xref{Auto-Indentation}. @item @cindex keymaps in modes @@ -3214,6 +3215,665 @@ Since this function is called after every buffer change, it should be reasonably fast. @end defvar +@node Auto-Indentation +@section Auto-indention of code + +For programming languages, an important feature of a major mode is to +provide automatic indentation. This is controlled in Emacs by +@code{indent-line-function} (@pxref{Mode-Specific Indent}). +Writing a good indentation function can be difficult and to a large +extent it is still a black art. + +Many major mode authors will start by writing a simple indentation +function that works for simple cases, for example by comparing with the +indentation of the previous text line. For most programming languages +that are not really line-based, this tends to scale very poorly: +improving such a function to let it handle more diverse situations tends +to become more and more difficult, resulting in the end with a large, +complex, unmaintainable indentation function which nobody dares to touch. + +A good indentation function will usually need to actually parse the +text, according to the syntax of the language. Luckily, it is not +necessary to parse the text in as much detail as would be needed +for a compiler, but on the other hand, the parser embedded in the +indentation code will want to be somewhat friendly to syntactically +incorrect code. + +Good maintainable indentation functions usually fall into 2 categories: +either parsing forward from some ``safe'' starting point until the +position of interest, or parsing backward from the position of interest. +Neither of the two is a clearly better choice than the other: parsing +backward is often more difficult than parsing forward because +programming languages are designed to be parsed forward, but for the +purpose of indentation it has the advantage of not needing to +guess a ``safe'' starting point, and it generally enjoys the property +that only a minimum of text will be analyzed to decide the indentation +of a line, so indentation will tend to be unaffected by syntax errors in +some earlier unrelated piece of code. Parsing forward on the other hand +is usually easier and has the advantage of making it possible to +reindent efficiently a whole region at a time, with a single parse. + +Rather than write your own indentation function from scratch, it is +often preferable to try and reuse some existing ones or to rely +on a generic indentation engine. There are sadly few such +engines. The CC-mode indentation code (used with C, C++, Java, Awk +and a few other such modes) has been made more generic over the years, +so if your language seems somewhat similar to one of those languages, +you might try to use that engine. @c FIXME: documentation? +Another one is SMIE which takes an approach in the spirit +of Lisp sexps and adapts it to non-Lisp languages. + +@menu +* SMIE:: A simple minded indentation engine +@end menu + +@node SMIE +@subsection Simple Minded Indentation Engine + +SMIE is a package that provides a generic navigation and indentation +engine. Based on a very simple parser using an ``operator precedence +grammar'', it lets major modes extend the sexp-based navigation of Lisp +to non-Lisp languages as well as provide a simple to use but reliable +auto-indentation. + +Operator precedence grammar is a very primitive technology for parsing +compared to some of the more common techniques used in compilers. +It has the following characteristics: its parsing power is very limited, +and it is largely unable to detect syntax errors, but it has the +advantage of being algorithmically efficient and able to parse forward +just as well as backward. In practice that means that SMIE can use it +for indentation based on backward parsing, that it can provide both +@code{forward-sexp} and @code{backward-sexp} functionality, and that it +will naturally work on syntactically incorrect code without any extra +effort. The downside is that it also means that most programming +languages cannot be parsed correctly using SMIE, at least not without +resorting to some special tricks (@pxref{SMIE Tricks}). + +@menu +* SMIE setup:: SMIE setup and features +* Operator Precedence Grammars:: A very simple parsing technique +* SMIE Grammar:: Defining the grammar of a language +* SMIE Lexer:: Defining tokens +* SMIE Tricks:: Working around the parser's limitations +* SMIE Indentation:: Specifying indentation rules +* SMIE Indentation Helpers:: Helper functions for indentation rules +* SMIE Indentation Example:: Sample indentation rules +@end menu + +@node SMIE setup +@subsubsection SMIE Setup and Features + +SMIE is meant to be a one-stop shop for structural navigation and +various other features which rely on the syntactic structure of code, in +particular automatic indentation. The main entry point is +@code{smie-setup} which is a function typically called while setting +up a major mode. + +@defun smie-setup grammar rules-function &rest keywords +Setup SMIE navigation and indentation. +@var{grammar} is a grammar table generated by @code{smie-prec2->grammar}. +@var{rules-function} is a set of indentation rules for use on +@code{smie-rules-function}. +@var{keywords} are additional arguments, which can include the following +keywords: +@itemize +@item +@code{:forward-token} @var{fun}: Specify the forward lexer to use. +@item +@code{:backward-token} @var{fun}: Specify the backward lexer to use. +@end itemize +@end defun + +Calling this function is sufficient to make commands such as +@code{forward-sexp}, @code{backward-sexp}, and @code{transpose-sexps} be +able to properly handle structural elements other than just the paired +parentheses already handled by syntax tables. For example, if the +provided grammar is precise enough, @code{transpose-sexps} can correctly +transpose the two arguments of a @code{+} operator, taking into account +the precedence rules of the language. + +Calling `smie-setup' is also sufficient to make TAB indentation work in +the expected way, and provides some commands that you can bind in the +major mode keymap. + +@deffn Command smie-close-block +This command closes the most recently opened (and not yet closed) block. +@end deffn + +@deffn Command smie-down-list &optional arg +This command is like @code{down-list} but it also pays attention to +nesting of tokens other than parentheses, such as @code{begin...end}. +@end deffn + +@node Operator Precedence Grammars +@subsubsection Operator Precedence Grammars + +SMIE's precedence grammars simply give to each token a pair of +precedences: the left-precedence and the right-precedence. We say +@code{T1 < T2} if the right-precedence of token @code{T1} is less than +the left-precedence of token @code{T2}. A good way to read this +@code{<} is as a kind of parenthesis: if we find @code{... T1 something +T2 ...} then that should be parsed as @code{... T1 (something T2 ...} +rather than as @code{... T1 something) T2 ...}. The latter +interpretation would be the case if we had @code{T1 > T2}. If we have +@code{T1 = T2}, it means that token T2 follows token T1 in the same +syntactic construction, so typically we have @code{"begin" = "end"}. +Such pairs of precedences are sufficient to express left-associativity +or right-associativity of infix operators, nesting of tokens like +parentheses and many other cases. + +@c ¡Let's leave this undocumented to leave it more open for change! +@c @defvar smie-grammar +@c The value of this variable is an alist specifying the left and right +@c precedence of each token. It is meant to be initialized by using one of +@c the functions below. +@c @end defvar + +@defun smie-prec2->grammar table +This function takes a @emph{prec2} grammar @var{table} and returns an +alist suitable for use in @code{smie-setup}. The @emph{prec2} +@var{table} is itself meant to be built by one of the functions below. +@end defun + +@defun smie-merge-prec2s &rest tables +This function takes several @emph{prec2} @var{tables} and merges them +into a new @emph{prec2} table. +@end defun + +@defun smie-precs->prec2 precs +This function builds a @emph{prec2} table from a table of precedences +@var{precs}. @var{precs} should be a list, sorted by precedence (for +example @code{"+"} will come before @code{"*"}), of elements of the form +@code{(@var{assoc} @var{op} ...)}, where each @var{op} is a token that +acts as an operator; @var{assoc} is their associativity, which can be +either @code{left}, @code{right}, @code{assoc}, or @code{nonassoc}. +All operators in a given element share the same precedence level +and associativity. +@end defun + +@defun smie-bnf->prec2 bnf &rest resolvers +This function lets you specify the grammar using a BNF notation. +It accepts a @var{bnf} description of the grammar along with a set of +conflict resolution rules @var{resolvers}, and +returns a @emph{prec2} table. + +@var{bnf} is a list of nonterminal definitions of the form +@code{(@var{nonterm} @var{rhs1} @var{rhs2} ...)} where each @var{rhs} +is a (non-empty) list of terminals (aka tokens) or non-terminals. + +Not all grammars are accepted: +@itemize +@item +An @var{rhs} cannot be an empty list (an empty list is never needed, +since SMIE allows all non-terminals to match the empty string anyway). +@item +An @var{rhs} cannot have 2 consecutive non-terminals: each pair of +non-terminals needs to be separated by a terminal (aka token). +This is a fundamental limitation of operator precedence grammars. +@end itemize + +Additionally, conflicts can occur: +@itemize +@item +The returned @emph{prec2} table holds constraints between pairs of tokens, and +for any given pair only one constraint can be present: T1 < T2, +T1 = T2, or T1 > T2. +@item +A token can be an @code{opener} (something similar to an open-paren), +a @code{closer} (like a close-paren), or @code{neither} of the two +(e.g. an infix operator, or an inner token like @code{"else"}). +@end itemize + +Precedence conflicts can be resolved via @var{resolvers}, which +is a list of @emph{precs} tables (see @code{smie-precs->prec2}): for +each precedence conflict, if those @code{precs} tables +specify a particular constraint, then the conflict is resolved by using +this constraint instead, else a conflict is reported and one of the +conflicting constraints is picked arbitrarily and the others are +simply ignored. +@end defun + +@node SMIE Grammar +@subsubsection Defining the Grammar of a Language + +The usual way to define the SMIE grammar of a language is by +defining a new global variable that holds the precedence table by +giving a set of BNF rules. +For example, the grammar definition for a small Pascal-like language +could look like: +@example +@group +(require 'smie) +(defvar sample-smie-grammar + (smie-prec2->grammar + (smie-bnf->prec2 +@end group +@group + '((id) + (inst ("begin" insts "end") + ("if" exp "then" inst "else" inst) + (id ":=" exp) + (exp)) + (insts (insts ";" insts) (inst)) + (exp (exp "+" exp) + (exp "*" exp) + ("(" exps ")")) + (exps (exps "," exps) (exp))) +@end group +@group + '((assoc ";")) + '((assoc ",")) + '((assoc "+") (assoc "*"))))) +@end group +@end example + +@noindent +A few things to note: + +@itemize +@item +The above grammar does not explicitly mention the syntax of function +calls: SMIE will automatically allow any sequence of sexps, such as +identifiers, balanced parentheses, or @code{begin ... end} blocks +to appear anywhere anyway. +@item +The grammar category @code{id} has no right hand side: this does not +mean that it can match only the empty string, since as mentioned any +sequence of sexps can appear anywhere anyway. +@item +Because non terminals cannot appear consecutively in the BNF grammar, it +is difficult to correctly handle tokens that act as terminators, so the +above grammar treats @code{";"} as a statement @emph{separator} instead, +which SMIE can handle very well. +@item +Separators used in sequences (such as @code{","} and @code{";"} above) +are best defined with BNF rules such as @code{(foo (foo "separator" foo) ...)} +which generate precedence conflicts which are then resolved by giving +them an explicit @code{(assoc "separator")}. +@item +The @code{("(" exps ")")} rule was not needed to pair up parens, since +SMIE will pair up any characters that are marked as having paren syntax +in the syntax table. What this rule does instead (together with the +definition of @code{exps}) is to make it clear that @code{","} should +not appear outside of parentheses. +@item +Rather than have a single @emph{precs} table to resolve conflicts, it is +preferable to have several tables, so as to let the BNF part of the +grammar specify relative precedences where possible. +@item +Unless there is a very good reason to prefer @code{left} or +@code{right}, it is usually preferable to mark operators as associative, +using @code{assoc}. For that reason @code{"+"} and @code{"*"} are +defined above as @code{assoc}, although the language defines them +formally as left associative. +@end itemize + +@node SMIE Lexer +@subsubsection Defining Tokens + +SMIE comes with a predefined lexical analyzer which uses syntax tables +in the following way: any sequence of characters that have word or +symbol syntax is considered a token, and so is any sequence of +characters that have punctuation syntax. This default lexer is +often a good starting point but is rarely actually correct for any given +language. For example, it will consider @code{"2,+3"} to be composed +of 3 tokens: @code{"2"}, @code{",+"}, and @code{"3"}. + +To describe the lexing rules of your language to SMIE, you need +2 functions, one to fetch the next token, and another to fetch the +previous token. Those functions will usually first skip whitespace and +comments and then look at the next chunk of text to see if it +is a special token. If so it should skip the token and +return a description of this token. Usually this is simply the string +extracted from the buffer, but it can be anything you want. +For example: +@example +@group +(defvar sample-keywords-regexp + (regexp-opt '("+" "*" "," ";" ">" ">=" "<" "<=" ":=" "="))) +@end group +@group +(defun sample-smie-forward-token () + (forward-comment (point-max)) + (cond + ((looking-at sample-keywords-regexp) + (goto-char (match-end 0)) + (match-string-no-properties 0)) + (t (buffer-substring-no-properties + (point) + (progn (skip-syntax-forward "w_") + (point)))))) +@end group +@group +(defun sample-smie-backward-token () + (forward-comment (- (point))) + (cond + ((looking-back sample-keywords-regexp (- (point) 2) t) + (goto-char (match-beginning 0)) + (match-string-no-properties 0)) + (t (buffer-substring-no-properties + (point) + (progn (skip-syntax-backward "w_") + (point)))))) +@end group +@end example + +Notice how those lexers return the empty string when in front of +parentheses. This is because SMIE automatically takes care of the +parentheses defined in the syntax table. More specifically if the lexer +returns nil or an empty string, SMIE tries to handle the corresponding +text as a sexp according to syntax tables. + +@node SMIE Tricks +@subsubsection Living With a Weak Parser + +The parsing technique used by SMIE does not allow tokens to behave +differently in different contexts. For most programming languages, this +manifests itself by precedence conflicts when converting the +BNF grammar. + +Sometimes, those conflicts can be worked around by expressing the +grammar slightly differently. For example, for Modula-2 it might seem +natural to have a BNF grammar that looks like this: + +@example + ... + (inst ("IF" exp "THEN" insts "ELSE" insts "END") + ("CASE" exp "OF" cases "END") + ...) + (cases (cases "|" cases) (caselabel ":" insts) ("ELSE" insts)) + ... +@end example + +But this will create conflicts for @code{"ELSE"}: on the one hand, the +IF rule implies (among many other things) that @code{"ELSE" = "END"}; +but on the other hand, since @code{"ELSE"} appears within @code{cases}, +which appears left of @code{"END"}, we also have @code{"ELSE" > "END"}. +We can solve the conflict either by using: +@example + ... + (inst ("IF" exp "THEN" insts "ELSE" insts "END") + ("CASE" exp "OF" cases "END") + ("CASE" exp "OF" cases "ELSE" insts "END") + ...) + (cases (cases "|" cases) (caselabel ":" insts)) + ... +@end example +or +@example + ... + (inst ("IF" exp "THEN" else "END") + ("CASE" exp "OF" cases "END") + ...) + (else (insts "ELSE" insts)) + (cases (cases "|" cases) (caselabel ":" insts) (else)) + ... +@end example + +Reworking the grammar to try and solve conflicts has its downsides, tho, +because SMIE assumes that the grammar reflects the logical structure of +the code, so it is preferable to keep the BNF closer to the intended +abstract syntax tree. + +Other times, after careful consideration you may conclude that those +conflicts are not serious and simply resolve them via the +@var{resolvers} argument of @code{smie-bnf->prec2}. Usually this is +because the grammar is simply ambiguous: the conflict does not affect +the set of programs described by the grammar, but only the way those +programs are parsed. This is typically the case for separators and +associative infix operators, where you want to add a resolver like +@code{'((assoc "|"))}. Another case where this can happen is for the +classic @emph{dangling else} problem, where you will use @code{'((assoc +"else" "then"))}. It can also happen for cases where the conflict is +real and cannot really be resolved, but it is unlikely to pose a problem +in practice. + +Finally, in many cases some conflicts will remain despite all efforts to +restructure the grammar. Do not despair: while the parser cannot be +made more clever, you can make the lexer as smart as you want. So, the +solution is then to look at the tokens involved in the conflict and to +split one of those tokens into 2 (or more) different tokens. E.g. if +the grammar needs to distinguish between two incompatible uses of the +token @code{"begin"}, make the lexer return different tokens (say +@code{"begin-fun"} and @code{"begin-plain"}) depending on which kind of +@code{"begin"} it finds. This pushes the work of distinguishing the +different cases to the lexer, which will thus have to look at the +surrounding text to find ad-hoc clues. + +@node SMIE Indentation +@subsubsection Specifying Indentation Rules + +Based on the provided grammar, SMIE will be able to provide automatic +indentation without any extra effort. But in practice, this default +indentation style will probably not be good enough. You will want to +tweak it in many different cases. + +SMIE indentation is based on the idea that indentation rules should be +as local as possible. To this end, it relies on the idea of +@emph{virtual} indentation, which is the indentation that a particular +program point would have if it were at the beginning of a line. +Of course, if that program point is indeed at the beginning of a line, +its virtual indentation is its current indentation. But if not, then +SMIE uses the indentation algorithm to compute the virtual indentation +of that point. Now in practice, the virtual indentation of a program +point does not have to be identical to the indentation it would have if +we inserted a newline before it. To see how this works, the SMIE rule +for indentation after a @code{@{} in C does not care whether the +@code{@{} is standing on a line of its own or is at the end of the +preceding line. Instead, these different cases are handled in the +indentation rule that decides how to indent before a @code{@{}. + +Another important concept is the notion of @emph{parent}: The +@emph{parent} of a token, is the head token of the nearest enclosing +syntactic construct. For example, the parent of an @code{else} is the +@code{if} to which it belongs, and the parent of an @code{if}, in turn, +is the lead token of the surrounding construct. The command +@code{backward-sexp} jumps from a token to its parent, but there are +some caveats: for @emph{openers} (tokens which start a construct, like +@code{if}), you need to start with point before the token, while for +others you need to start with point after the token. +@code{backward-sexp} stops with point before the parent token if that is +the @emph{opener} of the token of interest, and otherwise it stops with +point after the parent token. + +SMIE indentation rules are specified using a function that takes two +arguments @var{method} and @var{arg} where the meaning of @var{arg} and the +expected return value depend on @var{method}. + +@var{method} can be: +@itemize +@item +@code{:after}, in which case @var{arg} is a token and the function +should return the @var{offset} to use for indentation after @var{arg}. +@item +@code{:before}, in which case @var{arg} is a token and the function +should return the @var{offset} to use to indent @var{arg} itself. +@item +@code{:elem}, in which case the function should return either the offset +to use to indent function arguments (if @var{arg} is the symbol +@code{arg}) or the basic indentation step (if @var{arg} is the symbol +@code{basic}). +@item +@code{:list-intro}, in which case @var{arg} is a token and the function +should return non-@code{nil} if the token is followed by a list of +expressions (not separated by any token) rather than an expression. +@end itemize + +When @var{arg} is a token, the function is called with point just before +that token. A return value of nil always means to fallback on the +default behavior, so the function should return nil for arguments it +does not expect. + +@var{offset} can be: +@itemize +@item +@code{nil}: use the default indentation rule. +@item +@code{(column . @var{column})}: indent to column @var{column}. +@item +@var{number}: offset by @var{number}, relative to a base token which is +the current token for @code{:after} and its parent for @code{:before}. +@end itemize + +@node SMIE Indentation Helpers +@subsubsection Helper Functions for Indentation Rules + +SMIE provides various functions designed specifically for use in the +indentation rules function (several of those functions break if used in +another context). These functions all start with the prefix +@code{smie-rule-}. + +@defun smie-rule-bolp +Return non-@code{nil} if the current token is the first on the line. +@end defun + +@defun smie-rule-hanging-p +Return non-@code{nil} if the current token is @emph{hanging}. +A token is @emph{hanging} if it is the last token on the line +and if it is preceded by other tokens: a lone token on a line is not +hanging. +@end defun + +@defun smie-rule-next-p &rest tokens +Return non-@code{nil} if the next token is among @var{tokens}. +@end defun + +@defun smie-rule-prev-p &rest tokens +Return non-@code{nil} if the previous token is among @var{tokens}. +@end defun + +@defun smie-rule-parent-p &rest parents +Return non-@code{nil} if the current token's parent is among @var{parents}. +@end defun + +@defun smie-rule-sibling-p +Return non-nil if the current token's parent is actually a sibling. +This is the case for example when the parent of a @code{","} is just the +previous @code{","}. +@end defun + +@defun smie-rule-parent &optional offset +Return the proper offset to align the current token with the parent. +If non-@code{nil}, @var{offset} should be an integer giving an +additional offset to apply. +@end defun + +@defun smie-rule-separator method +Indent current token as a @emph{separator}. + +By @emph{separator}, we mean here a token whose sole purpose is to +separate various elements within some enclosing syntactic construct, and +which does not have any semantic significance in itself (i.e. it would +typically not exist as a node in an abstract syntax tree). + +Such a token is expected to have an associative syntax and be closely +tied to its syntactic parent. Typical examples are @code{","} in lists +of arguments (enclosed inside parentheses), or @code{";"} in sequences +of instructions (enclosed in a @code{@{...@}} or @code{begin...end} +block). + +@var{method} should be the method name that was passed to +`smie-rules-function'. +@end defun + +@node SMIE Indentation Example +@subsubsection Sample Indentation Rules + +Here is an example of an indentation function: + +@example +(eval-when-compile (require 'cl)) ;For the `case' macro. +(defun sample-smie-rules (kind token) + (case kind + (:elem (case token + (basic sample-indent-basic))) + (:after + (cond + ((equal token ",") (smie-rule-separator kind)) + ((equal token ":=") sample-indent-basic))) + (:before + (cond + ((equal token ",") (smie-rule-separator kind)) + ((member token '("begin" "(" "@{")) + (if (smie-rule-hanging-p) (smie-rule-parent))) + ((equal token "if") + (and (not (smie-rule-bolp)) (smie-rule-prev-p "else") + (smie-rule-parent))))))) +@end example + +@noindent +A few things to note: + +@itemize +@item +The first case indicates the basic indentation increment to use. +If @code{sample-indent-basic} is nil, then SMIE uses the global +setting @code{smie-indent-basic}. The major mode could have set +@code{smie-indent-basic} buffer-locally instead, but that +is discouraged. + +@item +The two (identical) rules for the token @code{","} make SMIE try to be +more clever when the comma separator is placed at the beginning of +lines. It tries to outdent the separator so as to align the code after +the comma; for example: + +@example +x = longfunctionname ( + arg1 + , arg2 + ); +@end example + +@item +The rule for indentation after @code{":="} exists because otherwise +SMIE would treat @code{":="} as an infix operator and would align the +right argument with the left one. + +@item +The rule for indentation before @code{"begin"} is an example of the use +of virtual indentation: This rule is used only when @code{"begin"} is +hanging, which can happen only when @code{"begin"} is not at the +beginning of a line. So this is not used when indenting +@code{"begin"} itself but only when indenting something relative to this +@code{"begin"}. Concretely, this rule changes the indentation from: + +@example + if x > 0 then begin + dosomething(x); + end +@end example +to +@example + if x > 0 then begin + dosomething(x); + end +@end example + +@item +The rule for indentation before @code{"if"} is similar to the one for +@code{"begin"}, but where the purpose is to treat @code{"else if"} +as a single unit, so as to align a sequence of tests rather than indent +each test further to the right. This function does this only in the +case where the @code{"if"} is not placed on a separate line, hence the +@code{smie-rule-bolp} test. + +If we know that the @code{"else"} is always aligned with its @code{"if"} +and is always at the beginning of a line, we can use a more efficient +rule: +@example +((equal token "if") + (and (not (smie-rule-bolp)) (smie-rule-prev-p "else") + (save-excursion + (sample-smie-backward-token) ;Jump before the "else". + (cons 'column (current-column))))) +@end example + +The advantage of this formulation is that it reuses the indentation of +the previous @code{"else"}, rather than going all the way back to the +first @code{"if"} of the sequence. +@end itemize + @node Desktop Save Mode @section Desktop Save Mode @cindex desktop save mode diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 4da94dacd71..3b08b472b06 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2209,7 +2209,7 @@ various commands) to indent the current line. The command In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}. -The default value is @code{indent-relative}. +The default value is @code{indent-relative}. @xref{Auto-Indentation}. @end defvar @deffn Command indent-according-to-mode From b1816a74de23a28f4ab3f39d7bcedb81cc13fd13 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 7 Dec 2010 14:48:15 -0500 Subject: [PATCH 33/58] * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains empty lines without a leading space. --- lisp/ChangeLog | 5 +++++ lisp/diff-mode.el | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e16bcdaabcc..94f0bc96277 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-07 Stefan Monnier + + * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains + empty lines without a leading space. + 2010-12-06 Leo * dired-aux.el (dired-do-redisplay): Postphone diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 907bf7d5b83..017d1b21b5a 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1827,10 +1827,13 @@ For use in `add-log-current-defun-function'." (eval-and-compile (require 'smerge-mode)) (save-excursion (diff-beginning-of-hunk 'try-harder) - (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. + (let* ((start (point)) + (style (diff-hunk-style)) ;Skips the hunk header as well. (beg (point)) (props '((diff-mode . fine) (face diff-refine-change))) - (end (progn (diff-end-of-hunk) (point)))) + ;; Be careful to go back to `start' so diff-end-of-hunk gets + ;; to read the hunk header's line info. + (end (progn (goto-char start) (diff-end-of-hunk) (point)))) (remove-overlays beg end 'diff-mode 'fine) From 740af6c9c09b04232cc778faf6c2618c87312999 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 7 Dec 2010 19:23:49 -0800 Subject: [PATCH 34/58] Fix ChangeLog typo. --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94f0bc96277..76973470e10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,8 +5,8 @@ 2010-12-06 Leo - * dired-aux.el (dired-do-redisplay): Postphone - dired-after-readin-hook while mapping over marks (Bug#6810). + * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook + while mapping over marks (Bug#6810). 2010-12-06 Chong Yidong From 3a1efe11b70e6f43b454e044d50d41336e2df255 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 7 Dec 2010 19:25:57 -0800 Subject: [PATCH 35/58] Fix ChangeLog whitespace. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76973470e10..bef6405d963 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,7 +3,7 @@ * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains empty lines without a leading space. -2010-12-06 Leo +2010-12-06 Leo * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook while mapping over marks (Bug#6810). From 3c1e62f86e7fb3369f19c7dd7dc895cff0f63bfb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 7 Dec 2010 19:29:41 -0800 Subject: [PATCH 36/58] Small smtpmail fix for bug#7588. * lisp/mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued file names, for the sake of MS Windows. --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bef6405d963..6c558723bdf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-08 Glenn Morris + + * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued + file names, for the sake of MS Windows. (Bug#7588) + 2010-12-07 Stefan Monnier * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 4e76de60188..1bf3fbe4a59 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -379,7 +379,7 @@ The list is in preference order.") (let* ((file-data (expand-file-name (format "%s_%i" - (format-time-string "%Y-%m-%d_%H:%M:%S") + (format-time-string "%Y-%m-%d_%H-%M-%S") (setq smtpmail-queue-counter (1+ smtpmail-queue-counter))) smtpmail-queue-dir)) @@ -1007,5 +1007,4 @@ many continuation lines." (provide 'smtpmail) -;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 ;;; smtpmail.el ends here From d5e6e0b6df0df7272d0595ab4ee4c372de966399 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 7 Dec 2010 19:32:31 -0800 Subject: [PATCH 37/58] mouse.el fix for bug#7586. * lisp/mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): Run hooks to update menu contents. --- lisp/ChangeLog | 3 +++ lisp/mouse.el | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c558723bdf..1805c06878e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-12-08 Glenn Morris + * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): + Run hooks to update menu contents. (Bug#7586) + * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued file names, for the sake of MS Windows. (Bug#7588) diff --git a/lisp/mouse.el b/lisp/mouse.el index e88c2669714..243e7179678 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -181,6 +181,7 @@ items `Turn Off' and `Help'." (minor-mode-menu-from-indicator indicator))) (defun mouse-menu-major-mode-map () + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* (;; Keymap from which to inherit; may be null. (ancestor (mouse-menu-non-singleton (and (current-local-map) @@ -213,6 +214,7 @@ Otherwise return the whole menu." "Return a keymap equivalent to the menu bar. The contents are the items that would be in the menu bar whether or not it is actually displayed." + (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (let* ((local-menu (and (current-local-map) (lookup-key (current-local-map) [menu-bar]))) (global-menu (lookup-key global-map [menu-bar])) @@ -2607,5 +2609,4 @@ choose a font." (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") (provide 'mldrag) -;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 ;;; mouse.el ends here From 478834e63b16484b9f6dda5cb008d7bf00f35bd9 Mon Sep 17 00:00:00 2001 From: Tom Breton Date: Tue, 7 Dec 2010 19:36:01 -0800 Subject: [PATCH 38/58] * lisp/cus-edit.el (custom-save-all): Bind print-length and print-level to nil. Fixes: debbugs:7581 --- lisp/ChangeLog | 5 +++++ lisp/cus-edit.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1805c06878e..ba9ae095240 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-08 Tom Breton + + * cus-edit.el (custom-save-all): + Bind print-length and print-level to nil. (Bug#7581) + 2010-12-08 Glenn Morris * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b815e31f31c..4046009a9a0 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4279,7 +4279,9 @@ if only the first line of the docstring is shown.")) (unless (eq major-mode 'emacs-lisp-mode) (emacs-lisp-mode)) - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (print-length nil) + (print-level nil)) (custom-save-variables) (custom-save-faces)) (let ((file-precious-flag t)) From da9123a8350059d10c2d73586a332d195894ae48 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Tue, 7 Dec 2010 19:42:00 -0800 Subject: [PATCH 39/58] * lisp/log-edit.el (log-edit-changelog-entries): Regexp quote filename. Fixes: debbugs:7505 --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba9ae095240..a52a158f243 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-08 Jan Moringen + + * log-edit.el (log-edit-changelog-entries): + Regexp quote filename. (Bug#7505) + 2010-12-08 Tom Breton * cus-edit.el (custom-save-all): From 32802ee17de9429e07b546aa4e2febe7f0f7072a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 8 Dec 2010 21:07:25 +0100 Subject: [PATCH 40/58] * net/tramp.el (tramp-handle-start-file-process): Protect buffer-modified value. (Bug#7557) (tramp-action-password): Delete region, do not narrow. (tramp-process-actions): Do not widen. --- lisp/ChangeLog | 7 +++ lisp/net/tramp.el | 119 ++++++++++++++++++++++++---------------------- 2 files changed, 69 insertions(+), 57 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a52a158f243..814c5ef89fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-12-08 Michael Albinus + + * net/tramp.el (tramp-handle-start-file-process): Protect + buffer-modified value. (Bug#7557) + (tramp-action-password): Delete region, do not narrow. + (tramp-process-actions): Do not widen. + 2010-12-08 Jan Moringen * log-edit.el (log-edit-changelog-entries): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a9733fc6a0f..0b7bae67082 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4522,60 +4522,65 @@ beginning of local filename are not substituted." (defun tramp-handle-start-file-process (name buffer program &rest args) "Like `start-file-process' for Tramp files." (with-parsed-tramp-file-name default-directory nil - (unwind-protect - ;; When PROGRAM is nil, we just provide a tty. - (let ((command - (when (stringp program) - (format "cd %s; exec %s" - (tramp-shell-quote-argument localname) - (mapconcat 'tramp-shell-quote-argument - (cons program args) " ")))) - (tramp-process-connection-type - (or (null program) tramp-process-connection-type)) - (name1 name) - (i 0)) - (unless buffer - ;; BUFFER can be nil. We use a temporary buffer. - (setq buffer (generate-new-buffer tramp-temp-buffer-name))) - (while (get-process name1) - ;; NAME must be unique as process name. - (setq i (1+ i) - name1 (format "%s<%d>" name i))) - (setq name name1) - ;; Set the new process properties. - (tramp-set-connection-property v "process-name" name) - (tramp-set-connection-property v "process-buffer" buffer) - ;; Activate narrowing in order to save BUFFER contents. - ;; Clear also the modification time; otherwise we might be - ;; interrupted by `verify-visited-file-modtime'. - (with-current-buffer (tramp-get-connection-buffer v) - (clear-visited-file-modtime) - (narrow-to-region (point-max) (point-max))) - (if command - ;; Send the command. - (tramp-send-command v command nil t) ; nooutput - ;; Check, whether a pty is associated. - (tramp-maybe-open-connection v) - (unless (process-get (tramp-get-connection-process v) 'remote-tty) - (tramp-error - v 'file-error "pty association is not supported for `%s'" name))) - (let ((p (tramp-get-connection-process v))) - ;; Set sentinel and query flag for this process. - (tramp-set-connection-property p "vector" v) - (set-process-sentinel p 'tramp-process-sentinel) - (tramp-set-process-query-on-exit-flag p t) - ;; Return process. - p)) - ;; Save exit. - (with-current-buffer (tramp-get-connection-buffer v) - (if (string-match tramp-temp-buffer-name (buffer-name)) - (progn - (set-process-buffer (tramp-get-connection-process v) nil) - (kill-buffer (current-buffer))) - (widen) - (goto-char (point-max)))) - (tramp-set-connection-property v "process-name" nil) - (tramp-set-connection-property v "process-buffer" nil)))) + ;; When PROGRAM is nil, we just provide a tty. + (let ((command + (when (stringp program) + (format "cd %s; exec %s" + (tramp-shell-quote-argument localname) + (mapconcat 'tramp-shell-quote-argument + (cons program args) " ")))) + (tramp-process-connection-type + (or (null program) tramp-process-connection-type)) + (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) + (name1 name) + (i 0)) + (unwind-protect + (save-excursion + (save-restriction + (unless buffer + ;; BUFFER can be nil. We use a temporary buffer. + (setq buffer (generate-new-buffer tramp-temp-buffer-name))) + (while (get-process name1) + ;; NAME must be unique as process name. + (setq i (1+ i) + name1 (format "%s<%d>" name i))) + (setq name name1) + ;; Set the new process properties. + (tramp-set-connection-property v "process-name" name) + (tramp-set-connection-property v "process-buffer" buffer) + ;; Activate narrowing in order to save BUFFER contents. + ;; Clear also the modification time; otherwise we might + ;; be interrupted by `verify-visited-file-modtime'. + (with-current-buffer (tramp-get-connection-buffer v) + (let ((buffer-undo-list t)) + (clear-visited-file-modtime) + (narrow-to-region (point-max) (point-max)) + (if command + ;; Send the command. + (tramp-send-command v command nil t) ; nooutput + ;; Check, whether a pty is associated. + (tramp-maybe-open-connection v) + (unless (process-get + (tramp-get-connection-process v) 'remote-tty) + (tramp-error + v 'file-error + "pty association is not supported for `%s'" name))))) + (let ((p (tramp-get-connection-process v))) + ;; Set sentinel and query flag for this process. + (tramp-set-connection-property p "vector" v) + (set-process-sentinel p 'tramp-process-sentinel) + (tramp-set-process-query-on-exit-flag p t) + ;; Return process. + p))) + ;; Save exit. + (with-current-buffer (tramp-get-connection-buffer v) + (if (string-match tramp-temp-buffer-name (buffer-name)) + (progn + (set-process-buffer (tramp-get-connection-process v) nil) + (kill-buffer (current-buffer))) + (set-buffer-modified-p bmp))) + (tramp-set-connection-property v "process-name" nil) + (tramp-set-connection-property v "process-buffer" nil))))) (defun tramp-handle-process-file (program &optional infile destination display &rest args) @@ -6707,9 +6712,10 @@ file exists and nonzero exit status otherwise." (with-current-buffer (process-buffer proc) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (tramp-message vec 3 "Sending %s" (match-string 1)) + (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-enter-password proc) - ;; Hide password prompt. - (narrow-to-region (point-max) (point-max)))) + ;; Remove password prompt, in order not to find it next iteration. + (delete-region (point-min) (point-max))) (defun tramp-action-succeed (proc vec) "Signal success in finding shell prompt." @@ -6820,7 +6826,6 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-process-one-action proc vec actions)) (tramp-process-one-action proc vec actions))))) (with-current-buffer (tramp-get-connection-buffer vec) - (widen) (tramp-message vec 6 "\n%s" (buffer-string))) (unless (eq exit 'ok) (tramp-clear-passwd vec) From b2364eaaa8387b54f0c43beda3d0ea23b8fa3b89 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 8 Dec 2010 17:46:03 -0800 Subject: [PATCH 41/58] * lisp/mail/smtpmail.el (smtpmail-send-it): Revert previous change. (convert-standard-filename means it was bogus.) --- lisp/ChangeLog | 4 ++++ lisp/mail/smtpmail.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 814c5ef89fa..4b81098fb9e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-09 Glenn Morris + + * mail/smtpmail.el (smtpmail-send-it): Revert previous change. + 2010-12-08 Michael Albinus * net/tramp.el (tramp-handle-start-file-process): Protect diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 1bf3fbe4a59..62bfbb740c4 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -379,7 +379,7 @@ The list is in preference order.") (let* ((file-data (expand-file-name (format "%s_%i" - (format-time-string "%Y-%m-%d_%H-%M-%S") + (format-time-string "%Y-%m-%d_%H:%M:%S") (setq smtpmail-queue-counter (1+ smtpmail-queue-counter))) smtpmail-queue-dir)) From 81ced43d179308153dfba3eece877e84c4091dea Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Wed, 8 Dec 2010 17:50:08 -0800 Subject: [PATCH 42/58] diary-lib fix for bug#7536. * lisp/calendar/diary-lib.el (diary-list-sexp-entries): Handle case of no newline at end of file. --- lisp/ChangeLog | 5 +++++ lisp/calendar/diary-lib.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b81098fb9e..d8edf108bd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-09 Stephen Berman + + * calendar/diary-lib.el (diary-list-sexp-entries): + Handle case of no newline at end of file. (Bug#7536) + 2010-12-09 Glenn Morris * mail/smtpmail.el (smtpmail-send-it): Revert previous change. diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 219e489a2eb..899c142b75b 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1744,7 +1744,7 @@ best if they are non-marking." (forward-line 1) (while (looking-at "[ \t]") (forward-line 1)) - (backward-char 1) + (if (bolp) (backward-char 1)) (setq entry (buffer-substring-no-properties entry-start (point)))) (setq diary-entry (diary-sexp-entry sexp entry date) literal entry ; before evaluation From 65ceb118c42c59b0ff36aeae20ad0f3b53842501 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 9 Dec 2010 20:53:17 +0200 Subject: [PATCH 43/58] Fix bug #1077 with popping new frames from a minibuffer-only frame. Do NOT merge with trunk! menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): New functions. (menu-bar-showhide-menu) : Use them instead of `nil' and `>', respectively. --- lisp/ChangeLog | 7 +++++++ lisp/menu-bar.el | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8edf108bd2..8184473d035 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-12-09 Eli Zaretskii + + * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): + New functions. + (menu-bar-showhide-menu) : Use + them instead of `nil' and `>', respectively. (Bug#1077) + 2010-12-09 Stephen Berman * calendar/diary-lib.el (diary-list-sexp-entries): diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index d25de5b385c..1f97ea76847 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -980,16 +980,33 @@ mail status in mode line")) :visible (and (display-graphic-p) (fboundp 'x-show-tip)) :button (:toggle . tooltip-mode))) +(defun menu-bar-frame-for-menubar () + "Return the frame suitable for updating the menu bar." + (or (and (framep menu-updating-frame) + menu-updating-frame) + (selected-frame))) + +(defun menu-bar-positive-p (val) + "Return non-nil iff VAL is a positive number." + (and (numberp val) + (> val 0))) + (define-key menu-bar-showhide-menu [menu-bar-mode] `(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame :help ,(purecopy "Turn menu-bar on/off") - :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) + :button + (:toggle . (menu-bar-positive-p + (frame-parameter (menu-bar-frame-for-menubar) + 'menu-bar-lines))))) (define-key menu-bar-showhide-menu [showhide-tool-bar] `(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame :help ,(purecopy "Turn tool-bar on/off") :visible (display-graphic-p) - :button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) + :button + (:toggle . (menu-bar-positive-p + (frame-parameter (menu-bar-frame-for-menubar) + 'tool-bar-lines))))) (define-key menu-bar-options-menu [showhide] `(menu-item ,(purecopy "Show/Hide") ,menu-bar-showhide-menu)) From 9b2a758a0546463337b490969638874ef8f4c7ca Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Thu, 9 Dec 2010 19:31:52 -0800 Subject: [PATCH 44/58] Commit missing file from 2010-05-15T00:48:53Z!rgm@gnu.org. Fixes: debbugs:7505 --- lisp/log-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/log-edit.el b/lisp/log-edit.el index ddc0f601701..3f79c2a2b44 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -773,7 +773,7 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each (setq pattern (file-name-nondirectory file))) (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" - pattern + (regexp-quote pattern) "\\($\\|[^[:alnum:]]\\)")) (let (texts From ffda048bfbfd66b55001574703be3aa31231b808 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Dec 2010 19:33:51 -0800 Subject: [PATCH 45/58] * doc/emacs/trouble.texi (Checklist): Fix typo in newsgroup name. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/trouble.texi | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index dd03f0e4782..9d820f866c4 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2010-12-10 Glenn Morris + + * trouble.texi (Checklist): Fix typo in newsgroup name. + 2010-12-05 Chong Yidong * search.texi (Word Search): Note that the lazy highlight always diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 2f90b30bf83..e2b27083243 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -629,7 +629,7 @@ read the tracker's online documentation to see the various features you can use. All mail sent to the @samp{bug-gnu-emacs} mailing list is also -gatewayed to the @samp{bug.gnu.emacs} newsgroup. The reverse is also +gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also true, but we ask you not to post bug reports via the newsgroup. It can make it much harder to contact you if we need to ask for more information, and it does not integrate well with the bug tracker. @@ -1127,6 +1127,3 @@ Emacs distribution. @lowersections @end ifnottex -@ignore - arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c -@end ignore From 158d59456887041e74cf0d8e0fa19bc65e6e4b1f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 10 Dec 2010 05:14:57 +0100 Subject: [PATCH 46/58] * net/tramp.el (tramp-action-password, tramp-process-actions): Revert patch from 2010-12-08. Use `save-restriction'. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 45 +++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8184473d035..55206c2c8ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-10 Michael Albinus + + * net/tramp.el (tramp-action-password, tramp-process-actions): + Revert patch from 2010-12-08. Use `save-restriction'. + 2010-12-09 Eli Zaretskii * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0b7bae67082..babcc2ca250 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -6712,10 +6712,9 @@ file exists and nonzero exit status otherwise." (with-current-buffer (process-buffer proc) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (tramp-message vec 3 "Sending %s" (match-string 1)) - (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-enter-password proc) - ;; Remove password prompt, in order not to find it next iteration. - (delete-region (point-min) (point-max))) + ;; Hide password prompt. + (narrow-to-region (point-max) (point-max)))) (defun tramp-action-succeed (proc vec) "Signal success in finding shell prompt." @@ -6816,25 +6815,27 @@ The terminal type can be configured with `tramp-terminal-type'." (with-temp-message "" ;; Enable auth-source and password-cache. (tramp-set-connection-property vec "first-password-request" t) - (let (exit) - (while (not exit) - (tramp-message proc 3 "Waiting for prompts from remote shell") - (setq exit - (catch 'tramp-action - (if timeout - (with-timeout (timeout) - (tramp-process-one-action proc vec actions)) - (tramp-process-one-action proc vec actions))))) - (with-current-buffer (tramp-get-connection-buffer vec) - (tramp-message vec 6 "\n%s" (buffer-string))) - (unless (eq exit 'ok) - (tramp-clear-passwd vec) - (tramp-error-with-buffer - nil vec 'file-error - (cond - ((eq exit 'permission-denied) "Permission denied") - ((eq exit 'process-died) "Process died") - (t "Login failed"))))))) + (save-restriction + (let (exit) + (while (not exit) + (tramp-message proc 3 "Waiting for prompts from remote shell") + (setq exit + (catch 'tramp-action + (if timeout + (with-timeout (timeout) + (tramp-process-one-action proc vec actions)) + (tramp-process-one-action proc vec actions))))) + (with-current-buffer (tramp-get-connection-buffer vec) + (widen) + (tramp-message vec 6 "\n%s" (buffer-string))) + (unless (eq exit 'ok) + (tramp-clear-passwd vec) + (tramp-error-with-buffer + nil vec 'file-error + (cond + ((eq exit 'permission-denied) "Permission denied") + ((eq exit 'process-died) "Process died") + (t "Login failed")))))))) ;; Utility functions. From 1f10e75066b557174bb475c735bd74a725000a4a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 10 Dec 2010 12:46:40 -0500 Subject: [PATCH 47/58] Bump version to 23.2.91. Regenerate configure and ldefs-boot.el. --- README | 2 +- configure | 469 +++++++++--------- configure.in | 2 +- doc/emacs/emacs.texi | 2 +- doc/lispref/book-spine.texinfo | 2 +- doc/lispref/elisp.texi | 2 +- doc/lispref/vol1.texi | 2 +- doc/lispref/vol2.texi | 2 +- doc/man/emacs.1 | 2 +- doc/misc/faq.texi | 2 +- etc/AUTHORS | 61 ++- lib-src/makefile.w32-in | 2 +- lisp/dired.el | 2 +- lisp/ldefs-boot.el | 121 +++-- lisp/simple.el | 5 + lisp/version.el | 2 +- nextstep/Cocoa/Emacs.base/Contents/Info.plist | 4 +- .../Resources/English.lproj/InfoPlist.strings | 4 +- .../Emacs.base/Resources/Emacs.desktop | 2 +- .../Emacs.base/Resources/Info-gnustep.plist | 4 +- nt/emacs.rc | 8 +- nt/emacsclient.rc | 8 +- 22 files changed, 369 insertions(+), 341 deletions(-) diff --git a/README b/README index 4090e099331..e7a88e0a492 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, See the end of the file for license conditions. -This directory tree holds version 23.2.90 of GNU Emacs, the extensible, +This directory tree holds version 23.2.91 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure b/configure index d1e5addcb75..ead032e31c0 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for emacs 23.2.90. +# Generated by GNU Autoconf 2.67 for emacs 23.2.91. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -316,7 +316,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -356,19 +356,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -530,7 +530,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -549,8 +549,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='emacs' PACKAGE_TARNAME='emacs' -PACKAGE_VERSION='23.2.90' -PACKAGE_STRING='emacs 23.2.90' +PACKAGE_VERSION='23.2.91' +PACKAGE_STRING='emacs 23.2.91' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -840,8 +840,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -886,7 +887,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -912,7 +913,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1116,7 +1117,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1132,7 +1133,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1162,8 +1163,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1171,7 +1172,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1189,13 +1190,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1218,7 +1219,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1232,8 +1233,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1248,9 +1249,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1289,11 +1290,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1319,7 +1320,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures emacs 23.2.90 to adapt to many kinds of systems. +\`configure' configures emacs 23.2.91 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1333,7 +1334,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1393,7 +1394,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of emacs 23.2.90:";; + short | recursive ) echo "Configuration of emacs 23.2.91:";; esac cat <<\_ACEOF @@ -1539,10 +1540,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -emacs configure 23.2.90 -generated by GNU Autoconf 2.65 +emacs configure 23.2.91 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1658,7 +1659,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1682,10 +1683,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1721,7 +1722,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1748,7 +1749,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1812,7 +1813,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1842,7 +1843,7 @@ ac_fn_c_check_header_preproc () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1854,7 +1855,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else eval "$3=no" fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1863,15 +1864,18 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_preproc -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1880,8 +1884,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -1911,7 +1919,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$4+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1967,7 +1975,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2035,7 +2043,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2083,8 +2091,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by emacs $as_me 23.2.90, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by emacs $as_me 23.2.91, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2194,11 +2202,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2232,11 +2238,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2249,11 +2253,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2267,11 +2269,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2326,7 +2326,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2341,7 +2346,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2422,7 +2431,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2556,7 +2565,7 @@ if test "${with_x_toolkit+set}" = set; then : m | mo | mot | moti | motif ) val=motif ;; g | gt | gtk ) val=gtk ;; * ) -as_fn_error "\`--with-x-toolkit=$withval' is invalid; +as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 ;; @@ -2712,7 +2721,7 @@ fi # Check whether --with-gtk was given. if test "${with_gtk+set}" = set; then : - withval=$with_gtk; as_fn_error "--with-gtk has been removed. Use --with-x-toolkit to + withval=$with_gtk; as_fn_error $? "--with-gtk has been removed. Use --with-x-toolkit to specify a toolkit." "$LINENO" 5 fi @@ -2720,7 +2729,7 @@ fi # Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then : - withval=$with_gcc; as_fn_error "--with-gcc has been removed. Set the \`CC' environment + withval=$with_gcc; as_fn_error $? "--with-gcc has been removed. Set the \`CC' environment variable to specify a compiler." "$LINENO" 5 fi @@ -2826,7 +2835,7 @@ do stringfreelist) ac_gc_check_string_free_list=1 ;; xmallocoverrun) ac_xmalloc_overrun=1 ;; conslist) ac_gc_check_cons_list=1 ;; - *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; + *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; esac done IFS="$ac_save_IFS" @@ -2931,16 +2940,22 @@ fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2954,7 +2969,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -2965,16 +2980,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2999,7 +3014,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3007,7 +3022,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3353,7 +3368,7 @@ fi if test $unported = yes; then - as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. + as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 fi @@ -3667,8 +3682,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3782,9 +3797,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3826,8 +3840,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3884,9 +3898,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3937,8 +3951,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4274,7 +4288,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4290,11 +4304,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4333,7 +4347,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4349,18 +4363,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4421,7 +4435,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4487,7 +4501,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4619,8 +4633,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4809,7 +4822,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4825,11 +4838,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4868,7 +4881,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4884,18 +4897,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5314,7 +5327,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then MAKEINFO=off elif ! test -e $srcdir/info/emacs; then - as_fn_error "You do not seem to have makeinfo >= 4.6, and your + as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your source tree does not seem to have pre-built manuals in the \`info' directory. Either install a suitable version of makeinfo, or re-run configure with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 @@ -5722,7 +5735,7 @@ case "${canonical}" in fi test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - as_fn_error "crt*.o not found. Use --with-crt-dir to specify the location." "$LINENO" 5 + as_fn_error $? "crt*.o not found. Use --with-crt-dir to specify the location." "$LINENO" 5 ;; esac test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib @@ -5737,8 +5750,7 @@ if test "${with_sound}" != "no"; then do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5929,7 +5941,7 @@ else fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$emacs_alsa_subdir" != yes; then - as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 fi ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi @@ -5953,8 +5965,7 @@ for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6796,7 +6807,7 @@ fi $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -6804,7 +6815,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -6929,7 +6940,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -6947,7 +6958,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -7033,7 +7044,7 @@ else fi done fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -7203,7 +7214,7 @@ if test "${with_ns}" != no; then if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : HAVE_NS=yes else - as_fn_error "\`--with-ns' was specified, but the include + as_fn_error $? "\`--with-ns' was specified, but the include files are missing or cannot be compiled." "$LINENO" 5 fi @@ -7305,7 +7316,7 @@ fi if test "$HAVE_XSERVER" = true || test -n "$DISPLAY" || test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then - as_fn_error "You seem to be running X, but no X development libraries + as_fn_error $? "You seem to be running X, but no X development libraries were found. You should install the relevant development files for X and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make sure you have development files for image handling, i.e. @@ -7397,8 +7408,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7504,6 +7514,7 @@ int main () { char *data, *data2, *data3; + const char *cdata2; int i, pagesize; int fd, fd2; @@ -7528,10 +7539,10 @@ main () fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; - data2 = ""; - if (write (fd2, data2, 1) != 1) + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) @@ -7888,8 +7899,7 @@ XScreenNumberOfScreen XSetWMProtocols do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -8158,7 +8168,7 @@ $as_echo "no" >&6; } fi if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 + as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 fi fi @@ -8184,7 +8194,7 @@ done if test "${GTK_COMPILES}" != "yes"; then if test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; + as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; fi else HAVE_GTK=yes @@ -8666,7 +8676,7 @@ fi $as_echo "yes; using Lucid toolkit" >&6; } USE_X_TOOLKIT=LUCID elif test x"${USE_X_TOOLKIT}" = xLUCID; then - as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 + as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 $as_echo "no; do not use toolkit by default" >&6; } @@ -9826,8 +9836,7 @@ if test "${HAVE_X11}" = "yes"; then do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10078,7 +10087,7 @@ if test "${HAVE_X11}" = "yes"; then MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" if test "X${MISSING}" != X; then - as_fn_error "The following required libraries were not found: + as_fn_error $? "The following required libraries were not found: $MISSING Maybe some development libraries/packages are missing? If you don't want to link with them give @@ -10400,8 +10409,7 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -10465,7 +10473,7 @@ fi if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error "a system implementation of alloca is required " "$LINENO" 5 + as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 fi # fmod, logb, and frexp are found in -lm on most systems. @@ -10652,7 +10660,7 @@ fi if test $ac_cv_prog_liblockfile = yes; then - as_fn_error "Shared liblockfile found but can't link against it. + as_fn_error $? "Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a \`development' package to install containing liblockfile." "$LINENO" 5 else : @@ -10695,8 +10703,7 @@ cfmakeraw cfsetspeed do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -10727,8 +10734,7 @@ done do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -10780,8 +10786,8 @@ static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", +static const char *tz_strings[] = { + (const char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -10798,7 +10804,7 @@ spring_forward_gap () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -10811,16 +10817,14 @@ spring_forward_gap () } static int -mktime_test1 (now) - time_t now; +mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (now) - time_t now; +mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -10844,8 +10848,7 @@ irix_6_4_bug () } static int -bigtime_test (j) - int j; +bigtime_test (int j) { struct tm tm; time_t now; @@ -10889,7 +10892,7 @@ year_2050_test () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -10924,7 +10927,7 @@ main () for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv (tz_strings[i]); + putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -10976,7 +10979,7 @@ ac_have_func=no # yes means we've found a way to get the load average. # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || - as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 + as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 ac_save_LIBS=$LIBS @@ -12807,8 +12810,7 @@ for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13182,14 +13184,14 @@ if test "x$GCC" = xyes \ && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 + as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 fi #### Find out which version of Emacs this is. version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` if test x"${version}" = x; then - as_fn_error "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5 + as_fn_error $? "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5 fi if test x"${version}" != x"$PACKAGE_VERSION"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5 @@ -13520,6 +13522,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -13681,19 +13684,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -13889,7 +13892,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -13942,8 +13945,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by emacs $as_me 23.2.90, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by emacs $as_me 23.2.91, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14008,11 +14011,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -emacs config.status 23.2.90 -configured by $0, generated by GNU Autoconf 2.65, +emacs config.status 23.2.91 +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14028,11 +14031,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -14054,6 +14062,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -14066,7 +14075,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14075,7 +14084,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -14143,7 +14152,7 @@ do "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -14181,7 +14190,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -14198,7 +14207,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -14212,18 +14221,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14312,20 +14321,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -14353,7 +14370,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14438,7 +14455,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -14451,7 +14468,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -14479,7 +14496,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -14506,7 +14523,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -14637,22 +14654,22 @@ s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -14663,19 +14680,19 @@ which seems to be undefined. Please make sure it is defined." >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -14755,7 +14772,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -14776,7 +14793,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/configure.in b/configure.in index ac42e7cfde1..64f7ad8d656 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ(2.62) -AC_INIT(emacs, 23.2.90) +AC_INIT(emacs, 23.2.91) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 7f6321d44d3..28cc962d3ac 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -5,7 +5,7 @@ @c The edition number appears in several places in this file @set EDITION Sixteenth -@set EMACSVER 23.2.90 +@set EMACSVER 23.2.91 @copying This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@* diff --git a/doc/lispref/book-spine.texinfo b/doc/lispref/book-spine.texinfo index e665a66fea5..849d7edc8eb 100644 --- a/doc/lispref/book-spine.texinfo +++ b/doc/lispref/book-spine.texinfo @@ -11,7 +11,7 @@ @center @titlefont{GNU Emacs Lisp Reference Manual} @sp 5 @center GNU -@center Emacs Version 23.2.90 +@center Emacs Version 23.2.91 @center for Unix Users @sp 5 diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index bd6695777d3..c36ef5ac330 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -8,7 +8,7 @@ @c Please remember to update the edition number in README as well. @c And also the copies in vol1.texi and vol2.texi. @set VERSION 3.0 -@set EMACSVER 23.2.90 +@set EMACSVER 23.2.91 @set DATE July 2009 @c in general, keep the following line commented out, unless doing a diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 0f2a21d6580..f1eaa2e83b9 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.2.90 +@set EMACSVER 23.2.91 @set DATE July 2009 @dircategory Emacs diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 738c8d55f95..63e1988a7ca 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.2.90 +@set EMACSVER 23.2.91 @set DATE July 2009 @dircategory Emacs diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index fc197a01adc..0cdb24bce97 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH EMACS 1 "2007 April 13" "GNU Emacs 23.2.90" +.TH EMACS 1 "2007 April 13" "GNU Emacs 23.2.91" . . .SH NAME diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index b109af4d68b..9f4077e547d 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -5,7 +5,7 @@ @c %**end of header @c This is used in many places -@set VER 23.2.90 +@set VER 23.2.91 @c This file is maintained by Romain Francoise . @c Feel free to install changes without prior permission (but I'd diff --git a/etc/AUTHORS b/etc/AUTHORS index 5259776426b..01124fb9b7b 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -334,7 +334,8 @@ Bob Halley: changed ccl.c esh-io.el Bob Olson: co-wrote cperl-mode.el -Bob Rogers: changed vc-svn.el cperl-mode.el ffap.el thingatpt.el +Bob Rogers: changed vc-svn.el cperl-mode.el ffap.el maintaining.texi + thingatpt.el vc-dir.el vc1-xtra.texi Bob Weiner: changed info.el quail.el @@ -437,7 +438,7 @@ and co-wrote longlines.el and changed xdisp.c simple.el files.el display.texi frames.texi files.texi emacs.texi xterm.c keyboard.c cus-edit.el faces.el Makefile.in xfaces.c misc.texi xfns.c font.c image.c startup.el - compile.el custom.texi text.texi and 650 other files + text.texi compile.el custom.texi and 653 other files Chris Chase: co-wrote idlw-shell.el idlwave.el @@ -838,8 +839,9 @@ Ed L. Cashin: changed gnus-sum.el imap.el Ed Swarthout: changed hexl.el table.el -Eduard Wiebe: changed browse-url.el flymake.texi footnote.el - javascript.el korean.el mule-conf.el objects.texi ps-print.el vc-rcs.el +Eduard Wiebe: changed browse-url.el dired.el flymake.texi footnote.el + javascript.el korean.el locate.el mule-conf.el objects.texi ps-print.el + vc-rcs.el Eduardo Muñoz: changed dired.el ls-lisp.el @@ -876,7 +878,7 @@ Eli Tziperman: wrote rmail-spam-filter.el Eli Zaretskii: wrote rxvt.el tty-colors.el and changed msdos.c makefile.w32-in Makefile.in files.el info.el rmail.el fileio.c mainmake.v2 pc-win.el startup.el config.bat simple.el msdos.h - dired.c w32.c frame.c internal.el menu-bar.el process.c INSTALL + w32.c dired.c frame.c menu-bar.el process.c internal.el INSTALL xfaces.c and 604 other files Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el @@ -1145,7 +1147,7 @@ and changed Makefile.in calendar.el diary-lib.el rmail.el f90.el cal-menu.el cal-hebrew.el fortran.el holidays.el configure.in calendar.texi cal-islam.el bytecomp.el cal-bahai.el appt.el emacs.texi files.el cal-china.el rmailsum.el cal-tex.el simple.el - and 1010 other files + and 1011 other files Glynn Clements: wrote gamegrid.el snake.el tetris.el @@ -1333,7 +1335,7 @@ James Clark: wrote nxml-enc.el nxml-glyph.el nxml-maint.el nxml-mode.el rng-match.el rng-nxml.el rng-parse.el rng-pttrn.el rng-uri.el rng-util.el rng-valid.el rng-xsd.el sgml-mode.el xmltok.el xsd-regexp.el -and changed fns.c window.c xselect.c +and changed fns.c nxml-mode.texi window.c xselect.c James Cloos: wrote arabic.el and changed url-history.el @@ -1360,10 +1362,10 @@ Jan Djärv: wrote dnd.el font-setting.el x-dnd.el and changed gtkutil.c xterm.c xfns.c xterm.h configure.in xmenu.c x-win.el Makefile.in gtkutil.h keyboard.c frame.c frames.texi config.in emacs.c xselect.c xresources.texi cus-start.el startup.el alloc.c - process.c xlwmenu.c and 205 other files + process.c xlwmenu.c and 207 other files Jan Moringen: co-wrote cpp.el -and changed eieio.el zeroconf.el +and changed eieio.el log-edit.el zeroconf.el Jan Nieuwenhuizen: changed info.el TUTORIAL.nl add-log.el emacs.c emacsclient.c gnus-start.el gud.el nnmh.el server.el startup.el @@ -1517,6 +1519,8 @@ Joe Edmonds: changed lisp-mode.el Joe Hildebrand: co-wrote nndb.el +Joe Matarazzo: changed ebrowse.c + Joe Ramey: changed filelock.c rmailsum.el Joe Reiss: changed gnus-art.el @@ -1796,8 +1800,8 @@ Kenichi Handa: wrote composite.el cyrillic.el isearch-x.el ps-bdf.el and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el quail.el and changed coding.c mule-cmds.el mule.el fontset.c charset.c fontset.el xdisp.c xterm.c font.c fileio.c Makefile.in mule-conf.el characters.el - fns.c mule-diag.el ftfont.c ccl.c charset.h coding.h xfaces.c - japanese.el and 378 other files + fns.c mule-diag.el charset.h ftfont.c ccl.c coding.h xfaces.c + japanese.el and 379 other files Kenichi Okada: co-wrote sasl-cram.el sasl-digest.el @@ -1942,8 +1946,8 @@ Lawrence Mitchell: wrote erc-backend.el erc-log.el and changed erc.el erc-match.el erc-nets.el erc-nickserv.el erc-button.el erc-compat.el erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el erc-autoaway.el erc-autojoin.el erc-bbdb.el erc-ezbounce.el erc-menu.el - erc-netsplit.el erc-nicklist.el erc-notify.el erc-sound.el lread.c - and 4 other files + erc-netsplit.el erc-nicklist.el erc-notify.el erc-sound.el format.el + and 5 other files Lawrence R. Dodd: co-wrote dired-x.el and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el @@ -2042,9 +2046,9 @@ and changed erc.el erc-dcc.el erc-speak.el erc-bbdb.el erc-complete.el and 23 other files Mark A. Hershberger: changed xml.el nnrss.el mm-url.el cperl-mode.el - vc-bzr.el Makefile.in NXML-NEWS cc-mode.texi compilation.txt compile.el - ede.texi eieio.texi esh-mode.el flymake.el gnus-group.el isearch.el - makefile.w32-in nxml nxml-mode.texi programs.texi python.el + vc-bzr.el Makefile.in NXML-NEWS cc-mode.texi compilation.txt + compile.el ede.texi eieio.texi esh-mode.el flymake.el gnus-group.el + isearch.el makefile.w32-in nxml-mode.texi programs.texi python.el and 5 other files Mark D. Baushke: changed mh-e.el mh-utils.el mh-mime.el mh-comp.el @@ -2123,8 +2127,8 @@ Martin Neitzel: changed supercite.el Martin Pohlack: changed pc-select.el Martin Rudalics: changed window.el window.c windows.texi cus-edit.el - frame.c frame.el cus-start.el files.el subr.el add-log.el buffer.c - buffers.texi dired.el font-lock.el help-fns.el wid-edit.el xdisp.c + frame.c frame.el cus-start.el dired.el files.el subr.el add-log.el + buffer.c buffers.texi font-lock.el help-fns.el wid-edit.el xdisp.c display.texi find-func.el help.el help.texi and 129 other files Martin Stjernholm: wrote cc-bytecomp.el @@ -2982,7 +2986,7 @@ and co-wrote font-lock.el and changed vc.el subr.el lisp.h keyboard.c simple.el files.el pcvs.el keymap.c xdisp.c Makefile.in vc-hooks.el alloc.c newcomment.el tex-mode.el bytecomp.el compile.el buffer.c info.el fill.el fileio.c - window.c and 908 other files + window.c and 909 other files Stefan Reichör: changed gnus-agent.el @@ -3006,7 +3010,7 @@ Stephan Stahl: changed which-func.el buff-menu.el buffer.c dired-x.texi Stephen A. Wood: changed fortran.el -Stephen Berman: changed todo-mode.el allout.el diary-lib.el dired.el +Stephen Berman: changed diary-lib.el todo-mode.el allout.el dired.el files.el find-dired.el gtkutil.c info.el newcomment.el recentf.el rfc822.el @@ -3205,7 +3209,7 @@ Toby Speight: changed generic-x.el window.el Tokuya Kameshima: wrote org-mew.el org-wl.el -Tom Breton: changed autoinsert.el gnus-agent.el lread.c +Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c Tom Hageman: changed etags.c @@ -3285,10 +3289,9 @@ Ulf Stegemann: changed smime.el Ulrich Leodolter: changed w32proc.c Ulrich Mueller: changed configure.in Makefile.in files.el gud.el - ChgPane.c ChgSel.c INSTALL XMakeAssoc.c authors.el bytecomp.el - calc-units.el case-table.el configure doctor.el emacs.1 emacs.c - emacs.desktop emacsclient.c fortran.el gnu-linux.h iso-acc.el - and 13 other files + server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c authors.el + bytecomp.el calc-units.el case-table.el configure doctor.el emacs.1 + emacs.c emacs.desktop emacsclient.c fortran.el and 14 other files Ulrich Neumerkel: changed xterm.c @@ -3330,6 +3333,8 @@ Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el Vladimir Volovich: changed smime.el +W. Martin Borgert: changed files.el schemas.xml + Walter C. Pelissero: changed browse-url.el url-methods.el Werner Benger: changed keyboard.c @@ -3397,8 +3402,8 @@ Yagi Tatsuya: changed gnus-art.el gnus-start.el Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h macmenu.c macgui.h image.c xdisp.c macselect.c keyboard.c xterm.c - Makefile.in emacs.c darwin.h w32term.c dispextern.h macos.texi - process.c unexmacosx.c alloc.c and 83 other files + Makefile.in emacs.c darwin.h w32term.c alloc.c dispextern.h macos.texi + process.c unexmacosx.c and 84 other files Yann Dirson: changed imenu.el @@ -3426,6 +3431,8 @@ Yu-Ji Hosokawa: changed README.W32 Yukihiro Matsumoto: co-wrote ruby-mode.el +Yuri Karaban: changed pop3.el + Yuri Shtil: changed etags.c Yutaka Niibe: changed indent.c xdisp.c configure.in Makefile.in dispnew.c diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 1a0def1e304..e7fb9f03455 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -22,7 +22,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc emacs .PHONY: $(ALL) -VERSION = 23.2.90 +VERSION = 23.2.91 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \ diff --git a/lisp/dired.el b/lisp/dired.el index 4472c13bab2..08f2e28d05e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3532,7 +3532,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "07676ea25af17f5d50cc5db4f53bddc0") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "03cf081d2aac54764123d2407c3196a2") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 4a47f95b7fc..9879878bd4c 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1492,7 +1492,7 @@ insert a template for the file depending on the mode of the buffer. ;;;### (autoloads (batch-update-autoloads update-directory-autoloads ;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" -;;;;;; (19636 58496)) +;;;;;; (19683 64086)) ;;; Generated autoloads from emacs-lisp/autoload.el (put 'generated-autoload-file 'safe-local-variable 'stringp) @@ -2601,19 +2601,14 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;### (autoloads (batch-byte-recompile-directory batch-byte-compile ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory -;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning -;;;;;; byte-compile-warnings-safe-p) "bytecomp" "emacs-lisp/bytecomp.el" -;;;;;; (19636 58496)) +;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning) +;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (19678 47007)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) (put 'byte-compile-dynamic-docstrings 'safe-local-variable 'booleanp) -(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p) -(autoload 'byte-compile-warnings-safe-p "bytecomp" "\ -Return non-nil if X is valid as a value of `byte-compile-warnings'. - -\(fn X)" nil nil) +(put 'byte-compile-warnings 'safe-local-variable (lambda (v) (or (symbolp v) (null (delq nil (mapcar (lambda (x) (not (symbolp x))) v)))))) (autoload 'byte-compile-disable-warning "bytecomp" "\ Change `byte-compile-warnings' to disable WARNING. @@ -2860,8 +2855,8 @@ See the documentation for `calculator-mode' for more information. ;;;*** -;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (19636 -;;;;;; 58496)) +;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (19678 +;;;;;; 47007)) ;;; Generated autoloads from calendar/calendar.el (autoload 'calendar "calendar" "\ @@ -3910,7 +3905,7 @@ is run). ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" -;;;;;; (19652 24589)) +;;;;;; (19706 58029)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ @@ -4858,7 +4853,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. ;;;;;; customize-mode customize customize-save-variable customize-set-variable ;;;;;; customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically ;;;;;; custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el" -;;;;;; (19636 58496)) +;;;;;; (19711 45554)) ;;; Generated autoloads from cus-edit.el (defvar custom-browse-sort-alphabetically nil "\ @@ -5943,7 +5938,7 @@ Deuglify broken Outlook (Express) articles and redisplay. ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" -;;;;;; "calendar/diary-lib.el" (19636 58496)) +;;;;;; "calendar/diary-lib.el" (19714 24709)) ;;; Generated autoloads from calendar/diary-lib.el (autoload 'diary "diary-lib" "\ @@ -6024,7 +6019,7 @@ With prefix arg, prompt for diff switches. ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" -;;;;;; (19661 51722)) +;;;;;; (19711 45554)) ;;; Generated autoloads from diff-mode.el (autoload 'diff-mode "diff-mode" "\ @@ -6065,7 +6060,7 @@ Optional arguments are passed to `dig-invoke'. ;;;### (autoloads (dired-mode dired-auto-revert-buffer dired-noselect ;;;;;; dired-other-frame dired-other-window dired dired-trivial-filenames -;;;;;; dired-listing-switches) "dired" "dired.el" (19636 58496)) +;;;;;; dired-listing-switches) "dired" "dired.el" (19714 24826)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -8268,7 +8263,7 @@ Minor mode to hook EasyPG into Mail mode. ;;;*** -;;;### (autoloads (epg-make-context) "epg" "epg.el" (19636 58496)) +;;;### (autoloads (epg-make-context) "epg" "epg.el" (19708 34240)) ;;; Generated autoloads from epg.el (autoload 'epg-make-context "epg" "\ @@ -13688,8 +13683,8 @@ The main features of this mode are ;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file ;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer ;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window -;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19636 -;;;;;; 58496)) +;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19705 +;;;;;; 10058)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -14165,7 +14160,7 @@ Example: ;;;;;; image-dired-jump-thumbnail-buffer image-dired-delete-tag ;;;;;; image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs ;;;;;; image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs) -;;;;;; "image-dired" "image-dired.el" (19636 58496)) +;;;;;; "image-dired" "image-dired.el" (19709 15556)) ;;; Generated autoloads from image-dired.el (autoload 'image-dired-dired-insert-marked-thumbs "image-dired" "\ @@ -15945,7 +15940,7 @@ something strange, such as redefining an Emacs function. ;;;*** ;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches) -;;;;;; "locate" "locate.el" (19662 53673)) +;;;;;; "locate" "locate.el" (19697 24269)) ;;; Generated autoloads from locate.el (defvar locate-ls-subdir-switches (purecopy "-al") "\ @@ -15997,7 +15992,7 @@ except that FILTER is not optional. ;;;*** -;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19661 52402)) +;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19714 24709)) ;;; Generated autoloads from log-edit.el (autoload 'log-edit "log-edit" "\ @@ -16057,8 +16052,8 @@ are indicated with a symbol. ;;;*** ;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer -;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (19636 -;;;;;; 58496)) +;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (19688 +;;;;;; 11756)) ;;; Generated autoloads from lpr.el (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt))) @@ -16152,7 +16147,7 @@ for further customization of the printer command. ;;;*** ;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el" -;;;;;; (19672 43471)) +;;;;;; (19678 47007)) ;;; Generated autoloads from ls-lisp.el (defvar ls-lisp-support-shell-wildcards t "\ @@ -17575,8 +17570,8 @@ To test this function, evaluate: ;;;*** -;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19636 -;;;;;; 58496)) +;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19678 +;;;;;; 47007)) ;;; Generated autoloads from mouse-sel.el (defvar mouse-sel-mode nil "\ @@ -18410,7 +18405,7 @@ Revert posting and mailing methods to the standard Emacs methods. ;;;*** ;;;### (autoloads (disable-command enable-command disabled-command-function) -;;;;;; "novice" "novice.el" (19636 58496)) +;;;;;; "novice" "novice.el" (19678 47007)) ;;; Generated autoloads from novice.el (defvar disabled-command-function 'disabled-command-function "\ @@ -20721,7 +20716,7 @@ True if decoded armor MESSAGE-KEYS has symmetric encryption indicator. ;;;*** ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" -;;;;;; (19636 58496)) +;;;;;; (19678 64521)) ;;; Generated autoloads from textmodes/picture.el (autoload 'picture-mode "picture" "\ @@ -20899,7 +20894,7 @@ Ignores leading comment characters. ;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview ;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript ;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" -;;;;;; (19636 58496)) +;;;;;; (19678 47007)) ;;; Generated autoloads from printing.el (autoload 'pr-interface "printing" "\ @@ -21589,8 +21584,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (19641 -;;;;;; 1314)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (19705 +;;;;;; 10058)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ @@ -21787,7 +21782,7 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** ;;;### (autoloads (python-shell jython-mode python-mode run-python) -;;;;;; "python" "progmodes/python.el" (19672 43471)) +;;;;;; "python" "progmodes/python.el" (19689 20360)) ;;; Generated autoloads from progmodes/python.el (add-to-list 'interpreter-mode-alist (cons (purecopy "jython") 'jython-mode)) @@ -21798,20 +21793,24 @@ If EXTENSION is any other symbol, it is ignored. (autoload 'run-python "python" "\ Run an inferior Python process, input and output via buffer *Python*. -CMD is the Python command to run. NOSHOW non-nil means don't show the -buffer automatically. +CMD is the Python command to run. NOSHOW non-nil means don't +show the buffer automatically. -Normally, if there is a process already running in `python-buffer', -switch to that buffer. Interactively, a prefix arg allows you to edit -the initial command line (default is `python-command'); `-i' etc. args -will be added to this as appropriate. A new process is started if: -one isn't running attached to `python-buffer', or interactively the -default `python-command', or argument NEW is non-nil. See also the -documentation for `python-buffer'. +Interactively, a prefix arg means to prompt for the initial +Python command line (default is `python-command'). -Runs the hook `inferior-python-mode-hook' (after the -`comint-mode-hook' is run). (Type \\[describe-mode] in the process -buffer for a list of commands.) +A new process is started if one isn't running attached to +`python-buffer', or if called from Lisp with non-nil arg NEW. +Otherwise, if a process is already running in `python-buffer', +switch to that buffer. + +This command runs the hook `inferior-python-mode-hook' after +running `comint-mode-hook'. Type \\[describe-mode] in the +process buffer for a list of commands. + +By default, Emacs inhibits the loading of Python modules from the +current working directory, for security reasons. To disable this +behavior, change `python-remove-cwd-from-path' to nil. \(fn &optional CMD NOSHOW NEW)" t nil) @@ -21873,7 +21872,7 @@ command is used to switch to an existing process, only when a new process is started. If you use this, you will probably want to ensure that the current arguments are retained (they will be included in the prompt). This argument is ignored when this function is called -programmatically, or when running in Emacs 19.34 or older. +programmatically. Note: You can toggle between using the CPython interpreter and the JPython interpreter by hitting \\[python-toggle-shells]. This toggles @@ -22864,8 +22863,8 @@ variable. ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers ;;;;;; rmail-dont-reply-to-names rmail-user-mail-address-regexp -;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19641 -;;;;;; 1152)) +;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19705 +;;;;;; 10467)) ;;; Generated autoloads from mail/rmail.el (autoload 'rmail-movemail-variant-p "rmail" "\ @@ -24128,8 +24127,8 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** ;;;### (autoloads (server-save-buffers-kill-terminal server-mode -;;;;;; server-force-delete server-start) "server" "server.el" (19662 -;;;;;; 13261)) +;;;;;; server-force-delete server-start) "server" "server.el" (19682 +;;;;;; 58511)) ;;; Generated autoloads from server.el (autoload 'server-start "server" "\ @@ -24729,7 +24728,7 @@ interactively. If there's no argument, do it at the current buffer. ;;;*** ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" -;;;;;; "mail/smtpmail.el" (19636 58496)) +;;;;;; "mail/smtpmail.el" (19714 24709)) ;;; Generated autoloads from mail/smtpmail.el (autoload 'smtpmail-send-it "smtpmail" "\ @@ -25095,7 +25094,7 @@ Spam reports will be queued with the method used when ;;;*** ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" -;;;;;; "speedbar.el" (19658 61388)) +;;;;;; "speedbar.el" (19678 47007)) ;;; Generated autoloads from speedbar.el (defalias 'speedbar 'speedbar-frame-mode) @@ -26529,7 +26528,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. ;;;*** ;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" -;;;;;; "progmodes/tcl.el" (19636 58496)) +;;;;;; "progmodes/tcl.el" (19673 50265)) ;;; Generated autoloads from progmodes/tcl.el (autoload 'tcl-mode "tcl" "\ @@ -28011,7 +28010,7 @@ BUFFER defaults to `trace-buffer'. ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion ;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers ;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp" -;;;;;; "net/tramp.el" (19672 43471)) +;;;;;; "net/tramp.el" (19714 24709)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -29566,7 +29565,7 @@ Name of the directory containing Bzr repository status files.") ;;;*** -;;;### (autoloads (vc-dir) "vc-dir" "vc-dir.el" (19661 53223)) +;;;### (autoloads (vc-dir) "vc-dir" "vc-dir.el" (19706 58306)) ;;; Generated autoloads from vc-dir.el (autoload 'vc-dir "vc-dir" "\ @@ -29625,7 +29624,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc-hg.el" (19661 52523)) +;;;### (autoloads nil "vc-hg" "vc-hg.el" (19683 64086)) ;;; Generated autoloads from vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -30940,7 +30939,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;;;*** ;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el" -;;;;;; (19636 58496)) +;;;;;; (19694 49287)) ;;; Generated autoloads from progmodes/which-func.el (put 'which-func-format 'risky-local-variable t) (put 'which-func-current 'risky-local-variable t) @@ -31401,8 +31400,8 @@ With arg, turn widget mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (19636 -;;;;;; 58496)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (19678 +;;;;;; 47007)) ;;; Generated autoloads from wid-edit.el (autoload 'widgetp "wid-edit" "\ @@ -32012,8 +32011,8 @@ Zone out, completely. ;;;;;; "url/url-expand.el" "url/url-ftp.el" "url/url-history.el" ;;;;;; "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el" ;;;;;; "url/url-vars.el" "vc-dav.el" "vcursor.el" "vt-control.el" -;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19672 -;;;;;; 46342 903499)) +;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19714 +;;;;;; 25843 484853)) ;;;*** diff --git a/lisp/simple.el b/lisp/simple.el index 2946da3cdc6..603654c0ea7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4115,6 +4115,11 @@ into account variable-width characters and line continuation." ;; When already vscrolled, we vscroll some more if we can, ;; or clear vscroll and move forward at end of tall image. ((> (setq vs (window-vscroll nil t)) 0) + + ;; If we are vscrolling an image at the top of the screen, + ;; we could actually advance point if this yields space + ;; below.... + (when (> rbot 0) (set-window-vscroll nil (+ vs (min rbot (frame-char-height))) t))) ;; If cursor just entered the bottom scroll margin, move forward, diff --git a/lisp/version.el b/lisp/version.el index 49c355d7020..a4ec3be11d3 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -32,7 +32,7 @@ (defconst emacs-copyright "Copyright (C) 2010 Free Software Foundation, Inc." "\ Short copyright string for this version of Emacs.") -(defconst emacs-version "23.2.90" "\ +(defconst emacs-version "23.2.91" "\ Version numbers of this version of Emacs.") (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\ diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/Cocoa/Emacs.base/Contents/Info.plist index 77be3ecf7dd..9788377c103 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/Cocoa/Emacs.base/Contents/Info.plist @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs 23.2.90 Copyright (C) 2010 Free Software Foundation, Inc. + Emacs 23.2.91 Copyright (C) 2010 Free Software Foundation, Inc. CFBundleIconFile Emacs.icns CFBundleIdentifier @@ -566,7 +566,7 @@ along with GNU Emacs. If not, see . APPL CFBundleShortVersionString - 23.2.90 + 23.2.91 CFBundleSignature EMAx diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings index c3edea0a204..b20105ee28f 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings @@ -1,6 +1,6 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Emacs"; -CFBundleShortVersionString = "Version 23.2.90"; -CFBundleGetInfoString = "Emacs version 23.2.90, NS Windowing"; +CFBundleShortVersionString = "Version 23.2.91"; +CFBundleGetInfoString = "Emacs version 23.2.91, NS Windowing"; NSHumanReadableCopyright = "Copyright (C) 2010 Free Software Foundation, Inc."; diff --git a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop index fc7293cc6b3..ae42df1873e 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop +++ b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Encoding=UTF-8 Type=Application -Version=23.2.90 +Version=23.2.91 Categories=GNUstep Name=Emacs Comment=GNU Emacs for NeXT/Open/GNUstep and OS X diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist index 5e1a64679f7..aaedda4d647 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist @@ -2,7 +2,7 @@ ApplicationDescription = "GNU Emacs for GNUstep / OS X"; ApplicationIcon = emacs.tiff; ApplicationName = Emacs; - ApplicationRelease = "23.2.90"; + ApplicationRelease = "23.2.91"; Authors = ( "Adrian Robert (GNUstep)", "Christophe de Dinechin (MacOS X)", @@ -13,7 +13,7 @@ ); Copyright = "Copyright (C) 2010 Free Software Foundation, Inc."; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; - FullVersionID = "Emacs 23.2.90, NS Windowing"; + FullVersionID = "Emacs 23.2.91, NS Windowing"; NSExecutable = Emacs; NSIcon = emacs.tiff; NSPrincipalClass = NSApplication; diff --git a/nt/emacs.rc b/nt/emacs.rc index 1266c8b8171..bf35e1d8cc3 100644 --- a/nt/emacs.rc +++ b/nt/emacs.rc @@ -7,8 +7,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,2,90,0 - PRODUCTVERSION 23,2,90,0 + FILEVERSION 23,2,91,0 + PRODUCTVERSION 23,2,91,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 2, 90, 0\0" + VALUE "FileVersion", "23, 2, 91, 0\0" VALUE "InternalName", "Emacs\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010\0" VALUE "OriginalFilename", "emacs.exe" VALUE "ProductName", "Emacs\0" - VALUE "ProductVersion", "23, 2, 90, 0\0" + VALUE "ProductVersion", "23, 2, 91, 0\0" VALUE "OLESelfRegister", "\0" END END diff --git a/nt/emacsclient.rc b/nt/emacsclient.rc index 9da7524e04d..8d0a34640da 100644 --- a/nt/emacsclient.rc +++ b/nt/emacsclient.rc @@ -5,8 +5,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,2,90,0 - PRODUCTVERSION 23,2,90,0 + FILEVERSION 23,2,91,0 + PRODUCTVERSION 23,2,91,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 2, 90, 0\0" + VALUE "FileVersion", "23, 2, 91, 0\0" VALUE "InternalName", "EmacsClient\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010\0" VALUE "OriginalFilename", "emacsclientw.exe" VALUE "ProductName", "EmacsClient\0" - VALUE "ProductVersion", "23, 2, 90, 0\0" + VALUE "ProductVersion", "23, 2, 91, 0\0" VALUE "OLESelfRegister", "\0" END END From 0b9fc69a7651c4a36ab4616f5f7d1c2f48fed783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 10 Dec 2010 19:23:43 +0100 Subject: [PATCH 48/58] Move call to Fkill_emacs from signal handler (session event) (Bug#7552). * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT as (Qsave_session arg). * xsmfns.c (smc_interact_CB): Set arg to Qnil. (smc_die_CB): Make an event with arg Qt. (Fhandle_save_session): If event has Qt as argument, call Fkill_emacs. --- src/ChangeLog | 10 ++++++++++ src/keyboard.c | 2 +- src/xsmfns.c | 25 ++++++++++++++++++------- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9a92697b52d..af944c32ebd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-12-10 Jan Djärv + + * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT + as (Qsave_session arg). + + * xsmfns.c (smc_interact_CB): Set arg to Qnil. + (smc_die_CB): Make an event with arg Qt. + (Fhandle_save_session): If event has Qt as argument, + call Fkill_emacs (Bug#7552). + 2010-12-07 Jan Djärv * xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552). diff --git a/src/keyboard.c b/src/keyboard.c index b35e4ae84e2..b027b3b09e6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4305,7 +4305,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) #endif else if (event->kind == SAVE_SESSION_EVENT) { - obj = Fcons (Qsave_session, Qnil); + obj = Fcons (Qsave_session, Fcons (event->arg, Qnil)); kbd_fetch_ptr = event + 1; } /* Just discard these, by returning nil. diff --git a/src/xsmfns.c b/src/xsmfns.c index f6260d00a56..8a16f68b255 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -172,6 +172,7 @@ smc_interact_CB (smcConn, clientData) { doing_interact = True; emacs_event.kind = SAVE_SESSION_EVENT; + emacs_event.arg = Qnil; } /* This is called when the session manager tells us to save ourselves. @@ -298,12 +299,8 @@ smc_die_CB (smcConn, clientData) SmcConn smcConn; SmPointer clientData; { - /* This may behave badly if desktop.el tries to ask questions. */ - Fkill_emacs (Qnil); - - /* This will not be reached, but we want kill-emacs-hook to be run. */ - SmcCloseConnection (smcConn, 0, 0); - ice_connection_closed (); + emacs_event.kind = SAVE_SESSION_EVENT; + emacs_event.arg = Qt; } /* We don't use the next two but they are mandatory, leave them empty. @@ -540,9 +537,12 @@ Do not call this function yourself. */) (event) Lisp_Object event; { + int kill_emacs = CONSP (event) && CONSP (XCDR (event)) + && EQ (Qt, XCAR (XCDR (event))); + /* Check doing_interact so that we don't do anything if someone called this at the wrong time. */ - if (doing_interact) + if (doing_interact && ! kill_emacs) { Bool cancel_shutdown = False; @@ -553,9 +553,20 @@ Do not call this function yourself. */) doing_interact = False; } + else if (kill_emacs) + { + /* We should not do user interaction here, but it is not easy to + prevent. Fix this in next version. */ + Fkill_emacs (Qnil); + /* This will not be reached, but we want kill-emacs-hook to be run. */ + SmcCloseConnection (smc_conn, 0, 0); + ice_connection_closed (); + } + return Qnil; } + /*********************************************************************** From 7470c6f07f7df4a9ac4079753591477abb46c867 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 Dec 2010 18:32:10 -0800 Subject: [PATCH 49/58] [Backport from trunk]: * make-dist: Exclude etc/*.pyc. --- ChangeLog | 4 ++++ make-dist | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a6b47ed9415..51cfab5906c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-12-11 Glenn Morris + + * make-dist: Exclude etc/*.pyc. [Backport from trunk] + 2010-11-13 Dan Nicolaescu Fix alloca definition when using gcc on non-gnu systems. diff --git a/make-dist b/make-dist index 5e81da5d70f..fe022f523f1 100755 --- a/make-dist +++ b/make-dist @@ -602,7 +602,7 @@ echo "Making links to \`etc'" fi done cd ../${tempdir}/etc - rm -f fns*.el + rm -f fns*.el *.pyc rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core rm -f TAGS) From 5612fd086e551a041197520abea15b4912948117 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 Dec 2010 18:34:55 -0800 Subject: [PATCH 50/58] Doc fixes. * lisp/subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) (with-silent-modifications): Doc fixes. --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55206c2c8ba..3191718bcfc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-11 Glenn Morris + + * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) + (with-silent-modifications): Doc fixes. + 2010-12-10 Michael Albinus * net/tramp.el (tramp-action-password, tramp-process-actions): diff --git a/lisp/subr.el b/lisp/subr.el index 8404352636e..c0f65897f29 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1,7 +1,8 @@ ;;; subr.el --- basic lisp subroutines for Emacs ;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -418,7 +419,7 @@ Unibyte strings are converted to multibyte for comparison." (assoc-string key alist nil)) (defun member-ignore-case (elt list) - "Like `member', but ignores differences in case and text representation. + "Like `member', but ignore differences in case and text representation. ELT must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison. Non-strings in LIST are ignored." @@ -1392,9 +1393,8 @@ if it is empty or a duplicate." (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. -Execution is delayed if `delay-mode-hooks' is non-nil. -If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' -after running the mode hooks. +Execution is delayed if the variable `delay-mode-hooks' is non-nil. +Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. Major mode functions should use this instead of `run-hooks' when running their FOO-mode-hook." (if delay-mode-hooks @@ -2495,7 +2495,7 @@ If PARAM is present and non-nil, it replaces STRING as the object `yank-rectangle', PARAM may be a list of strings to insert as a rectangle. If NOEXCLUDE is present and non-nil, the normal removal of the - yank-excluded-properties is not performed; instead FUNCTION is + `yank-excluded-properties' is not performed; instead FUNCTION is responsible for removing those properties. This may be necessary if FUNCTION adjusts point before or after inserting the object. If UNDO is present and non-nil, it is a function that will be called @@ -2767,7 +2767,7 @@ See also `with-temp-file' and `with-output-to-string'." (kill-buffer ,temp-buffer))))))) (defmacro with-silent-modifications (&rest body) - "Execute BODY, pretending it does not modifies the buffer. + "Execute BODY, pretending it does not modify the buffer. If BODY performs real modifications to the buffer's text, other than cosmetic ones, undo data may become corrupted. Typically used around modifications of text-properties which do not really @@ -3778,9 +3778,9 @@ which is higher than \"1alpha\"." ;; The following statement ought to be in print.c, but `provide' can't ;; be used there. +;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html (when (hash-table-p (car (read-from-string (prin1-to-string (make-hash-table))))) (provide 'hashtable-print-readable)) -;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here From 6e427e96702a3e4eccce4cabac7aea2382475e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Kl=C3=ADc?= Date: Fri, 10 Dec 2010 18:37:16 -0800 Subject: [PATCH 51/58] * doc/emacs/text.texi (HTML Mode): Small fixes. Fixes: debbugs:7607 --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/text.texi | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 9d820f866c4..cfc04f55ae8 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2010-12-11 Karel Klíč + + * text.texi (HTML Mode): Small fixes. (Bug#7607) + 2010-12-10 Glenn Morris * trouble.texi (Checklist): Fix typo in newsgroup name. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index a9faa420967..bef7319eae5 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1765,7 +1765,7 @@ variant of SGML mode. @kindex C-c C-n @r{(SGML mode)} @findex sgml-name-char Interactively specify a special character and insert the SGML -@samp{&}-command for that character. +@samp{&}-command for that character (@code{sgml-name-char}). @item C-c C-t @kindex C-c C-t @r{(SGML mode)} @@ -1799,7 +1799,7 @@ A numeric argument acts as a repeat count. @findex sgml-skip-tag-backward Skip backward across a balanced tag group (which extends from an opening tag through its corresponding closing tag) -(@code{sgml-skip-tag-forward}). A numeric argument acts as a repeat +(@code{sgml-skip-tag-backward}). A numeric argument acts as a repeat count. @item C-c C-d @@ -1841,7 +1841,7 @@ buffer as SGML (@code{sgml-validate}). @kindex C-c TAB @r{(SGML mode)} @findex sgml-tags-invisible Toggle the visibility of existing tags in the buffer. This can be -used as a cheap preview. +used as a cheap preview (@code{sgml-tags-invisible}). @end table @cindex nXML mode From 68f75971cc0228edb80d22728d6f83494d1594b5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Dec 2010 11:11:32 +0200 Subject: [PATCH 52/58] Fix bug #7576 with lack of index entries for character syntax. custom.texi (Init Syntax): Add index entries for "character syntax". --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/custom.texi | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index cfc04f55ae8..e16e41964c1 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2010-12-11 Eli Zaretskii + + * custom.texi (Init Syntax): Add index entries for "character syntax". + (Bug#7576) + 2010-12-11 Karel Klíč * text.texi (HTML Mode): Small fixes. (Bug#7607) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 18fdb581210..0d78e21ca06 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2234,6 +2234,8 @@ a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for non-@acronym{ASCII} in your init file. @item Characters: +@cindex Lisp character syntax +@cindex character syntax Lisp character constant syntax consists of a @samp{?} followed by either a character or an escape sequence starting with @samp{\}. Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}. Note that @@ -2250,6 +2252,7 @@ keys which send non-@acronym{ASCII} characters. @code{nil} stands for `false'. @item Other Lisp objects: +@cindex Lisp object syntax Write a single-quote (@code{'}) followed by the Lisp object you want. @end table From 3c73e30e34593dbd43ac6bdd8b6cdf70f493e3a2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Dec 2010 11:41:45 +0200 Subject: [PATCH 53/58] Fix bug #7563 with docs of split-string-and-unquote. processes.texi (Shell Arguments): Fix documentation of `split-string-and-unquote'. Add indexing. --- doc/lispref/ChangeLog | 5 +++++ doc/lispref/processes.texi | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b27efdda941..50c23da7027 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2010-12-11 Eli Zaretskii + + * processes.texi (Shell Arguments): Fix documentation of + `split-string-and-unquote'. Add indexing. (Bug#7563) + 2010-12-07 Stefan Monnier * modes.texi (Auto-Indentation): New section to document SMIE. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 1a4a766c81c..e281c0d5917 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -195,10 +195,17 @@ a shell command: @end example @end defun -@cindex quoting and unquoting shell command line +@cindex quoting and unquoting command-line arguments +@cindex minibuffer input, and command-line arguments +@cindex @code{call-process}, command-line arguments from minibuffer +@cindex @code{start-process}, command-line arguments from minibuffer The following two functions are useful for creating shell commands from individual argument strings, and taking shell command lines apart -into individual arguments. +into individual arguments. These functions are mainly intended to be +used for converting user input in the minibuffer, a Lisp string, into +a list of string arguments to be passed to @code{call-process} or +@code{start-process}, or for the converting such lists of arguments in +a single Lisp string to be presented in the minibuffer or echo area. @defun split-string-and-unquote string &optional separators This function splits @var{string} into substrings at matches for the @@ -210,7 +217,7 @@ If @var{separators} is omitted or @code{nil}, it defaults to @code{"\\s-+"}, which is a regular expression that matches one or more characters with whitespace syntax (@pxref{Syntax Class Table}). -This function performs two types of quoting: enclosing a whole string +This function supports two types of quoting: enclosing a whole string in double quotes @code{"@dots{}"}, and quoting individual characters with a backslash escape @samp{\}. The latter is also used in Lisp strings, so this function can handle those as well. From f055902693167478ad9affe03bb9398b6140b070 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Dec 2010 14:27:13 +0200 Subject: [PATCH 54/58] Code cleanup in xdisp.c regarding string_char_and_length. xdisp.c (string_pos_nchars_ahead, c_string_pos) (face_before_or_after_it_pos, next_element_from_string) (next_element_from_c_string, produce_stretch_glyph): Remove unused calculations of maximum string length before calling string_char_and_length and STRING_CHAR_AND_LENGTH. (string_char_and_length): Update commentary: MAXLEN is no longer needed. --- src/ChangeLog | 10 ++++++++++ src/xdisp.c | 35 +++++++++-------------------------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index af944c32ebd..f2604606982 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-12-11 Eli Zaretskii + + * xdisp.c (string_pos_nchars_ahead, c_string_pos) + (face_before_or_after_it_pos, next_element_from_string) + (next_element_from_c_string, produce_stretch_glyph): Remove unused + calculations of maximum string length before calling + string_char_and_length and STRING_CHAR_AND_LENGTH. + (string_char_and_length): Update commentary: MAXLEN is no longer + needed. + 2010-12-10 Jan Djärv * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT diff --git a/src/xdisp.c b/src/xdisp.c index 161e2b1cc4d..d3afac26a68 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1454,11 +1454,10 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos) } -/* Return the next character from STR which is MAXLEN bytes long. - Return in *LEN the length of the character. This is like - STRING_CHAR_AND_LENGTH but never returns an invalid character. If - we find one, we return a `?', but with the length of the invalid - character. */ +/* Return the next character from STR. Return in *LEN the length of + the character. This is like STRING_CHAR_AND_LENGTH but never + returns an invalid character. If we find one, we return a `?', but + with the length of the invalid character. */ static INLINE int string_char_and_length (str, len) @@ -1492,15 +1491,13 @@ string_pos_nchars_ahead (pos, string, nchars) if (STRING_MULTIBYTE (string)) { - int rest = SBYTES (string) - BYTEPOS (pos); const unsigned char *p = SDATA (string) + BYTEPOS (pos); int len; while (nchars--) { string_char_and_length (p, &len); - p += len, rest -= len; - xassert (rest >= 0); + p += len; CHARPOS (pos) += 1; BYTEPOS (pos) += len; } @@ -1545,14 +1542,13 @@ c_string_pos (charpos, s, multibyte_p) if (multibyte_p) { - int rest = strlen (s), len; + int len; SET_TEXT_POS (pos, 0, 0); while (charpos--) { string_char_and_length (s, &len); - s += len, rest -= len; - xassert (rest >= 0); + s += len; CHARPOS (pos) += 1; BYTEPOS (pos) += len; } @@ -3614,7 +3610,6 @@ face_before_or_after_it_pos (it, before_p) if (STRING_MULTIBYTE (it->string)) { const unsigned char *p = SDATA (it->string) + BYTEPOS (pos); - int rest = SBYTES (it->string) - BYTEPOS (pos); int c, len; struct face *face = FACE_FROM_ID (it->f, face_id); @@ -6264,7 +6259,6 @@ next_element_from_string (it) } else if (STRING_MULTIBYTE (it->string)) { - int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); const unsigned char *s = (SDATA (it->string) + IT_STRING_BYTEPOS (*it)); it->c = string_char_and_length (s, &it->len); @@ -6300,7 +6294,6 @@ next_element_from_string (it) } else if (STRING_MULTIBYTE (it->string)) { - int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it); const unsigned char *s = (SDATA (it->string) + IT_STRING_BYTEPOS (*it)); it->c = string_char_and_length (s, &it->len); @@ -6354,13 +6347,7 @@ next_element_from_c_string (it) BYTEPOS (it->position) = CHARPOS (it->position) = -1; } else if (it->multibyte_p) - { - /* Implementation note: The calls to strlen apparently aren't a - performance problem because there is no noticeable performance - difference between Emacs running in unibyte or multibyte mode. */ - int maxlen = strlen (it->s) - IT_BYTEPOS (*it); - it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len); - } + it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len); else it->c = it->s[IT_BYTEPOS (*it)], it->len = 1; @@ -20917,11 +20904,7 @@ produce_stretch_glyph (it) it2 = *it; if (it->multibyte_p) - { - int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT) - - IT_BYTEPOS (*it)); - it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len); - } + it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len); else { it2.c = it2.char_to_display = *p, it2.len = 1; From 76feb8641e5870c73b649a6e986b5d8d8936a61f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Dec 2010 17:20:11 +0200 Subject: [PATCH 55/58] Fix bug #7398 with truncated glyphs in tooltip display on w32. w32fns.c (Fx_show_tip): Call try_window with last argument TRY_WINDOW_IGNORE_FONTS_CHANGE. Delete the TODO ifdef: problem solved. Round up the tip height to an integral multiple of the frame's line height. Add FRAME_COLUMN_WIDTH to the tip width. --- src/ChangeLog | 6 ++++++ src/w32fns.c | 23 ++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f2604606982..249e77d3aa3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2010-12-11 Eli Zaretskii + * w32fns.c (Fx_show_tip): Call try_window with last argument + TRY_WINDOW_IGNORE_FONTS_CHANGE. Delete the TODO ifdef: problem + solved. Round up the tip height to an integral multiple of the + frame's line height. Add FRAME_COLUMN_WIDTH to the tip width. + (Bug#7398) + * xdisp.c (string_pos_nchars_ahead, c_string_pos) (face_before_or_after_it_pos, next_element_from_string) (next_element_from_c_string, produce_stretch_glyph): Remove unused diff --git a/src/w32fns.c b/src/w32fns.c index 61dd8b9ee1f..39fa6918e62 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5892,7 +5892,7 @@ Text larger than the specified size is clipped. */) clear_glyph_matrix (w->desired_matrix); clear_glyph_matrix (w->current_matrix); SET_TEXT_POS (pos, BEGV, BEGV_BYTE); - try_window (FRAME_ROOT_WINDOW (f), pos, 0); + try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); /* Compute width and height of the tooltip. */ width = height = 0; @@ -5909,9 +5909,7 @@ Text larger than the specified size is clipped. */) /* Let the row go over the full width of the frame. */ row->full_width_p = 1; -#ifdef TODO /* Investigate why some fonts need more width than is - calculated for some tooltips. */ - /* There's a glyph at the end of rows that is use to place + /* There's a glyph at the end of rows that is used to place the cursor there. Don't include the width of this glyph. */ if (row->used[TEXT_AREA]) { @@ -5919,15 +5917,16 @@ Text larger than the specified size is clipped. */) row_width = row->pixel_width - last->pixel_width; } else -#endif row_width = row->pixel_width; - /* TODO: find why tips do not draw along baseline as instructed. */ height += row->height; width = max (width, row_width); } - /* Add the frame's internal border to the width and height the X + /* Round up the height to an integral multiple of FRAME_LINE_HEIGHT. */ + if (height % FRAME_LINE_HEIGHT (f) != 0) + height += FRAME_LINE_HEIGHT (f) - height % FRAME_LINE_HEIGHT (f); + /* Add the frame's internal border to the width and height the w32 window should have. */ height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f); @@ -5946,11 +5945,13 @@ Text larger than the specified size is clipped. */) FRAME_EXTERNAL_MENU_BAR (f)); /* Position and size tooltip, and put it in the topmost group. - The add-on of 3 to the 5th argument is a kludge: without it, - some fonts cause the last character of the tip to be truncated, - for some obscure reason. */ + The add-on of FRAME_COLUMN_WIDTH to the 5th argument is a + peculiarity of w32 display: without it, some fonts cause the + last character of the tip to be truncated or wrapped around to + the next line. */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, - root_x, root_y, rect.right - rect.left + 3, + root_x, root_y, + rect.right - rect.left + FRAME_COLUMN_WIDTH (f), rect.bottom - rect.top, SWP_NOACTIVATE); /* Ensure tooltip is on top of other topmost windows (eg menus). */ From 4bb49a92aa12b7c607cc648b7598fde22216f06e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Dec 2010 20:45:53 +0200 Subject: [PATCH 56/58] Fallout from bug #7563. processes.texi (Shell Arguments): strings.texi (Creating Strings): Don't mention "shell commands"; make it explicit that `split-string-and-unquote' and `combine-and-quote-strings' are mainly for working with arguments to call-process and start-process. --- doc/lispref/ChangeLog | 6 ++++++ doc/lispref/processes.texi | 16 ++++++++-------- doc/lispref/strings.texi | 6 +++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 50c23da7027..970da3f5ff2 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,11 @@ 2010-12-11 Eli Zaretskii + * processes.texi (Shell Arguments): + * strings.texi (Creating Strings): Don't mention "shell commands"; + make it explicit that `split-string-and-unquote' and + `combine-and-quote-strings' are mainly for working with arguments + to call-process and start-process. + * processes.texi (Shell Arguments): Fix documentation of `split-string-and-unquote'. Add indexing. (Bug#7563) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e281c0d5917..8136fedb7f0 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -199,11 +199,12 @@ a shell command: @cindex minibuffer input, and command-line arguments @cindex @code{call-process}, command-line arguments from minibuffer @cindex @code{start-process}, command-line arguments from minibuffer - The following two functions are useful for creating shell commands -from individual argument strings, and taking shell command lines apart -into individual arguments. These functions are mainly intended to be -used for converting user input in the minibuffer, a Lisp string, into -a list of string arguments to be passed to @code{call-process} or + The following two functions are useful for combining a list of +individual command-line argument strings into a single string, and +taking a string apart into a list of individual command-line +arguments. These functions are mainly intended to be used for +converting user input in the minibuffer, a Lisp string, into a list of +string arguments to be passed to @code{call-process} or @code{start-process}, or for the converting such lists of arguments in a single Lisp string to be presented in the minibuffer or echo area. @@ -233,9 +234,8 @@ resulting string. The strings in @var{list-of-strings} that need quoting are those that include @var{separator} as their substring. Quoting a string encloses it in double quotes @code{"@dots{}"}. In the simplest case, if you -are consing a shell command from the individual command-line -arguments, every argument that includes embedded blanks will be -quoted. +are consing a command from the individual command-line arguments, +every argument that includes embedded blanks will be quoted. @end defun @node Synchronous Processes diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 94d2765a833..cc74c2cbf8a 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -348,9 +348,9 @@ practice: @result{} ("o" "o" "o") @end example -If you need to split a string that is a shell command, where -individual arguments could be quoted, see @ref{Shell Arguments, -split-string-and-unquote}. +If you need to split a string into a list of individual command-line +arguments suitable for @code{call-process} or @code{start-process}, +see @ref{Shell Arguments, split-string-and-unquote}. @end defun @defvar split-string-default-separators From 15579471891efd210b5d9edd29c1374cba98f648 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Dec 2010 22:37:54 +0200 Subject: [PATCH 57/58] Document that expand-file-name collapses multiple slashes. (Bug#7617) fileio.c (Fexpand_file_name): Doc fix. --- src/ChangeLog | 4 ++++ src/fileio.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 249e77d3aa3..97401ffe40a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-12-12 Eli Zaretskii + + * fileio.c (Fexpand_file_name): Doc fix. (Bug#7617) + 2010-12-11 Eli Zaretskii * w32fns.c (Fx_show_tip): Call try_window with last argument diff --git a/src/fileio.c b/src/fileio.c index 440a726b26b..e330f724142 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -832,6 +832,9 @@ File name components that are `.' are removed, and so are file name components followed by `..', along with the `..' itself; note that these simplifications are done without checking the resulting file names in the file system. +Multiple consecutive slashes are collapsed into a single slash, +except at the beginning of the file name when they are significant (e.g., +UNC file names on MS-Windows.) An initial `~/' expands to your home directory. An initial `~USER/' expands to USER's home directory. See also the function `substitute-in-file-name'. @@ -839,7 +842,7 @@ See also the function `substitute-in-file-name'. For technical reasons, this function can return correct but non-intuitive results for the root directory; for instance, \(expand-file-name ".." "/") returns "/..". For this reason, use -(directory-file-name (file-name-directory dirname)) to traverse a +\(directory-file-name (file-name-directory dirname)) to traverse a filesystem tree, not (expand-file-name ".." dirname). */) (name, default_directory) Lisp_Object name, default_directory; From 11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Dec 2010 22:45:57 +0200 Subject: [PATCH 58/58] subr.el (posn-col-row): Evaluate header-line-format in the context of the POSITION window's buffer. --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3191718bcfc..bd5d5576867 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-12 Eli Zaretskii + + * subr.el (posn-col-row): Evaluate header-line-format in the + context of the POSITION window's buffer. + 2010-12-11 Glenn Morris * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) diff --git a/lisp/subr.el b/lisp/subr.el index c0f65897f29..e4be7df50c7 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -958,7 +958,9 @@ and `event-end' functions." (setq spacing 0))) (cons (/ (car pair) (frame-char-width frame)) (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) - (if (null header-line-format) 0 1)))))))) + (if (null (with-current-buffer (window-buffer window) + header-line-format)) + 0 1)))))))) (defun posn-actual-col-row (position) "Return the actual column and row in POSITION, measured in characters.