From: Martin Rudalics Date: Tue, 31 May 2011 12:25:16 +0000 (+0200) Subject: Merge from trunk X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91184af015b4eb0ced1227176291ff051f690e7d;p=emacs.git Merge from trunk --- 91184af015b4eb0ced1227176291ff051f690e7d diff --cc doc/lispref/ChangeLog index bf1f699c525,bd92b2a7273..3aa84ae62f6 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@@ -1,12 -1,42 +1,51 @@@ +2011-05-30 Martin Rudalics + + * windows.texi (Windows and Frames, Window Sizes) + (Resizing Windows): Minor rewrites. + (Splitting Windows): Provide additional examples. Rewrite + parts on window-splits and window-nest. + (Deleting Windows, Window Parameters, Side Windows): Minor + rewrites. + + 2011-05-29 Chong Yidong + + * help.texi (Accessing Documentation): + * display.texi (Pixel Specification): + * processes.texi (Serial Ports, Serial Ports): + * nonascii.texi (Character Properties, Default Coding Systems): + * text.texi (Changing Properties, Special Properties): + * windows.texi (Window Start and End): + * modes.texi (SMIE Indentation Example, SMIE Tricks): + * keymaps.texi (Searching Keymaps, Tool Bar): + * minibuf.texi (Basic Completion): + * compile.texi (Eval During Compile): + * strings.texi (Formatting Strings): Tweaks to avoid overflowing + 7x9 paper in printed manual. + + * lists.texi (Sets And Lists): Fix misplaced text. + + 2011-05-29 Chong Yidong + + * keymaps.texi (Remapping Commands): Emphasize that the keymap + needs to be active (Bug#8350). + + 2011-05-28 Chong Yidong + + * minibuf.texi (Reading File Names): Clarify (Bug#8480). + + * tips.texi (Coding Conventions): Remove antediluvian filename + limit recommendation (Bug#8538). + + 2011-05-27 Glenn Morris + + * modes.texi (Auto Major Mode): Update for set-auto-mode changes. + + 2011-05-26 Glenn Morris + + * variables.texi (File Local Variables): + Update hack-local-variables `mode-only' return value. + Add some more details on what this function does in the other case. + 2011-05-19 Glenn Morris * lists.texi (Sets And Lists): Mention cl provides union etc. diff --cc etc/NEWS index 6693abea6a4,509b304d369..c16bde3bb48 --- a/etc/NEWS +++ b/etc/NEWS @@@ -284,141 -296,10 +296,145 @@@ If you need it, feedmail.el ought to pr ** The variable `focus-follows-mouse' now always defaults to nil. ++++ +** Window handling code. + +*** Window tree functions accessible in Elisp. +You can use functions to return the parent, siblings or child windows of +any window including internal windows (windows not associated with a +buffer) in the window tree. `walk-window-tree' is a new function for +traversing window trees. + +*** Window handling code moved to Elisp. +Splitting, resizing, and deleting window is mostly done in Elisp now. +The parts remaining in C deal only with checking the validity of these +operations wrt the window tree and window sizes. + +*** Window manipulations can deal with internal windows. +Many window handling functions like `split-window', `delete-window', or +`delete-other-windows' as well as the window resizing functions can now +act on any window including internal ones. + +*** window-total-height/-width vs window-body-height/-width. +The function `window-height' has been renamed to `window-total-height' +and `window-width' has been renamed to `window-body-width'. Two new +functions `window-total-width' and `window-body-height' are provided. + +*** Window parameters specific to window handling functions. +For each window you can specify a parameter to override the default +behavior of a number of functions like `split-window', `delete-window' +and `delete-other-windows'. + +*** New semantics of third argument of `split-window'. +The third argument of `split-window' can be set to any of the values +'below, 'right, 'above, or 'left to make the new window appear on the +corresponding side of the window that shall be split. + +*** New option `window-nest'. +The new option `window-nest' allows to return the space obtained for +resizing or creating a window more reliably to the window from which +such space was obtained. + +*** New option `window-splits'. +The new option `window-splits' allows to split a window that otherwise +cannot be split because it's too small by stealing space from other +windows in the same combination. + +*** `split-window-above-each-other' and `split-window-side-by-side'. +The commands `split-window-vertically' and `split-window-horizontally' +have been renamed to `split-window-above-each-other' and +`split-window-side-by-side' respectively. The old names are provided as +aliases. + +*** Window resizing functions. +A new standard function for resizing windows called `resize-window' has +been introduced. This and all other functions for resizing windows no +longer delete any windows when they become too small. + +*** Frame/window resizing. +Resizing an Emacs frame now preserves the proportional sizes of +subwindows modulo restrictions imposed by window minimum sizes and +fixed-size windows. + +*** `adjust-window-trailing-edge' adjustments. +`adjust-window-trailing-edge' can now deal with fixed-size windows and +is able to resize other windows if a window adjacent to the trailing +edge cannot be shrunk any more. This makes its behavior more similar to +that of Emacs 21 without compromising, however, the latter's inability +to delete windows which was introduced in Emacs 22. + +*** Commands for maximizing and minimizing windows. +New functions to maximize and minimize a window within its frame are +provided, namely `maximize-window' and `minimize-window'. + +*** Window-local buffer lists. +Windows now have local buffer lists. This means that removing a buffer +from display in a window will preferably show the buffer previously +shown in that window with its previous window-start and window-point +positions. This also means that the same buffer may be automatically +shown twice even if it already appears in another window. + +*** New commands `switch-to-prev-buffer' and `switch-to-next-buffer'. +These functions allow to navigate through the live buffers that have +been shown in a specific window. + +*** New window parameter `quit-restore'. +Functions to remove a buffer from display like `delete-windows-on' or +`replace-buffer-in-windows' now respect the `quit-restore' window +parameter which tells how to proceed with the window: Delete it, delete +its frame, or display some previously shown buffer in it. This means +that you don't have to dedicate a window to its buffer to obtain the +corresponding behavior, setting its `quit-restore' parameter suffices. + +*** New command `quit-restore-window'. +This function explicitly restores the state of one specific window +consulting its `quit-restore' window parameter. Among others, it is +now also called when exiting view-mode. + +*** Buffer display specifiers. +Customizing the display of buffers is now handled with the help of +buffer display specifiers. These specifiers are customizable via the +option `display-buffer-alist' and completely obsolete all existing +`display-buffer' related options like, `pop-up-windows', `pop-up-frames' +`display-buffer-reuse-frames' or `split-height-threshold'. Buffer +display specifiers also allow to specify a number of new options to +choose, for example, the desired position of a new window or its size. + +*** Arguments of `display-buffer'. +The second argument of `display-buffer' now accepts a list of buffer +display specifiers. A new third argument accepts a label to identify +buffers whose names are not expressive enough. + +*** Functions for displaying and popping and switching to buffers. +The `display-buffer', `pop-to-buffer' and `switch-to-buffer' families of +functions are all based on buffer display specifiers now. A number of +new functions with unified mnemnonics like `display-buffer-same-frame', +`pop-to-buffer-same-frame' and `switch-to-buffer-same-frame' have been +added. By convention, functions in the `switch-to-buffer' family are +now recommended for interactive use only. Application are supposed to +use function from the `pop-to-buffer' family instead. + +*** Atomic windows. +Atomic windows are internal windows that are treated by a number of +functions like `split-window', `delete-window' and +`delete-other-windows' atomically. This means that any of these +operations when applied to a subwindow of the atomic window is applied +to the entire atomic window instead. Atomic windows can be either +created automatically with the help of buffer display specifiers or +manually via the `window-atom' window parameter. + +*** Side windows. +Side windows are special windows located at one of the four sides of a +frame. Side windows are useful for assigning buffers always the same +location within a frame whenever they are shown there. Side windows are +by default semi-permanent which means that functions like +`delete-other-windows' do not delete them. Side windows can be either +created automatically with the help of buffer display specifiers or +manually via the `window-side' window parameter. ++ + ** Function `sha1' is now implemented in C for speed. + The elisp implementation sha1.el is removed. Feature sha1 is provided + by default. - * Editing Changes in Emacs 24.1 diff --cc lib/getopt_.h index 43acccc0bfc,43acccc0bfc..cbebd4aecae --- a/lib/getopt_.h +++ b/lib/getopt_.h @@@ -16,7 -16,7 +16,7 @@@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ --#ifndef _GL_GETOPT_H ++#ifndef _@GUARD_PREFIX@_GETOPT_H #if __GNUC__ >= 3 #pragma GCC system_header @@@ -36,10 -36,10 +36,10 @@@ # undef _GL_SYSTEM_GETOPT #endif --#ifndef _GL_GETOPT_H ++#ifndef _@GUARD_PREFIX@_GETOPT_H #ifndef __need_getopt --# define _GL_GETOPT_H 1 ++# define _@GUARD_PREFIX@_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an @@@ -279,5 -279,5 +279,5 @@@ extern int getopt_long_only (int ___arg /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt --#endif /* getopt.h */ --#endif /* getopt.h */ ++#endif /* _@GUARD_PREFIX@_GETOPT_H */ ++#endif /* _@GUARD_PREFIX@_GETOPT_H */ diff --cc lisp/ChangeLog index 2b32237f3e0,07f700f6987..2b57bf28142 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@@ -1,27 -1,388 +1,410 @@@ + 2011-05-31 Stefan Monnier + + * minibuffer.el: Add metadata method to completion tables. + (completion-category-overrides): New defcustom. + (completion-metadata, completion--field-metadata) + (completion-metadata-get, completion--styles) + (completion--cycle-threshold): New functions. + (completion-try-completion, completion-all-completions): + Add `metadata' argument to choose completion-styles. + (completion--do-completion): Use metadata to choose cycling. + (completion-all-sorted-completions): Use metadata for sorting. + Remove :completion-cycle-penalty which is not needed any more. + (completion--try-word-completion): Add `metadata' argument. + (minibuffer-completion-help): Check metadata for annotation function + and sorting. + (completion-file-name-table): Return `category' metadata. + (minibuffer-completing-file-name): Make obsolete. + * simple.el (minibuffer-completing-symbol): Make obsolete. + * icomplete.el (icomplete-completions): Pass new `metadata' param to + completion-try-completion. + +2011-05-30 Martin Rudalics + + * window.el (ignore-window-parameters, window-size-fixed): + Rewrite doc-strings. + (window-min-delta-1, window-min-delta): Reorder. Minor rewrite. + (resize-subwindows-normal): Use zerop when checking other-delta. + Call window-min-delta with NODOWN argument nil. + (adjust-window-trailing-edge): Fix doc-string. + (other-window): Fix doc-string and respect + ignore-window-parameters. + (delete-window, delete-other-windows): Fix doc-strings. Remove + -function postfix from associated window parameters. + (quit-restore-window): Resize only if buffer was in + temp-buffer-resize-mode. + (window-split-min-size): Rewrite doc-string. + (split-window): Rewrite doc-string. Rename horflag to + horizontal. Major rewrite of size calculations. Remove + -function postfix from associated window parameter. + (window-state-put-1, display-buffer-split-window-1): Rename + horflag to horizontal. + (same-window-p): Remove call to non-existent function. + + 2011-05-30 Stefan Monnier + + * mail/smtpmail.el (smtpmail-send-data): Add progress reporter. + + 2011-05-30 Leo Liu + + * net/rcirc.el (rcirc-debug-buffer): Use visible buffer name. + (rcirc-print): Decode all incoming messages (bug#8744). + (rcirc-decode-coding-system): Allow value nil for automatic coding + system detection. + + 2011-05-29 Chong Yidong + + * image.el (image-animate-max-time): Allow nil and t values. + Default to nil. + (create-animated-image): Doc fix. + (image-animate-start): Remove second arg; just use + image-animate-max-time. + (image-animate-timeout): Doc fix. Args changed. + + * image-mode.el (image-toggle-display-image): Ensure that the + image spec passed to the animate timer is the same object as in + the the buffer's display property (Bug#6981). + (image-transform-properties): Doc fix. + + * image.el (image-animate-max-time): Default to nil. + + 2011-05-29 Martin Rudalics + + * menu-bar.el (kill-this-buffer-enabled-p): Avoid looping over + entire buffer list (Bug#8184). + + 2011-05-29 Chong Yidong + + * image.el (imagemagick-types-inhibit) + (imagemagick-register-types): Doc fix. + + 2011-05-29 Deniz Dogan + + * net/rcirc.el (rcirc): Use the user's stored encryption method by + default. + + 2011-05-29 Chong Yidong + + * select.el: Don't perform clipboard-manager saving in hooks; + leave the hooks empty. + + 2011-05-28 Leo Liu + + * replace.el (occur-menu-map, occur-edit-mode-map): New vars. + (occur-mode-map): Bind occur-edit-mode. Use occur-menu-map. + (occur-edit-mode): New major mode (Bug#8463). + (occur-after-change-function): New function. + (occur-engine): Give Occur tags a read-only property. + + 2011-05-28 Kevin Ryde + + * subr.el (def-edebug-spec): Doc fix (Bug#8430). + + 2011-05-28 Chong Yidong + + * bindings.el (help-echo): Make the initial non-indicator dash + empty on graphical terminals (Bug#7295). + + * files.el (auto-mode-alist): Move config rule after the + in-stripping one (Bug#8547). + + * newcomment.el (comment-end-skip): Doc fix (Bug#8659). + + * startup.el (normal-splash-screen): Remove gratuitous mode-line + setting (Bug#8740). + + 2011-05-28 Alp Aker (tiny change) + + * buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort) + (Buffer-menu-buffer+size): Use Buffer-menu-buffer-column + (Bug#8539). + + 2011-05-28 Chong Yidong + + + * emacs-lisp/re-builder.el (re-builder): Improve doc (Bug#8286). + + 2011-05-28 Dima Kogan (tiny change) + + * progmodes/hideshow.el (hs-looking-at-block-start-p): New fun. + (hs-hide-block-at-point, hs-find-block-beginning) + (hs-already-hidden-p, hs-hide-block, hs-show-block): Use it + (Bug#8279). + + 2011-05-28 Glenn Morris + + * startup.el (fancy-about-screen): Use standard mode line. (Bug#8740) + + 2011-05-28 Chong Yidong + + * help-fns.el (describe-function-1): If the function is a derived + major mode, print the parent mode. + + * progmodes/cc-mode.el (c-mode, c++-mode, objc-mode, java-mode) + (idl-mode, pike-mode, awk-mode): Inherit from prog-mode. + + 2011-05-28 Stefan Monnier + + * minibuffer.el (completion--capf-wrapper): Check applicability before + retuning non-nil for non-exclusive completion data. + * progmodes/etags.el (tags-completion-at-point-function): + * info-look.el (info-lookup-completions-at-point): Mark as + non-exclusive. + (info-complete): Adjust accordingly. + + * info-look.el: Convert to lexical-binding and completion-at-point. + (info-lookup-completions-at-point): New function. + (info-complete): Use it and completion-in-region. + + 2011-05-28 Drew Adams + + * isearch.el: Let M-e start with point at the first mismatched char. + (isearch-fail-pos): New function. + (isearch-edit-string): Use it. + + 2011-05-28 Dmitry Kurochkin (tiny change) + + * isearch.el (isearch-range-invisible): Use invisible-p (bug#8721). + + 2009-11-23 Toby Cubitt + + * emacs-lisp/avl-tree.el: New avl-tree-stack datatype. Add new + traversal functions for avl-trees. + (avl-tree--stack): New struct. + (avl-tree-stack-p, avl-tree--stack-repopulate): New funs. + (avl-tree-enter): Add optional `updatefun' arg. + (avl-tree--do-enter): Add optional `updatefun' arg. + Change return value. + (avl-tree-delete): Add optional `test' and `nilflag' args. + (avl-tree--do-delete): Add `test' and `nilflag' args. + Change return value. + (avl-tree-member): Add optional `nilflag' + (avl-tree-member-p): New function. + (avl-tree-mapc, avl-tree-mapf, avl-tree-mapcar): New functions. + (avl-tree-stack, avl-tree-stack-pop, avl-tree-stack-first) + (avl-tree-stack-empty-p): New functions. + + 2009-11-23 Toby Cubitt + + * emacs-lisp/avl-tree.el (avl-tree--del-balance): Rename from + avl-tree--del-balance1 and make it work both ways. + (avl-tree--del-balance2): Remove. + (avl-tree--enter-balance): Rename from avl-tree--enter-balance1 and + make it work both ways. + (avl-tree--enter-balance2): Remove. + (avl-tree--switch-dir, avl-tree--dir-to-sign, avl-tree--sign-to-dir): + New macros. + (avl-tree--mapc, avl-tree-map): Add direction argument. + + 2011-05-27 David Michael (tiny change) + + * files.el (interpreter-mode-alist): Add rbash (bug#8745). + + 2011-05-27 Chong Yidong + + * select.el: Support clipboard managers with built-in function + x-clipboard-manager-save, via delete-frame-functions and + kill-emacs-hook. + (xselect-convert-to-targets): Add MULTIPLE target to list. + (xselect-convert-to-save-targets): New function. + + 2011-05-27 Kenichi Handa + + * mail/sendmail.el (mail-encode-header): Avoid double encoding by + let-binding rfc2047-encode-encoded-words to nil. + + 2011-05-27 Glenn Morris + + * mail/emacsbug.el: Don't require url-util. + + * shell.el (shell-directory-tracker): Case matters. (Bug#8735) + + * files.el (set-auto-mode): + Also respect mode: entries at the end of the file. (Bug#8586) + + 2011-05-26 Glenn Morris + + * files.el (hack-local-variables-prop-line, hack-local-variables): + Downcase mode names, as seems to be traditional. + (hack-local-variables, hack-local-variables-apply): Doc fixes. + + * mail/emacsbug.el (report-emacs-bug): Mention checking From address. + (report-emacs-bug-hook): Try to validate the From address. (Bug#8038) + + 2011-05-25 Julien Danjou + + * textmodes/rst.el (rst-define-level-faces): Do not define face + symbol if it is already defined. + + 2011-05-24 Vincent Belaïche + + * play/5x5.el (5x5-new-game, 5x5-randomize): + Reset 5x5-solver-output to nil when a new grid is cast. + (5x5-log-init, 5x5-log): Use defsubst instead of defmacro to shunt + these debugging traces, as defmacro breaks the compiled code. + + 2011-05-24 Dmitry Kurochkin (tiny change) + + * isearch.el (isearch-range-invisible): Use invisible-p (bug#8721). + + 2011-05-24 Leo Liu + + * vc/vc-bzr.el (vc-bzr-sha1-program): Rename from sha1-program. + (vc-bzr-sha1): Adapt. + + * sha1.el: Remove. Function `sha1' is now builtin. + + * bindings.el: Provide sha1 feature. + + 2011-05-24 Kenichi Handa + + * mail/sendmail.el: Require `rfc2047'. + (mail-insert-from-field): Do not perform RFC2047 encoding. + (mail-encode-header): New function. + (sendmail-send-it): Set buffer-file-coding-system of the work + buffer to the return value of select-message-coding-system. + Call mail-encode-header. + + * mail/smtpmail.el (smtpmail-send-it): Call mail-encode-header. + + 2011-05-24 Sean Neakums (tiny change) + + * mail/supercite.el (sc-default-cite-frame): + Handle sc-nested-citation-p when sc-cite-blank-lines-p is non-nil. + + 2011-05-24 Glenn Morris + + * progmodes/python.el (brm-menu): Declare. + + * emulation/viper.el (viper-set-hooks): Declare. + + * play/5x5.el (5x5-log-init, 5x5-log): Evaluate when compiling. + (5x5-log-init, 5x5-log, 5x5-solver): Doc fixes. + (math-map-vec, math-sub, math-mul, math-make-intv, math-reduce-vec) + (math-format-number, math-pow, calcFunc-arrange, calcFunc-cvec) + (calcFunc-diag, calcFunc-trn, calcFunc-inv, calcFunc-mrow) + (calcFunc-mcol, calcFunc-vconcat, calcFunc-index): Declare. + + 2011-05-24 Stefan Monnier + + Add an :exit-function for completion-at-point. + + * minibuffer.el (completion--done): New fun. + (completion--do-completion): Use it. New arg `expect-exact'. + (minibuffer-complete, minibuffer-complete-word): Don't output message, + since completion--do-completion does it for us now. + (minibuffer-force-complete): Use completion--done and + completion--replace. Handle sole-completion case with more care. + (minibuffer-complete-and-exit): Use new `expect-exact' arg. + (completion-extra-properties): New var. + (completion-annotate-function): Make obsolete. + (minibuffer-completion-help): Adjust accordingly. + Use completion-list-insert-choice-function. + (completion-at-point, completion-help-at-point): + Bind completion-extra-properties. + (completion-pcm-word-delimiters): Add | (for uniquify, for example). + * simple.el (completion-list-insert-choice-function): New var. + (completion-setup-function): Preserve it. + (choose-completion): Pay attention to it, shuffle the code a bit. + (choose-completion-string): New arg `insert-function'. + + * textmodes/bibtex.el: Convert to lexical binding. + (bibtex-mode-map): Use completion-at-point. + (bibtex-mode): Use define-derived-mode&completion-at-point-functions. + (bibtex-completion-at-point-function): New fun, from bibtex-complete. + (bibtex-complete): Define as obsolete alias. + (bibtex-complete-internal): Remove. + (bibtex-format-entry): Remove unused sub-group in regexp. + * shell.el (shell--command-completion-data) + (shell-environment-variable-completion): + * pcomplete.el (pcomplete-completions-at-point): + * comint.el (comint--complete-file-name-data): Use :exit-function + instead of completion-table-with-terminator so it also works for + choose-completion. + + 2011-05-23 Stefan Monnier + + * .el: Don't quote lambda expressions with `quote'. + + * vc/smerge-mode.el (smerge-refine-subst): Don't deactivate the mark + (bug#8710). + + * emacs-lisp/lisp.el (up-list): Fix forward movement (bug#8708). + + 2011-05-23 Ken Manheimer + + * allout.el (allout-inhibit-auto-fill-on-headline): Create new + customization variable and implement: If non-nil, auto-fill will + be inhibited while on topic's header line. + + 2011-05-23 Vincent Belaïche + + * play/5x5.el: I/ Add an arithmetic solver to suggest positions to + click on. II/ Make 5x5 multisession. III/ Ensure that random grids + always have a solution in grid size = 5 cases. + (5x5-mode-map): Add keybinding to function `5x5-solve-suggest'. + (5x5-solver-output, 5x5-log-buffer): New vars. + (5x5-grid, 5x5-x-pos, 5x5-y-pos, 5x5-moves, 5x5-cracking): + Make these variables buffer local to achieve 5x5 multi-session-ness. + (5x5): Set 5x5-grid-size only if SIZE is non-negative. + (5x5-grid-to-vec, 5x5-vec-to-grid, 5x5-log-init, 5x5-log, 5x5-solver) + (5x5-solve-suggest): New funs. + (5x5-randomize): Use 5x5-make-move instead of 5x5-flip-cell to + randomize a grid so that we ensure that there is always a solution. + (5x5-make-random-grid): Allow other movement than flipping. + + 2011-05-23 Kevin Ryde + + * emacs-lisp/advice.el (ad-read-advised-function): + Use `function-called-at-point' as the default default, if it has + advice and passes PREDICATE. + + 2011-05-23 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-function-form): Only call + byte-compile-lambda if it's actually a lambda. + + * emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one): + Fix function quoting. Use backquote better. + + 2011-05-22 Yuanle Song + + * nxml/rng-xsd.el (rng-xsd-check-pattern): Use case-sensitive + matching (Bug#8516). + + 2011-01-22 Jari Aalto + + * vc/vc-dir.el (vc-default-dir-printer): Give edited tag a + different face (Bug#8178). + + 2011-05-22 Chong Yidong + + * vc/diff-mode.el (diff-changed): Don't use terminal specs for + defface (Bug#8144). + + 2011-05-22 Stefan Monnier + + * emacs-lisp/macroexp.el (macroexpand-all-1): Convert ' to #' for + funcall as well (bug#8712). Warn when performing those conversions. + * emacs-lisp/bytecomp.el (byte-compile-form): Fix error report. + + * progmodes/grep.el (grep-mode): Fix it for good (bug#8684)! + + 2011-05-22 Glenn Morris + + * files.el (hack-local-variables-prop-line): Small simplifications. + (hack-local-variables, hack-local-variables-prop-line): + If MODE-ONLY, return the mode, rather than just `t'. + + 2011-05-21 Stefan Monnier + + * progmodes/grep.el (grep-mode): Fix last change (bug#8684). + 2011-05-21 Glenn Morris + * files.el (hack-local-variables-prop-line, hack-local-variables): + If only interested in the mode, don't bother doing the other stuff. + * image-mode.el (image-after-revert-hook): Redraw all frames on which the image is visible. (Bug#8567) diff --cc lisp/menu-bar.el index 41b18f8b66f,343a9c6dd0c..0460cd524e4 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@@ -1818,15 -1818,16 +1818,18 @@@ for the definition of the menu frame. When called in the minibuffer, get out of the minibuffer using `abort-recursive-edit'." (interactive) - (if (menu-bar-non-minibuffer-window-p) - (kill-buffer (current-buffer)) - (abort-recursive-edit))) + (cond + ((not (menu-bar-menu-frame-live-and-visible-p))) + ((menu-bar-non-minibuffer-window-p) + (kill-buffer)) + (t (abort-recursive-edit)))) (defun kill-this-buffer-enabled-p () + "Return non-nil if the `kill-this-buffer' menu item should be enabled." (or (not (menu-bar-non-minibuffer-window-p)) (let (found-1) + ;; Instead of looping over entire buffer list, stop once we've + ;; found two "killable" buffers (Bug#8184). (catch 'found-2 (dolist (buffer (buffer-list)) (unless (string-match-p "^ " (buffer-name buffer)) diff --cc src/ChangeLog index 561612b519f,fa8022b0d4d..48c2fa8716b --- a/src/ChangeLog +++ b/src/ChangeLog @@@ -1,8 -1,289 +1,294 @@@ + 2011-05-31 Paul Eggert + + Use 'inline', not 'INLINE'. + + * alloc.c, fontset.c (INLINE): Remove. + * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c: + * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c: + * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline. + * gmalloc.c (register_heapinfo): Use inline unconditionally. + * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__. + + 2011-05-31 Dan Nicolaescu + + Make it possible to run ./temacs. + + * callproc.c (set_initial_environment): Remove CANNOT_DUMP code, + syms_of_callproc does the same thing. Remove test for + "initialized", do it in the caller. + * emacs.c (main): Avoid calling set_initial_environment when dumping. + + 2011-05-31 Stefan Monnier + + * minibuf.c (Finternal_complete_buffer): Return `category' metadata. + (read_minibuf): Use get_minibuffer. + (syms_of_minibuf): Use DEFSYM. + (Qmetadata): New var. + * data.c (Qbuffer): Don't make it static. + (syms_of_data): Use DEFSYM. + + 2011-05-31 Paul Eggert + + * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751) + (CCL_CODE_MIN): New macro. + +2011-05-30 Martin Rudalics + + * window.c (Fsplit_window_internal): Make all arguments + mandatory. Rewrite doc-string. Simplify code. + + 2011-05-30 Paul Eggert + + * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests. + + * eval.c (Qdebug): Now static. + * lisp.h (Qdebug): Remove decl. This reverts a part of the + 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of + 2011-04-14T06:48:41Z!eggert@cs.ucla.edu. + + 2011-05-29 Chong Yidong + + * image.c: Various fixes to ImageMagick code comments. + (Fimagemagick_types): Doc fix. + + 2011-05-29 Paul Eggert + + Minor fixes prompted by GCC 4.6.0 warnings. + + * xselect.c (converted_selections, conversion_fail_tag): Now static. + + * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h". + (x_clipboard_manager_save_all): Move extern decl to ... + * xterm.h: ... here, so that it can be checked for consistency. + + 2011-05-29 Chong Yidong + + * xselect.c (x_clipboard_manager_save_frame) + (x_clipboard_manager_save_all): New functions. + (Fx_clipboard_manager_save): Lisp function deleted. + + * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all. + * frame.c (delete_frame): Call x_clipboard_manager_save_frame. + + * xterm.h: Update prototype. + + 2011-05-28 William Xu + + * nsterm.m (ns_term_shutdown): Synchronize user defaults before + exiting (Bug#8239). + + 2011-05-28 Jim Meyering + + Avoid a sign-extension bug in crypto_hash_function. + * fns.c (to_uchar): Define. + (crypto_hash_function): Use it to convert some newly-signed + variables to unsigned, to avoid sign-extension bugs. For example, + without this change, (md5 "truc") would evaluate to + 45723a2aff78ff4fff7fff1114760e62 rather than the expected + 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in + https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html. + + 2011-05-27 Paul Eggert + + Integer overflow fixes. + + * dbusbind.c: Serial number integer overflow fixes. + (CHECK_DBUS_SERIAL_GET_SERIAL): New macro. + (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float + to hold a serial number that is too large for a fixnum. + (Fdbus_method_return_internal, Fdbus_method_error_internal): + Check for serial numbers out of range. Decode any serial number + that was so large that it became a float. (Bug#8722) + + * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg. + (Fdbus_call_method, Fdbus_call_method_asynchronously): + Use XFASTINT rather than XUINT when numbers are nonnegative. + (xd_append_arg, Fdbus_method_return_internal): + (Fdbus_method_error_internal): Likewise. Also, for unsigned + arguments, check that Lisp number is nonnegative, rather than + silently wrapping negative numbers around. (Bug#8722) + (xd_read_message_1): Don't assume dbus_uint32_t can fit in int. + (Bug#8722) + + * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT. + + * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'. + + ccl: add integer overflow checks + * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT): + (IN_INT_RANGE): New macros. + (ccl_driver): Use them to check for integer overflow when + decoding a CCL program. Many of the new checks are whether XINT (x) + fits in int; it doesn't always, on 64-bit hosts. The new version + doesn't catch all possible integer overflows, but it's an + improvement. (Bug#8719) + + * alloc.c (make_event_array): Use XINT, not XUINT. + There's no need for unsigned here. + + * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t + This follows up to the 2011-05-06 change that substituted uintptr_t + for EMACS_INT. This case wasn't caught back then. + + Rework Fformat to avoid integer overflow issues. + * editfns.c: Include unconditionally, as it's everywhere + now (part of C89). Include . + (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed. + (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns. + (Fformat): Avoid the prepass trying to compute sizes; it was only + approximate and thus did not catch overflow reliably. Instead, walk + through the format just once, formatting and computing sizes as we go, + checking for integer overflow at every step, and allocating a larger + buffer as needed. Keep track separately whether the format is + multibyte. Keep only the most-recently calculated precision, rather + than them all. Record whether each argument has been converted to + string. Use EMACS_INT, not int, for byte and char and arg counts. + Support field widths and precisions larger than INT_MAX. Avoid + sprintf's undefined behavior with conversion specifications such as %#d + and %.0c. Fix bug with strchr succeeding on '\0' when looking for + flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when + formatting out-of-range floating point numbers with int + formats. (Bug#8668) + + * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN. + + * data.c: Avoid integer truncation in expressions involving floats. + * data.c: Include . + (arith_driver): When there's an integer overflow in an expression + involving floating point, convert the integers to floating point + so that the resulting value does not suffer from catastrophic + integer truncation. For example, on a 64-bit host (* 4 + most-negative-fixnum 0.5) should yield about -4.6e+18, not zero. + Do not rely on undefined behavior after integer overflow. + + merge count_size_as_multibyte, parse_str_to_multibyte + * character.c, character.h (count_size_as_multibyte): + Renamed from parse_str_to_multibyte; all uses changed. + Check for integer overflow. + * insdel.c, lisp.h (count_size_as_multibyte): Remove, + since it's now a duplicate of the other. This is more of + a character than a buffer op, so better that it's in character.c. + * fns.c, print.c: Adjust to above changes. + + 2011-05-27 Stefan Monnier + + * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup. + + 2011-05-27 Paul Eggert + + * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings. + (x_handle_selection_request, frame_for_x_selection): Remove unused vars. + (x_clipboard_manager_save): Now static. + (Fx_clipboard_manager_save): Rename local to avoid shadowing. + + * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings. + (crypto_hash_function): Now static. + Fix pointer signedness problems. Avoid unnecessary initializations. + + 2011-05-27 Chong Yidong + + * termhooks.h (Vselection_alist): Make it terminal-local. + + * terminal.c (create_terminal): Initialize it. + + * xselect.c: Support for clipboard managers. + (Vselection_alist): Move to termhooks.h as terminal-local var. + (LOCAL_SELECTION): New macro. + (x_atom_to_symbol): Handle x_display_info_for_display fail case. + (symbol_to_x_atom): Remove gratuitous arg. + (x_handle_selection_request, lisp_data_to_selection_data) + (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed. + (x_own_selection, x_get_local_selection, x_convert_selection): + New arg, specifying work frame. Use terminal-local Vselection_alist. + (some_frame_on_display): Delete unused function. + (Fx_own_selection_internal, Fx_get_selection_internal) + (Fx_disown_selection_internal, Fx_selection_owner_p) + (Fx_selection_exists_p): New optional frame arg. + (frame_for_x_selection, Fx_clipboard_manager_save): New functions. + (x_handle_selection_clear): Don't treat other terminals with the + same keyboard specially. Use the terminal-local Vselection_alist. + (x_clear_frame_selections): Use Frun_hook_with_args. + + * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms. + + * xterm.h: Add support for those atoms. + + 2011-05-26 Chong Yidong + + * xselect.c: ICCCM-compliant handling of MULTIPLE targets. + (converted_selections, conversion_fail_tag): New global variables. + (x_selection_request_lisp_error): Free the above. + (x_get_local_selection): Remove unnecessary code. + (x_reply_selection_request): Args changed; handle arbitrary array + of converted selections stored in converted_selections. + Separate the XChangeProperty and SelectionNotify steps. + (x_handle_selection_request): Rewrite to handle MULTIPLE target. + (x_convert_selection): New function. + (x_handle_selection_event): Simplify. + (x_get_foreign_selection): Don't ignore incoming requests while + waiting for an answer; this will fail when we implement + SAVE_TARGETS, and seems unnecessary anyway. + (selection_data_to_lisp_data): Recognize ATOM_PAIR type. + (Vx_sent_selection_functions): Doc fix. + + 2011-05-26 Leo Liu + + * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699) + + 2011-05-25 YAMAMOTO Mitsuharu + + * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p. + + * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row + for fringe update if it has periodic bitmap. + (row_equal_p): Also compare left_fringe_offset, right_fringe_offset, + and fringe_bitmap_periodic_p. + + * fringe.c (get_fringe_bitmap_data): New function. + (draw_fringe_bitmap_1, update_window_fringes): Use it. + (update_window_fringes): Record periodicity of fringe bitmap in glyph + row. Mark glyph row for fringe update if periodicity changed. + + * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row + for fringe update unless it has periodic bitmap. + + 2011-05-25 Kenichi Handa + + * xdisp.c (get_next_display_element): Set correct it->face_id for + a static composition. + + 2011-05-24 Leo Liu + + * deps.mk (fns.o): + * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h. + + * fns.c (crypto_hash_function, Fsha1): New function. + (Fmd5): Use crypto_hash_function. + (syms_of_fns): Add Ssha1. + + 2011-05-22 Paul Eggert + + * gnutls.c: Remove unused macros. + (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function): + (fn_gnutls_transport_set_push_function) [!WINDOWSNT]: + Remove macros that are defined and never used. + Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14). + + 2011-05-22 Chong Yidong + + * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS. + (Fx_get_selection_internal): Minor cleanup. + (Fx_own_selection_internal): Rename arguments for consistency with + select.el. + + 2011-05-22 Paul Eggert + + * xselect.c (QSAVE_TARGETS): New static var, to fix build failure. + + 2011-05-22 Chong Yidong + + * xselect.c (syms_of_xselect): Include character.h; use DEFSYM. + 2011-05-21 YAMAMOTO Mitsuharu * dispnew.c (scrolling_window): Don't exclude the case that the