------------------------------------------------------------ revno: 116193 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-29 00:36:32 -0800 message: * etc/NEWS: Don't use a separate section for single entries diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-29 08:27:55 +0000 +++ etc/NEWS 2014-01-29 08:36:32 +0000 @@ -491,9 +491,7 @@ `electric-pair-text-syntax-table' to tweak pairing behavior inside strings and comments. -** EPA - -*** New option `epa-mail-aliases'. +** New EPA option `epa-mail-aliases'. You can set this to a list of alias expansions for keys to use in `epa-mail-encrypt'. @@ -506,9 +504,7 @@ is `foo@bar.com', ignore that name as regards encryption. This is useful to avoid a query when you have no key for that name. -** ERC - -*** New option `erc-accidental-paste-threshold-seconds'. +** New ERC option `erc-accidental-paste-threshold-seconds'. If set to a number, this can be used to avoid accidentally pasting large amounts of data into the ERC input. @@ -537,9 +533,8 @@ Tramp-using variants can still be used by enabling the eshell-tramp module. -** F90 mode --- -*** New option `f90-smart-end-names'. +** New F90 mode option `f90-smart-end-names'. ** Icomplete is a bit more like Ido. ------------------------------------------------------------ revno: 116192 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-29 00:31:50 -0800 message: * lisp/hippie-exp.el: Header comment changes. Remove pointless+wrong "last change" header. Set Maintainer to FSF, since original author has made no changes in 16+ years. diff: === modified file 'lisp/hippie-exp.el' --- lisp/hippie-exp.el 2014-01-01 07:43:34 +0000 +++ lisp/hippie-exp.el 2014-01-29 08:31:50 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 1992, 2001-2014 Free Software Foundation, Inc. ;; Author: Anders Holst -;; Last change: 3 March 1998 +;; Maintainer: FSF ;; Version: 1.6 ;; Keywords: abbrev convenience ------------------------------------------------------------ revno: 116191 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-29 00:27:55 -0800 message: Some doc for cycle-spacing * lisp/simple.el (just-one-space, cycle-spacing): Doc fixes. * doc/emacs/killing.texi (Deletion): Mention cycle-spacing. * doc/lispref/text.texi: Comment. * etc/NEWS: Related edits. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-01-28 02:50:16 +0000 +++ doc/emacs/ChangeLog 2014-01-29 08:27:55 +0000 @@ -1,3 +1,7 @@ +2014-01-29 Glenn Morris + + * killing.texi (Deletion): Mention cycle-spacing. + 2014-01-28 Glenn Morris * text.texi (Fill Commands): Mention fill-single-char-nobreak-p. === modified file 'doc/emacs/killing.texi' --- doc/emacs/killing.texi 2014-01-26 01:10:18 +0000 +++ doc/emacs/killing.texi 2014-01-29 08:27:55 +0000 @@ -109,12 +109,11 @@ delete all the text in the region if it is active (@pxref{Using Region}). -@c FIXME: `cycle-spacing' should be documented, too. (Maybe not in -@c this node, tho.) --xfq @kindex M-\ @findex delete-horizontal-space @kindex M-SPC @findex just-one-space +@findex cycle-spacing The other delete commands are those that delete only whitespace characters: spaces, tabs and newlines. @kbd{M-\} (@code{delete-horizontal-space}) deletes all the spaces and tab @@ -125,7 +124,11 @@ (even if there were none before). With a numeric argument @var{n}, it leaves @var{n} spaces before point if @var{n} is positive; if @var{n} is negative, it deletes newlines in addition to spaces and tabs, -leaving @var{-n} spaces before point. +leaving @var{-n} spaces before point. The command @code{cycle-spacing} +acts like a more flexible version of @code{just-one-space}. It +does different things if you call it repeatedly in succession. +The first call acts like @code{just-one-space}, the next removes +all whitespace, and a third call restores the original whitespace. @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines after the current line. If the current line is blank, it deletes all === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2014-01-28 01:49:02 +0000 +++ doc/lispref/text.texi 2014-01-29 08:27:55 +0000 @@ -771,6 +771,9 @@ @code{nil}. @end deffn +@c There is also cycle-spacing, but I cannot see it being useful in +@c Lisp programs, so it is not mentioned here. + @deffn Command delete-blank-lines This function deletes blank lines surrounding point. If point is on a blank line with one or more blank lines before or after it, then all but === modified file 'etc/NEWS' --- etc/NEWS 2014-01-28 03:00:20 +0000 +++ etc/NEWS 2014-01-29 08:27:55 +0000 @@ -273,16 +273,14 @@ the last step. Its default value is changed to nil, which means a tab stop every `tab-width' columns. -** Filling changes - -*** New command `cycle-spacing' cycles between spacing conventions: -having just one space, no spaces, or reverting to the original -spacing. Like `just-one-space', it can handle or ignore newlines and -leave different number of spaces. - -+++ -*** `fill-single-char-nobreak-p' prevents fill from breaking a line after -a one-letter word, which is an error according to some typographical ++++ +** New command `cycle-spacing' acts like a smarter `just-one-space'. +When called in succession, it cycles between spacing conventions: +one space, no spaces, original spacing. + ++++ +** The new function `fill-single-char-nobreak-p' can stop fill from breaking +a line after a one-letter word, which is an error in some typographical conventions. To use it, add it to the `fill-nobreak-predicate' hook. +++ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-28 09:45:37 +0000 +++ lisp/ChangeLog 2014-01-29 08:27:55 +0000 @@ -1,3 +1,7 @@ +2014-01-29 Glenn Morris + + * simple.el (just-one-space, cycle-spacing): Doc fixes. + 2014-01-28 Martin Rudalics * window.el (fit-frame-to-buffer): Fix calculations for margins and === modified file 'lisp/simple.el' --- lisp/simple.el 2014-01-23 07:53:56 +0000 +++ lisp/simple.el 2014-01-29 08:27:55 +0000 @@ -794,7 +794,8 @@ (defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces). -If N is negative, delete newlines as well, leaving -N spaces." +If N is negative, delete newlines as well, leaving -N spaces. +See also `cycle-spacing'." (interactive "*p") (cycle-spacing n nil t)) @@ -805,31 +806,22 @@ variable.") (defun cycle-spacing (&optional n preserve-nl-back single-shot) - "Manipulate spaces around the point in a smart way. - -When run as an interactive command, the first time it's called -in a sequence, deletes all spaces and tabs around point leaving -one (or N spaces). If this does not change content of the -buffer, skips to the second step: - -When run for the second time in a sequence, deletes all the -spaces it has previously inserted. - -When run for the third time, returns the whitespace and point in -a state encountered when it had been run for the first time. - -For example, if buffer contains \"foo ^ bar\" with \"^\" denoting the -point, calling `cycle-spacing' command will replace two spaces with -a single space, calling it again immediately after, will remove all -spaces, and calling it for the third time will bring two spaces back -together. - -If N is negative, delete newlines as well. However, if -PRESERVE-NL-BACK is t new line characters prior to the point -won't be removed. - -If SINGLE-SHOT is non-nil, will only perform the first step. In -other words, it will work just like `just-one-space' command." + "Manipulate whitespace around point in a smart way. +In interactive use, this function behaves differently in successive +consecutive calls. + +The first call in a sequence acts like `just-one-space'. +It deletes all spaces and tabs around point, leaving one space +\(or N spaces). N is the prefix argument. If N is negative, +it deletes newlines as well, leaving -N spaces. +\(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.) + +The second call in a sequence (or the first call if the above does +not result in any changes) deletes all spaces. + +The third call in a sequence restores the original whitespace (and point). + +If SINGLE-SHOT is non-nil, it only performs the first step in the sequence." (interactive "*p") (let ((orig-pos (point)) (skip-characters (if (and n (< n 0)) " \t\n\r" " \t")) ------------------------------------------------------------ revno: 116190 fixes bug: http://debbugs.gnu.org/16565 committer: Jan D. branch nick: trunk timestamp: Wed 2014-01-29 09:23:59 +0100 message: * xmenu.c (create_and_show_popup_menu): Handle case when no key is grabbed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-28 09:45:37 +0000 +++ src/ChangeLog 2014-01-29 08:23:59 +0000 @@ -1,3 +1,8 @@ +2014-01-29 Jan Djärv + + * xmenu.c (create_and_show_popup_menu): Handle case when no key + is grabbed (Bug#16565). + 2014-01-28 Martin Rudalics * xdisp.c (last_max_ascent): Re-remove after erroneously === modified file 'src/xmenu.c' --- src/xmenu.c 2014-01-13 01:40:35 +0000 +++ src/xmenu.c 2014-01-29 08:23:59 +0000 @@ -1306,6 +1306,8 @@ for (i = 0; i < 5; i++) if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i)) break; + // If keys aren't grabbed (i.e. a mouse up event), use 0. + if (i == 5) i = 0; } /* Display the menu. */ ------------------------------------------------------------ revno: 116189 committer: martin rudalics branch nick: trunk timestamp: Tue 2014-01-28 10:45:37 +0100 message: Fix Fwindow_text_pixel_size and fit-frame-to-buffer. * xdisp.c (last_max_ascent): Re-remove after erroneously reintroducing it on 2013-11-30 and abolishing Dmitry's removal from 2013-03-29. (move_it_to): Re-remove reference to last_max_ascent. (Fwindow_text_pixel_size): Add iterator's max_ascent and max_descent here instead of calling line_bottom_y. Fix doc-string. * window.el (fit-frame-to-buffer): Fix calculations for margins and height constraints. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-28 07:02:34 +0000 +++ lisp/ChangeLog 2014-01-28 09:45:37 +0000 @@ -1,3 +1,8 @@ +2014-01-28 Martin Rudalics + + * window.el (fit-frame-to-buffer): Fix calculations for margins and + height constraints. + 2014-01-28 Luke Lee * progmodes/hideif.el: Extend to full CPP expression syntax. === modified file 'lisp/window.el' --- lisp/window.el 2014-01-22 10:29:23 +0000 +++ lisp/window.el 2014-01-28 09:45:37 +0000 @@ -6864,20 +6864,30 @@ ;; Handle margins. (margins (or (frame-parameter frame 'fit-frame-to-buffer-margins) fit-frame-to-buffer-margins)) - (left-margin (or (window--sanitize-margin - (nth 0 margins) 0 display-width) - (nth 0 workarea))) - (top-margin (or (window--sanitize-margin - (nth 1 margins) 0 display-height) - (nth 1 workarea))) + (left-margin (if (nth 0 margins) + (or (window--sanitize-margin + (nth 0 margins) 0 display-width) + 0) + (nth 0 workarea))) + (top-margin (if (nth 1 margins) + (or (window--sanitize-margin + (nth 1 margins) 0 display-height) + 0) + (nth 1 workarea))) (workarea-width (nth 2 workarea)) - (right-margin (or (window--sanitize-margin - (nth 2 margins) left-margin display-width) - (+ left-margin workarea-width))) + (right-margin (if (nth 2 margins) + (- display-width + (or (window--sanitize-margin + (nth 2 margins) left-margin display-width) + 0)) + (nth 2 workarea))) (workarea-height (nth 3 workarea)) - (bottom-margin (or (window--sanitize-margin - (nth 3 margins) top-margin display-height) - (+ top-margin workarea-height))) + (bottom-margin (if (nth 3 margins) + (- display-height + (or (window--sanitize-margin + (nth 3 margins) top-margin display-height) + 0)) + (nth 3 workarea))) ;; The pixel width of FRAME (which does not include the ;; window manager's decorations). (frame-width (frame-pixel-width)) @@ -6927,11 +6937,7 @@ (not (zerop lines))) (1- lines) 0)))) - ;; The maximum height we can use for fitting. - (fit-height - (- workarea-height extra-height toolbar-extra-height)) - ;; The pixel position of FRAME's top border. We usually - ;; try to leave this alone. + ;; The pixel position of FRAME's top border. (top (let ((top (frame-parameter nil 'top))) (if (consp top) @@ -6943,7 +6949,8 @@ (max-height (cond ((numberp (nth 0 sizes)) (* (nth 0 sizes) char-height)) - ((numberp max-height) (* max-height char-height)))) + ((numberp max-height) (* max-height char-height)) + (t display-height))) (min-height (cond ((numberp (nth 1 sizes)) (* (nth 1 sizes) char-height)) @@ -6954,7 +6961,8 @@ ((numberp (nth 2 sizes)) (- (* (nth 2 sizes) char-width) window-extra-width)) ((numberp max-width) - (- (* max-width char-width) window-extra-width)))) + (- (* max-width char-width) window-extra-width)) + (t display-height))) (min-width (cond ((numberp (nth 3 sizes)) @@ -6967,59 +6975,48 @@ (value (window-text-pixel-size nil t t workarea-width workarea-height t)) (width (+ (car value) (window-right-divider-width))) - (height (+ (cdr value) (window-bottom-divider-width))) - remainder) - (unless frame-resize-pixelwise - ;; Round sizes to character sizes. - (setq remainder (% width char-width)) - (unless (zerop remainder) - (setq width (+ width (- char-width remainder)))) - (setq remainder (% height char-height)) - (setq height (+ height (- char-height remainder)))) - ;; Now make sure that we don't get larger than our rounded - ;; maximum lines and columns. - (when (> width fit-width) - (setq width (- fit-width (% fit-width char-width)))) - (when (> height fit-height) - (setq height (- fit-height (% fit-height char-height)))) + (height (+ (cdr value) (window-bottom-divider-width)))) ;; Don't change height or width when the window's size is fixed ;; in either direction. (cond + ((eq window-size-fixed 'width) + (setq width nil)) ((eq window-size-fixed 'height) - (setq height nil)) - ((eq window-size-fixed 'width) (setq height nil))) + ;; Fit width to constraints. (when width + (unless frame-resize-pixelwise + ;; Round to character sizes. + (setq width (* (/ (+ width char-width -1) char-width) + char-width))) ;; Fit to maximum and minimum widths. - (when max-width - (setq width (min width max-width))) - (when min-width - (setq width (max width min-width))) + (setq width (max (min width max-width) min-width)) ;; Add extra width. (setq width (+ width extra-width)) - ;; Preserve right margin. - (let ((right (+ left width extra-width))) + ;; Preserve margins. + (let ((right (+ left width))) (cond ((> right right-margin) ;; Move frame to left (we don't know its real width). - (setq left (min (- right-margin display-width) -1))) + (setq left (max left-margin (- left (- right right-margin))))) ((< left left-margin) ;; Move frame to right. (setq left left-margin))))) + ;; Fit height to constraints. (when height + (unless frame-resize-pixelwise + (setq height (* (/ (+ height char-height -1) char-height) + char-height))) ;; Fit to maximum and minimum heights. - (when max-height - (setq height (min height max-height))) - (when min-height - (setq height (max height min-height))) + (setq height (max (min height max-height) min-height)) ;; Add extra height. (setq height (+ height extra-height)) - ;; Preserve bottom and top margins. - (let ((bottom (+ top height extra-height))) + ;; Preserve margins. + (let ((bottom (+ top height))) (cond ((> bottom bottom-margin) ;; Move frame up (we don't know its real height). - (setq top (min (- bottom-margin display-height) -1))) + (setq top (max top-margin (- top (- bottom bottom-margin))))) ((< top top-margin) ;; Move frame down. (setq top top-margin))))) === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-28 07:43:24 +0000 +++ src/ChangeLog 2014-01-28 09:45:37 +0000 @@ -1,3 +1,13 @@ +2014-01-28 Martin Rudalics + + * xdisp.c (last_max_ascent): Re-remove after erroneously + reintroducing it on 2013-11-30 and abolishing Dmitry's removal + from 2013-03-29. + (move_it_to): Re-remove reference to last_max_ascent. + (Fwindow_text_pixel_size): Add iterator's max_ascent and + max_descent here instead of calling line_bottom_y. Fix + doc-string. + 2014-01-28 Dmitry Antipov * terminal.c (initial_free_frame_resources): New function. === modified file 'src/xdisp.c' --- src/xdisp.c 2014-01-25 03:48:29 +0000 +++ src/xdisp.c 2014-01-28 09:45:37 +0000 @@ -571,7 +571,7 @@ /* Ascent and height of the last line processed by move_it_to. */ -static int last_max_ascent, last_height; +static int last_height; /* Non-zero if there's a help-echo in the echo area. */ @@ -9099,7 +9099,6 @@ it->current_y += it->max_ascent + it->max_descent; ++it->vpos; last_height = it->max_ascent + it->max_descent; - last_max_ascent = it->max_ascent; it->max_ascent = it->max_descent = 0; } @@ -9126,7 +9125,6 @@ it->current_y += it->max_ascent + it->max_descent; ++it->vpos; last_height = it->max_ascent + it->max_descent; - last_max_ascent = it->max_ascent; } if (backup_data) @@ -9511,7 +9509,7 @@ include the height of the mode- or header-line of WINDOW in the return value. If it is either the symbol `mode-line' or `header-line', include only the height of that line, if present, in the return value. If t, -include the height of any of these lines in the return value. */) +include the height of both, if present, in the return value. */) (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit, Lisp_Object y_limit, Lisp_Object mode_and_header_line) { @@ -9579,7 +9577,6 @@ SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start)); start_display (&it, w, startp); - /** move_it_vertically_backward (&it, 0); **/ if (NILP (x_limit)) x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y); else @@ -9593,14 +9590,7 @@ MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); } - if (start == end) - y = it.current_y; - else - { - /* Count last line. */ - last_height = 0; - y = line_bottom_y (&it); /* - y; */ - } + y = it.current_y + it.max_ascent + it.max_descent; if (!EQ (mode_and_header_line, Qheader_line) && !EQ (mode_and_header_line, Qt)) ------------------------------------------------------------ revno: 116188 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2014-01-28 11:43:24 +0400 message: * xfaces.c (free_frame_faces): Adjust comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-28 05:55:06 +0000 +++ src/ChangeLog 2014-01-28 07:43:24 +0000 @@ -4,6 +4,7 @@ (init_initial_terminal): Install new hook to free face cache on initial frame and avoid memory leak. For details, see . + * xfaces.c (free_frame_faces): Adjust comment. 2014-01-26 Paul Eggert === modified file 'src/xfaces.c' --- src/xfaces.c 2014-01-01 07:43:34 +0000 +++ src/xfaces.c 2014-01-28 07:43:24 +0000 @@ -694,7 +694,8 @@ } -/* Free face cache of frame F. Called from delete_frame. */ +/* Free face cache of frame F. Called from frame-dependent + resource freeing function, e.g. (x|tty)_free_frame_resources. */ void free_frame_faces (struct frame *f)