------------------------------------------------------------ revno: 116127 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-01-23 00:27:44 -0800 message: * doc/emacs/building.texi (Lisp Eval): Update prefix argument behavior of eval-expression, eval-last-sexp. * etc/NEWS: Related edit. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-01-21 08:49:46 +0000 +++ doc/emacs/ChangeLog 2014-01-23 08:27:44 +0000 @@ -1,3 +1,8 @@ +2014-01-23 Glenn Morris + + * building.texi (Lisp Eval): Update prefix argument behavior + of eval-expression, eval-last-sexp. + 2014-01-17 Bastien Guerry * building.texi (Commands of GUD): Fix keybinding for `gud-break'. === modified file 'doc/emacs/building.texi' --- doc/emacs/building.texi 2014-01-17 12:43:51 +0000 +++ doc/emacs/building.texi 2014-01-23 08:27:44 +0000 @@ -1476,13 +1476,17 @@ The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the Emacs Lisp expression preceding point in the buffer, and displays the value in the echo area. When the result of an evaluation is an -integer, you can type @kbd{C-x C-e} a second time to display the value -of the integer result in additional formats (octal, hexadecimal, and -character). +integer, it is displayed together with the value in other formats +(octal, hexadecimal, and character). If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts the value into the current buffer at point, rather than displaying it -in the echo area. The argument's value does not matter. +in the echo area. If the prefix argument is zero, any integer output +is inserted together with its value in other formats (octal, +hexadecimal, and character). Such a prefix argument also prevents +abbreviation of the output according to the variables +@code{eval-expression-print-level} and @code{eval-expression-print-length} +(see below). @kindex C-M-x @r{(Emacs Lisp mode)} @findex eval-defun @@ -1516,9 +1520,11 @@ The options @code{eval-expression-print-level} and @code{eval-expression-print-length} control the maximum depth and length of lists to print in the result of the evaluation commands -before abbreviating them. @code{eval-expression-debug-on-error} -controls whether evaluation errors invoke the debugger when these -commands are used; its default is @code{t}. +before abbreviating them. Supplying a zero prefix argument to +@code{eval-expression} or @code{eval-last-sexp} causes lists to be +printed in full. @code{eval-expression-debug-on-error} controls +whether evaluation errors invoke the debugger when these commands are +used; its default is @code{t}. @node Lisp Interaction @section Lisp Interaction Buffers === modified file 'etc/NEWS' --- etc/NEWS 2014-01-23 02:38:18 +0000 +++ etc/NEWS 2014-01-23 08:27:44 +0000 @@ -214,12 +214,13 @@ *** `eval-defun' on an already defined defcustom calls the :set function, if there is one. ++++ *** The commands `eval-expression' (`M-:'), `eval-last-sexp' (`C-x C-e'), -and `eval-print-last-sexp' (`C-j') can take a zero prefix argument. -This disables truncation of lists in the output, equivalent to -setting `(eval-expression-)print-length' and `(eval-expression-)print-limit' -to nil. Additionally, it causes integers to be printed in multiple -formats (octal, hexadecimal, and character). +and `eval-print-last-sexp' (`C-j' in Lisp Interaction mode) can take a +zero prefix argument. This disables truncation of lists in the output, +equivalent to setting `(eval-expression-)print-length' and +`(eval-expression-)print-limit' to nil. Additionally, it causes integers +to be printed in other formats (octal, hexadecimal, and character). --- ** `write-region-inhibit-fsync' now defaults to t in batch mode. ------------------------------------------------------------ revno: 116126 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-01-23 00:21:53 -0800 message: * emacs-lisp-intro.texi (lengths-list-file): Fix textual parentheses. diff: === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2014-01-06 05:25:46 +0000 +++ doc/lispintro/ChangeLog 2014-01-23 08:21:53 +0000 @@ -1,3 +1,7 @@ +2014-01-23 Glenn Morris + + * emacs-lisp-intro.texi (lengths-list-file): Fix textual parentheses. + 2013-12-30 Paul Eggert Specify .texi encoding (Bug#16292). === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2014-01-08 19:16:10 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2014-01-23 08:21:53 +0000 @@ -15061,18 +15061,19 @@ @c !!! 22.1.1 lisp sources location here @smallexample (lengths-list-file - "/usr/local/share/emacs/22.1.1/lisp/emacs-lisp/debug.el") + "/usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el") @end smallexample @noindent -(You may need to change the pathname of the file; the one here is for -GNU Emacs version 22.1.1. To change the expression, copy it to +You may need to change the pathname of the file; the one here is for +GNU Emacs version 22.1. To change the expression, copy it to the @file{*scratch*} buffer and edit it. @need 1200 @noindent -(Also, to see the full length of the list, rather than a truncated +Also, to see the full length of the list, rather than a truncated version, you may have to evaluate the following: +@c We do not want to insert, so do not mention the zero prefix argument. @smallexample (custom-set-variables '(eval-expression-print-length nil)) @@ -15098,7 +15099,8 @@ (75 41 80 62 20 45 44 68 45 12 34 235) @end smallexample -(The newer version of @file{debug.el} contains more defuns than the +@noindent +The newer version of @file{debug.el} contains more defuns than the earlier one; and my new machine is much faster than the old one.) Note that the length of the last definition in the file is first in ------------------------------------------------------------ revno: 116125 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 23:53:56 -0800 message: Doc fixes related to zero prefix argument of eval-expression etc * emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-last-sexp): * simple.el (eval-expression): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 20:05:03 +0000 +++ lisp/ChangeLog 2014-01-23 07:53:56 +0000 @@ -1,3 +1,8 @@ +2014-01-23 Glenn Morris + + * emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-last-sexp): + * simple.el (eval-expression): Doc fixes. + 2014-01-22 Glenn Morris * emacs-lisp/authors.el (authors-fixed-entries): Addition. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2014-01-03 22:38:55 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2014-01-23 07:53:56 +0000 @@ -867,14 +867,15 @@ (defun eval-print-last-sexp (&optional eval-last-sexp-arg-internal) "Evaluate sexp before point; print value into current buffer. +Normally, this function truncates long output according to the value +of the variables `eval-expression-print-length' and +`eval-expression-print-level'. With a prefix argument of zero, +however, there is no such truncation. Such a prefix argument +also causes integers to be printed in several additional formats +\(octal, hexadecimal, and character). + If `eval-expression-debug-on-error' is non-nil, which is the default, -this command arranges for all errors to enter the debugger. - -Note that printing the result is controlled by the variables -`eval-expression-print-length' and `eval-expression-print-level', -which see. With a zero prefix arg, print output with no limit -on the length and level of lists, and include additional formats -for integers (octal, hexadecimal, and character)." +this command arranges for all errors to enter the debugger." (interactive "P") (let ((standard-output (current-buffer))) (terpri) @@ -1084,10 +1085,12 @@ (defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area. Interactively, with prefix argument, print output into current buffer. -Truncates long output according to the value of the variables -`eval-expression-print-length' and `eval-expression-print-level'. -With a zero prefix arg, print output with no limit on the length -and level of lists, and include additional formats for integers + +Normally, this function truncates long output according to the value +of the variables `eval-expression-print-length' and +`eval-expression-print-level'. With a prefix argument of zero, +however, there is no such truncation. Such a prefix argument +also causes integers to be printed in several additional formats \(octal, hexadecimal, and character). If `eval-expression-debug-on-error' is non-nil, which is the default, === modified file 'lisp/simple.el' --- lisp/simple.el 2014-01-21 01:58:16 +0000 +++ lisp/simple.el 2014-01-23 07:53:56 +0000 @@ -1396,17 +1396,18 @@ ;; for the sake of completion of names like eval-region, eval-buffer. (defun eval-expression (exp &optional insert-value) "Evaluate EXP and print value in the echo area. -When called interactively, read an Emacs Lisp expression and -evaluate it. +When called interactively, read an Emacs Lisp expression and evaluate it. Value is also consed on to front of the variable `values'. -Optional argument INSERT-VALUE non-nil (interactively, -with prefix argument) means insert the result into the current buffer -instead of printing it in the echo area. With a zero prefix arg, -insert the result with no limit on the length and level of lists, -and include additional formats for integers (octal, hexadecimal, -and character). Truncates long output according to the value -of the variables `eval-expression-print-length' -and `eval-expression-print-level'. +Optional argument INSERT-VALUE non-nil (interactively, with prefix +argument) means insert the result into the current buffer instead of +printing it in the echo area. + +Normally, this function truncates long output according to the value +of the variables `eval-expression-print-length' and +`eval-expression-print-level'. With a prefix argument of zero, +however, there is no such truncation. Such a prefix argument +also causes integers to be printed in several additional formats +\(octal, hexadecimal, and character). If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger." ------------------------------------------------------------ revno: 116124 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-01-22 18:48:44 -0800 message: Merge from gnulib. This incorporates: 2014-01-22 qacl: check for fchmod * m4/acl.m4: Update from gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2014-01-22 19:02:41 +0000 +++ ChangeLog 2014-01-23 02:48:44 +0000 @@ -1,3 +1,9 @@ +2014-01-23 Paul Eggert + + Merge from gnulib, incorporating: + 2014-01-22 qacl: check for fchmod + * m4/acl.m4: Update from gnulib. + 2014-01-22 Paul Eggert Fix miscellaneous update-game-score bugs. === modified file 'm4/acl.m4' --- m4/acl.m4 2014-01-01 07:43:34 +0000 +++ m4/acl.m4 2014-01-23 02:48:44 +0000 @@ -1,5 +1,5 @@ # acl.m4 - check for access control list (ACL) primitives -# serial 16 +# serial 17 # Copyright (C) 2002, 2004-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -14,6 +14,7 @@ AS_HELP_STRING([--disable-acl], [do not support ACLs]), , [enable_acl=auto]) + AC_CHECK_FUNCS_ONCE([fchmod]) LIB_ACL= use_acl=0 if test "x$enable_acl" != "xno"; then ------------------------------------------------------------ revno: 116123 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 21:38:18 -0500 message: * etc/NEWS: Small edits diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-22 19:26:45 +0000 +++ etc/NEWS 2014-01-23 02:38:18 +0000 @@ -15,9 +15,10 @@ with a prefix argument or by typing C-u C-h C-n. Temporary note: -+++ indicates that all necessary updates to the manuals in doc/ are complete. ++++ indicates that all necessary documentation updates are complete. + (This means all relevant manuals in doc/ AND lisp doc-strings.) --- means no change in the manuals is needed. -When you add a new item, use the appropriate mark if you know it applies, +When you add a new item, use the appropriate mark if you are sure it applies, otherwise leave it unmarked. @@ -213,11 +214,12 @@ *** `eval-defun' on an already defined defcustom calls the :set function, if there is one. -*** A zero prefix arg of `eval-last-sexp' (`C-x C-e'), -`eval-expression' (`M-:') and `eval-print-last-sexp' (`C-j') inserts -a list with no limit on its length and level (by using nil values of -`print-length' and `print-level'), and inserts additional formats for -integers (octal, hexadecimal, and character). +*** The commands `eval-expression' (`M-:'), `eval-last-sexp' (`C-x C-e'), +and `eval-print-last-sexp' (`C-j') can take a zero prefix argument. +This disables truncation of lists in the output, equivalent to +setting `(eval-expression-)print-length' and `(eval-expression-)print-limit' +to nil. Additionally, it causes integers to be printed in multiple +formats (octal, hexadecimal, and character). --- ** `write-region-inhibit-fsync' now defaults to t in batch mode. ------------------------------------------------------------ revno: 116122 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 21:11:13 -0500 message: * etc/PROBLEMS: Remove more obsolete stuff, modernize exec-shield a bit, downplay LessTif (Motif is free software now). diff: === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2014-01-12 17:27:17 +0000 +++ etc/PROBLEMS 2014-01-23 02:11:13 +0000 @@ -24,8 +24,7 @@ No fonts match `-*-fixed-medium-r-*--6-*-*-*-*-*-iso8859-1' This happens because some X resource specifies a bad font family for -Emacs to use. The possible places where this specification might be -are: +Emacs to use. The possible places where this specification might be are: - in your ~/.Xdefaults file @@ -60,7 +59,7 @@ systems do), this could happen if the proper version of ncurses is not visible to the Emacs configure script (i.e. it cannot be found along the usual path the linker looks for -libraries). It can happen because your version of ncurses is +libraries). It can happen because your version of ncurses is obsolete, or is available only in form of binaries. The solution is to install an up-to-date version of ncurses in @@ -280,8 +279,8 @@ *** The Hyperbole package causes *Help* buffers not to be displayed in Help mode due to setting `temp-buffer-show-hook' rather than using -`add-hook'. Using `(add-hook 'temp-buffer-show-hook -'help-mode-maybe)' after loading Hyperbole should fix this. +`add-hook'. Using `(add-hook 'temp-buffer-show-hook 'help-mode-finish)' +after loading Hyperbole should fix this. ** Keyboard problems @@ -537,7 +536,7 @@ 4 _rld_text_resolve(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) ["/comp2/mtibuild/v73/workarea/v7.3/rld/rld_bridge.s":175, 0xfb6032c] -(`rld' is the dynamic linker.) We don't know yet why this +(`rld' is the dynamic linker.) We don't know why this happens, but setting the environment variable LD_BIND_NOW to 1 (which forces the dynamic linker to bind all shared objects early on) seems to work around the problem. @@ -668,13 +667,6 @@ Another alternative is to avoid a paren in column zero. For example, in a Lisp string you could precede the paren with a backslash. -** With certain fonts, when the cursor appears on a character, the -character doesn't appear--you get a solid box instead. - -One user on a Linux-based GNU system reported that this problem went -away with installation of a new X server. The failing server was -XFree86 3.1.1. XFree86 3.1.2 works. - ** Emacs pauses for several seconds when changing the default font. This has been reported for fvwm 2.2.5 and the window manager of KDE @@ -779,7 +771,7 @@ other sizes as well, your text is corrupted, probably through software that is not 8-bit clean. If the problem goes away with another font size, it's probably because some fonts pretend to be ISO-8859-1 fonts -when they are really ASCII fonts. In particular the schumacher-clean +when they are really ASCII fonts. In particular the schumacher-clean fonts have this bug in some versions of X. To see what glyphs are included in a font, use `xfd', like this: @@ -800,13 +792,6 @@ support.) Files encoded as emacs-mule using oc-unicode aren't generally read correctly by Emacs 21. -** After a while, Emacs slips into unibyte mode. - -The VM mail package, which is not part of Emacs, sometimes does - (standard-display-european t) -That should be changed to - (standard-display-european 1 t) - * X runtime problems ** X keyboard problems @@ -868,11 +853,8 @@ *** Under X, C-v and/or other keys don't work. -These may have been intercepted by your window manager. In -particular, AfterStep 1.6 is reported to steal C-v in its default -configuration. Various Meta keys are also likely to be taken by the -configuration of the `feel'. See the WM's documentation for how to -change this. +These may have been intercepted by your window manager. +See the WM's documentation for how to change this. *** Clicking C-mouse-2 in the scroll bar doesn't split the window. @@ -1012,8 +994,7 @@ and "Cancel" buttons do not respond to mouse clicks. Dragging the file dialog window usually causes the buttons to work again. -The solution is to use LessTif instead. LessTif is a free replacement -for Motif. See the file INSTALL for information on how to do this. +As a workaround, you can try building Emacs using Motif or LessTif instead. Another workaround is not to use the mouse to trigger file prompts, but to use the keyboard. This way, you will be prompted for a file in @@ -1032,9 +1013,9 @@ lesstif-devel-0.92.0-1.i386.rpm was reported to have problems with menu placement. -On some systems, even with Motif 1.2 emulation, Emacs occasionally -locks up, grabbing all mouse and keyboard events. We still don't know -what causes these problems; they are not reproducible by Emacs developers. +On some systems, Emacs occasionally locks up, grabbing all mouse and +keyboard events. We don't know what causes these problems; they are +not reproducible by Emacs developers. *** Motif: The Motif version of Emacs paints the screen a solid color. @@ -1043,7 +1024,7 @@ Emacs*default.attributeFont: -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-* That the resource has this effect indicates a bug in something, but we -do not yet know what. If it is an Emacs bug, we hope someone can +do not know what. If it is an Emacs bug, we hope someone can explain what the bug is so we can fix it. In the mean time, removing the resource prevents the problem. @@ -1710,17 +1691,6 @@ ** FreeBSD -*** FreeBSD 2.1.5: useless symbolic links remain in /tmp or other -directories that have the +t bit. - -This is because of a kernel bug in FreeBSD 2.1.5 (fixed in 2.2). -Emacs uses symbolic links to implement file locks. In a directory -with +t bit, the directory owner becomes the owner of the symbolic -link, so that it cannot be removed by anyone else. - -If you don't like those useless links, you can customize -the option `create-lockfiles'. - *** FreeBSD: Getting a Meta key on the console. By default, neither Alt nor any other key acts as a Meta key on @@ -1747,8 +1717,8 @@ christos@theory.tn.cornell.edu says: The problem is that in your .cshrc you have something that tries to -execute `tty`. If you are not running the shell on a real tty then -tty will print "not a tty". Csh expects one word in some places, +execute `tty`. If you are not running the shell on a real tty then +tty will print "not a tty". Csh expects one word in some places, but tty is giving it back 3. The solution is to add a pair of quotes around `tty` to make it a single @@ -1792,12 +1762,6 @@ add mod2 = Mode_switch EOF -*** HP/UX: "Cannot find callback list" messages from dialog boxes in -Emacs built with Motif. - -This problem resulted from a bug in GCC 2.4.5. Newer GCC versions -such as 2.7.0 fix the problem. - *** HP/UX: Emacs does not recognize the AltGr key. To fix this, set up a file ~/.dt/sessions/sessionetc with executable @@ -1929,10 +1893,6 @@ ** Irix -*** Irix 6.5: Emacs crashes on the SGI R10K, when compiled with GCC. - -This seems to be fixed in GCC 2.95. - *** Irix: Trouble using ptys, or running out of ptys. The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to @@ -1975,7 +1935,7 @@ ** Emacs crashes when opening a file with a UNC path and rails-mode is loaded. -Loading rails-mode seems to interfere with UNC path handling. This has been +Loading rails-mode seems to interfere with UNC path handling. This has been reported as a bug against both Emacs and rails-mode, so look for an updated rails-mode that avoids this crash, or avoid using UNC paths if using rails-mode. @@ -1988,12 +1948,12 @@ Using create-fontset-from-ascii-font or the --font startup parameter with a Chinese, Japanese or Korean font leads to display problems. -Use a Latin-only font as your default font. If you want control over +Use a Latin-only font as your default font. If you want control over which font is used to display Chinese, Japanese or Korean character, use create-fontset-from-fontset-spec to define a fontset. Frames are not refreshed while the File or Font dialog or a pop-up menu -is displayed. This also means help text for pop-up menus is not +is displayed. This also means help text for pop-up menus is not displayed at all. This is because message handling under Windows is synchronous, so we cannot handle repaint (or any other) messages while waiting for a system function to return the result of the dialog or @@ -2042,7 +2002,7 @@ the input method. To bind keys that produce non-ASCII characters with modifiers, you -must specify raw byte codes. For instance, if you want to bind +must specify raw byte codes. For instance, if you want to bind META-a-grave to a command, you need to specify this in your `~/.emacs': (global-set-key [?\M-\340] ...) @@ -2053,7 +2013,7 @@ The %b specifier for format-time-string does not produce abbreviated month names with consistent widths for some locales on some versions -of Windows. This is caused by a deficiency in the underlying system +of Windows. This is caused by a deficiency in the underlying system library function. The function set-time-zone-rule gives incorrect results for many @@ -2118,7 +2078,7 @@ Many cheap inkjet, and even some cheap laser printers, do not print plain text anymore, they will only print through graphical -printer drivers. A workaround on MS-Windows is to use Windows' basic +printer drivers. A workaround on MS-Windows is to use Windows' basic built in editor to print (this is possibly the only useful purpose it has): @@ -2140,20 +2100,20 @@ ** Pressing the mouse button on MS-Windows does not give a mouse-2 event. -This is usually a problem with the mouse driver. Because most Windows +This is usually a problem with the mouse driver. Because most Windows programs do not do anything useful with the middle mouse button, many mouse drivers allow you to define the wheel press to do something -different. Some drivers do not even have the option to generate a -middle button press. In such cases, setting the wheel press to -"scroll" sometimes works if you press the button twice. Trying a +different. Some drivers do not even have the option to generate a +middle button press. In such cases, setting the wheel press to +"scroll" sometimes works if you press the button twice. Trying a generic mouse driver might help. ** Scrolling the mouse wheel on MS-Windows always scrolls the top window. -This is another common problem with mouse drivers. Instead of +This is another common problem with mouse drivers. Instead of generating scroll events, some mouse drivers try to fake scroll bar -movement. But they are not intelligent enough to handle multiple -scroll bars within a frame. Trying a generic mouse driver might help. +movement. But they are not intelligent enough to handle multiple +scroll bars within a frame. Trying a generic mouse driver might help. ** Mail sent through Microsoft Exchange in some encodings appears to be mangled and is not seen correctly in Rmail or Gnus. We don't know @@ -2253,7 +2213,7 @@ *** Building a 32-bit executable on a 64-bit GNU/Linux architecture. First ensure that the necessary 32-bit system libraries and include -files are installed. Then use: +files are installed. Then use: env CC="gcc -m32" ./configure --build=i386-linux-gnu \ --x-libraries=/usr/X11R6/lib @@ -2305,7 +2265,7 @@ *** Building the MS-Windows port fails with a CreateProcess failure. Some versions of mingw32 make on some versions of Windows do not seem -to detect the shell correctly. Try "make SHELL=cmd.exe", or if that +to detect the shell correctly. Try "make SHELL=cmd.exe", or if that fails, try running make from Cygwin bash instead. *** Building `ctags' for MS-Windows with the MinGW port of GCC fails. @@ -2356,7 +2316,7 @@ through SDKPAINT The Emacs icon contains a high resolution PNG icon for Vista, which is -not recognized by older versions of the resource compiler. There are +not recognized by older versions of the resource compiler. There are several workarounds for this problem: 1. Use Free MinGW tools to compile, which do not have this problem. 2. Install the latest Windows SDK. @@ -2431,68 +2391,51 @@ ** Dumping -*** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel. - -With certain recent Linux kernels (like the one of Red Hat Fedora Core -1 and newer), the new "Exec-shield" functionality is enabled by default, which -creates a different memory layout that breaks the emacs dumper. Emacs tries -to handle this at build time, but if the workaround used fails, these -instructions can be useful. -The work-around explained here is not enough on Fedora Core 4 (and possible -newer). Read the next item. - -Configure can overcome the problem of exec-shield if the architecture is -x86 and the program setarch is present. On other architectures no -workaround is known. - -You can check the Exec-shield state like this: +*** Segfault during `make bootstrap' under the Linux kernel. + +In Red Hat Linux kernels, "Exec-shield" functionality is enabled by +default, which creates a different memory layout that can break the +emacs dumper. Emacs tries to handle this at build time, but if this +fails, the following instructions may be useful. + +Exec-shield is enabled on your system if cat /proc/sys/kernel/exec-shield -It returns non-zero when Exec-shield is enabled, 0 otherwise. Please -read your system documentation for more details on Exec-shield and -associated commands. Exec-shield can be turned off with this command: - - echo "0" > /proc/sys/kernel/exec-shield - -When Exec-shield is enabled, building Emacs will segfault during the -execution of this command: +prints a value other than 0. (Please read your system documentation +for more details on Exec-shield and associated commands.) + +Additionally, Linux kernel versions since 2.6.12 randomize the virtual +address space of a process by default. If this feature is enabled on +your system, then + + cat /proc/sys/kernel/randomize_va_space + +prints a value other than 0. + +When these features are enabled, building Emacs may segfault during +the execution of this command: ./temacs --batch --load loadup [dump|bootstrap] -To work around this problem, it is necessary to temporarily disable -Exec-shield while building Emacs, or, on x86, by using the `setarch' -command when running temacs like this: - - setarch i386 ./temacs --batch --load loadup [dump|bootstrap] - - -*** Fedora Core 4 GNU/Linux: Segfault during dumping. - -In addition to exec-shield explained above "Linux: Segfault during -`make bootstrap' under certain recent versions of the Linux kernel" -item, Linux kernel shipped with Fedora Core 4 randomizes the virtual -address space of a process. As the result dumping may fail even if -you turn off exec-shield. In this case, use the -R option to the setarch -command: - - setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap] +To work around this problem, you can temporarily disable these +features while building Emacs. You can do so using the following +commands (as root). Remember to re-enable them when you are done, +by echoing the original values back to the files. + + echo 0 > /proc/sys/kernel/exec-shield + echo 0 > /proc/sys/kernel/randomize_va_space + +Or, on x86, you can try using the `setarch' command when running +temacs, like this: + + setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap] or - setarch i386 -R make bootstrap - -*** Fatal signal in the command temacs -l loadup inc dump. - -This command is the final stage of building Emacs. It is run by the -Makefile in the src subdirectory. - -It has been known to get fatal errors due to insufficient swapping -space available on the machine. - -On 68000s, it has also happened because of bugs in the -subroutine `alloca'. Verify that `alloca' works right, even -for large blocks (many pages). + setarch i386 -R make + +(The -R option disables address space randomization.) *** test-distrib says that the distribution has been clobbered. *** or, temacs prints "Command key out of range 0-127". @@ -2503,32 +2446,12 @@ fooled by the fact that most of a .elc file is text: these are binary files and can contain all 256 byte values. -In particular `shar' cannot be used for transmitting GNU Emacs. -It typically truncates "lines". What appear to be "lines" in -a binary file can of course be of any length. Even once `shar' -itself is made to work correctly, `sh' discards null characters -when unpacking the shell archive. - -I have also seen character \177 changed into \377. I do not know -what transfer means caused this problem. Various network -file transfer programs are suspected of clobbering the high bit. - -If you have a copy of Emacs that has been damaged in its -nonprinting characters, you can fix them: - - 1) Record the names of all the .elc files. - 2) Delete all the .elc files. - 3) Recompile alloc.c with a value of PURESIZE twice as large. - (See puresize.h.) You might as well save the old alloc.o. - 4) Remake emacs. It should work now. - 5) Running emacs, do Meta-x byte-compile-file repeatedly - to recreate all the .elc files that used to exist. - You may need to increase the value of the variable - max-lisp-eval-depth to succeed in running the compiler interpreted - on certain .el files. 400 was sufficient as of last report. - 6) Reinstall the old alloc.o (undoing changes to alloc.c if any) - and remake temacs. - 7) Remake emacs. It should work now, with valid .elc files. +If you have a copy of Emacs whose .elc files have been damaged in this +way, you should be able to fix it by using: + + make bootstrap + +to regenerate all the .elc files. *** temacs prints "Pure Lisp storage exhausted". @@ -2611,38 +2534,18 @@ it can cause problems like this. You might be able to find the correct value in the man page for a.out (5). -* Runtime problems on legacy systems +* Problems on legacy systems This section covers bugs reported on very old hardware or software. If you are using hardware and an operating system shipped after 2000, it is unlikely you will see any of these. -*** OPENSTEP 4.2: Compiling syntax.c with gcc 2.7.2.1 fails. - -The compiler was reported to crash while compiling syntax.c with the -following message: - - cc: Internal compiler error: program cc1obj got fatal signal 11 - -To work around this, replace the macros UPDATE_SYNTAX_TABLE_FORWARD, -INC_BOTH, and INC_FROM with functions. To this end, first define 3 -functions, one each for every macro. Here's an example: - - static int update_syntax_table_forward(int from) - { - return(UPDATE_SYNTAX_TABLE_FORWARD(from)); - }/*update_syntax_table_forward*/ - -Then replace all references to UPDATE_SYNTAX_TABLE_FORWARD in syntax.c -with a call to the function update_syntax_table_forward. - *** Solaris 2.x **** Strange results from format %d in a few cases, on a Sun. -Sun compiler version SC3.0 has been found to miscompile part of -editfns.c. The workaround is to compile with some other compiler such -as GCC. +Sun compiler version SC3.0 has been found to miscompile part of editfns.c. +The workaround is to compile with some other compiler such as GCC. **** On Solaris, Emacs dumps core if lisp-complete-symbol is called. @@ -2702,38 +2605,6 @@ pen@lysator.liu.se says (Feb 1998) that the Compose key does work if you link with the MIT X11 libraries instead of the Solaris X11 libraries. -*** HP/UX: Emacs is slow using X11R5. - -This happens if you use the MIT versions of the X libraries--it -doesn't run as fast as HP's version. People sometimes use the version -because they see the HP version doesn't have the libraries libXaw.a, -libXmu.a, libXext.a and others. HP/UX normally doesn't come with -those libraries installed. To get good performance, you need to -install them and rebuild Emacs. - -*** UnixWare 2.1: Error 12 (virtual memory exceeded) when dumping Emacs. - -Paul Abrahams (abrahams@acm.org) reports that with the installed -virtual memory settings for UnixWare 2.1.2, an Error 12 occurs during -the "make" that builds Emacs, when running temacs to dump emacs. That -error indicates that the per-process virtual memory limit has been -exceeded. The default limit is probably 32MB. Raising the virtual -memory limit to 40MB should make it possible to finish building Emacs. - -You can do this with the command `ulimit' (sh) or `limit' (csh). -But you have to be root to do it. - -According to Martin Sohnius, you can also retune this in the kernel: - - # /etc/conf/bin/idtune SDATLIM 33554432 ## soft data size limit - # /etc/conf/bin/idtune HDATLIM 33554432 ## hard " - # /etc/conf/bin/idtune SVMMSIZE unlimited ## soft process size limit - # /etc/conf/bin/idtune HVMMSIZE unlimited ## hard " - # /etc/conf/bin/idbuild -B - -(He recommends you not change the stack limit, though.) -These changes take effect when you reboot. - ** MS-Windows 95, 98, ME, and NT *** MS-Windows NT/95: Problems running Perl under Emacs @@ -2947,7 +2818,7 @@ ** Archaic window managers and toolkits -*** OpenLook: Under OpenLook, the Emacs window disappears when you type M-q. +*** Open Look: Under Open Look, the Emacs window disappears when you type M-q. Some versions of the Open Look window manager interpret M-q as a quit command for whatever window you are typing at. If you want to use ------------------------------------------------------------ revno: 116121 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 21:09:55 -0500 message: * etc/TODO: Addition. diff: === modified file 'etc/TODO' --- etc/TODO 2014-01-01 07:43:34 +0000 +++ etc/TODO 2014-01-23 02:09:55 +0000 @@ -232,6 +232,9 @@ ** FFI (foreign function interface) See eg http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00246.html +** Replace unexec with a more portable form of dumping +See eg http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01034.html + ** Imenu could be extended into a file-structure browsing mechanism using code like that of customize-groups. ------------------------------------------------------------ revno: 116120 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 21:09:31 -0500 message: Downplay LessTif in docs, since Motif is now free software, and even http://lesstif.sourceforge.net/ recommends it over LessTif. diff: === modified file 'INSTALL' --- INSTALL 2014-01-09 00:10:07 +0000 +++ INSTALL 2014-01-23 02:09:31 +0000 @@ -254,14 +254,11 @@ To get more attractive menus, you can specify an X toolkit when you configure Emacs; use the option `--with-x-toolkit=TOOLKIT', where TOOLKIT is `gtk' (the default), `athena', or `motif' (`yes' and -`lucid' are synonyms for `athena'). On some systems, it does not work -to use a toolkit with shared libraries. A free implementation of -Motif, called LessTif, is available from . -Compiling with LessTif or Motif causes a standard File Selection -Dialog to pop up when you invoke file commands with the mouse. You -can get fancy 3D-style scroll bars, even without Gtk or LessTif/Motif, -if you have the Xaw3d library installed (see "Image support libraries" -above for Xaw3d availability). +`lucid' are synonyms for `athena'). Compiling with Motif causes a +standard File Selection Dialog to pop up when you invoke file commands +with the mouse. You can get fancy 3D-style scroll bars, even without +Gtk or Motif, if you have the Xaw3d library installed (see +"Image support libraries" above for Xaw3d availability). You can tell configure where to search for GTK by specifying `--with-pkg-config-prog=PATH' where PATH is the pathname to @@ -295,8 +292,7 @@ --without-gif for GIF image support --without-png for PNG image support -Use --without-toolkit-scroll-bars to disable LessTif/Motif or Xaw3d -scroll bars. +Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars. Use --without-xim to inhibit the default use of X Input Methods. In this case, the X resource useXIM can be used to turn on use of XIM. === modified file 'configure.ac' --- configure.ac 2014-01-22 19:02:41 +0000 +++ configure.ac 2014-01-23 02:09:31 +0000 @@ -1947,7 +1947,7 @@ test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then AC_MSG_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 +and for the toolkit you want, such as Gtk+ or Motif. Also make sure you have development files for image handling, i.e. tiff, gif, jpeg, png and xpm. If you are sure you want Emacs compiled without X window support, pass ------------------------------------------------------------ revno: 116119 committer: David Engster branch nick: trunk timestamp: Wed 2014-01-22 22:50:47 +0100 message: Update EIEIO documentation. * eieio.texi (Introduction): Move introductory paragraph about EIEIO and CLOS from 'Building Classes' to here. (Documentation): Remove, since eieio-doc is not part of Emacs. (Class Values, CLOS compatibility): Mention that `describe-function' will also give information about classes. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-01-21 08:49:46 +0000 +++ doc/misc/ChangeLog 2014-01-22 21:50:47 +0000 @@ -1,3 +1,11 @@ +2014-01-22 David Engster + + * eieio.texi (Introduction): Move introductory paragraph about + EIEIO and CLOS from 'Building Classes' to here. + (Documentation): Remove, since eieio-doc is not part of Emacs. + (Class Values, CLOS compatibility): Mention that + `describe-function' will also give information about classes. + 2014-01-20 Paul Eggert * texinfo.tex: Update from gnulib. === modified file 'doc/misc/eieio.texi' --- doc/misc/eieio.texi 2014-01-12 16:50:54 +0000 +++ doc/misc/eieio.texi 2014-01-22 21:50:47 +0000 @@ -72,7 +72,6 @@ * Base Classes:: Additional classes you can inherit from. * Browsing:: Browsing your class lists. * Class Values:: Displaying information about a class or object. -* Documentation:: Automatically creating texinfo documentation. * Default Superclass:: The root superclasses. * Signals:: When you make errors. * Naming Conventions:: Name your objects in an Emacs friendly way. @@ -177,9 +176,17 @@ @node Introduction @chapter Introduction -Due to restrictions in the Emacs Lisp language, CLOS cannot be -completely supported, and a few functions have been added in place of -setf. +First off, please note that this manual cannot serve as a complete +introduction to object oriented programming and generic functions in +LISP. Although EIEIO is not a complete implementation of the Common +Lisp Object System (CLOS) and also differs from it in several aspects, +it follows the same basic concepts. Therefore, it is highly +recommended to learn those from a textbook or tutorial first, +especially if you only know OOP from languages like C++ or Java. If +on the other hand you are already familiar with CLOS, you should be +aware that @eieio{} does not implement the full CLOS specification and +also differs in some other aspects (@xref{Introduction}, and @ref{CLOS +compatibility}). @eieio{} supports the following features: @@ -211,7 +218,10 @@ Customization support in a class (extension to CLOS) @end enumerate -Here are some important CLOS features that @eieio{} presently lacks: +Due to restrictions in the Emacs Lisp language, CLOS cannot be +completely supported, and a few functions have been added in place of +setf. Here are some important CLOS features that @eieio{} presently +lacks: @table @asis @@ -247,17 +257,6 @@ @node Building Classes @chapter Building Classes -First off, please note that this manual cannot serve as a complete -introduction to object oriented programming and generic functions in -LISP. Although EIEIO is not a complete CLOS implementation and also -differs from CLOS in several aspects, it follows the same basic -concepts. Therefore, it is highly recommended to learn these from a -textbook or tutorial first, especially if you only know OOP from -languages like C++ or Java. If on the other hand you are already -familiar with CLOS, you should be aware that @eieio{} does not implement -the full CLOS specification and also differs in some other aspects -(@xref{Introduction}, and @ref{CLOS compatibility}). - A @dfn{class} is a definition for organizing data and methods together. An @eieio{} class has structures similar to the classes found in other object-oriented (OO) languages. @@ -1546,55 +1545,18 @@ @chapter Class Values Details about any class or object can be retrieved using the function -@code{eieio-describe-class}. Interactively, type in the name of -a class. In a program, pass it a string with the name of a class, a -class symbol, or an object. The resulting buffer will display all slot -names. - -Additionally, all methods defined to have functionality on this class is -displayed. - -@node Documentation -@chapter Documentation - -It is possible to automatically create documentation for your classes in -texinfo format by using the tools in the file @file{eieio-doc.el} - -@deffn Command eieiodoc-class class indexstring &optional skiplist - -This will start at the current point, and create an indented menu of -all the child classes of, and including @var{class}, but skipping any -classes that might be in @var{skiplist}. It will then create nodes for -all these classes, subsection headings, and indexes. - -Each class will be indexed using the texinfo labeled index -@var{indexstring} which is a two letter description. -@xref{New Indices,,,texinfo,Texinfo manual}. - -To use this command, the texinfo macro - -@example -@@defindex @@var @{ indexstring @} -@end example - -@noindent -where @var{indexstring} is replaced with the two letter code. - -Next, an inheritance tree will be created listing all parents of that -section's class. - -Then, all the slots will be expanded in tables, and described -using the documentation strings from the code. Default values will also -be displayed. Only those slots with @code{:initarg} specified will be -expanded, others will be hidden. If a slot is inherited from a parent, -that slot will also be skipped unless the default value is different. -If there is a change, then the documentation part of the slot will be -replace with an @@xref back to the parent. - -This command can only display documentation for classes whose -definitions have been loaded in this Emacs session. - -@end deffn +@code{eieio-describe-class}. Interactively, type in the name of a +class. In a program, pass it a string with the name of a class, a +class symbol, or an object. The resulting buffer will display all +slot names. Additionally, all methods defined to have functionality +on this class is displayed. + +You can also use the normal @code{describe-function} to retrieve +information about a class. If you call it on a constructor function, +it will also display the class information. If you call it on a +generic function, all implementations of that generic function will be +listet, together with links through which you can directly jump to the +source. @node Default Superclass @chapter Default Superclass @@ -1903,9 +1865,9 @@ @end table CLOS supports the @code{describe} command, but @eieio{} only provides -@code{eieio-describe-class}, and @code{eieio-describe-generic}. These -functions are adviced into @code{describe-variable}, and -@code{describe-function}. +@code{eieio-describe-class}, and @code{eieio-describe-generic}. Those +are automatically called by @code{describe-function} when called on a +constructor or generic function. When creating a new class (@pxref{Building Classes}) there are several new keywords supported by @eieio{}. ------------------------------------------------------------ revno: 116118 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 16:14:34 -0500 message: Tweak earlier version.el change diff: === modified file 'lisp/version.el' --- lisp/version.el 2014-01-22 18:29:40 +0000 +++ lisp/version.el 2014-01-22 21:14:34 +0000 @@ -186,9 +186,10 @@ (with-temp-buffer (let ((default-directory (file-name-as-directory dir))) (and (eq 0 - (ignore-errors - (call-process "git" nil '(t nil) nil "log" - "-1" "--pretty=format:%N"))) + (condition-case nil + (call-process "git" nil '(t nil) nil "log" + "-1" "--pretty=format:%N") + (error nil))) (not (zerop (buffer-size))) (replace-regexp-in-string "\n" "" (buffer-string)))))))) ------------------------------------------------------------ revno: 116117 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 15:05:03 -0500 message: * lisp/emacs-lisp/authors.el (authors-fixed-entries): Addition. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 19:26:45 +0000 +++ lisp/ChangeLog 2014-01-22 20:05:03 +0000 @@ -1,3 +1,7 @@ +2014-01-22 Glenn Morris + + * emacs-lisp/authors.el (authors-fixed-entries): Addition. + 2014-01-22 Stefan Monnier * emacs-lisp/package.el: Write files silently. === modified file 'lisp/emacs-lisp/authors.el' --- lisp/emacs-lisp/authors.el 2014-01-22 07:35:50 +0000 +++ lisp/emacs-lisp/authors.el 2014-01-22 20:05:03 +0000 @@ -503,6 +503,7 @@ ("Michael D. Prange" :changed "tex-mode.el") ;; No longer distributed (dgux5-4r3.h was renamed to dgux5-4-3.h). ;;; ("Paul Reilly" :wrote "gux5-4r2.h" "dgux5-4-3.h") + ("Rob Riepel" :wrote "tpu-edt.doc") ("Roland B. Roberts" :changed "files.el" "sort.el" "buffer.h" "callproc.c" "dired.c" "process.c" "sysdep.c" "systty.h") ;; No longer distributed. ------------------------------------------------------------ revno: 116116 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2014-01-22 21:38:31 +0200 message: Fix MS-Windows build in lib-src broken by last commit. lib-src/update-game-score.c (write_scores) [WINDOWSNT]: Use chmod instead of fchmod. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-01-22 19:02:41 +0000 +++ lib-src/ChangeLog 2014-01-22 19:38:31 +0000 @@ -1,3 +1,8 @@ +2014-01-22 Eli Zaretskii + + * update-game-score.c (write_scores) [WINDOWSNT]: Use chmod + instead of fchmod. + 2014-01-22 Paul Eggert Fix miscellaneous update-game-score bugs. === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2014-01-22 19:02:41 +0000 +++ lib-src/update-game-score.c 2014-01-22 19:38:31 +0000 @@ -443,8 +443,10 @@ fd = mkostemp (tempfile, 0); if (fd < 0) return -1; +#ifndef WINDOWSNT if (fchmod (fd, 0644) != 0) return -1; +#endif f = fdopen (fd, "w"); if (! f) return -1; @@ -457,6 +459,10 @@ return -1; if (rename (tempfile, filename) != 0) return -1; +#ifdef WINDOWSNT + if (chmod (filename, 0644) < 0) + return -1; +#endif return 0; } ------------------------------------------------------------ revno: 116115 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 14:26:45 -0500 message: ChangeLog fix. * lisp/ChangeLog: The installed change was based on this one: http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00372.html * etc/NEWS: Fix based on the fact that this does not work out of the box, unless you fetch the notes, as described in http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00015.html Seems very non-intuitive to me... diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-22 17:26:14 +0000 +++ etc/NEWS 2014-01-22 19:26:45 +0000 @@ -236,7 +236,8 @@ and this variable has been marked obsolete. --- -** `emacs-bzr-version' has been renamed to `emacs-repository-version'. +** `emacs-bzr-version' has been renamed to `emacs-repository-version', +and works for git too, if you fetch the repository notes. ** New user options: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 19:22:45 +0000 +++ lisp/ChangeLog 2014-01-22 19:26:45 +0000 @@ -336,11 +336,14 @@ * simple.el (read--expression): Enable eldoc-mode. * progmodes/octave.el (octave-mode-menu): Adapt to change in eldoc. -2014-01-11 Eric S. Raymond +2014-01-11 Dani Moncayo + Eric S. Raymond * version.el (emacs-repository-get-version): Enhance so the function works correctly in either a Bazaar or Git repo. +2014-01-11 Eric S. Raymond + * play/meese.el: It's 2014 and Ed Meese is justly forgotten. Goes with removal of the joke manpages from /etc. ------------------------------------------------------------ revno: 116114 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-01-22 14:22:45 -0500 message: * lisp/emacs-lisp/package.el: Write files silently. (package-autoload-ensure-default-file) (package-generate-description-file, package--write-file-no-coding) (package-install-from-archive, package--download-one-archive): Tell `write-region' to stay quiet. (package-menu-mode, package-menu--print-info): Omit the Archive column if there's only one archive. (package-all-keywords, package--has-keyword-p): Remove dead code. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 18:29:40 +0000 +++ lisp/ChangeLog 2014-01-22 19:22:45 +0000 @@ -1,3 +1,13 @@ +2014-01-22 Stefan Monnier + + * emacs-lisp/package.el: Write files silently. + (package-autoload-ensure-default-file, package--write-file-no-coding) + (package-generate-description-file, package--download-one-archive) + (package-install-from-archive): Tell `write-region' to stay quiet. + (package-menu-mode, package-menu--print-info): Omit the Archive column + if there's only one archive. + (package-all-keywords, package--has-keyword-p): Remove dead code. + 2014-01-22 Glenn Morris * version.el (emacs-bzr-version-bzr): Fix typo. @@ -11,10 +21,9 @@ 2014-01-22 Martin Rudalics Fixes in window size functions around Bug#16430 and Bug#16470. - * window.el (window-total-size, window-size): New argument - ROUND. - (window--min-delta-1, window-min-delta, window--max-delta-1): Be - more conservative when calculating the numbers of lines or + * window.el (window-total-size, window-size): New argument ROUND. + (window--min-delta-1, window-min-delta, window--max-delta-1): + Be more conservative when calculating the numbers of lines or columns a window can shrink (Bug#16430). (fit-window-to-buffer): Simplify code. * term.el (term-window-width): Call window-body-width again. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-01-22 01:50:40 +0000 +++ lisp/emacs-lisp/package.el 2014-01-22 19:22:45 +0000 @@ -641,7 +641,7 @@ ";; End:\n" ";;; " (file-name-nondirectory file) " ends here\n") - nil file)) + nil file nil 'silent)) file) (defvar generated-autoload-file) @@ -709,8 +709,7 @@ (package--alist-to-plist (package-desc-extras pkg-desc)))) "\n") - nil - pkg-file)))) + nil pkg-file nil 'silent)))) (defun package--alist-to-plist (alist) (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))) @@ -759,7 +758,7 @@ (defun package--write-file-no-coding (file-name) (let ((buffer-file-coding-system 'no-conversion)) - (write-region (point-min) (point-max) file-name))) + (write-region (point-min) (point-max) file-name nil 'silent))) (defmacro package--with-work-buffer (location file &rest body) "Run BODY in a buffer containing the contents of FILE at LOCATION. @@ -874,7 +873,8 @@ (expand-file-name (concat (package-desc-full-name pkg-desc) ".signed") - package-user-dir)) + package-user-dir) + nil 'silent) ;; Update the old pkg-desc which will be shown on the description buffer. (setf (package-desc-signed pkg-desc) t) ;; Update the new (activated) pkg-desc as well. @@ -1280,7 +1280,8 @@ ;; Write out good signatures into archive-contents.signed file. (write-region (mapconcat #'epg-signature-to-string good-signatures "\n") nil - (expand-file-name (concat file ".signed") dir))))) + (expand-file-name (concat file ".signed") dir) + nil 'silent)))) (declare-function epg-check-configuration "epg-config" (config &optional minimum-version)) @@ -1636,11 +1637,13 @@ Letters do not insert themselves; instead, they are commands. \\ \\{package-menu-mode-map}" - (setq tabulated-list-format [("Package" 18 package-menu--name-predicate) - ("Version" 12 nil) - ("Status" 10 package-menu--status-predicate) - ("Archive" 10 package-menu--archive-predicate) - ("Description" 0 nil)]) + (setq tabulated-list-format + `[("Package" 18 package-menu--name-predicate) + ("Version" 12 nil) + ("Status" 10 package-menu--status-predicate) + ,@(if (cdr package-archives) + '(("Archive" 10 package-menu--archive-predicate))) + ("Description" 0 nil)]) (setq tabulated-list-padding 2) (setq tabulated-list-sort-key (cons "Status" nil)) (add-hook 'tabulated-list-revert-hook 'package-menu--refresh nil t) @@ -1737,8 +1740,7 @@ "Collect all package keywords" (let (keywords) (package--mapc (lambda (desc) - (let* ((extras (and desc (package-desc-extras desc))) - (desc-keywords (and desc (package-desc--keywords desc)))) + (let* ((desc-keywords (and desc (package-desc--keywords desc)))) (setq keywords (append keywords desc-keywords))))) keywords)) @@ -1779,8 +1781,7 @@ "Test if package DESC has any of the given KEYWORDS. When none are given, the package matches." (if keywords - (let* ((extras (and desc (package-desc-extras desc))) - (desc-keywords (and desc (package-desc--keywords desc))) + (let* ((desc-keywords (and desc (package-desc--keywords desc))) found) (dolist (k keywords) (when (and (not found) @@ -1816,28 +1817,29 @@ (let* ((pkg-desc (car pkg)) (status (cdr pkg)) (face (pcase status - (`"built-in" 'font-lock-builtin-face) - (`"available" 'default) - (`"new" 'bold) - (`"held" 'font-lock-constant-face) - (`"disabled" 'font-lock-warning-face) - (`"installed" 'font-lock-comment-face) - (`"unsigned" 'font-lock-warning-face) - (_ 'font-lock-warning-face)))) ; obsolete. + (`"built-in" 'font-lock-builtin-face) + (`"available" 'default) + (`"new" 'bold) + (`"held" 'font-lock-constant-face) + (`"disabled" 'font-lock-warning-face) + (`"installed" 'font-lock-comment-face) + (`"unsigned" 'font-lock-warning-face) + (_ 'font-lock-warning-face)))) ; obsolete. (list pkg-desc - (vector (list (symbol-name (package-desc-name pkg-desc)) - 'face 'link - 'follow-link t - 'package-desc pkg-desc - 'action 'package-menu-describe-package) - (propertize (package-version-join - (package-desc-version pkg-desc)) - 'font-lock-face face) - (propertize status 'font-lock-face face) - (propertize (or (package-desc-archive pkg-desc) "") - 'font-lock-face face) - (propertize (package-desc-summary pkg-desc) - 'font-lock-face face))))) + `[,(list (symbol-name (package-desc-name pkg-desc)) + 'face 'link + 'follow-link t + 'package-desc pkg-desc + 'action 'package-menu-describe-package) + ,(propertize (package-version-join + (package-desc-version pkg-desc)) + 'font-lock-face face) + ,(propertize status 'font-lock-face face) + ,@(if (cdr package-archives) + (list (propertize (or (package-desc-archive pkg-desc) "") + 'font-lock-face face))) + ,(propertize (package-desc-summary pkg-desc) + 'font-lock-face face)]))) (defun package-menu-refresh () "Download the Emacs Lisp package archive. ------------------------------------------------------------ revno: 116113 committer: Paul Eggert branch nick: trunk timestamp: Wed 2014-01-22 11:02:41 -0800 message: Fix miscellaneous update-game-score bugs. * configure.ac (difftime): Remove. * lib/update-game-score.c (difftime) [!HAVE_DIFFTIME]: Remove. (read_score) [HAVE_GETDELIM]: Don't access uninitialized storage. (read_scores, write_scores): Check for fclose failure. (write_scores): Use fchmod, not chmod, to avoid a race. (lock_file): Fix test for out-of-date lock file; it was reversed. Use ordinary subtraction rather than difftime; since we're already assuming POSIX we don't need to worry about the possibility of time_t being a magic cookie. diff: === modified file 'ChangeLog' --- ChangeLog 2014-01-22 01:43:37 +0000 +++ ChangeLog 2014-01-22 19:02:41 +0000 @@ -1,3 +1,8 @@ +2014-01-22 Paul Eggert + + Fix miscellaneous update-game-score bugs. + * configure.ac (difftime): Remove. + 2014-01-20 Paul Eggert Merge from gnulib, incorporating: === modified file 'configure.ac' --- configure.ac 2014-01-11 13:36:06 +0000 +++ configure.ac 2014-01-22 19:02:41 +0000 @@ -3468,7 +3468,6 @@ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ gai_strerror getline getdelim sync \ -difftime \ getpwent endpwent getgrent endgrent \ touchlock \ cfmakeraw cfsetspeed copysign __executable_start log2) === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-01-22 02:44:44 +0000 +++ lib-src/ChangeLog 2014-01-22 19:02:41 +0000 @@ -1,3 +1,15 @@ +2014-01-22 Paul Eggert + + Fix miscellaneous update-game-score bugs. + * update-game-score.c (difftime) [!HAVE_DIFFTIME]: Remove. + (read_score) [HAVE_GETDELIM]: Don't access uninitialized storage. + (read_scores, write_scores): Check for fclose failure. + (write_scores): Use fchmod, not chmod, to avoid a race. + (lock_file): Fix test for out-of-date lock file; it was reversed. + Use ordinary subtraction rather than difftime; since we're already + assuming POSIX we don't need to worry about the possibility of + time_t being a magic cookie. + 2014-01-19 Paul Eggert update-game-score fixes for -m and integer overflow (Bug#16428) === modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2014-01-19 08:50:53 +0000 +++ lib-src/update-game-score.c 2014-01-22 19:02:41 +0000 @@ -59,11 +59,6 @@ #define MAX_ATTEMPTS 5 #define MAX_DATA_LEN 1024 -#ifndef HAVE_DIFFTIME -/* OK on POSIX (time_t is arithmetic type) modulo overflow in subtraction. */ -#define difftime(t1, t0) (double)((t1) - (t0)) -#endif - static _Noreturn void usage (int err) { @@ -275,6 +270,7 @@ #ifdef HAVE_GETDELIM { size_t count = 0; + score->username = 0; if (getdelim (&score->username, &count, ' ', f) < 1 || score->username == NULL) return -1; @@ -371,14 +367,13 @@ while ((readval = read_score (f, &entry)) == 0) if (push_score (&ret, &scorecount, &cursize, &entry) < 0) return -1; - if (readval > 0) + if (readval > 0 && fclose (f) == 0) { *count = scorecount; *alloc = cursize; *scores = ret; retval = 0; } - fclose (f); return retval; } @@ -448,6 +443,8 @@ fd = mkostemp (tempfile, 0); if (fd < 0) return -1; + if (fchmod (fd, 0644) != 0) + return -1; f = fdopen (fd, "w"); if (! f) return -1; @@ -456,10 +453,9 @@ scores[i].score, scores[i].username, scores[i].data) < 0) return -1; - fclose (f); - if (rename (tempfile, filename) < 0) + if (fclose (f) != 0) return -1; - if (chmod (filename, 0644) < 0) + if (rename (tempfile, filename) != 0) return -1; return 0; } @@ -479,9 +475,9 @@ *state = lockpath; trylock: attempts++; - /* If the lock is over an hour old, delete it. */ + /* If the lock is over an hour old, delete it. */ if (stat (lockpath, &buf) == 0 - && (difftime (buf.st_ctime, time (NULL) > 60*60))) + && 60 * 60 < time (0) - buf.st_ctime) unlink (lockpath); fd = open (lockpath, O_CREAT | O_EXCL, 0600); if (fd < 0) ------------------------------------------------------------ revno: 116112 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 13:29:40 -0500 message: * lisp/version.el (emacs-bzr-version-bzr): Fix typo. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 17:34:27 +0000 +++ lisp/ChangeLog 2014-01-22 18:29:40 +0000 @@ -1,5 +1,7 @@ 2014-01-22 Glenn Morris + * version.el (emacs-bzr-version-bzr): Fix typo. + * version.el (emacs-repository-get-version): Check either .bzr or .git, but not both. Make the git case actually use the DIR argument, and return nil === modified file 'lisp/version.el' --- lisp/version.el 2014-01-22 17:34:27 +0000 +++ lisp/version.el 2014-01-22 18:29:40 +0000 @@ -106,7 +106,7 @@ (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") (match-string 1)))))) -(defun emacs-bzr-version-bzr (_dir) +(defun emacs-bzr-version-bzr (dir) "Ask bzr itself for the version information for directory DIR." ;; Comments on `bzr version-info': ;; i) Unknown files also cause clean != 1. @@ -125,7 +125,7 @@ (call-process "bzr" nil '(t nil) nil "version-info" "--custom" "--template={revno} {revision_id} (clean = {clean})" - "dir")) + dir)) (buffer-string)))) (define-obsolete-function-alias 'emacs-bzr-get-version ------------------------------------------------------------ revno: 116111 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 09:34:27 -0800 message: * version.el (emacs-repository-get-version): Avoid error if .git exists but the git executable is not found. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 17:26:14 +0000 +++ lisp/ChangeLog 2014-01-22 17:34:27 +0000 @@ -4,6 +4,7 @@ Check either .bzr or .git, but not both. Make the git case actually use the DIR argument, and return nil rather than the empty string. + Avoid error if .git exists but the git executable is not found. 2014-01-22 Martin Rudalics === modified file 'lisp/version.el' --- lisp/version.el 2014-01-22 17:26:14 +0000 +++ lisp/version.el 2014-01-22 17:34:27 +0000 @@ -185,8 +185,10 @@ (message "Waiting for git...") (with-temp-buffer (let ((default-directory (file-name-as-directory dir))) - (and (zerop (call-process "git" nil '(t nil) nil "log" - "-1" "--pretty=format:%N")) + (and (eq 0 + (ignore-errors + (call-process "git" nil '(t nil) nil "log" + "-1" "--pretty=format:%N"))) (not (zerop (buffer-size))) (replace-regexp-in-string "\n" "" (buffer-string)))))))) ------------------------------------------------------------ revno: 116110 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 09:26:14 -0800 message: Fixes for emacs-repository-get-version * lisp/version.el (emacs-repository-get-version): Check either .bzr or .git, but not both. Make the git case actually use the DIR argument, and return nil rather than the empty string. * etc/NEWS: Don't mention that emacs-repository-version works for git, because it only returns nil (since it uses %N and there seem to be no notes in the git version of the Emacs repo.) No idea why this change is in trunk during a feature freeze anyway. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-01-22 08:30:00 +0000 +++ etc/NEWS 2014-01-22 17:26:14 +0000 @@ -236,8 +236,7 @@ and this variable has been marked obsolete. --- -** `emacs-bzr-version' has been renamed to `emacs-repository-version', -and works for git too. +** `emacs-bzr-version' has been renamed to `emacs-repository-version'. ** New user options: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 10:29:23 +0000 +++ lisp/ChangeLog 2014-01-22 17:26:14 +0000 @@ -1,3 +1,10 @@ +2014-01-22 Glenn Morris + + * version.el (emacs-repository-get-version): + Check either .bzr or .git, but not both. + Make the git case actually use the DIR argument, and return nil + rather than the empty string. + 2014-01-22 Martin Rudalics Fixes in window size functions around Bug#16430 and Bug#16470. === modified file 'lisp/version.el' --- lisp/version.el 2014-01-11 23:59:49 +0000 +++ lisp/version.el 2014-01-22 17:26:14 +0000 @@ -145,52 +145,50 @@ version control. If `force', always ask. the VCS. Otherwise only ask the VCS if we cannot find any information ourselves." (or dir (setq dir source-directory)) - (or - ;; Bazaar case -- to be removed after transition - (when (file-directory-p (expand-file-name ".bzr/branch" dir)) - (if (eq external 'force) - (emacs-bzr-version-bzr dir) - (let (file loc rev) - (cond ((file-readable-p - (setq file (expand-file-name ".bzr/branch/last-revision" dir))) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-max)) - (if (looking-back "\n") - (delete-char -1)) - (buffer-string))) - ;; OK, no last-revision. Is it a lightweight checkout? - ((file-readable-p - (setq file (expand-file-name ".bzr/branch/location" dir))) - (setq rev (emacs-bzr-version-dirstate dir)) - ;; If the parent branch is local, try looking there for the rev. - ;; Note: there is no guarantee that the parent branch's rev - ;; corresponds to this branch. This branch could have - ;; been made with a specific -r revno argument, or the - ;; parent could have been updated since this branch was created. - ;; To try and detect this, we check the dirstate revids - ;; to see if they match. - (if (and (setq loc (with-temp-buffer - (insert-file-contents file) - (if (looking-at "file://\\(.*\\)") - (match-string 1)))) - (equal rev (emacs-bzr-version-dirstate loc))) - (emacs-bzr-get-version loc) - ;; If parent does not match, the best we can do without - ;; calling external commands is to use the dirstate rev. - rev)) - (external - (emacs-bzr-version-bzr dir)))))) - ;; Git case - (when (file-directory-p (expand-file-name ".git" dir)) - (message "Waiting for git...") - (with-temp-buffer - (if (zerop - (call-process "git" nil '(t nil) nil "log" - "-1" - "--pretty=format:%N")) - (replace-regexp-in-string "\n" "" (buffer-string))))) - )) + (cond ((file-directory-p (expand-file-name ".bzr/branch" dir)) + (if (eq external 'force) + (emacs-bzr-version-bzr dir) + (let (file loc rev) + (cond ((file-readable-p + (setq file (expand-file-name + ".bzr/branch/last-revision" dir))) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-max)) + (if (looking-back "\n") + (delete-char -1)) + (buffer-string))) + ;; OK, no last-revision. Is it a lightweight checkout? + ((file-readable-p + (setq file (expand-file-name ".bzr/branch/location" dir))) + (setq rev (emacs-bzr-version-dirstate dir)) + ;; If parent branch is local, try looking there for the rev. + ;; Note: there is no guarantee that the parent branch's rev + ;; corresponds to this branch. This branch could have + ;; been made with a specific -r revno argument, or the + ;; parent could have been updated since this branch was + ;; created. + ;; To try and detect this, we check the dirstate revids + ;; to see if they match. + (if (and (setq loc (with-temp-buffer + (insert-file-contents file) + (if (looking-at "file://\\(.*\\)") + (match-string 1)))) + (equal rev (emacs-bzr-version-dirstate loc))) + (emacs-repository-get-version loc) + ;; If parent does not match, the best we can do without + ;; calling external commands is to use the dirstate rev. + rev)) + (external + (emacs-bzr-version-bzr dir)))))) + ((file-directory-p (expand-file-name ".git" dir)) + (message "Waiting for git...") + (with-temp-buffer + (let ((default-directory (file-name-as-directory dir))) + (and (zerop (call-process "git" nil '(t nil) nil "log" + "-1" "--pretty=format:%N")) + (not (zerop (buffer-size))) + (replace-regexp-in-string "\n" "" (buffer-string)))))))) ;; We put version info into the executable in the form that `ident' uses. (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) ------------------------------------------------------------ revno: 116109 committer: martin rudalics branch nick: trunk timestamp: Wed 2014-01-22 11:29:23 +0100 message: Fixes in window size functions around Bug#16430 and Bug#16470. * window.c (Fwindow_pixel_width, Fwindow_pixel_height) (Fwindow_mode_line_height, Fwindow_header_line_height) (Fwindow_right_divider_width, Fwindow_bottom_divider_width): Minor doc-string adjustments. (Fwindow_total_height, Fwindow_total_width): New argument ROUND. Rewrite doc-strings. (window_body_height, window_body_width): Do not count partially visible lines/columns when PIXELWISE is nil (Bug#16470). (Qfloor, Qceiling): New symbols. * window.el (window-total-size, window-size): New argument ROUND. (window--min-delta-1, window-min-delta, window--max-delta-1): Be more conservative when calculating the numbers of lines or columns a window can shrink (Bug#16430). (fit-window-to-buffer): Simplify code. * term.el (term-window-width): Call window-body-width again. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 08:30:00 +0000 +++ lisp/ChangeLog 2014-01-22 10:29:23 +0000 @@ -1,3 +1,14 @@ +2014-01-22 Martin Rudalics + + Fixes in window size functions around Bug#16430 and Bug#16470. + * window.el (window-total-size, window-size): New argument + ROUND. + (window--min-delta-1, window-min-delta, window--max-delta-1): Be + more conservative when calculating the numbers of lines or + columns a window can shrink (Bug#16430). + (fit-window-to-buffer): Simplify code. + * term.el (term-window-width): Call window-body-width again. + 2014-01-22 Glenn Morris * image.el (image-format-suffixes): Doc fix. === modified file 'lisp/term.el' --- lisp/term.el 2014-01-19 16:59:51 +0000 +++ lisp/term.el 2014-01-22 10:29:23 +0000 @@ -975,9 +975,8 @@ (display-graphic-p) overflow-newline-into-fringe (/= (frame-parameter nil 'right-fringe) 0)) - ;; Call window-text-width instead of window-width (Bug#16470). - (window-text-width) - (1- (window-text-width)))) + (window-body-width) + (1- (window-body-width)))) (put 'term-mode 'mode-class 'special) === modified file 'lisp/window.el' --- lisp/window.el 2014-01-22 01:50:40 +0000 +++ lisp/window.el 2014-01-22 10:29:23 +0000 @@ -1013,18 +1013,21 @@ (window--atom-check frame)) ;;; Window sizes. -(defun window-total-size (&optional window horizontal) +(defun window-total-size (&optional window horizontal round) "Return the total height or width of WINDOW. WINDOW must be a valid window and defaults to the selected one. If HORIZONTAL is omitted or nil, return the total height of WINDOW, in lines, like `window-total-height'. Otherwise return -the total width, in columns, like `window-total-width'." +the total width, in columns, like `window-total-width'. + +Optional argument ROUND is handled as for `window-total-height' +and `window-total-width'." (if horizontal - (window-total-width window) - (window-total-height window))) + (window-total-width window round) + (window-total-height window round))) -(defun window-size (&optional window horizontal pixelwise) +(defun window-size (&optional window horizontal pixelwise round) "Return the height or width of WINDOW. WINDOW must be a valid window and defaults to the selected one. @@ -1033,14 +1036,18 @@ the total width, in columns, like `window-total-width'. Optional argument PIXELWISE means return the pixel size of WINDOW -like `window-pixel-height' and `window-pixel-width'." +like `window-pixel-height' and `window-pixel-width'. + +Optional argument ROUND is ignored if PIXELWISE is non-nil and +handled as for `window-total-height' and `window-total-width' +otherwise." (if horizontal (if pixelwise (window-pixel-width window) - (window-total-width window)) + (window-total-width window round)) (if pixelwise (window-pixel-height window) - (window-total-height window)))) + (window-total-height window round)))) (defvar window-size-fixed nil "Non-nil in a buffer means windows displaying the buffer are fixed-size. @@ -1316,7 +1323,7 @@ (unless (eq sub window) (setq delta (min delta - (- (window-size sub horizontal pixelwise) + (- (window-size sub horizontal pixelwise 'floor) (window-min-size sub horizontal ignore pixelwise))))) (setq sub (window-right sub)))) @@ -1356,7 +1363,7 @@ Optional argument PIXELWISE non-nil means return number of pixels by which WINDOW can be shrunk." (setq window (window-normalize-window window)) - (let ((size (window-size window horizontal pixelwise)) + (let ((size (window-size window horizontal pixelwise 'floor)) (minimum (window-min-size window horizontal ignore pixelwise))) (cond (nodown @@ -1393,7 +1400,7 @@ (t (setq delta (+ delta - (- (window-size sub horizontal pixelwise) + (- (window-size sub horizontal pixelwise 'floor) (window-min-size sub horizontal ignore pixelwise)))))) (setq sub (window-right sub)))) @@ -7131,8 +7138,7 @@ (window-bottom-divider-width))) ;; Round height. (unless pixelwise - (setq height (+ (/ height char-height) - (if (zerop (% height char-height)) 0 1)))) + (setq height (/ (+ height char-height -1) char-height))) (unless (= height total-height) (window-resize-no-error window @@ -7185,8 +7191,7 @@ (if pixelwise char-height 1)))) (window-right-divider-width)))) (unless pixelwise - (setq width (+ (/ width char-width) - (if (zerop (% width char-width)) 0 1)))) + (setq width (/ (+ width char-width -1) char-width))) (unless (= width body-width) (window-resize-no-error window === modified file 'src/ChangeLog' --- src/ChangeLog 2014-01-21 16:08:31 +0000 +++ src/ChangeLog 2014-01-22 10:29:23 +0000 @@ -1,3 +1,16 @@ +2014-01-22 Martin Rudalics + + Fixes in window size functions around Bug#16430 and Bug#16470. + * window.c (Fwindow_pixel_width, Fwindow_pixel_height) + (Fwindow_mode_line_height, Fwindow_header_line_height) + (Fwindow_right_divider_width, Fwindow_bottom_divider_width): + Minor doc-string adjustments. + (Fwindow_total_height, Fwindow_total_width): New argument ROUND. + Rewrite doc-strings. + (window_body_height, window_body_width): Do not count partially + visible lines/columns when PIXELWISE is nil (Bug#16470). + (Qfloor, Qceiling): New symbols. + 2014-01-21 Eli Zaretskii * w32fns.c (unwind_create_frame): Avoid crashing inside assertion === modified file 'src/window.c' --- src/window.c 2014-01-11 09:31:09 +0000 +++ src/window.c 2014-01-22 10:29:23 +0000 @@ -54,6 +54,7 @@ static Lisp_Object Qwindow_pixel_to_total; static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; static Lisp_Object Qsafe, Qabove, Qbelow, Qwindow_size, Qclone_of; +static Lisp_Object Qfloor, Qceiling; static int displayed_window_lines (struct window *); static int count_windows (struct window *); @@ -682,7 +683,7 @@ } DEFUN ("window-pixel-width", Fwindow_pixel_width, Swindow_pixel_width, 0, 1, 0, - doc: /* Return the pixel width of window WINDOW. + doc: /* Return the width of window WINDOW in pixels. WINDOW must be a valid window and defaults to the selected one. The return value includes the fringes and margins of WINDOW as well as @@ -695,7 +696,7 @@ } DEFUN ("window-pixel-height", Fwindow_pixel_height, Swindow_pixel_height, 0, 1, 0, - doc: /* Return the pixel height of window WINDOW. + doc: /* Return the height of window WINDOW in pixels. WINDOW must be a valid window and defaults to the selected one. The return value includes the mode line and header line, if any. If @@ -706,34 +707,77 @@ return make_number (decode_valid_window (window)->pixel_height); } -DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0, - doc: /* Return the total height, in lines, of window WINDOW. +DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 2, 0, + doc: /* Return the height of window WINDOW in lines. WINDOW must be a valid window and defaults to the selected one. -The return value includes the mode line and header line, if any. -If WINDOW is an internal window, the total height is the height -of the screen areas spanned by its children. - -On a graphical display, this total height is reported as an -integer multiple of the default character height. */) - (Lisp_Object window) +The return value includes the heights of WINDOW's mode and header line +and its bottom divider, if any. If WINDOW is an internal window, the +total height is the height of the screen areas spanned by its children. + +If WINDOW's pixel height is not an integral multiple of its frame's +character height, the number of lines occupied by WINDOW is rounded +internally. This is done in a way such that, if WINDOW is a parent +window, the sum of the total heights of all its children internally +equals the total height of WINDOW. + +If the optional argument ROUND is `ceiling', return the smallest integer +larger than WINDOW's pixel height divided by the character height of +WINDOW's frame. ROUND `floor' means to return the largest integer +smaller than WINDOW's pixel height divided by the character height of +WINDOW's frame. Any other value of ROUND means to return the internal +total height of WINDOW. */) + (Lisp_Object window, Lisp_Object round) { - return make_number (decode_valid_window (window)->total_lines); + struct window *w = decode_valid_window (window); + + if (! EQ (round, Qfloor) && ! EQ (round, Qceiling)) + return make_number (w->total_lines); + else + { + int unit = FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)); + + return make_number (EQ (round, Qceiling) + ? ((w->pixel_height + unit - 1) /unit) + : (w->pixel_height / unit)); + } } -DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, - doc: /* Return the total width, in columns, of window WINDOW. +DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 2, 0, + doc: /* Return the total width of window WINDOW in columns. WINDOW must be a valid window and defaults to the selected one. -The return value includes any vertical dividers or scroll bars -belonging to WINDOW. If WINDOW is an internal window, the total width -is the width of the screen areas spanned by its children. - -On a graphical display, this total width is reported as an -integer multiple of the default character width. */) - (Lisp_Object window) +The return value includes the widths of WINDOW's fringes, margins, +scroll bars and its right divider, if any. If WINDOW is an internal +window, the total width is the width of the screen areas spanned by its +children. + +If WINDOW's pixel width is not an integral multiple of its frame's +character width, the number of lines occupied by WINDOW is rounded +internally. This is done in a way such that, if WINDOW is a parent +window, the sum of the total widths of all its children internally +equals the total width of WINDOW. + +If the optional argument ROUND is `ceiling', return the smallest integer +larger than WINDOW's pixel width divided by the character width of +WINDOW's frame. ROUND `floor' means to return the largest integer +smaller than WINDOW's pixel width divided by the character width of +WINDOW's frame. Any other value of ROUND means to return the internal +total width of WINDOW. */) + (Lisp_Object window, Lisp_Object round) { - return make_number (decode_valid_window (window)->total_cols); + struct window *w = decode_valid_window (window); + + if (! EQ (round, Qfloor) && ! EQ (round, Qceiling)) + return make_number (w->total_cols); + else + { + int unit = FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); + + return make_number (EQ (round, Qceiling) + ? ((w->pixel_width + unit - 1) /unit) + : (w->pixel_width / unit)); + } } DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, @@ -811,62 +855,58 @@ return make_number (decode_valid_window (window)->top_line); } -/* Return the number of lines of W's body. Don't count any mode or - header line of W. */ - +/* Return the number of lines/pixels of W's body. Don't count any mode + or header line or horizontal divider of W. Rounds down to nearest + integer when not working pixelwise. */ static int window_body_height (struct window *w, bool pixelwise) { - int pixels = (w->pixel_height - - WINDOW_BOTTOM_DIVIDER_WIDTH (w) + int height = (w->pixel_height - WINDOW_HEADER_LINE_HEIGHT (w) - - WINDOW_MODE_LINE_HEIGHT (w)); - int unit = FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)); + - WINDOW_MODE_LINE_HEIGHT (w) + - WINDOW_BOTTOM_DIVIDER_WIDTH (w)); - return pixelwise ? pixels : ((pixels + unit - 1) / unit); + return pixelwise ? height : height / FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)); } -/* Return the number of columns of W's body. Don't count columns - occupied by the scroll bar or the vertical bar separating W from its - right sibling. On window-systems don't count fringes or display - margins either. */ +/* Return the number of columns/pixels of W's body. Don't count columns + occupied by the scroll bar or the divider/vertical bar separating W + from its right sibling or margins. On window-systems don't count + fringes either. Round down to nearest integer when not working + pixelwise. */ int window_body_width (struct window *w, bool pixelwise) { struct frame *f = XFRAME (WINDOW_FRAME (w)); - int pixels = (w->pixel_width - - WINDOW_RIGHT_DIVIDER_WIDTH (w) - - (WINDOW_HAS_VERTICAL_SCROLL_BAR (w) - ? WINDOW_SCROLL_BAR_AREA_WIDTH (w) - : ((!FRAME_WINDOW_P (f) - && !WINDOW_RIGHTMOST_P (w) - && !WINDOW_RIGHT_DIVIDER_WIDTH (w) - && !WINDOW_FULL_WIDTH_P (w)) - /* According to Eli this is either 1 or 0. */ - ? 1 : 0)) + int width = (w->pixel_width + - WINDOW_RIGHT_DIVIDER_WIDTH (w) + - (WINDOW_HAS_VERTICAL_SCROLL_BAR (w) + ? WINDOW_SCROLL_BAR_AREA_WIDTH (w) + : ((!FRAME_WINDOW_P (f) + && !WINDOW_RIGHTMOST_P (w) + && !WINDOW_RIGHT_DIVIDER_WIDTH (w)) + /* A vertical bar is either 1 or 0. */ + ? 1 : 0)) - WINDOW_MARGINS_WIDTH (w) - (FRAME_WINDOW_P (f) ? WINDOW_FRINGES_WIDTH (w) : 0)); - int unit = FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); - return pixelwise ? pixels : ((pixels + unit - 1) / unit); + return pixelwise ? width : width / FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)); } DEFUN ("window-body-height", Fwindow_body_height, Swindow_body_height, 0, 2, 0, - doc: /* Return the height, in lines, of WINDOW's text area. -WINDOW must be a live window and defaults to the selected one. - -Optional argument PIXELWISE non-nil means return the height in pixels. - -The returned height does not include the mode line or header line. On a -graphical display, the height is expressed as an integer multiple of the -default character height if PIXELWISE is nil. - -If PIXELWISE is nil and a line at the bottom of the text area is only -partially visible, that counts as a whole line; to exclude -partially-visible lines, use `window-text-height'. */) + doc: /* Return the height of WINDOW's text area. +WINDOW must be a live window and defaults to the selected one. Optional +argument PIXELWISE non-nil means return the height of WINDOW's text area +in pixels. The return value does not include the mode line or header +line or any horizontal divider. + +If PIXELWISE is nil, return the largest integer smaller than WINDOW's +pixel height divided by the character height of WINDOW's frame. This +means that if a line at the bottom of the text area is only partially +visible, that line is not counted. */) (Lisp_Object window, Lisp_Object pixelwise) { return make_number (window_body_height (decode_live_window (window), @@ -874,19 +914,16 @@ } DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 2, 0, - doc: /* Return the width, in columns, of WINDOW's text area. -WINDOW must be a live window and defaults to the selected one. - -Optional argument PIXELWISE non-nil means return the width in pixels. - -The return value does not include any vertical dividers, fringe or -marginal areas, or scroll bars. On a graphical display, the width is -expressed as an integer multiple of the default character width if -PIXELWISE is nil. - -If PIXELWISE is nil and a column at the right of the text area is only -partially visible, that counts as a whole column; to exclude -partially-visible columns, use `window-text-width'. */) + doc: /* Return the width of WINDOW's text area. +WINDOW must be a live window and defaults to the selected one. Optional +argument PIXELWISE non-nil means return the width in pixels. The return +value does not include any vertical dividers, fringes or marginal areas, +or scroll bars. + +If PIXELWISE is nil, return the largest integer smaller than WINDOW's +pixel width divided by the character width of WINDOW's frame. This +means that if a column at the right of the text area is only partially +visible, that column is not counted. */) (Lisp_Object window, Lisp_Object pixelwise) { return make_number (window_body_width (decode_live_window (window), @@ -895,7 +932,7 @@ DEFUN ("window-mode-line-height", Fwindow_mode_line_height, Swindow_mode_line_height, 0, 1, 0, - doc: /* Return the height in pixel of WINDOW's mode-line. + doc: /* Return the height in pixels of WINDOW's mode-line. WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { @@ -904,7 +941,7 @@ DEFUN ("window-header-line-height", Fwindow_header_line_height, Swindow_header_line_height, 0, 1, 0, - doc: /* Return the height in pixel of WINDOW's header-line. + doc: /* Return the height in pixels of WINDOW's header-line. WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { @@ -913,7 +950,7 @@ DEFUN ("window-right-divider-width", Fwindow_right_divider_width, Swindow_right_divider_width, 0, 1, 0, - doc: /* Return the width of WINDOW's right divider. + doc: /* Return the width in pixels of WINDOW's right divider. WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { @@ -922,7 +959,7 @@ DEFUN ("window-bottom-divider-width", Fwindow_bottom_divider_width, Swindow_bottom_divider_width, 0, 1, 0, - doc: /* Return the width of WINDOW's bottom divider. + doc: /* Return the width in pixels of WINDOW's bottom divider. WINDOW must be a live window and defaults to the selected one. */) (Lisp_Object window) { @@ -7101,6 +7138,8 @@ DEFSYM (Qabove, "above"); DEFSYM (Qbelow, "below"); DEFSYM (Qclone_of, "clone-of"); + DEFSYM (Qfloor, "floor"); + DEFSYM (Qceiling, "ceiling"); staticpro (&Vwindow_list); ------------------------------------------------------------ revno: 116108 committer: Michael Albinus branch nick: trunk timestamp: Wed 2014-01-22 11:02:46 +0100 message: * automated/file-notify-tests.el (file-notify-test02-events): Hide Bug#16519, until it is solved. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2014-01-21 13:31:39 +0000 +++ test/ChangeLog 2014-01-22 10:02:46 +0000 @@ -1,3 +1,8 @@ +2014-01-22 Michael Albinus + + * automated/file-notify-tests.el (file-notify-test02-events): + Hide Bug#16519, until it is solved. + 2014-01-21 Michael Albinus * automated/file-notify-tests.el === modified file 'test/automated/file-notify-tests.el' --- test/automated/file-notify-tests.el 2014-01-21 13:31:39 +0000 +++ test/automated/file-notify-tests.el 2014-01-22 10:02:46 +0000 @@ -237,7 +237,9 @@ (ignore-errors (delete-file file-notify--test-tmpfile)) (ignore-errors (delete-file file-notify--test-tmpfile1)))) - (should file-notify--test-results) + (should + (or file-notify--test-results + (and noninteractive (eq file-notify--library 'gfilenotify)))) ;; Bug#16519. (dolist (result file-notify--test-results) ;(message "%s" (ert-test-result-messages result)) (when (ert-test-failed-p result) ------------------------------------------------------------ revno: 116107 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-01-22 00:30:00 -0800 message: Some doc for image-format-suffixes * doc/lispref/display.texi (ImageMagick Images): Expand on image-format-suffixes. * lisp/image.el (image-format-suffixes): Doc fix. * etc/NEWS: Related markup. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-01-20 20:05:04 +0000 +++ doc/lispref/ChangeLog 2014-01-22 08:30:00 +0000 @@ -1,3 +1,7 @@ +2014-01-22 Glenn Morris + + * display.texi (ImageMagick Images): Expand on image-format-suffixes. + 2014-01-20 Glenn Morris * hash.texi (Other Hash): Do not mention subr-x.el functions; === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2014-01-07 07:51:20 +0000 +++ doc/lispref/display.texi 2014-01-22 08:30:00 +0000 @@ -4690,6 +4690,16 @@ ImageMagick entirely. @end defopt +@defvar image-format-suffixes +This variable is an alist mapping image types to file name extensions. +Emacs uses this in conjunction with the @code{:format} image property +(see below) to give a hint to the ImageMagick library as to the type +of an image. Each element has the form @code{(@var{type} +@var{extension})}, where @var{type} is a symbol specifying an image +content-type, and @var{extension} is a string that specifies the +associated file name extension. +@end defvar + Images loaded with ImageMagick support the following additional image descriptor properties: @@ -4700,13 +4710,13 @@ supports transparency. If the value is @code{nil}, it defaults to the frame's background color. -@item :width, :height +@item :width @var{width}, :height @var{height} The @code{:width} and @code{:height} keywords are used for scaling the image. If only one of them is specified, the other one will be calculated so as to preserve the aspect ratio. If both are specified, aspect ratio may not be preserved. -@item :max-width, :max-height +@item :max-width @var{max-width}, :max-height @var{max-height} The @code{:max-width} and @code{:max-height} keywords are used for scaling if the size of the image of the image exceeds these values. If @code{:width} is set it will have precedence over @code{max-width}, @@ -4715,19 +4725,16 @@ wish. @code{:max-width} and @code{:max-height} will always preserve the aspect ratio. -@c FIXME: ':format-type' or ':format'? --xfq -@item :format -ImageMagick tries to auto-detect the image type, but it isn't always -able to. By using @code{:format-type}, we can give ImageMagick a hint -to try to help it. It's used in conjunction with the -@code{image-format-suffixes} variable, which provides a mapping from -content types to file name suffixes. This is then given to -ImageMagick as a file name hint. +@item :format @var{type} +The value, @var{type}, should be a symbol specifying the type of the +image data, as found in @code{image-format-suffixes}. This is used +when the image does not have an associated file name, to provide a +hint to ImageMagick to help it detect the image type. -@item :rotation +@item :rotation @var{angle} Specifies a rotation angle in degrees. -@item :index +@item :index @var{frame} @c Doesn't work: http://debbugs.gnu.org/7978 @xref{Multi-Frame Images}. @end table === modified file 'etc/NEWS' --- etc/NEWS 2014-01-22 07:55:53 +0000 +++ etc/NEWS 2014-01-22 08:30:00 +0000 @@ -175,9 +175,11 @@ +++ *** ImageMagick images now support the :max-width and :max-height keywords. -*** Some data types aren't auto-detected by ImageMagick. -Adding :format to `create-image' may help if the content type is in -the new variable `image-format-suffixes'. ++++ +*** When using `create-image' with image data, you can pass a :format +attribute (via the property-list argument) in order to help +ImageMagick detect the image type. The value should be a MIME +content-type that is found in the new variable `image-format-suffixes'. ** Frame and window changes === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-01-22 07:55:53 +0000 +++ lisp/ChangeLog 2014-01-22 08:30:00 +0000 @@ -1,5 +1,7 @@ 2014-01-22 Glenn Morris + * image.el (image-format-suffixes): Doc fix. + * international/quail.el (quail-define-package): Doc fix. * emacs-lisp/authors.el (authors-valid-file-names): === modified file 'lisp/image.el' --- lisp/image.el 2014-01-01 07:43:34 +0000 +++ lisp/image.el 2014-01-22 08:30:00 +0000 @@ -104,11 +104,13 @@ (defvar image-format-suffixes '((image/x-icon "ico")) - "Alist of MIME Content-Type headers to file name suffixes. + "An alist associating image types with file name suffixes. This is used as a hint by the ImageMagick library when detecting -image types. If `create-image' is called with a :format -matching found in this alist, the ImageMagick library will be -told that the data would have this suffix if saved to a file.") +the type of image data (that does not have an associated file name). +Each element has the form (MIME-CONTENT-TYPE EXTENSION). +If `create-image' is called with a :format attribute whose value +equals a content-type found in this list, the ImageMagick library is +told that the data would have the associated suffix if saved to a file.") (defcustom image-load-path (list (file-name-as-directory (expand-file-name "images" data-directory))