diff options
| author | Paul Eggert | 2011-05-29 18:12:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-05-29 18:12:12 -0700 |
| commit | 90856fe0b82ba19d1c3d73a4ba48007380201e66 (patch) | |
| tree | 1b41ea9c212d3e7c1da29d03acc155a177db6c7c | |
| parent | 55d4c1b248e84d347ae73278faff623741f52691 (diff) | |
| parent | ca3cf0a561302e2a94eb0ab24063e29580a97fe1 (diff) | |
| download | emacs-90856fe0b82ba19d1c3d73a4ba48007380201e66.tar.gz emacs-90856fe0b82ba19d1c3d73a4ba48007380201e66.zip | |
Merge from trunk.
56 files changed, 711 insertions, 488 deletions
| @@ -1,8 +1,15 @@ | |||
| 1 | 2011-05-28 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-05-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use 'inline', not 'INLINE'. | 3 | Use 'inline', not 'INLINE'. |
| 4 | * configure.in, autogen/config.in (INLINE): Remove. | 4 | * configure.in, autogen/config.in (INLINE): Remove. |
| 5 | 5 | ||
| 6 | 2011-05-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 7 | |||
| 8 | Adjust to recent gnulib change for @GUARD_PREFIX@. | ||
| 9 | * lib/makefile.w32-in (getopt_h): Substitute @GUARD_PREFIX@, too. | ||
| 10 | All uses of _GL_ for guard prefixes in lib/*.h replaced with | ||
| 11 | _@GUARD_PREFIX@_. | ||
| 12 | |||
| 6 | 2011-05-27 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2011-05-27 Paul Eggert <eggert@cs.ucla.edu> |
| 7 | 14 | ||
| 8 | * doc/misc/texinfo.tex, lib/getopt.c, lib/intprops.h: Merge from gnulib. | 15 | * doc/misc/texinfo.tex, lib/getopt.c, lib/intprops.h: Merge from gnulib. |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 87ef485518e..bd92b2a7273 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * help.texi (Accessing Documentation): | ||
| 4 | * display.texi (Pixel Specification): | ||
| 5 | * processes.texi (Serial Ports, Serial Ports): | ||
| 6 | * nonascii.texi (Character Properties, Default Coding Systems): | ||
| 7 | * text.texi (Changing Properties, Special Properties): | ||
| 8 | * windows.texi (Window Start and End): | ||
| 9 | * modes.texi (SMIE Indentation Example, SMIE Tricks): | ||
| 10 | * keymaps.texi (Searching Keymaps, Tool Bar): | ||
| 11 | * minibuf.texi (Basic Completion): | ||
| 12 | * compile.texi (Eval During Compile): | ||
| 13 | * strings.texi (Formatting Strings): Tweaks to avoid overflowing | ||
| 14 | 7x9 paper in printed manual. | ||
| 15 | |||
| 16 | * lists.texi (Sets And Lists): Fix misplaced text. | ||
| 17 | |||
| 18 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 19 | |||
| 20 | * keymaps.texi (Remapping Commands): Emphasize that the keymap | ||
| 21 | needs to be active (Bug#8350). | ||
| 22 | |||
| 1 | 2011-05-28 Chong Yidong <cyd@stupidchicken.com> | 23 | 2011-05-28 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 24 | ||
| 3 | * minibuf.texi (Reading File Names): Clarify (Bug#8480). | 25 | * minibuf.texi (Reading File Names): Clarify (Bug#8480). |
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index f9f0e6662cf..fe5563370c4 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi | |||
| @@ -445,7 +445,7 @@ used to load it for compiling, but not executing. For example, | |||
| 445 | 445 | ||
| 446 | @lisp | 446 | @lisp |
| 447 | (eval-when-compile | 447 | (eval-when-compile |
| 448 | (require 'my-macro-package)) ;; only macros needed from this | 448 | (require 'my-macro-package)) |
| 449 | @end lisp | 449 | @end lisp |
| 450 | 450 | ||
| 451 | The same sort of thing goes for macros and @code{defsubst} functions | 451 | The same sort of thing goes for macros and @code{defsubst} functions |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 338fd421994..199a20cc2cd 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1441,9 +1441,9 @@ specify a particular attribute for certain text. @xref{Face | |||
| 1441 | Attributes}. | 1441 | Attributes}. |
| 1442 | 1442 | ||
| 1443 | @item | 1443 | @item |
| 1444 | A cons cell, either of the form @code{(foreground-color . @var{color-name})} or | 1444 | A cons cell, either of the form @code{(fg-color . @var{color-name})} |
| 1445 | @code{(background-color . @var{color-name})}. These elements specify | 1445 | or @code{(bg-color . @var{color-name})}. These elements specify just |
| 1446 | just the foreground color or just the background color. | 1446 | the foreground color or just the background color. |
| 1447 | 1447 | ||
| 1448 | @code{(foreground-color . @var{color-name})} has the same effect as | 1448 | @code{(foreground-color . @var{color-name})} has the same effect as |
| 1449 | @code{(:foreground @var{color-name})}; likewise for the background. | 1449 | @code{(:foreground @var{color-name})}; likewise for the background. |
| @@ -3821,9 +3821,10 @@ pixels per inch, millimeter, and centimeter, respectively. The | |||
| 3821 | and height of the current face. An image specification @code{image} | 3821 | and height of the current face. An image specification @code{image} |
| 3822 | corresponds to the width or height of the image. | 3822 | corresponds to the width or height of the image. |
| 3823 | 3823 | ||
| 3824 | The @code{left-fringe}, @code{right-fringe}, @code{left-margin}, | 3824 | The elements @code{left-fringe}, @code{right-fringe}, |
| 3825 | @code{right-margin}, @code{scroll-bar}, and @code{text} elements | 3825 | @code{left-margin}, @code{right-margin}, @code{scroll-bar}, and |
| 3826 | specify to the width of the corresponding area of the window. | 3826 | @code{text} specify to the width of the corresponding area of the |
| 3827 | window. | ||
| 3827 | 3828 | ||
| 3828 | The @code{left}, @code{center}, and @code{right} positions can be | 3829 | The @code{left}, @code{center}, and @code{right} positions can be |
| 3829 | used with @code{:align-to} to specify a position relative to the left | 3830 | used with @code{:align-to} to specify a position relative to the left |
| @@ -4652,16 +4653,14 @@ If @var{no-error} is non-@code{nil} and a suitable path can't be | |||
| 4652 | found, don't signal an error. Instead, return a list of directories as | 4653 | found, don't signal an error. Instead, return a list of directories as |
| 4653 | before, except that @code{nil} appears in place of the image directory. | 4654 | before, except that @code{nil} appears in place of the image directory. |
| 4654 | 4655 | ||
| 4655 | Here is an example that uses a common idiom to provide compatibility | 4656 | Here is an example of using @code{image-load-path-for-library}: |
| 4656 | with versions of Emacs that lack the variable @code{image-load-path}: | ||
| 4657 | 4657 | ||
| 4658 | @example | 4658 | @example |
| 4659 | (defvar image-load-path) ; shush compiler | 4659 | (defvar image-load-path) ; shush compiler |
| 4660 | (let* ((load-path (image-load-path-for-library | 4660 | (let* ((load-path (image-load-path-for-library |
| 4661 | "mh-e" "mh-logo.xpm")) | 4661 | "mh-e" "mh-logo.xpm")) |
| 4662 | (image-load-path (cons (car load-path) | 4662 | (image-load-path (cons (car load-path) |
| 4663 | (when (boundp 'image-load-path) | 4663 | image-load-path))) |
| 4664 | image-load-path)))) | ||
| 4665 | (mh-tool-bar-folder-buttons-init)) | 4664 | (mh-tool-bar-folder-buttons-init)) |
| 4666 | @end example | 4665 | @end example |
| 4667 | @end defun | 4666 | @end defun |
| @@ -5399,8 +5398,10 @@ value) in various ways. | |||
| 5399 | (aref colorcomp-data 2))) | 5398 | (aref colorcomp-data 2))) |
| 5400 | (samp " (sample text) ")) | 5399 | (samp " (sample text) ")) |
| 5401 | (insert "Color\t: " | 5400 | (insert "Color\t: " |
| 5402 | (propertize samp 'face `(foreground-color . ,cstr)) | 5401 | (propertize samp 'face |
| 5403 | (propertize samp 'face `(background-color . ,cstr)) | 5402 | `(foreground-color . ,cstr)) |
| 5403 | (propertize samp 'face | ||
| 5404 | `(background-color . ,cstr)) | ||
| 5404 | "\n")))) | 5405 | "\n")))) |
| 5405 | 5406 | ||
| 5406 | (defun colorcomp (color) | 5407 | (defun colorcomp (color) |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 259bb3cf86e..264d63511bc 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | @c in general, keep the following line commented out, unless doing a | 14 | @c in general, keep the following line commented out, unless doing a |
| 15 | @c copy of this manual that will be published. The manual should go | 15 | @c copy of this manual that will be published. The manual should go |
| 16 | @c onto the distribution in the full, 8.5 x 11" size. | 16 | @c onto the distribution in the full, 8.5 x 11" size. |
| 17 | @c set smallbook | 17 | @c @smallbook |
| 18 | 18 | ||
| 19 | @ifset smallbook | 19 | @ifset smallbook |
| 20 | @smallbook | 20 | @smallbook |
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index e287e6fbad4..63fc06c929b 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -138,9 +138,9 @@ unless @var{verbatim} is non-@code{nil}. | |||
| 138 | @end defun | 138 | @end defun |
| 139 | 139 | ||
| 140 | @defun documentation function &optional verbatim | 140 | @defun documentation function &optional verbatim |
| 141 | This function returns the documentation string of @var{function}. | 141 | This function returns the documentation string of @var{function}. It |
| 142 | @code{documentation} handles macros, named keyboard macros, and | 142 | handles macros, named keyboard macros, and special forms, as well as |
| 143 | special forms, as well as ordinary functions. | 143 | ordinary functions. |
| 144 | 144 | ||
| 145 | If @var{function} is a symbol, this function first looks for the | 145 | If @var{function} is a symbol, this function first looks for the |
| 146 | @code{function-documentation} property of that symbol; if that has a | 146 | @code{function-documentation} property of that symbol; if that has a |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 2ebce284fd3..d55cb299771 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -718,17 +718,18 @@ pseudo-Lisp description of the order and conditions for searching | |||
| 718 | them: | 718 | them: |
| 719 | 719 | ||
| 720 | @lisp | 720 | @lisp |
| 721 | (or (if overriding-terminal-local-map | 721 | (or (cond |
| 722 | (@var{find-in} overriding-terminal-local-map) | 722 | (overriding-terminal-local-map |
| 723 | (if overriding-local-map | 723 | (@var{find-in} overriding-terminal-local-map)) |
| 724 | (@var{find-in} overriding-local-map) | 724 | (overriding-local-map |
| 725 | (or (@var{find-in} (get-char-property (point) 'keymap)) | 725 | (@var{find-in} overriding-local-map)) |
| 726 | (@var{find-in-any} emulation-mode-map-alists) | 726 | (or (@var{find-in} (get-char-property (point) 'keymap)) |
| 727 | (@var{find-in-any} minor-mode-overriding-map-alist) | 727 | (@var{find-in-any} emulation-mode-map-alists) |
| 728 | (@var{find-in-any} minor-mode-map-alist) | 728 | (@var{find-in-any} minor-mode-overriding-map-alist) |
| 729 | (if (get-text-property (point) 'local-map) | 729 | (@var{find-in-any} minor-mode-map-alist) |
| 730 | (@var{find-in} (get-char-property (point) 'local-map)) | 730 | (if (get-text-property (point) 'local-map) |
| 731 | (@var{find-in} (current-local-map)))))) | 731 | (@var{find-in} (get-char-property (point) 'local-map)) |
| 732 | (@var{find-in} (current-local-map))))) | ||
| 732 | (@var{find-in} (current-global-map))) | 733 | (@var{find-in} (current-global-map))) |
| 733 | @end lisp | 734 | @end lisp |
| 734 | 735 | ||
| @@ -1468,33 +1469,33 @@ Dired mode is set up: | |||
| 1468 | @section Remapping Commands | 1469 | @section Remapping Commands |
| 1469 | @cindex remapping commands | 1470 | @cindex remapping commands |
| 1470 | 1471 | ||
| 1471 | A special kind of key binding, using a special ``key sequence'' | 1472 | A special kind of key binding can be used to @dfn{remap} one command |
| 1472 | which includes a command name, has the effect of @dfn{remapping} that | 1473 | to another, without having to refer to the key sequence(s) bound to |
| 1473 | command into another. Here's how it works. You make a key binding | 1474 | the original command. To use this feature, make a key binding for a |
| 1474 | for a key sequence that starts with the dummy event @code{remap}, | 1475 | key sequence that starts with the dummy event @code{remap}, followed |
| 1475 | followed by the command name you want to remap. Specify the remapped | 1476 | by the command name you want to remap; for the binding, specify the |
| 1476 | definition as the definition in this binding. The remapped definition | 1477 | new definition (usually a command name, but possibly any other valid |
| 1477 | is usually a command name, but it can be any valid definition for | 1478 | definition for a key binding). |
| 1478 | a key binding. | ||
| 1479 | 1479 | ||
| 1480 | Here's an example. Suppose that My mode uses special commands | 1480 | For example, suppose My mode provides a special command |
| 1481 | @code{my-kill-line} and @code{my-kill-word}, which should be invoked | 1481 | @code{my-kill-line}, which should be invoked instead of |
| 1482 | instead of @code{kill-line} and @code{kill-word}. It can establish | 1482 | @code{kill-line}. To establish this, its mode keymap should contain |
| 1483 | this by making these two command-remapping bindings in its keymap: | 1483 | the following remapping: |
| 1484 | 1484 | ||
| 1485 | @smallexample | 1485 | @smallexample |
| 1486 | (define-key my-mode-map [remap kill-line] 'my-kill-line) | 1486 | (define-key my-mode-map [remap kill-line] 'my-kill-line) |
| 1487 | (define-key my-mode-map [remap kill-word] 'my-kill-word) | ||
| 1488 | @end smallexample | 1487 | @end smallexample |
| 1489 | 1488 | ||
| 1490 | Whenever @code{my-mode-map} is an active keymap, if the user types | 1489 | @noindent |
| 1491 | @kbd{C-k}, Emacs will find the standard global binding of | 1490 | Then, whenever @code{my-mode-map} is active, if the user types |
| 1492 | @code{kill-line} (assuming nobody has changed it). But | 1491 | @kbd{C-k} (the default global key sequence for @code{kill-line}) Emacs |
| 1493 | @code{my-mode-map} remaps @code{kill-line} to @code{my-kill-line}, | 1492 | will instead run @code{my-kill-line}. |
| 1494 | so instead of running @code{kill-line}, Emacs runs | ||
| 1495 | @code{my-kill-line}. | ||
| 1496 | 1493 | ||
| 1497 | Remapping only works through a single level. In other words, | 1494 | Note that remapping only takes place through active keymaps; for |
| 1495 | example, putting a remapping in a prefix keymap like @code{ctl-x-map} | ||
| 1496 | typically has no effect, as such keymaps are not themselves active. | ||
| 1497 | In addition, remapping only works through a single level; in the | ||
| 1498 | following example, | ||
| 1498 | 1499 | ||
| 1499 | @smallexample | 1500 | @smallexample |
| 1500 | (define-key my-mode-map [remap kill-line] 'my-kill-line) | 1501 | (define-key my-mode-map [remap kill-line] 'my-kill-line) |
| @@ -1502,11 +1503,10 @@ Remapping only works through a single level. In other words, | |||
| 1502 | @end smallexample | 1503 | @end smallexample |
| 1503 | 1504 | ||
| 1504 | @noindent | 1505 | @noindent |
| 1505 | does not have the effect of remapping @code{kill-line} into | 1506 | @code{kill-line} is @emph{not} remapped to @code{my-other-kill-line}. |
| 1506 | @code{my-other-kill-line}. If an ordinary key binding specifies | 1507 | Instead, if an ordinary key binding specifies @code{kill-line}, it is |
| 1507 | @code{kill-line}, this keymap will remap it to @code{my-kill-line}; | 1508 | remapped to @code{my-kill-line}; if an ordinary binding specifies |
| 1508 | if an ordinary binding specifies @code{my-kill-line}, this keymap will | 1509 | @code{my-kill-line}, it is remapped to @code{my-other-kill-line}. |
| 1509 | remap it to @code{my-other-kill-line}. | ||
| 1510 | 1510 | ||
| 1511 | To undo the remapping of a command, remap it to @code{nil}; e.g. | 1511 | To undo the remapping of a command, remap it to @code{nil}; e.g. |
| 1512 | 1512 | ||
| @@ -2636,8 +2636,8 @@ using an indirection through @code{tool-bar-map}. | |||
| 2636 | By default, the global map binds @code{[tool-bar]} as follows: | 2636 | By default, the global map binds @code{[tool-bar]} as follows: |
| 2637 | @example | 2637 | @example |
| 2638 | (global-set-key [tool-bar] | 2638 | (global-set-key [tool-bar] |
| 2639 | '(menu-item "tool bar" ignore | 2639 | '(menu-item "tool bar" ignore |
| 2640 | :filter (lambda (ignore) tool-bar-map))) | 2640 | :filter (lambda (ignore) tool-bar-map))) |
| 2641 | @end example | 2641 | @end example |
| 2642 | @noindent | 2642 | @noindent |
| 2643 | Thus the tool bar map is derived dynamically from the value of variable | 2643 | Thus the tool bar map is derived dynamically from the value of variable |
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index d27c609dc83..064be89632f 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -1355,10 +1355,10 @@ and the @code{(4)} in the @code{sample-list} are not @code{eq}: | |||
| 1355 | (delq '(4) sample-list) | 1355 | (delq '(4) sample-list) |
| 1356 | @result{} (a c (4)) | 1356 | @result{} (a c (4)) |
| 1357 | @end group | 1357 | @end group |
| 1358 | @end example | ||
| 1358 | 1359 | ||
| 1359 | If you want to delete elements that are @code{equal} to a given value, | 1360 | If you want to delete elements that are @code{equal} to a given value, |
| 1360 | use @code{delete} (see below). | 1361 | use @code{delete} (see below). |
| 1361 | @end example | ||
| 1362 | 1362 | ||
| 1363 | @defun remq object list | 1363 | @defun remq object list |
| 1364 | This function returns a copy of @var{list}, with all elements removed | 1364 | This function returns a copy of @var{list}, with all elements removed |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 5336fef48ad..aa22e6c92ff 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -837,12 +837,13 @@ variable as ``risky'' with a non-@code{nil} | |||
| 837 | @code{risky-local-variable} property. @xref{File Local Variables}. | 837 | @code{risky-local-variable} property. @xref{File Local Variables}. |
| 838 | 838 | ||
| 839 | @defvar completion-ignore-case | 839 | @defvar completion-ignore-case |
| 840 | If the value of this variable is non-@code{nil}, Emacs does not | 840 | If the value of this variable is non-@code{nil}, case is not |
| 841 | consider case significant in completion. Note, however, that this | 841 | considered significant in completion. Within @code{read-file-name}, |
| 842 | variable is overridden by @code{read-file-name-completion-ignore-case} | 842 | this variable is overridden by |
| 843 | within @code{read-file-name} (@pxref{Reading File Names}), and by | 843 | @code{read-file-name-completion-ignore-case} (@pxref{Reading File |
| 844 | @code{read-buffer-completion-ignore-case} within @code{read-buffer} | 844 | Names}); within @code{read-buffer}, it is overridden by |
| 845 | (@pxref{High-Level Completion}). | 845 | @code{read-buffer-completion-ignore-case} (@pxref{High-Level |
| 846 | Completion}). | ||
| 846 | @end defvar | 847 | @end defvar |
| 847 | 848 | ||
| 848 | @defvar completion-regexp-list | 849 | @defvar completion-regexp-list |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 63ecf59e538..562cc76c3f0 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1046,8 +1046,8 @@ Turning on text-mode runs the hook `text-mode-hook'." | |||
| 1046 | @end group | 1046 | @end group |
| 1047 | @group | 1047 | @group |
| 1048 | ;; @r{These four lines are absent from the current version} | 1048 | ;; @r{These four lines are absent from the current version} |
| 1049 | ;; @r{not because this is done some other way, but rather} | 1049 | ;; @r{not because this is done some other way, but because} |
| 1050 | ;; @r{because nowadays Text mode uses the normal definition of paragraphs.} | 1050 | ;; @r{nowadays Text mode uses the normal definition of paragraphs.} |
| 1051 | (set (make-local-variable 'paragraph-start) | 1051 | (set (make-local-variable 'paragraph-start) |
| 1052 | (concat "[ \t]*$\\|" page-delimiter)) | 1052 | (concat "[ \t]*$\\|" page-delimiter)) |
| 1053 | (set (make-local-variable 'paragraph-separate) paragraph-start) | 1053 | (set (make-local-variable 'paragraph-separate) paragraph-start) |
| @@ -1139,12 +1139,15 @@ modes should understand the Lisp conventions for comments. The rest of | |||
| 1139 | 1139 | ||
| 1140 | @smallexample | 1140 | @smallexample |
| 1141 | @group | 1141 | @group |
| 1142 | (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$" )) | 1142 | (set (make-local-variable 'paragraph-start) |
| 1143 | (set (make-local-variable 'paragraph-separate) paragraph-start) | 1143 | (concat page-delimiter "\\|$" )) |
| 1144 | (set (make-local-variable 'paragraph-separate) | ||
| 1145 | paragraph-start) | ||
| 1144 | @dots{} | 1146 | @dots{} |
| 1145 | @end group | 1147 | @end group |
| 1146 | @group | 1148 | @group |
| 1147 | (set (make-local-variable 'comment-indent-function) 'lisp-comment-indent)) | 1149 | (set (make-local-variable 'comment-indent-function) |
| 1150 | 'lisp-comment-indent)) | ||
| 1148 | @dots{} | 1151 | @dots{} |
| 1149 | @end group | 1152 | @end group |
| 1150 | @end smallexample | 1153 | @end smallexample |
| @@ -3619,7 +3622,9 @@ natural to have a BNF grammar that looks like this: | |||
| 3619 | (inst ("IF" exp "THEN" insts "ELSE" insts "END") | 3622 | (inst ("IF" exp "THEN" insts "ELSE" insts "END") |
| 3620 | ("CASE" exp "OF" cases "END") | 3623 | ("CASE" exp "OF" cases "END") |
| 3621 | ...) | 3624 | ...) |
| 3622 | (cases (cases "|" cases) (caselabel ":" insts) ("ELSE" insts)) | 3625 | (cases (cases "|" cases) |
| 3626 | (caselabel ":" insts) | ||
| 3627 | ("ELSE" insts)) | ||
| 3623 | ... | 3628 | ... |
| 3624 | @end example | 3629 | @end example |
| 3625 | 3630 | ||
| @@ -3894,9 +3899,10 @@ and is always at the beginning of a line, we can use a more efficient | |||
| 3894 | rule: | 3899 | rule: |
| 3895 | @example | 3900 | @example |
| 3896 | ((equal token "if") | 3901 | ((equal token "if") |
| 3897 | (and (not (smie-rule-bolp)) (smie-rule-prev-p "else") | 3902 | (and (not (smie-rule-bolp)) |
| 3903 | (smie-rule-prev-p "else") | ||
| 3898 | (save-excursion | 3904 | (save-excursion |
| 3899 | (sample-smie-backward-token) ;Jump before the "else". | 3905 | (sample-smie-backward-token) |
| 3900 | (cons 'column (current-column))))) | 3906 | (cons 'column (current-column))))) |
| 3901 | @end example | 3907 | @end example |
| 3902 | 3908 | ||
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 0328dae9e7b..77337899923 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -374,18 +374,18 @@ properties that Emacs knows about: | |||
| 374 | 374 | ||
| 375 | @table @code | 375 | @table @code |
| 376 | @item name | 376 | @item name |
| 377 | This property corresponds to the Unicode @code{Name} property. The | 377 | Corresponds to the @code{Name} Unicode property. The value is a |
| 378 | value is a string consisting of upper-case Latin letters A to Z, | 378 | string consisting of upper-case Latin letters A to Z, digits, spaces, |
| 379 | digits, spaces, and hyphen @samp{-} characters. | 379 | and hyphen @samp{-} characters. |
| 380 | 380 | ||
| 381 | @cindex unicode general category | 381 | @cindex unicode general category |
| 382 | @item general-category | 382 | @item general-category |
| 383 | This property corresponds to the Unicode @code{General_Category} | 383 | Corresponds to the @code{General_Category} Unicode property. The |
| 384 | property. The value is a symbol whose name is a 2-letter abbreviation | 384 | value is a symbol whose name is a 2-letter abbreviation of the |
| 385 | of the character's classification. | 385 | character's classification. |
| 386 | 386 | ||
| 387 | @item canonical-combining-class | 387 | @item canonical-combining-class |
| 388 | Corresponds to the Unicode @code{Canonical_Combining_Class} property. | 388 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. |
| 389 | The value is an integer number. | 389 | The value is an integer number. |
| 390 | 390 | ||
| 391 | @item bidi-class | 391 | @item bidi-class |
| @@ -466,15 +466,18 @@ This function returns the value of @var{char}'s @var{propname} property. | |||
| 466 | @result{} Nd | 466 | @result{} Nd |
| 467 | @end group | 467 | @end group |
| 468 | @group | 468 | @group |
| 469 | (get-char-code-property ?\u2084 'digit-value) ; subscript 4 | 469 | ;; subscript 4 |
| 470 | (get-char-code-property ?\u2084 'digit-value) | ||
| 470 | @result{} 4 | 471 | @result{} 4 |
| 471 | @end group | 472 | @end group |
| 472 | @group | 473 | @group |
| 473 | (get-char-code-property ?\u2155 'numeric-value) ; one fifth | 474 | ;; one fifth |
| 475 | (get-char-code-property ?\u2155 'numeric-value) | ||
| 474 | @result{} 0.2 | 476 | @result{} 0.2 |
| 475 | @end group | 477 | @end group |
| 476 | @group | 478 | @group |
| 477 | (get-char-code-property ?\u2163 'numeric-value) ; Roman IV | 479 | ;; Roman IV |
| 480 | (get-char-code-property ?\u2163 'numeric-value) | ||
| 478 | @result{} 4 | 481 | @result{} 4 |
| 479 | @end group | 482 | @end group |
| 480 | @end example | 483 | @end example |
| @@ -1449,11 +1452,11 @@ for decoding (in case @var{operation} does decoding), and | |||
| 1449 | @var{encoding-system} is the coding system for encoding (in case | 1452 | @var{encoding-system} is the coding system for encoding (in case |
| 1450 | @var{operation} does encoding). | 1453 | @var{operation} does encoding). |
| 1451 | 1454 | ||
| 1452 | The argument @var{operation} is a symbol, one of @code{write-region}, | 1455 | The argument @var{operation} is a symbol; it should be one of |
| 1453 | @code{start-process}, @code{call-process}, @code{call-process-region}, | 1456 | @code{write-region}, @code{start-process}, @code{call-process}, |
| 1454 | @code{insert-file-contents}, or @code{open-network-stream}. These are | 1457 | @code{call-process-region}, @code{insert-file-contents}, or |
| 1455 | the names of the Emacs I/O primitives that can do character code and | 1458 | @code{open-network-stream}. These are the names of the Emacs I/O |
| 1456 | eol conversion. | 1459 | primitives that can do character code and eol conversion. |
| 1457 | 1460 | ||
| 1458 | The remaining arguments should be the same arguments that might be given | 1461 | The remaining arguments should be the same arguments that might be given |
| 1459 | to the corresponding I/O primitive. Depending on the primitive, one | 1462 | to the corresponding I/O primitive. Depending on the primitive, one |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index ba9d8accd4a..1a1b63683ce 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1794,9 +1794,9 @@ nice values get scheduled more favorably.) | |||
| 1794 | The number of threads in the process. | 1794 | The number of threads in the process. |
| 1795 | 1795 | ||
| 1796 | @item start | 1796 | @item start |
| 1797 | The time the process was started, in the @w{@code{(@var{high} | 1797 | The time when the process was started, in the same |
| 1798 | @var{low} @var{microsec})}} format used by @code{current-time} and | 1798 | @w{@code{(@var{high} @var{low} @var{microsec})}} format used by |
| 1799 | @code{file-attributes}. | 1799 | @code{current-time} and @code{file-attributes}. |
| 1800 | 1800 | ||
| 1801 | @item etime | 1801 | @item etime |
| 1802 | The time elapsed since the process started, in the @w{@code{(@var{high} | 1802 | The time elapsed since the process started, in the @w{@code{(@var{high} |
| @@ -2482,25 +2482,17 @@ Install @var{plist} as the initial plist of the process. | |||
| 2482 | @itemx :parity | 2482 | @itemx :parity |
| 2483 | @itemx :stopbits | 2483 | @itemx :stopbits |
| 2484 | @itemx :flowcontrol | 2484 | @itemx :flowcontrol |
| 2485 | These arguments are handled by @code{serial-process-configure}, which | 2485 | These are handled by @code{serial-process-configure}, which is called |
| 2486 | is called by @code{make-serial-process}. | 2486 | by @code{make-serial-process}. |
| 2487 | @end table | 2487 | @end table |
| 2488 | 2488 | ||
| 2489 | The original argument list, possibly modified by later configuration, | 2489 | The original argument list, possibly modified by later configuration, |
| 2490 | is available via the function @code{process-contact}. | 2490 | is available via the function @code{process-contact}. |
| 2491 | 2491 | ||
| 2492 | Examples: | 2492 | Here is an example: |
| 2493 | 2493 | ||
| 2494 | @example | 2494 | @example |
| 2495 | (make-serial-process :port "/dev/ttyS0" :speed 9600) | 2495 | (make-serial-process :port "/dev/ttyS0" :speed 9600) |
| 2496 | |||
| 2497 | (make-serial-process :port "COM1" :speed 115200 :stopbits 2) | ||
| 2498 | |||
| 2499 | (make-serial-process :port "\\\\.\\COM13" :speed 1200 | ||
| 2500 | :bytesize 7 :parity 'odd) | ||
| 2501 | |||
| 2502 | (make-serial-process :port "/dev/tty.BlueConsole-SPP-1" | ||
| 2503 | :speed nil) | ||
| 2504 | @end example | 2496 | @end example |
| 2505 | @end defun | 2497 | @end defun |
| 2506 | 2498 | ||
| @@ -2560,19 +2552,9 @@ flow control). If @var{flowcontrol} is not given, it defaults to no | |||
| 2560 | flow control. | 2552 | flow control. |
| 2561 | @end table | 2553 | @end table |
| 2562 | 2554 | ||
| 2563 | @code{serial-process-configure} is called by @code{make-serial-process} for the | 2555 | @code{serial-process-configure} is called by |
| 2564 | initial configuration of the serial port. | 2556 | @code{make-serial-process} for the initial configuration of the serial |
| 2565 | 2557 | port. | |
| 2566 | Examples: | ||
| 2567 | |||
| 2568 | @example | ||
| 2569 | (serial-process-configure :process "/dev/ttyS0" :speed 1200) | ||
| 2570 | |||
| 2571 | (serial-process-configure :buffer "COM1" :stopbits 1 | ||
| 2572 | :parity 'odd :flowcontrol 'hw) | ||
| 2573 | |||
| 2574 | (serial-process-configure :port "\\\\.\\COM13" :bytesize 7) | ||
| 2575 | @end example | ||
| 2576 | @end defun | 2558 | @end defun |
| 2577 | 2559 | ||
| 2578 | @node Byte Packing | 2560 | @node Byte Packing |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index d062c215952..05ac40e90c1 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -828,12 +828,12 @@ is not truncated. | |||
| 828 | 828 | ||
| 829 | @example | 829 | @example |
| 830 | @group | 830 | @group |
| 831 | (format "The word `%7s' actually has %d letters in it." | 831 | (format "The word `%7s' has %d letters in it." |
| 832 | "foo" (length "foo")) | 832 | "foo" (length "foo")) |
| 833 | @result{} "The word ` foo' actually has 3 letters in it." | 833 | @result{} "The word ` foo' has 3 letters in it." |
| 834 | (format "The word `%7s' actually has %d letters in it." | 834 | (format "The word `%7s' has %d letters in it." |
| 835 | "specification" (length "specification")) | 835 | "specification" (length "specification")) |
| 836 | @result{} "The word `specification' actually has 13 letters in it." | 836 | @result{} "The word `specification' has 13 letters in it." |
| 837 | @end group | 837 | @end group |
| 838 | @end example | 838 | @end example |
| 839 | 839 | ||
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 8205c5fa169..6a3f53c55e2 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -2806,9 +2806,9 @@ construct each part with @code{propertize} and then combine them with | |||
| 2806 | @end smallexample | 2806 | @end smallexample |
| 2807 | @end defun | 2807 | @end defun |
| 2808 | 2808 | ||
| 2809 | See also the function @code{buffer-substring-no-properties} | 2809 | @xref{Buffer Contents}, for the function |
| 2810 | (@pxref{Buffer Contents}) which copies text from the buffer | 2810 | @code{buffer-substring-no-properties}, which copies text from the |
| 2811 | but does not copy its properties. | 2811 | buffer but does not copy its properties. |
| 2812 | 2812 | ||
| 2813 | @node Property Search | 2813 | @node Property Search |
| 2814 | @subsection Text Property Search Functions | 2814 | @subsection Text Property Search Functions |
| @@ -2992,13 +2992,6 @@ face attribute name and @var{value} is a meaningful value for that | |||
| 2992 | attribute. With this feature, you do not need to create a face each | 2992 | attribute. With this feature, you do not need to create a face each |
| 2993 | time you want to specify a particular attribute for certain text. | 2993 | time you want to specify a particular attribute for certain text. |
| 2994 | @xref{Face Attributes}. | 2994 | @xref{Face Attributes}. |
| 2995 | |||
| 2996 | @item | ||
| 2997 | A cons cell with the form @code{(foreground-color . @var{color-name})} | ||
| 2998 | or @code{(background-color . @var{color-name})}. These are old, | ||
| 2999 | deprecated equivalents for @code{(:foreground @var{color-name})} and | ||
| 3000 | @code{(:background @var{color-name})}. Please convert code that uses | ||
| 3001 | them. | ||
| 3002 | @end itemize | 2995 | @end itemize |
| 3003 | 2996 | ||
| 3004 | It works to use the latter two forms directly as the value | 2997 | It works to use the latter two forms directly as the value |
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index e2bbcc11e6e..be37eb2034b 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -249,7 +249,8 @@ file if you distribute copies. Use a notice like this one: | |||
| 249 | ;; GNU General Public License for more details. | 249 | ;; GNU General Public License for more details. |
| 250 | 250 | ||
| 251 | ;; You should have received a copy of the GNU General Public License | 251 | ;; You should have received a copy of the GNU General Public License |
| 252 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | 252 | ;; along with this program. If not, see |
| 253 | ;; <http://www.gnu.org/licenses/>. | ||
| 253 | @end smallexample | 254 | @end smallexample |
| 254 | 255 | ||
| 255 | If you have signed papers to assign the copyright to the Foundation, | 256 | If you have signed papers to assign the copyright to the Foundation, |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 93f2035eca6..2cf4a8152c7 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -1462,10 +1462,10 @@ to the current position of point in @var{window}; @var{window}, to the | |||
| 1462 | selected window. If @var{position} is @code{t}, that means to check the | 1462 | selected window. If @var{position} is @code{t}, that means to check the |
| 1463 | last visible position in @var{window}. | 1463 | last visible position in @var{window}. |
| 1464 | 1464 | ||
| 1465 | The @code{pos-visible-in-window-p} function considers only vertical | 1465 | This function considers only vertical scrolling. If @var{position} is |
| 1466 | scrolling. If @var{position} is out of view only because @var{window} | 1466 | out of view only because @var{window} has been scrolled horizontally, |
| 1467 | has been scrolled horizontally, @code{pos-visible-in-window-p} returns | 1467 | @code{pos-visible-in-window-p} returns non-@code{nil} anyway. |
| 1468 | non-@code{nil} anyway. @xref{Horizontal Scrolling}. | 1468 | @xref{Horizontal Scrolling}. |
| 1469 | 1469 | ||
| 1470 | If @var{position} is visible, @code{pos-visible-in-window-p} returns | 1470 | If @var{position} is visible, @code{pos-visible-in-window-p} returns |
| 1471 | @code{t} if @var{partially} is @code{nil}; if @var{partially} is | 1471 | @code{t} if @var{partially} is @code{nil}; if @var{partially} is |
| @@ -177,6 +177,8 @@ with Xft. To change font, use the X resource font, for example: | |||
| 177 | Emacs.pane.menubar.font: Courier-12 | 177 | Emacs.pane.menubar.font: Courier-12 |
| 178 | 178 | ||
| 179 | ** On graphical displays, the mode-line no longer ends in dashes. | 179 | ** On graphical displays, the mode-line no longer ends in dashes. |
| 180 | Also, the first dash (which does not indicate anything) is just | ||
| 181 | displayed as a space. | ||
| 180 | 182 | ||
| 181 | ** On Nextstep/OSX, the menu bar can be hidden by customizing | 183 | ** On Nextstep/OSX, the menu bar can be hidden by customizing |
| 182 | ns-auto-hide-menu-bar. | 184 | ns-auto-hide-menu-bar. |
| @@ -386,6 +388,8 @@ between applications. | |||
| 386 | 388 | ||
| 387 | *** Support for X cut buffers has been removed. | 389 | *** Support for X cut buffers has been removed. |
| 388 | 390 | ||
| 391 | *** Support for X clipboard managers has been added. | ||
| 392 | |||
| 389 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers | 393 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers |
| 390 | the lines in the current rectangle. With an prefix argument, this | 394 | the lines in the current rectangle. With an prefix argument, this |
| 391 | prompts for a number to count from and for a format string. | 395 | prompts for a number to count from and for a format string. |
| @@ -747,6 +751,9 @@ consult. | |||
| 747 | 751 | ||
| 748 | * New Modes and Packages in Emacs 24.1 | 752 | * New Modes and Packages in Emacs 24.1 |
| 749 | 753 | ||
| 754 | ** Occur Edit mode applies edits made in *Occur* buffers to the | ||
| 755 | original buffers. It is bound to C-x C-q in Occur mode. | ||
| 756 | |||
| 750 | ** New global minor modes electric-pair-mode, electric-indent-mode, | 757 | ** New global minor modes electric-pair-mode, electric-indent-mode, |
| 751 | and electric-layout-mode. | 758 | and electric-layout-mode. |
| 752 | 759 | ||
diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 82e2937d6d2..0f3918ab771 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _GL_GETOPT_H | 19 | #ifndef _@GUARD_PREFIX@_GETOPT_H |
| 20 | 20 | ||
| 21 | #if __GNUC__ >= 3 | 21 | #if __GNUC__ >= 3 |
| 22 | @PRAGMA_SYSTEM_HEADER@ | 22 | @PRAGMA_SYSTEM_HEADER@ |
| @@ -32,10 +32,10 @@ | |||
| 32 | # undef _GL_SYSTEM_GETOPT | 32 | # undef _GL_SYSTEM_GETOPT |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #ifndef _GL_GETOPT_H | 35 | #ifndef _@GUARD_PREFIX@_GETOPT_H |
| 36 | 36 | ||
| 37 | #ifndef __need_getopt | 37 | #ifndef __need_getopt |
| 38 | # define _GL_GETOPT_H 1 | 38 | # define _@GUARD_PREFIX@_GETOPT_H 1 |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | /* Standalone applications should #define __GETOPT_PREFIX to an | 41 | /* Standalone applications should #define __GETOPT_PREFIX to an |
| @@ -249,5 +249,5 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, | |||
| 249 | /* Make sure we later can get all the definitions and declarations. */ | 249 | /* Make sure we later can get all the definitions and declarations. */ |
| 250 | #undef __need_getopt | 250 | #undef __need_getopt |
| 251 | 251 | ||
| 252 | #endif /* getopt.h */ | 252 | #endif /* _@GUARD_PREFIX@_GETOPT_H */ |
| 253 | #endif /* getopt.h */ | 253 | #endif /* _@GUARD_PREFIX@_GETOPT_H */ |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 2d18a073a49..40fbe663da7 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | # the same distribution terms as the rest of that program. | 9 | # the same distribution terms as the rest of that program. |
| 10 | # | 10 | # |
| 11 | # Generated by gnulib-tool. | 11 | # Generated by gnulib-tool. |
| 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat | 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | MOSTLYCLEANFILES += core *.stackdump | 15 | MOSTLYCLEANFILES += core *.stackdump |
| @@ -149,7 +149,8 @@ BUILT_SOURCES += $(GETOPT_H) | |||
| 149 | getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) | 149 | getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) |
| 150 | $(AM_V_GEN)rm -f $@-t $@ && \ | 150 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 151 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | 151 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 152 | sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ | 152 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 153 | -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ | ||
| 153 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 154 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ |
| 154 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 155 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 155 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 156 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| @@ -278,7 +279,8 @@ if GL_GENERATE_STDARG_H | |||
| 278 | stdarg.h: stdarg.in.h $(top_builddir)/config.status | 279 | stdarg.h: stdarg.in.h $(top_builddir)/config.status |
| 279 | $(AM_V_GEN)rm -f $@-t $@ && \ | 280 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 280 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | 281 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
| 281 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 282 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 283 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 282 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 284 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 283 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 285 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 284 | -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ | 286 | -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ |
| @@ -328,7 +330,8 @@ if GL_GENERATE_STDDEF_H | |||
| 328 | stddef.h: stddef.in.h $(top_builddir)/config.status | 330 | stddef.h: stddef.in.h $(top_builddir)/config.status |
| 329 | $(AM_V_GEN)rm -f $@-t $@ && \ | 331 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 330 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | 332 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
| 331 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 333 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 334 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 332 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 335 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 333 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 336 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 334 | -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ | 337 | -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ |
| @@ -357,7 +360,8 @@ if GL_GENERATE_STDINT_H | |||
| 357 | stdint.h: stdint.in.h $(top_builddir)/config.status | 360 | stdint.h: stdint.in.h $(top_builddir)/config.status |
| 358 | $(AM_V_GEN)rm -f $@-t $@ && \ | 361 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 359 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | 362 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 360 | sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ | 363 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 364 | -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ | ||
| 361 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 365 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ |
| 362 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 366 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 363 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 367 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| @@ -405,7 +409,8 @@ BUILT_SOURCES += stdio.h | |||
| 405 | stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 409 | stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
| 406 | $(AM_V_GEN)rm -f $@-t $@ && \ | 410 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 407 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | 411 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
| 408 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 412 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 413 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 409 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 414 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 410 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 415 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 411 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | 416 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ |
| @@ -528,7 +533,8 @@ BUILT_SOURCES += stdlib.h | |||
| 528 | stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 533 | stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
| 529 | $(AM_V_GEN)rm -f $@-t $@ && \ | 534 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 530 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | 535 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
| 531 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 536 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 537 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 532 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 538 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 533 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 539 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 534 | -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ | 540 | -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ |
| @@ -656,7 +662,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU | |||
| 656 | $(AM_V_at)$(MKDIR_P) sys | 662 | $(AM_V_at)$(MKDIR_P) sys |
| 657 | $(AM_V_GEN)rm -f $@-t $@ && \ | 663 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 658 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | 664 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 659 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 665 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 666 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 660 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 667 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 661 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 668 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 662 | -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ | 669 | -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ |
| @@ -714,7 +721,8 @@ BUILT_SOURCES += time.h | |||
| 714 | time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 721 | time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
| 715 | $(AM_V_GEN)rm -f $@-t $@ && \ | 722 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 716 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | 723 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ |
| 717 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 724 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 725 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 718 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 726 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 719 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 727 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 720 | -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ | 728 | -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ |
| @@ -764,7 +772,8 @@ BUILT_SOURCES += unistd.h | |||
| 764 | unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 772 | unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
| 765 | $(AM_V_GEN)rm -f $@-t $@ && \ | 773 | $(AM_V_GEN)rm -f $@-t $@ && \ |
| 766 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ | 774 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
| 767 | sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ | 775 | sed -e 's|@''GUARD_PREFIX''@|GL|g' \ |
| 776 | -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ | ||
| 768 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | 777 | -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ |
| 769 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | 778 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
| 770 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 779 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
diff --git a/lib/intprops.h b/lib/intprops.h index d722648555b..1f6a539c183 100644 --- a/lib/intprops.h +++ b/lib/intprops.h | |||
| @@ -22,9 +22,8 @@ | |||
| 22 | 22 | ||
| 23 | #include <limits.h> | 23 | #include <limits.h> |
| 24 | 24 | ||
| 25 | /* Return a integer value, converted to the same type as the integer | 25 | /* Return an integer value, converted to the same type as the integer |
| 26 | expression E after integer type promotion. V is the unconverted value. | 26 | expression E after integer type promotion. V is the unconverted value. */ |
| 27 | E should not have side effects. */ | ||
| 28 | #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) | 27 | #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) |
| 29 | 28 | ||
| 30 | /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see | 29 | /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see |
| @@ -53,7 +52,7 @@ | |||
| 53 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) | 52 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) |
| 54 | 53 | ||
| 55 | /* Return 1 if the integer expression E, after integer promotion, has | 54 | /* Return 1 if the integer expression E, after integer promotion, has |
| 56 | a signed type. E should not have side effects. */ | 55 | a signed type. */ |
| 57 | #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) | 56 | #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) |
| 58 | 57 | ||
| 59 | 58 | ||
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in index 99eda065568..1f543f1bc21 100644 --- a/lib/makefile.w32-in +++ b/lib/makefile.w32-in | |||
| @@ -197,7 +197,8 @@ ARG_NONNULL_H = ../arg-nonnull.h | |||
| 197 | 197 | ||
| 198 | getopt_h: | 198 | getopt_h: |
| 199 | - $(DEL) getopt_.h-t getopt_.h | 199 | - $(DEL) getopt_.h-t getopt_.h |
| 200 | sed -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \ | 200 | sed -e "s!@GUARD_PREFIX@!GL!g" \ |
| 201 | -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \ | ||
| 201 | -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \ | 202 | -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \ |
| 202 | -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \ | 203 | -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \ |
| 203 | -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \ | 204 | -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \ |
diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h index 4469d54e4f4..43f96070708 100644 --- a/lib/stdarg.in.h +++ b/lib/stdarg.in.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | along with this program; if not, write to the Free Software Foundation, | 15 | along with this program; if not, write to the Free Software Foundation, |
| 16 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | 16 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
| 17 | 17 | ||
| 18 | #ifndef _GL_STDARG_H | 18 | #ifndef _@GUARD_PREFIX@_STDARG_H |
| 19 | 19 | ||
| 20 | #if __GNUC__ >= 3 | 20 | #if __GNUC__ >= 3 |
| 21 | @PRAGMA_SYSTEM_HEADER@ | 21 | @PRAGMA_SYSTEM_HEADER@ |
| @@ -25,12 +25,12 @@ | |||
| 25 | /* The include_next requires a split double-inclusion guard. */ | 25 | /* The include_next requires a split double-inclusion guard. */ |
| 26 | #@INCLUDE_NEXT@ @NEXT_STDARG_H@ | 26 | #@INCLUDE_NEXT@ @NEXT_STDARG_H@ |
| 27 | 27 | ||
| 28 | #ifndef _GL_STDARG_H | 28 | #ifndef _@GUARD_PREFIX@_STDARG_H |
| 29 | #define _GL_STDARG_H | 29 | #define _@GUARD_PREFIX@_STDARG_H |
| 30 | 30 | ||
| 31 | #ifndef va_copy | 31 | #ifndef va_copy |
| 32 | # define va_copy(a,b) ((a) = (b)) | 32 | # define va_copy(a,b) ((a) = (b)) |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #endif /* _GL_STDARG_H */ | 35 | #endif /* _@GUARD_PREFIX@_STDARG_H */ |
| 36 | #endif /* _GL_STDARG_H */ | 36 | #endif /* _@GUARD_PREFIX@_STDARG_H */ |
diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 62a91a7a6a3..c7b98e7dcc5 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h | |||
| @@ -38,9 +38,9 @@ | |||
| 38 | remember if special invocation has ever been used to obtain wint_t, | 38 | remember if special invocation has ever been used to obtain wint_t, |
| 39 | in which case we need to clean up NULL yet again. */ | 39 | in which case we need to clean up NULL yet again. */ |
| 40 | 40 | ||
| 41 | # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) | 41 | # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) |
| 42 | # ifdef __need_wint_t | 42 | # ifdef __need_wint_t |
| 43 | # undef _GL_STDDEF_H | 43 | # undef _@GUARD_PREFIX@_STDDEF_H |
| 44 | # define _GL_STDDEF_WINT_T | 44 | # define _GL_STDDEF_WINT_T |
| 45 | # endif | 45 | # endif |
| 46 | # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ | 46 | # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ |
| @@ -49,14 +49,14 @@ | |||
| 49 | #else | 49 | #else |
| 50 | /* Normal invocation convention. */ | 50 | /* Normal invocation convention. */ |
| 51 | 51 | ||
| 52 | # ifndef _GL_STDDEF_H | 52 | # ifndef _@GUARD_PREFIX@_STDDEF_H |
| 53 | 53 | ||
| 54 | /* The include_next requires a split double-inclusion guard. */ | 54 | /* The include_next requires a split double-inclusion guard. */ |
| 55 | 55 | ||
| 56 | # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ | 56 | # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ |
| 57 | 57 | ||
| 58 | # ifndef _GL_STDDEF_H | 58 | # ifndef _@GUARD_PREFIX@_STDDEF_H |
| 59 | # define _GL_STDDEF_H | 59 | # define _@GUARD_PREFIX@_STDDEF_H |
| 60 | 60 | ||
| 61 | /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ | 61 | /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ |
| 62 | #if @REPLACE_NULL@ | 62 | #if @REPLACE_NULL@ |
| @@ -82,6 +82,6 @@ | |||
| 82 | # define wchar_t int | 82 | # define wchar_t int |
| 83 | #endif | 83 | #endif |
| 84 | 84 | ||
| 85 | # endif /* _GL_STDDEF_H */ | 85 | # endif /* _@GUARD_PREFIX@_STDDEF_H */ |
| 86 | # endif /* _GL_STDDEF_H */ | 86 | # endif /* _@GUARD_PREFIX@_STDDEF_H */ |
| 87 | #endif /* __need_XXX */ | 87 | #endif /* __need_XXX */ |
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 376b96a785d..09ac138b851 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | * <http://www.opengroup.org/susv3xbd/stdint.h.html> | 21 | * <http://www.opengroup.org/susv3xbd/stdint.h.html> |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #ifndef _GL_STDINT_H | 24 | #ifndef _@GUARD_PREFIX@_STDINT_H |
| 25 | 25 | ||
| 26 | #if __GNUC__ >= 3 | 26 | #if __GNUC__ >= 3 |
| 27 | @PRAGMA_SYSTEM_HEADER@ | 27 | @PRAGMA_SYSTEM_HEADER@ |
| @@ -52,13 +52,13 @@ | |||
| 52 | /* Other systems may have an incomplete or buggy <stdint.h>. | 52 | /* Other systems may have an incomplete or buggy <stdint.h>. |
| 53 | Include it before <inttypes.h>, since any "#include <stdint.h>" | 53 | Include it before <inttypes.h>, since any "#include <stdint.h>" |
| 54 | in <inttypes.h> would reinclude us, skipping our contents because | 54 | in <inttypes.h> would reinclude us, skipping our contents because |
| 55 | _GL_STDINT_H is defined. | 55 | _@GUARD_PREFIX@_STDINT_H is defined. |
| 56 | The include_next requires a split double-inclusion guard. */ | 56 | The include_next requires a split double-inclusion guard. */ |
| 57 | # @INCLUDE_NEXT@ @NEXT_STDINT_H@ | 57 | # @INCLUDE_NEXT@ @NEXT_STDINT_H@ |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H | 60 | #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H |
| 61 | #define _GL_STDINT_H | 61 | #define _@GUARD_PREFIX@_STDINT_H |
| 62 | 62 | ||
| 63 | /* <sys/types.h> defines some of the stdint.h types as well, on glibc, | 63 | /* <sys/types.h> defines some of the stdint.h types as well, on glibc, |
| 64 | IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). | 64 | IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). |
| @@ -588,5 +588,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 588 | 588 | ||
| 589 | #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ | 589 | #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ |
| 590 | 590 | ||
| 591 | #endif /* _GL_STDINT_H */ | 591 | #endif /* _@GUARD_PREFIX@_STDINT_H */ |
| 592 | #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ | 592 | #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 0b85d0c28cc..81d3d71842c 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | #else | 35 | #else |
| 36 | /* Normal invocation convention. */ | 36 | /* Normal invocation convention. */ |
| 37 | 37 | ||
| 38 | #ifndef _GL_STDIO_H | 38 | #ifndef _@GUARD_PREFIX@_STDIO_H |
| 39 | 39 | ||
| 40 | #define _GL_ALREADY_INCLUDING_STDIO_H | 40 | #define _GL_ALREADY_INCLUDING_STDIO_H |
| 41 | 41 | ||
| @@ -44,8 +44,8 @@ | |||
| 44 | 44 | ||
| 45 | #undef _GL_ALREADY_INCLUDING_STDIO_H | 45 | #undef _GL_ALREADY_INCLUDING_STDIO_H |
| 46 | 46 | ||
| 47 | #ifndef _GL_STDIO_H | 47 | #ifndef _@GUARD_PREFIX@_STDIO_H |
| 48 | #define _GL_STDIO_H | 48 | #define _@GUARD_PREFIX@_STDIO_H |
| 49 | 49 | ||
| 50 | /* Get va_list. Needed on many systems, including glibc 2.8. */ | 50 | /* Get va_list. Needed on many systems, including glibc 2.8. */ |
| 51 | #include <stdarg.h> | 51 | #include <stdarg.h> |
| @@ -1345,6 +1345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " | |||
| 1345 | #endif | 1345 | #endif |
| 1346 | 1346 | ||
| 1347 | 1347 | ||
| 1348 | #endif /* _GL_STDIO_H */ | 1348 | #endif /* _@GUARD_PREFIX@_STDIO_H */ |
| 1349 | #endif /* _GL_STDIO_H */ | 1349 | #endif /* _@GUARD_PREFIX@_STDIO_H */ |
| 1350 | #endif | 1350 | #endif |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 7513553b672..62a2ce920e6 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -28,13 +28,13 @@ | |||
| 28 | #else | 28 | #else |
| 29 | /* Normal invocation convention. */ | 29 | /* Normal invocation convention. */ |
| 30 | 30 | ||
| 31 | #ifndef _GL_STDLIB_H | 31 | #ifndef _@GUARD_PREFIX@_STDLIB_H |
| 32 | 32 | ||
| 33 | /* The include_next requires a split double-inclusion guard. */ | 33 | /* The include_next requires a split double-inclusion guard. */ |
| 34 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ | 34 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
| 35 | 35 | ||
| 36 | #ifndef _GL_STDLIB_H | 36 | #ifndef _@GUARD_PREFIX@_STDLIB_H |
| 37 | #define _GL_STDLIB_H | 37 | #define _@GUARD_PREFIX@_STDLIB_H |
| 38 | 38 | ||
| 39 | /* NetBSD 5.0 mis-defines NULL. */ | 39 | /* NetBSD 5.0 mis-defines NULL. */ |
| 40 | #include <stddef.h> | 40 | #include <stddef.h> |
| @@ -761,6 +761,6 @@ _GL_CXXALIASWARN (wctomb); | |||
| 761 | #endif | 761 | #endif |
| 762 | 762 | ||
| 763 | 763 | ||
| 764 | #endif /* _GL_STDLIB_H */ | 764 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ |
| 765 | #endif /* _GL_STDLIB_H */ | 765 | #endif /* _@GUARD_PREFIX@_STDLIB_H */ |
| 766 | #endif | 766 | #endif |
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 13fae7b6703..5acee705f8a 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | #else | 34 | #else |
| 35 | /* Normal invocation convention. */ | 35 | /* Normal invocation convention. */ |
| 36 | 36 | ||
| 37 | #ifndef _GL_SYS_STAT_H | 37 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H |
| 38 | 38 | ||
| 39 | /* Get nlink_t. */ | 39 | /* Get nlink_t. */ |
| 40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
| @@ -45,8 +45,8 @@ | |||
| 45 | /* The include_next requires a split double-inclusion guard. */ | 45 | /* The include_next requires a split double-inclusion guard. */ |
| 46 | #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ | 46 | #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ |
| 47 | 47 | ||
| 48 | #ifndef _GL_SYS_STAT_H | 48 | #ifndef _@GUARD_PREFIX@_SYS_STAT_H |
| 49 | #define _GL_SYS_STAT_H | 49 | #define _@GUARD_PREFIX@_SYS_STAT_H |
| 50 | 50 | ||
| 51 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 51 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
| 52 | 52 | ||
| @@ -653,6 +653,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " | |||
| 653 | #endif | 653 | #endif |
| 654 | 654 | ||
| 655 | 655 | ||
| 656 | #endif /* _GL_SYS_STAT_H */ | 656 | #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ |
| 657 | #endif /* _GL_SYS_STAT_H */ | 657 | #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ |
| 658 | #endif | 658 | #endif |
diff --git a/lib/time.in.h b/lib/time.in.h index cb533a46e10..1fbebf47beb 100644 --- a/lib/time.in.h +++ b/lib/time.in.h | |||
| @@ -28,13 +28,13 @@ | |||
| 28 | without adding our own declarations. */ | 28 | without adding our own declarations. */ |
| 29 | #if (defined __need_time_t || defined __need_clock_t \ | 29 | #if (defined __need_time_t || defined __need_clock_t \ |
| 30 | || defined __need_timespec \ | 30 | || defined __need_timespec \ |
| 31 | || defined _GL_TIME_H) | 31 | || defined _@GUARD_PREFIX@_TIME_H) |
| 32 | 32 | ||
| 33 | # @INCLUDE_NEXT@ @NEXT_TIME_H@ | 33 | # @INCLUDE_NEXT@ @NEXT_TIME_H@ |
| 34 | 34 | ||
| 35 | #else | 35 | #else |
| 36 | 36 | ||
| 37 | # define _GL_TIME_H | 37 | # define _@GUARD_PREFIX@_TIME_H |
| 38 | 38 | ||
| 39 | # @INCLUDE_NEXT@ @NEXT_TIME_H@ | 39 | # @INCLUDE_NEXT@ @NEXT_TIME_H@ |
| 40 | 40 | ||
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 59dd5709877..261659bc167 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | # define _GL_WINSOCK2_H_WITNESS | 36 | # define _GL_WINSOCK2_H_WITNESS |
| 37 | 37 | ||
| 38 | /* Normal invocation. */ | 38 | /* Normal invocation. */ |
| 39 | #elif !defined _GL_UNISTD_H | 39 | #elif !defined _@GUARD_PREFIX@_UNISTD_H |
| 40 | 40 | ||
| 41 | /* The include_next requires a split double-inclusion guard. */ | 41 | /* The include_next requires a split double-inclusion guard. */ |
| 42 | #if @HAVE_UNISTD_H@ | 42 | #if @HAVE_UNISTD_H@ |
| @@ -51,8 +51,8 @@ | |||
| 51 | # undef _GL_INCLUDING_WINSOCK2_H | 51 | # undef _GL_INCLUDING_WINSOCK2_H |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H | 54 | #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H |
| 55 | #define _GL_UNISTD_H | 55 | #define _@GUARD_PREFIX@_UNISTD_H |
| 56 | 56 | ||
| 57 | /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ | 57 | /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ |
| 58 | #include <stddef.h> | 58 | #include <stddef.h> |
| @@ -120,7 +120,7 @@ | |||
| 120 | #if @GNULIB_GETHOSTNAME@ | 120 | #if @GNULIB_GETHOSTNAME@ |
| 121 | /* Get all possible declarations of gethostname(). */ | 121 | /* Get all possible declarations of gethostname(). */ |
| 122 | # if @UNISTD_H_HAVE_WINSOCK2_H@ | 122 | # if @UNISTD_H_HAVE_WINSOCK2_H@ |
| 123 | # if !defined _GL_SYS_SOCKET_H | 123 | # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H |
| 124 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 124 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 125 | # undef socket | 125 | # undef socket |
| 126 | # define socket socket_used_without_including_sys_socket_h | 126 | # define socket socket_used_without_including_sys_socket_h |
| @@ -181,7 +181,7 @@ | |||
| 181 | "shutdown() used without including <sys/socket.h>"); | 181 | "shutdown() used without including <sys/socket.h>"); |
| 182 | # endif | 182 | # endif |
| 183 | # endif | 183 | # endif |
| 184 | # if !defined _GL_SYS_SELECT_H | 184 | # if !defined _@GUARD_PREFIX@_SYS_SELECT_H |
| 185 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 185 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 186 | # undef select | 186 | # undef select |
| 187 | # define select select_used_without_including_sys_select_h | 187 | # define select select_used_without_including_sys_select_h |
| @@ -1416,5 +1416,5 @@ _GL_CXXALIASWARN (write); | |||
| 1416 | #endif | 1416 | #endif |
| 1417 | 1417 | ||
| 1418 | 1418 | ||
| 1419 | #endif /* _GL_UNISTD_H */ | 1419 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ |
| 1420 | #endif /* _GL_UNISTD_H */ | 1420 | #endif /* _@GUARD_PREFIX@_UNISTD_H */ |
diff --git a/lib/verify.h b/lib/verify.h index 3294b303505..c6d30a35af9 100644 --- a/lib/verify.h +++ b/lib/verify.h | |||
| @@ -164,10 +164,13 @@ | |||
| 164 | (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) | 164 | (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) |
| 165 | 165 | ||
| 166 | # ifdef __cplusplus | 166 | # ifdef __cplusplus |
| 167 | # if !GNULIB_defined_struct__gl_verify_type | ||
| 167 | template <int w> | 168 | template <int w> |
| 168 | struct _gl_verify_type { | 169 | struct _gl_verify_type { |
| 169 | unsigned int _gl_verify_error_if_negative: w; | 170 | unsigned int _gl_verify_error_if_negative: w; |
| 170 | }; | 171 | }; |
| 172 | # define GNULIB_defined_struct__gl_verify_type 1 | ||
| 173 | # endif | ||
| 171 | # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ | 174 | # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ |
| 172 | _gl_verify_type<(R) ? 1 : -1> | 175 | _gl_verify_type<(R) ? 1 : -1> |
| 173 | # elif defined _GL_HAVE__STATIC_ASSERT | 176 | # elif defined _GL_HAVE__STATIC_ASSERT |
| @@ -206,7 +209,7 @@ template <int w> | |||
| 206 | # endif | 209 | # endif |
| 207 | # endif | 210 | # endif |
| 208 | 211 | ||
| 209 | # ifdef _GL_VERIFY_H | 212 | /* @assert.h omit start@ */ |
| 210 | 213 | ||
| 211 | /* Each of these macros verifies that its argument R is nonzero. To | 214 | /* Each of these macros verifies that its argument R is nonzero. To |
| 212 | be portable, R should be an integer constant expression. Unlike | 215 | be portable, R should be an integer constant expression. Unlike |
| @@ -220,13 +223,13 @@ template <int w> | |||
| 220 | /* Verify requirement R at compile-time, as an integer constant expression. | 223 | /* Verify requirement R at compile-time, as an integer constant expression. |
| 221 | Return 1. */ | 224 | Return 1. */ |
| 222 | 225 | ||
| 223 | # define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") | 226 | # define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") |
| 224 | 227 | ||
| 225 | /* Verify requirement R at compile-time, as a declaration without a | 228 | /* Verify requirement R at compile-time, as a declaration without a |
| 226 | trailing ';'. */ | 229 | trailing ';'. */ |
| 227 | 230 | ||
| 228 | # define verify(R) _GL_VERIFY (R, "verify (" #R ")") | 231 | # define verify(R) _GL_VERIFY (R, "verify (" #R ")") |
| 229 | 232 | ||
| 230 | # endif | 233 | /* @assert.h omit end@ */ |
| 231 | 234 | ||
| 232 | #endif | 235 | #endif |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 507a7bdf0ac..6d4752efec0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,12 +1,64 @@ | |||
| 1 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * image.el (image-animate-max-time): Allow nil and t values. | ||
| 4 | Default to nil. | ||
| 5 | (create-animated-image): Doc fix. | ||
| 6 | (image-animate-start): Remove second arg; just use | ||
| 7 | image-animate-max-time. | ||
| 8 | (image-animate-timeout): Doc fix. Args changed. | ||
| 9 | |||
| 10 | * image-mode.el (image-toggle-display-image): Ensure that the | ||
| 11 | image spec passed to the animate timer is the same object as in | ||
| 12 | the the buffer's display property (Bug#6981). | ||
| 13 | (image-transform-properties): Doc fix. | ||
| 14 | |||
| 15 | * image.el (image-animate-max-time): Default to nil. | ||
| 16 | |||
| 17 | 2011-05-29 Martin Rudalics <rudalics@gmx.at> | ||
| 18 | |||
| 19 | * menu-bar.el (kill-this-buffer-enabled-p): Avoid looping over | ||
| 20 | entire buffer list (Bug#8184). | ||
| 21 | |||
| 22 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 23 | |||
| 24 | * image.el (imagemagick-types-inhibit) | ||
| 25 | (imagemagick-register-types): Doc fix. | ||
| 26 | |||
| 27 | 2011-05-29 Deniz Dogan <deniz@dogan.se> | ||
| 28 | |||
| 29 | * net/rcirc.el (rcirc): Use the user's stored encryption method by | ||
| 30 | default. | ||
| 31 | |||
| 32 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 33 | |||
| 34 | * select.el: Don't perform clipboard-manager saving in hooks; | ||
| 35 | leave the hooks empty. | ||
| 36 | |||
| 37 | 2011-05-28 Leo Liu <sdl.web@gmail.com> | ||
| 38 | |||
| 39 | * replace.el (occur-menu-map, occur-edit-mode-map): New vars. | ||
| 40 | (occur-mode-map): Bind occur-edit-mode. Use occur-menu-map. | ||
| 41 | (occur-edit-mode): New major mode (Bug#8463). | ||
| 42 | (occur-after-change-function): New function. | ||
| 43 | (occur-engine): Give Occur tags a read-only property. | ||
| 44 | |||
| 1 | 2011-05-28 Kevin Ryde <user42@zip.com.au> | 45 | 2011-05-28 Kevin Ryde <user42@zip.com.au> |
| 2 | 46 | ||
| 3 | * subr.el (def-edebug-spec): Doc fix (Bug#8430). | 47 | * subr.el (def-edebug-spec): Doc fix (Bug#8430). |
| 4 | 48 | ||
| 5 | 2011-05-28 Chong Yidong <cyd@stupidchicken.com> | 49 | 2011-05-28 Chong Yidong <cyd@stupidchicken.com> |
| 6 | 50 | ||
| 51 | * bindings.el (help-echo): Make the initial non-indicator dash | ||
| 52 | empty on graphical terminals (Bug#7295). | ||
| 53 | |||
| 7 | * files.el (auto-mode-alist): Move config rule after the | 54 | * files.el (auto-mode-alist): Move config rule after the |
| 8 | in-stripping one (Bug#8547). | 55 | in-stripping one (Bug#8547). |
| 9 | 56 | ||
| 57 | * newcomment.el (comment-end-skip): Doc fix (Bug#8659). | ||
| 58 | |||
| 59 | * startup.el (normal-splash-screen): Remove gratuitous mode-line | ||
| 60 | setting (Bug#8740). | ||
| 61 | |||
| 10 | 2011-05-28 Alp Aker <aker@pitt.edu> (tiny change) | 62 | 2011-05-28 Alp Aker <aker@pitt.edu> (tiny change) |
| 11 | 63 | ||
| 12 | * buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort) | 64 | * buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort) |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 63c83ada9ba..ffc797966b8 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -321,7 +321,9 @@ mouse-3: Remove current window from display") | |||
| 321 | (standard-mode-line-format | 321 | (standard-mode-line-format |
| 322 | (list | 322 | (list |
| 323 | "%e" | 323 | "%e" |
| 324 | (propertize "-" 'help-echo help-echo) | 324 | `(:eval (if (display-graphic-p) |
| 325 | ,(propertize " " 'help-echo help-echo) | ||
| 326 | ,(propertize "-" 'help-echo help-echo))) | ||
| 325 | 'mode-line-mule-info | 327 | 'mode-line-mule-info |
| 326 | 'mode-line-client | 328 | 'mode-line-client |
| 327 | 'mode-line-modified | 329 | 'mode-line-modified |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6ed5a3fdcf4..4aba3a27900 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-05-29 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly | ||
| 4 | at the end of lines. | ||
| 5 | |||
| 6 | 2011-05-29 Julien Danjou <julien@danjou.info> | ||
| 7 | |||
| 8 | * smiley.el (gnus-smiley-file-types): Add gif as supported file type. | ||
| 9 | |||
| 1 | 2011-05-27 Glenn Morris <rgm@gnu.org> | 10 | 2011-05-27 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * gnus-group.el (gnus-bug-group-download-format-alist): | 12 | * gnus-group.el (gnus-bug-group-download-format-alist): |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index d23d9c7724b..ebd854930df 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -601,7 +601,7 @@ START, and END. Note that START and END should be merkers." | |||
| 601 | :help-echo (if title (format "%s (%s)" url title) url) | 601 | :help-echo (if title (format "%s (%s)" url title) url) |
| 602 | :keymap shr-map | 602 | :keymap shr-map |
| 603 | url) | 603 | url) |
| 604 | (put-text-property start (point) 'face 'shr-link) | 604 | (shr-add-font start (point) 'shr-link) |
| 605 | (put-text-property start (point) 'shr-url url)) | 605 | (put-text-property start (point) 'shr-url url)) |
| 606 | 606 | ||
| 607 | (defun shr-encode-url (url) | 607 | (defun shr-encode-url (url) |
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index 2f5c74220ea..cf23deb174b 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el | |||
| @@ -133,9 +133,11 @@ regexp to replace with IMAGE. IMAGE is the name of an image file in | |||
| 133 | (let ((types (list "pbm"))) | 133 | (let ((types (list "pbm"))) |
| 134 | (when (gnus-image-type-available-p 'xpm) | 134 | (when (gnus-image-type-available-p 'xpm) |
| 135 | (push "xpm" types)) | 135 | (push "xpm" types)) |
| 136 | (when (gnus-image-type-available-p 'gif) | ||
| 137 | (push "gif" types)) | ||
| 136 | types) | 138 | types) |
| 137 | "*List of suffixes on smiley file names to try." | 139 | "*List of suffixes on smiley file names to try." |
| 138 | :version "22.1" | 140 | :version "24.1" |
| 139 | :type '(repeat string) | 141 | :type '(repeat string) |
| 140 | :group 'smiley) | 142 | :group 'smiley) |
| 141 | 143 | ||
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index f4eb5eeaf45..145a15de246 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -484,18 +484,26 @@ was inserted." | |||
| 484 | (buffer-substring-no-properties (point-min) (point-max))) | 484 | (buffer-substring-no-properties (point-min) (point-max))) |
| 485 | filename)) | 485 | filename)) |
| 486 | (type (image-type file-or-data nil data-p)) | 486 | (type (image-type file-or-data nil data-p)) |
| 487 | (image0 (create-animated-image file-or-data type data-p)) | 487 | ;; Don't use create-animated-image here; that would start the |
| 488 | (image (append image0 | 488 | ;; timer, which works by altering the spec destructively. |
| 489 | (image-transform-properties image0))) | 489 | ;; But we still need to append the transformation properties, |
| 490 | (props | 490 | ;; which would make a new list. |
| 491 | (image (create-image file-or-data type data-p)) | ||
| 492 | (inhibit-read-only t) | ||
| 493 | (buffer-undo-list t) | ||
| 494 | (modified (buffer-modified-p)) | ||
| 495 | props) | ||
| 496 | |||
| 497 | (setq image (append image (image-transform-properties image))) | ||
| 498 | (setq props | ||
| 491 | `(display ,image | 499 | `(display ,image |
| 492 | intangible ,image | 500 | intangible ,image |
| 493 | rear-nonsticky (display intangible) | 501 | rear-nonsticky (display intangible) |
| 494 | read-only t front-sticky (read-only))) | 502 | read-only t front-sticky (read-only))) |
| 495 | (inhibit-read-only t) | ||
| 496 | (buffer-undo-list t) | ||
| 497 | (modified (buffer-modified-p))) | ||
| 498 | (image-flush image) | 503 | (image-flush image) |
| 504 | ;; Begin the animation, if any. | ||
| 505 | (image-animate-start image) | ||
| 506 | |||
| 499 | (let ((buffer-file-truename nil)) ; avoid changing dir mtime by lock_file | 507 | (let ((buffer-file-truename nil)) ; avoid changing dir mtime by lock_file |
| 500 | (add-text-properties (point-min) (point-max) props) | 508 | (add-text-properties (point-min) (point-max) props) |
| 501 | (restore-buffer-modified-p modified)) | 509 | (restore-buffer-modified-p modified)) |
| @@ -584,10 +592,13 @@ Its value should be one of the following: | |||
| 584 | (defvar image-transform-rotation 0.0) | 592 | (defvar image-transform-rotation 0.0) |
| 585 | 593 | ||
| 586 | (defun image-transform-properties (display) | 594 | (defun image-transform-properties (display) |
| 587 | "Rescale and/or rotate the current image. | 595 | "Return rescaling/rotation properties for the Image mode buffer. |
| 588 | The scale factor and rotation angle are given by the variables | 596 | These properties are suitable for appending to an image spec; |
| 589 | `image-transform-resize' and `image-transform-rotation'. This | 597 | they are determined by the variables `image-transform-resize' and |
| 590 | takes effect only if Emacs is compiled with ImageMagick support." | 598 | `image-transform-rotation'. |
| 599 | |||
| 600 | Recaling and rotation properties only take effect if Emacs is | ||
| 601 | compiled with ImageMagick support." | ||
| 591 | (let* ((size (image-size display t)) | 602 | (let* ((size (image-size display t)) |
| 592 | (height | 603 | (height |
| 593 | (cond | 604 | (cond |
diff --git a/lisp/image.el b/lisp/image.el index 3b90ac46bd1..b9ed10eacf2 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -590,9 +590,13 @@ Example: | |||
| 590 | 590 | ||
| 591 | ;;; Animated image API | 591 | ;;; Animated image API |
| 592 | 592 | ||
| 593 | (defcustom image-animate-max-time 30 | 593 | (defcustom image-animate-max-time nil |
| 594 | "Time in seconds to animate images." | 594 | "Time in seconds to animate images. |
| 595 | :type 'integer | 595 | If the value is nil, play animations once. |
| 596 | If the value is t, loop forever." | ||
| 597 | :type '(choice (const :tag "Play once" nil) | ||
| 598 | (const :tag "Loop forever" t) | ||
| 599 | integer) | ||
| 596 | :version "24.1" | 600 | :version "24.1" |
| 597 | :group 'image) | 601 | :group 'image) |
| 598 | 602 | ||
| @@ -601,7 +605,7 @@ Example: | |||
| 601 | 605 | ||
| 602 | ;;;###autoload | 606 | ;;;###autoload |
| 603 | (defun create-animated-image (file-or-data &optional type data-p &rest props) | 607 | (defun create-animated-image (file-or-data &optional type data-p &rest props) |
| 604 | "Create an animated image. | 608 | "Create an animated image, and begin animating it. |
| 605 | FILE-OR-DATA is an image file name or image data. | 609 | FILE-OR-DATA is an image file name or image data. |
| 606 | Optional TYPE is a symbol describing the image type. If TYPE is omitted | 610 | Optional TYPE is a symbol describing the image type. If TYPE is omitted |
| 607 | or nil, try to determine the image type from its first few bytes | 611 | or nil, try to determine the image type from its first few bytes |
| @@ -638,22 +642,20 @@ Images should not be larger than specified by `max-image-size'." | |||
| 638 | (setq timer nil))) | 642 | (setq timer nil))) |
| 639 | timer)) | 643 | timer)) |
| 640 | 644 | ||
| 641 | (defun image-animate-start (image &optional max-time) | 645 | (defun image-animate-start (image) |
| 642 | "Start animation of image IMAGE. | 646 | "Start animating the image IMAGE. |
| 643 | Optional second arg MAX-TIME is number of seconds to animate image, | 647 | The variable `image-animate-max-time' determines how long to |
| 644 | or t to animate infinitely." | 648 | animate for." |
| 645 | (let ((anim (image-animated-p image)) | 649 | (let ((anim (image-animated-p image)) |
| 646 | timer tmo) | 650 | delay ; in seconds |
| 651 | timer) | ||
| 647 | (when anim | 652 | (when anim |
| 648 | (if (setq timer (image-animate-timer image)) | 653 | (if (setq timer (image-animate-timer image)) |
| 649 | (setcar (nthcdr 3 (aref timer 6)) max-time) | 654 | (cancel-timer timer)) |
| 650 | (setq tmo (* (cdr anim) 0.01)) | 655 | (setq delay (max (* (cdr anim) 0.01) 0.025)) |
| 651 | (setq max-time (or max-time image-animate-max-time)) | 656 | (run-with-timer 0.2 nil #'image-animate-timeout |
| 652 | (run-with-timer tmo nil #'image-animate-timeout | 657 | image 0 (car anim) |
| 653 | image 1 (car anim) | 658 | delay 0 image-animate-max-time)))) |
| 654 | (if (numberp max-time) | ||
| 655 | (- max-time tmo) | ||
| 656 | max-time)))))) | ||
| 657 | 659 | ||
| 658 | (defun image-animate-stop (image) | 660 | (defun image-animate-stop (image) |
| 659 | "Stop animation of image." | 661 | "Stop animation of image." |
| @@ -661,20 +663,31 @@ or t to animate infinitely." | |||
| 661 | (when timer | 663 | (when timer |
| 662 | (cancel-timer timer)))) | 664 | (cancel-timer timer)))) |
| 663 | 665 | ||
| 664 | (defun image-animate-timeout (image ino count time-left) | 666 | (defun image-animate-timeout (image n count delay time-elapsed max) |
| 665 | (if (>= ino count) | 667 | "Display animation frame N of IMAGE. |
| 666 | (setq ino 0)) | 668 | N=0 refers to the initial animation frame. |
| 667 | (plist-put (cdr image) :index ino) | 669 | COUNT is the total number of frames in the animation. |
| 668 | (force-window-update) | 670 | DELAY is the time between animation frames, in seconds. |
| 669 | (let ((anim (image-animated-p image)) tmo) | 671 | TIME-ELAPSED is the total time that has elapsed since |
| 670 | (when anim | 672 | `image-animate-start' was called. |
| 671 | (setq tmo (* (cdr anim) 0.01)) | 673 | MAX determines when to stop. If t, loop forever. If nil, stop |
| 672 | (unless (and (= ino 0) (numberp time-left) (< time-left tmo)) | 674 | after displaying the last animation frame. Otherwise, stop |
| 673 | (run-with-timer tmo nil #'image-animate-timeout | 675 | after MAX seconds have elapsed." |
| 674 | image (1+ ino) count | 676 | (let (done) |
| 675 | (if (numberp time-left) | 677 | (plist-put (cdr image) :index n) |
| 676 | (- time-left tmo) | 678 | (force-window-update) |
| 677 | time-left)))))) | 679 | (setq n (1+ n)) |
| 680 | (if (>= n count) | ||
| 681 | (if max | ||
| 682 | (setq n 0) | ||
| 683 | (setq done t))) | ||
| 684 | (setq time-elapsed (+ delay time-elapsed)) | ||
| 685 | (if (numberp max) | ||
| 686 | (setq done (>= time-elapsed max))) | ||
| 687 | (unless done | ||
| 688 | (run-with-timer delay nil 'image-animate-timeout | ||
| 689 | image n count delay | ||
| 690 | time-elapsed max)))) | ||
| 678 | 691 | ||
| 679 | (defun image-animated-p (image) | 692 | (defun image-animated-p (image) |
| 680 | "Return non-nil if image is animated. | 693 | "Return non-nil if image is animated. |
| @@ -698,31 +711,38 @@ shall be displayed." | |||
| 698 | 711 | ||
| 699 | (defcustom imagemagick-types-inhibit | 712 | (defcustom imagemagick-types-inhibit |
| 700 | '(C HTML HTM TXT PDF) | 713 | '(C HTML HTM TXT PDF) |
| 701 | ;; FIXME what are the possible options? | 714 | "ImageMagick types that Emacs should not use ImageMagick to handle. |
| 702 | ;; Are these actually file-name extensions? | 715 | This should be a list of symbols, each of which has the same |
| 703 | ;; Why are these upper-case when eg image-types is lower-case? | 716 | names as one of the format tags used internally by ImageMagick; |
| 704 | "Types the ImageMagick loader should not try to handle." | 717 | see `imagemagick-types'. Entries in this list are excluded from |
| 705 | :type '(choice (const :tag "Let ImageMagick handle all the types it can" nil) | 718 | being registered by `imagemagick-register-types'. |
| 719 | |||
| 720 | If Emacs is compiled without ImageMagick, this variable has no effect." | ||
| 721 | :type '(choice (const :tag "Let ImageMagick handle all types it can" nil) | ||
| 706 | (repeat symbol)) | 722 | (repeat symbol)) |
| 707 | :version "24.1" | 723 | :version "24.1" |
| 708 | :group 'image) | 724 | :group 'image) |
| 709 | 725 | ||
| 710 | ;;;###autoload | 726 | ;;;###autoload |
| 711 | (defun imagemagick-register-types () | 727 | (defun imagemagick-register-types () |
| 712 | "Register the file types that ImageMagick is able to handle." | 728 | "Register file types that can be handled by ImageMagick. |
| 713 | (if (fboundp 'imagemagick-types) | 729 | This adds the file types returned by `imagemagick-types' |
| 714 | (let ((im-types (imagemagick-types))) | 730 | \(excluding the ones in `imagemagick-types-inhibit') to |
| 715 | (dolist (im-inhibit imagemagick-types-inhibit) | 731 | `auto-mode-alist' and `image-type-file-name-regexps', so that |
| 716 | (setq im-types (remove im-inhibit im-types))) | 732 | Emacs visits them in Image mode. |
| 717 | (dolist (im-type im-types) | 733 | |
| 718 | (let ((extension (downcase (symbol-name im-type)))) | 734 | If Emacs is compiled without ImageMagick support, do nothing." |
| 719 | (push | 735 | (when (fboundp 'imagemagick-types) |
| 720 | (cons (concat "\\." extension "\\'") 'image-mode) | 736 | (let ((im-types (imagemagick-types))) |
| 721 | auto-mode-alist) | 737 | (dolist (im-inhibit imagemagick-types-inhibit) |
| 722 | (push | 738 | (setq im-types (delq im-inhibit im-types))) |
| 723 | (cons (concat "\\." extension "\\'") 'imagemagick) | 739 | (dolist (im-type im-types) |
| 724 | image-type-file-name-regexps)))) | 740 | (let ((extension |
| 725 | (error "Emacs was not built with ImageMagick support"))) | 741 | (concat "\\." (downcase (symbol-name im-type)) |
| 742 | "\\'"))) | ||
| 743 | (push (cons extension 'image-mode) auto-mode-alist) | ||
| 744 | (push (cons extension 'imagemagick) | ||
| 745 | image-type-file-name-regexps)))))) | ||
| 726 | 746 | ||
| 727 | (provide 'image) | 747 | (provide 'image) |
| 728 | 748 | ||
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 8a33381b618..343a9c6dd0c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1823,14 +1823,17 @@ using `abort-recursive-edit'." | |||
| 1823 | (abort-recursive-edit))) | 1823 | (abort-recursive-edit))) |
| 1824 | 1824 | ||
| 1825 | (defun kill-this-buffer-enabled-p () | 1825 | (defun kill-this-buffer-enabled-p () |
| 1826 | (let ((count 0) | 1826 | "Return non-nil if the `kill-this-buffer' menu item should be enabled." |
| 1827 | (buffers (buffer-list))) | 1827 | (or (not (menu-bar-non-minibuffer-window-p)) |
| 1828 | (while buffers | 1828 | (let (found-1) |
| 1829 | (or (string-match "^ " (buffer-name (car buffers))) | 1829 | ;; Instead of looping over entire buffer list, stop once we've |
| 1830 | (setq count (1+ count))) | 1830 | ;; found two "killable" buffers (Bug#8184). |
| 1831 | (setq buffers (cdr buffers))) | 1831 | (catch 'found-2 |
| 1832 | (or (not (menu-bar-non-minibuffer-window-p)) | 1832 | (dolist (buffer (buffer-list)) |
| 1833 | (> count 1)))) | 1833 | (unless (string-match-p "^ " (buffer-name buffer)) |
| 1834 | (if (not found-1) | ||
| 1835 | (setq found-1 t) | ||
| 1836 | (throw 'found-2 t)))))))) | ||
| 1834 | 1837 | ||
| 1835 | (put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p)) | 1838 | (put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p)) |
| 1836 | 1839 | ||
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 0d02688beed..47085af85f0 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -456,7 +456,12 @@ If ARG is non-nil, instead prompt for connection parameters." | |||
| 456 | (encryption | 456 | (encryption |
| 457 | (intern (completing-read "Encryption (default plain): " | 457 | (intern (completing-read "Encryption (default plain): " |
| 458 | '("plain" "tls") | 458 | '("plain" "tls") |
| 459 | nil t nil nil "plain")))) | 459 | nil t |
| 460 | (let ((choice (plist-get server-plist | ||
| 461 | :encryption))) | ||
| 462 | (when choice | ||
| 463 | (symbol-name choice))) | ||
| 464 | nil "plain")))) | ||
| 460 | (rcirc-connect server port nick user-name | 465 | (rcirc-connect server port nick user-name |
| 461 | rcirc-default-full-name | 466 | rcirc-default-full-name |
| 462 | channels password encryption)) | 467 | channels password encryption)) |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index f1243f158a5..a1d77ccc6e0 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -118,7 +118,7 @@ at the place matched by the close of the first pair.") | |||
| 118 | 118 | ||
| 119 | ;;;###autoload | 119 | ;;;###autoload |
| 120 | (defvar comment-end-skip nil | 120 | (defvar comment-end-skip nil |
| 121 | "Regexp to match the end of a comment plus everything up to its body.") | 121 | "Regexp to match the end of a comment plus everything back to its body.") |
| 122 | ;;;###autoload(put 'comment-end-skip 'safe-local-variable 'string-or-null-p) | 122 | ;;;###autoload(put 'comment-end-skip 'safe-local-variable 'string-or-null-p) |
| 123 | 123 | ||
| 124 | ;;;###autoload | 124 | ;;;###autoload |
diff --git a/lisp/replace.el b/lisp/replace.el index 31a48d48960..0578ed09b1c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -761,22 +761,8 @@ a previously found match." | |||
| 761 | count))) | 761 | count))) |
| 762 | 762 | ||
| 763 | 763 | ||
| 764 | (defvar occur-mode-map | 764 | (defvar occur-menu-map |
| 765 | (let ((map (make-sparse-keymap))) | 765 | (let ((map (make-sparse-keymap))) |
| 766 | ;; We use this alternative name, so we can use \\[occur-mode-mouse-goto]. | ||
| 767 | (define-key map [mouse-2] 'occur-mode-mouse-goto) | ||
| 768 | (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) | ||
| 769 | (define-key map "\C-m" 'occur-mode-goto-occurrence) | ||
| 770 | (define-key map "o" 'occur-mode-goto-occurrence-other-window) | ||
| 771 | (define-key map "\C-o" 'occur-mode-display-occurrence) | ||
| 772 | (define-key map "\M-n" 'occur-next) | ||
| 773 | (define-key map "\M-p" 'occur-prev) | ||
| 774 | (define-key map "r" 'occur-rename-buffer) | ||
| 775 | (define-key map "c" 'clone-buffer) | ||
| 776 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) | ||
| 777 | (define-key map [menu-bar] (make-sparse-keymap)) | ||
| 778 | (define-key map [menu-bar occur] | ||
| 779 | (cons (purecopy "Occur") map)) | ||
| 780 | (define-key map [next-error-follow-minor-mode] | 766 | (define-key map [next-error-follow-minor-mode] |
| 781 | `(menu-item ,(purecopy "Auto Occurrence Display") | 767 | `(menu-item ,(purecopy "Auto Occurrence Display") |
| 782 | next-error-follow-minor-mode | 768 | next-error-follow-minor-mode |
| @@ -817,6 +803,24 @@ a previously found match." | |||
| 817 | `(menu-item ,(purecopy "Move to Previous Match") occur-prev | 803 | `(menu-item ,(purecopy "Move to Previous Match") occur-prev |
| 818 | :help ,(purecopy "Move to the Nth (default 1) previous match in an Occur mode buffer"))) | 804 | :help ,(purecopy "Move to the Nth (default 1) previous match in an Occur mode buffer"))) |
| 819 | map) | 805 | map) |
| 806 | "Menu keymap for `occur-mode'.") | ||
| 807 | |||
| 808 | (defvar occur-mode-map | ||
| 809 | (let ((map (make-sparse-keymap))) | ||
| 810 | ;; We use this alternative name, so we can use \\[occur-mode-mouse-goto]. | ||
| 811 | (define-key map [mouse-2] 'occur-mode-mouse-goto) | ||
| 812 | (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) | ||
| 813 | (define-key map "\C-x\C-q" 'occur-edit-mode) | ||
| 814 | (define-key map "\C-m" 'occur-mode-goto-occurrence) | ||
| 815 | (define-key map "o" 'occur-mode-goto-occurrence-other-window) | ||
| 816 | (define-key map "\C-o" 'occur-mode-display-occurrence) | ||
| 817 | (define-key map "\M-n" 'occur-next) | ||
| 818 | (define-key map "\M-p" 'occur-prev) | ||
| 819 | (define-key map "r" 'occur-rename-buffer) | ||
| 820 | (define-key map "c" 'clone-buffer) | ||
| 821 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) | ||
| 822 | (define-key map [menu-bar occur] (cons (purecopy "Occur") occur-menu-map)) | ||
| 823 | map) | ||
| 820 | "Keymap for `occur-mode'.") | 824 | "Keymap for `occur-mode'.") |
| 821 | 825 | ||
| 822 | (defvar occur-revert-arguments nil | 826 | (defvar occur-revert-arguments nil |
| @@ -853,6 +857,63 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. | |||
| 853 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) | 857 | (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) |
| 854 | (setq next-error-function 'occur-next-error)) | 858 | (setq next-error-function 'occur-next-error)) |
| 855 | 859 | ||
| 860 | |||
| 861 | ;;; Occur Edit mode | ||
| 862 | |||
| 863 | (defvar occur-edit-mode-map | ||
| 864 | (let ((map (make-sparse-keymap))) | ||
| 865 | (set-keymap-parent map text-mode-map) | ||
| 866 | (define-key map [mouse-2] 'occur-mode-mouse-goto) | ||
| 867 | (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) | ||
| 868 | (define-key map "\C-x\C-q" 'occur-mode) | ||
| 869 | (define-key map "\C-c\C-f" 'next-error-follow-minor-mode) | ||
| 870 | (define-key map [menu-bar occur] (cons (purecopy "Occur") occur-menu-map)) | ||
| 871 | map) | ||
| 872 | "Keymap for `occur-edit-mode'.") | ||
| 873 | |||
| 874 | (define-derived-mode occur-edit-mode occur-mode "Occur-Edit" | ||
| 875 | "Major mode for editing *Occur* buffers. | ||
| 876 | In this mode, changes to the *Occur* buffer are also applied to | ||
| 877 | the originating buffer. | ||
| 878 | |||
| 879 | To return to ordinary Occur mode, use \\[occur-mode]." | ||
| 880 | (setq buffer-read-only nil) | ||
| 881 | (add-hook 'after-change-functions 'occur-after-change-function nil t)) | ||
| 882 | |||
| 883 | (defun occur-after-change-function (beg end length) | ||
| 884 | (save-excursion | ||
| 885 | (goto-char beg) | ||
| 886 | (let* ((m (get-text-property (line-beginning-position) 'occur-target)) | ||
| 887 | (buf (marker-buffer m)) | ||
| 888 | (col (current-column))) | ||
| 889 | (when (= length 0) | ||
| 890 | ;; Apply occur-target property to inserted (e.g. yanked) text. | ||
| 891 | (put-text-property beg end 'occur-target m) | ||
| 892 | ;; Did we insert a newline? Occur Edit mode can't create new | ||
| 893 | ;; Occur entries; just discard everything after the newline. | ||
| 894 | (save-excursion | ||
| 895 | (and (search-forward "\n" end t) | ||
| 896 | (delete-region (1- (point)) end)))) | ||
| 897 | (let ((line (- (line-number-at-pos) | ||
| 898 | (line-number-at-pos (window-start)))) | ||
| 899 | (readonly (with-current-buffer buf buffer-read-only)) | ||
| 900 | (win (or (get-buffer-window buf) | ||
| 901 | (display-buffer buf t))) | ||
| 902 | (text (save-excursion | ||
| 903 | (forward-line 0) | ||
| 904 | (search-forward ":" nil t) | ||
| 905 | (setq col (- col (current-column))) | ||
| 906 | (buffer-substring-no-properties (point) (line-end-position))))) | ||
| 907 | (with-selected-window win | ||
| 908 | (goto-char m) | ||
| 909 | (recenter line) | ||
| 910 | (if readonly | ||
| 911 | (message "Buffer `%s' is read only." buf) | ||
| 912 | (delete-region (line-beginning-position) (line-end-position)) | ||
| 913 | (insert text)) | ||
| 914 | (move-to-column col)))))) | ||
| 915 | |||
| 916 | |||
| 856 | (defun occur-revert-function (_ignore1 _ignore2) | 917 | (defun occur-revert-function (_ignore1 _ignore2) |
| 857 | "Handle `revert-buffer' for Occur mode buffers." | 918 | "Handle `revert-buffer' for Occur mode buffers." |
| 858 | (apply 'occur-1 (append occur-revert-arguments (list (buffer-name))))) | 919 | (apply 'occur-1 (append occur-revert-arguments (list (buffer-name))))) |
| @@ -1280,6 +1341,7 @@ See also `multi-occur'." | |||
| 1280 | `(font-lock-face prefix-face)) | 1341 | `(font-lock-face prefix-face)) |
| 1281 | `(occur-prefix t mouse-face (highlight) | 1342 | `(occur-prefix t mouse-face (highlight) |
| 1282 | occur-target ,marker follow-link t | 1343 | occur-target ,marker follow-link t |
| 1344 | read-only t | ||
| 1283 | help-echo "mouse-2: go to this occurrence")))) | 1345 | help-echo "mouse-2: go to this occurrence")))) |
| 1284 | (match-str | 1346 | (match-str |
| 1285 | ;; We don't put `mouse-face' on the newline, | 1347 | ;; We don't put `mouse-face' on the newline, |
| @@ -1339,13 +1401,15 @@ See also `multi-occur'." | |||
| 1339 | (goto-char headerpt) | 1401 | (goto-char headerpt) |
| 1340 | (let ((beg (point)) | 1402 | (let ((beg (point)) |
| 1341 | end) | 1403 | end) |
| 1342 | (insert (format "%d match%s%s in buffer: %s\n" | 1404 | (insert (propertize |
| 1343 | matches (if (= matches 1) "" "es") | 1405 | (format "%d match%s%s in buffer: %s\n" |
| 1344 | ;; Don't display regexp for multi-buffer. | 1406 | matches (if (= matches 1) "" "es") |
| 1345 | (if (> (length buffers) 1) | 1407 | ;; Don't display regexp for multi-buffer. |
| 1346 | "" (format " for \"%s\"" | 1408 | (if (> (length buffers) 1) |
| 1347 | (query-replace-descr regexp))) | 1409 | "" (format " for \"%s\"" |
| 1348 | (buffer-name buf))) | 1410 | (query-replace-descr regexp))) |
| 1411 | (buffer-name buf)) | ||
| 1412 | 'read-only t)) | ||
| 1349 | (setq end (point)) | 1413 | (setq end (point)) |
| 1350 | (add-text-properties beg end | 1414 | (add-text-properties beg end |
| 1351 | (append | 1415 | (append |
diff --git a/lisp/select.el b/lisp/select.el index 5abbf8f795d..10c8f0b1efd 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -395,10 +395,6 @@ This function returns the string \"emacs\"." | |||
| 395 | (SAVE_TARGETS . xselect-convert-to-save-targets) | 395 | (SAVE_TARGETS . xselect-convert-to-save-targets) |
| 396 | (_EMACS_INTERNAL . xselect-convert-to-identity))) | 396 | (_EMACS_INTERNAL . xselect-convert-to-identity))) |
| 397 | 397 | ||
| 398 | (when (fboundp 'x-clipboard-manager-save) | ||
| 399 | (add-hook 'delete-frame-functions 'x-clipboard-manager-save) | ||
| 400 | (add-hook 'kill-emacs-hook 'x-clipboard-manager-save)) | ||
| 401 | |||
| 402 | (provide 'select) | 398 | (provide 'select) |
| 403 | 399 | ||
| 404 | ;;; select.el ends here | 400 | ;;; select.el ends here |
diff --git a/lisp/startup.el b/lisp/startup.el index 6636cf944e3..26c5a469330 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1739,9 +1739,6 @@ splash screen in another window." | |||
| 1739 | (erase-buffer) | 1739 | (erase-buffer) |
| 1740 | (setq default-directory command-line-default-directory) | 1740 | (setq default-directory command-line-default-directory) |
| 1741 | (set (make-local-variable 'tab-width) 8) | 1741 | (set (make-local-variable 'tab-width) 8) |
| 1742 | (if (not startup) | ||
| 1743 | (set (make-local-variable 'mode-line-format) | ||
| 1744 | (propertize "---- %b %-" 'face 'mode-line-buffer-id))) | ||
| 1745 | 1742 | ||
| 1746 | (if pure-space-overflow | 1743 | (if pure-space-overflow |
| 1747 | (insert pure-space-overflow-message)) | 1744 | (insert pure-space-overflow-message)) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 1049d09d6db..37a9fb8ffe2 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-05-29 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * url-cookie.el (url-cookie): Add option :named so that | ||
| 4 | url-cookie-p is defined. (Bug#8747) | ||
| 5 | |||
| 1 | 2011-05-02 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2011-05-02 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * url-queue.el: New file. | 8 | * url-queue.el: New file. |
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 7fdd8b174c1..78afa1633b6 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -35,17 +35,13 @@ | |||
| 35 | :group 'url) | 35 | :group 'url) |
| 36 | 36 | ||
| 37 | ;; A cookie is stored internally as a vector of 7 slots | 37 | ;; A cookie is stored internally as a vector of 7 slots |
| 38 | ;; [ cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ] | 38 | ;; [ url-cookie NAME VALUE EXPIRES LOCALPART DOMAIN SECURE ] |
| 39 | 39 | ||
| 40 | (defstruct (url-cookie | 40 | (defstruct (url-cookie |
| 41 | (:constructor url-cookie-create) | 41 | (:constructor url-cookie-create) |
| 42 | (:copier nil) | 42 | (:copier nil) |
| 43 | ;; For compatibility with a previous version which did not use | 43 | (:type vector) |
| 44 | ;; defstruct, and also in order to make sure that the printed | 44 | :named) |
| 45 | ;; representation does not depend on CL internals, we use an | ||
| 46 | ;; explicitly managed tag. | ||
| 47 | (:type vector)) | ||
| 48 | (tag 'cookie :read-only t) | ||
| 49 | name value expires localpart domain secure) | 45 | name value expires localpart domain secure) |
| 50 | 46 | ||
| 51 | (defvar url-cookie-storage nil "Where cookies are stored.") | 47 | (defvar url-cookie-storage nil "Where cookies are stored.") |
| @@ -77,8 +73,6 @@ telling Microsoft that." | |||
| 77 | ;; It's completely normal for the cookies file not to exist yet. | 73 | ;; It's completely normal for the cookies file not to exist yet. |
| 78 | (load (or fname url-cookie-file) t t)) | 74 | (load (or fname url-cookie-file) t t)) |
| 79 | 75 | ||
| 80 | (declare-function url-cookie-p "url-cookie" t t) ; defstruct | ||
| 81 | |||
| 82 | (defun url-cookie-clean-up (&optional secure) | 76 | (defun url-cookie-clean-up (&optional secure) |
| 83 | (let ((var (if secure 'url-cookie-secure-storage 'url-cookie-storage)) | 77 | (let ((var (if secure 'url-cookie-secure-storage 'url-cookie-storage)) |
| 84 | new new-cookies) | 78 | new new-cookies) |
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index e58d29b238f..0e44b694e40 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 | |||
| @@ -7,23 +7,19 @@ | |||
| 7 | # gives unlimited permission to copy and/or distribute it, | 7 | # gives unlimited permission to copy and/or distribute it, |
| 8 | # with or without modifications, as long as this notice is preserved. | 8 | # with or without modifications, as long as this notice is preserved. |
| 9 | 9 | ||
| 10 | #serial 2 | 10 | #serial 3 |
| 11 | 11 | ||
| 12 | # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. | 12 | # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. |
| 13 | # New applications should use gl_GETLOADAVG instead. | 13 | # New applications should use gl_GETLOADAVG instead. |
| 14 | 14 | ||
| 15 | # gl_GETLOADAVG(LIBOBJDIR) | 15 | # gl_GETLOADAVG |
| 16 | # ------------------------ | 16 | # ------------- |
| 17 | AC_DEFUN([gl_GETLOADAVG], | 17 | AC_DEFUN([gl_GETLOADAVG], |
| 18 | [AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) | 18 | [AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) |
| 19 | 19 | ||
| 20 | # Persuade glibc <stdlib.h> to declare getloadavg(). | 20 | # Persuade glibc <stdlib.h> to declare getloadavg(). |
| 21 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | 21 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) |
| 22 | 22 | ||
| 23 | # Make sure getloadavg.c is where it belongs, at configure-time. | ||
| 24 | test -f "$srcdir/$1/getloadavg.c" || | ||
| 25 | AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing]) | ||
| 26 | |||
| 27 | gl_save_LIBS=$LIBS | 23 | gl_save_LIBS=$LIBS |
| 28 | 24 | ||
| 29 | # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, | 25 | # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, |
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index c2f80323441..cb9f11a6284 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 | |||
| @@ -96,7 +96,7 @@ gl_MD5 | |||
| 96 | gl_SHA1 | 96 | gl_SHA1 |
| 97 | AC_REQUIRE([gl_C99_STRTOLD]) | 97 | AC_REQUIRE([gl_C99_STRTOLD]) |
| 98 | gl_FILEMODE | 98 | gl_FILEMODE |
| 99 | gl_GETLOADAVG([$gl_source_base]) | 99 | gl_GETLOADAVG |
| 100 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) | 100 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) |
| 101 | gl_FUNC_GETOPT_GNU | 101 | gl_FUNC_GETOPT_GNU |
| 102 | gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) | 102 | gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) |
diff --git a/src/ChangeLog b/src/ChangeLog index f31e68e9b7b..bada9f108f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-05-28 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-05-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use 'inline', not 'INLINE'. | 3 | Use 'inline', not 'INLINE'. |
| 4 | * alloc.c, fontset.c (INLINE): Remove. | 4 | * alloc.c, fontset.c (INLINE): Remove. |
| @@ -8,6 +8,32 @@ | |||
| 8 | * gmalloc.c (register_heapinfo): Use inline unconditionally. | 8 | * gmalloc.c (register_heapinfo): Use inline unconditionally. |
| 9 | * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__. | 9 | * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__. |
| 10 | 10 | ||
| 11 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * image.c: Various fixes to ImageMagick code comments. | ||
| 14 | (Fimagemagick_types): Doc fix. | ||
| 15 | |||
| 16 | 2011-05-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 17 | |||
| 18 | Minor fixes prompted by GCC 4.6.0 warnings. | ||
| 19 | |||
| 20 | * xselect.c (converted_selections, conversion_fail_tag): Now static. | ||
| 21 | |||
| 22 | * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h". | ||
| 23 | (x_clipboard_manager_save_all): Move extern decl to ... | ||
| 24 | * xterm.h: ... here, so that it can be checked for consistency. | ||
| 25 | |||
| 26 | 2011-05-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 27 | |||
| 28 | * xselect.c (x_clipboard_manager_save_frame) | ||
| 29 | (x_clipboard_manager_save_all): New functions. | ||
| 30 | (Fx_clipboard_manager_save): Lisp function deleted. | ||
| 31 | |||
| 32 | * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all. | ||
| 33 | * frame.c (delete_frame): Call x_clipboard_manager_save_frame. | ||
| 34 | |||
| 35 | * xterm.h: Update prototype. | ||
| 36 | |||
| 11 | 2011-05-28 William Xu <william.xwl@gmail.com> | 37 | 2011-05-28 William Xu <william.xwl@gmail.com> |
| 12 | 38 | ||
| 13 | * nsterm.m (ns_term_shutdown): Synchronize user defaults before | 39 | * nsterm.m (ns_term_shutdown): Synchronize user defaults before |
diff --git a/src/coding.c b/src/coding.c index e257790bbef..6ccaf354c74 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -55,8 +55,8 @@ CODING SYSTEM | |||
| 55 | character sequence of emacs-utf-8 to a byte sequence of a specific | 55 | character sequence of emacs-utf-8 to a byte sequence of a specific |
| 56 | coding system. | 56 | coding system. |
| 57 | 57 | ||
| 58 | In Emacs Lisp, a coding system is represented by a Lisp symbol. In | 58 | In Emacs Lisp, a coding system is represented by a Lisp symbol. On |
| 59 | C level, a coding system is represented by a vector of attributes | 59 | the C level, a coding system is represented by a vector of attributes |
| 60 | stored in the hash table Vcharset_hash_table. The conversion from | 60 | stored in the hash table Vcharset_hash_table. The conversion from |
| 61 | coding system symbol to attributes vector is done by looking up | 61 | coding system symbol to attributes vector is done by looking up |
| 62 | Vcharset_hash_table by the symbol. | 62 | Vcharset_hash_table by the symbol. |
diff --git a/src/emacs.c b/src/emacs.c index 8c4490b0a52..cf74963a816 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -65,6 +65,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 65 | #include "nsterm.h" | 65 | #include "nsterm.h" |
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | #ifdef HAVE_X_WINDOWS | ||
| 69 | #include "xterm.h" | ||
| 70 | #endif | ||
| 71 | |||
| 68 | #ifdef HAVE_SETLOCALE | 72 | #ifdef HAVE_SETLOCALE |
| 69 | #include <locale.h> | 73 | #include <locale.h> |
| 70 | #endif | 74 | #endif |
| @@ -1985,6 +1989,11 @@ all of which are called before Emacs is actually killed. */) | |||
| 1985 | 1989 | ||
| 1986 | UNGCPRO; | 1990 | UNGCPRO; |
| 1987 | 1991 | ||
| 1992 | #ifdef HAVE_X_WINDOWS | ||
| 1993 | /* Transfer any clipboards we own to the clipboard manager. */ | ||
| 1994 | x_clipboard_manager_save_all (); | ||
| 1995 | #endif | ||
| 1996 | |||
| 1988 | shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); | 1997 | shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); |
| 1989 | 1998 | ||
| 1990 | /* If we have an auto-save list file, | 1999 | /* If we have an auto-save list file, |
diff --git a/src/font.c b/src/font.c index edbdc958539..398198324a4 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -136,7 +136,7 @@ Lisp_Object Qja, Qko; | |||
| 136 | 136 | ||
| 137 | static Lisp_Object QCuser_spec; | 137 | static Lisp_Object QCuser_spec; |
| 138 | 138 | ||
| 139 | /* Alist of font registry symbol and the corresponding charsets | 139 | /* Alist of font registry symbols and the corresponding charset |
| 140 | information. The information is retrieved from | 140 | information. The information is retrieved from |
| 141 | Vfont_encoding_alist on demand. | 141 | Vfont_encoding_alist on demand. |
| 142 | 142 | ||
| @@ -226,9 +226,9 @@ static int num_font_drivers; | |||
| 226 | 226 | ||
| 227 | 227 | ||
| 228 | /* Return a Lispy value of a font property value at STR and LEN bytes. | 228 | /* Return a Lispy value of a font property value at STR and LEN bytes. |
| 229 | If STR is "*", it returns nil. | 229 | If STR is "*", return nil. |
| 230 | If FORCE_SYMBOL is zero and all characters in STR are digits, it | 230 | If FORCE_SYMBOL is zero and all characters in STR are digits, |
| 231 | returns an integer. Otherwise, it returns a symbol interned from | 231 | return an integer. Otherwise, return a symbol interned from |
| 232 | STR. */ | 232 | STR. */ |
| 233 | 233 | ||
| 234 | Lisp_Object | 234 | Lisp_Object |
| @@ -251,7 +251,7 @@ font_intern_prop (const char *str, int len, int force_symbol) | |||
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | /* The following code is copied from the function intern (in | 253 | /* The following code is copied from the function intern (in |
| 254 | lread.c), and modified to suite our purpose. */ | 254 | lread.c), and modified to suit our purpose. */ |
| 255 | obarray = Vobarray; | 255 | obarray = Vobarray; |
| 256 | if (!VECTORP (obarray) || ASIZE (obarray) == 0) | 256 | if (!VECTORP (obarray) || ASIZE (obarray) == 0) |
| 257 | obarray = check_obarray (obarray); | 257 | obarray = check_obarray (obarray); |
| @@ -305,7 +305,7 @@ font_pixel_size (FRAME_PTR f, Lisp_Object spec) | |||
| 305 | font vector. If VAL is not valid (i.e. not registered in | 305 | font vector. If VAL is not valid (i.e. not registered in |
| 306 | font_style_table), return -1 if NOERROR is zero, and return a | 306 | font_style_table), return -1 if NOERROR is zero, and return a |
| 307 | proper index if NOERROR is nonzero. In that case, register VAL in | 307 | proper index if NOERROR is nonzero. In that case, register VAL in |
| 308 | font_style_table if VAL is a symbol, and return a closest index if | 308 | font_style_table if VAL is a symbol, and return the closest index if |
| 309 | VAL is an integer. */ | 309 | VAL is an integer. */ |
| 310 | 310 | ||
| 311 | int | 311 | int |
| @@ -473,7 +473,7 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct | |||
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | 475 | ||
| 476 | /* Font property value validaters. See the comment of | 476 | /* Font property value validators. See the comment of |
| 477 | font_property_table for the meaning of the arguments. */ | 477 | font_property_table for the meaning of the arguments. */ |
| 478 | 478 | ||
| 479 | static Lisp_Object font_prop_validate (int, Lisp_Object, Lisp_Object); | 479 | static Lisp_Object font_prop_validate (int, Lisp_Object, Lisp_Object); |
| @@ -591,7 +591,7 @@ font_prop_validate_otf (Lisp_Object prop, Lisp_Object val) | |||
| 591 | return val; | 591 | return val; |
| 592 | } | 592 | } |
| 593 | 593 | ||
| 594 | /* Structure of known font property keys and validater of the | 594 | /* Structure of known font property keys and validator of the |
| 595 | values. */ | 595 | values. */ |
| 596 | static const struct | 596 | static const struct |
| 597 | { | 597 | { |
| @@ -742,7 +742,7 @@ enum xlfd_field_mask | |||
| 742 | }; | 742 | }; |
| 743 | 743 | ||
| 744 | 744 | ||
| 745 | /* Parse P pointing the pixel/point size field of the form | 745 | /* Parse P pointing to the pixel/point size field of the form |
| 746 | `[A B C D]' which specifies a transformation matrix: | 746 | `[A B C D]' which specifies a transformation matrix: |
| 747 | 747 | ||
| 748 | A B 0 | 748 | A B 0 |
| @@ -775,7 +775,7 @@ parse_matrix (const char *p) | |||
| 775 | } | 775 | } |
| 776 | 776 | ||
| 777 | /* Expand a wildcard field in FIELD (the first N fields are filled) to | 777 | /* Expand a wildcard field in FIELD (the first N fields are filled) to |
| 778 | multiple fields to fill in all 14 XLFD fields while restring a | 778 | multiple fields to fill in all 14 XLFD fields while restricting a |
| 779 | field position by its contents. */ | 779 | field position by its contents. */ |
| 780 | 780 | ||
| 781 | static int | 781 | static int |
| @@ -2054,14 +2054,14 @@ font_rescale_ratio (Lisp_Object font_entity) | |||
| 2054 | font-spec. The score value is 32 bit (`unsigned'), and the smaller | 2054 | font-spec. The score value is 32 bit (`unsigned'), and the smaller |
| 2055 | the value is, the closer the font is to the font-spec. | 2055 | the value is, the closer the font is to the font-spec. |
| 2056 | 2056 | ||
| 2057 | The lowest 2 bits of the score is used for driver type. The font | 2057 | The lowest 2 bits of the score are used for driver type. The font |
| 2058 | available by the most preferred font driver is 0. | 2058 | available by the most preferred font driver is 0. |
| 2059 | 2059 | ||
| 2060 | Each 7-bit in the higher 28 bits are used for numeric properties | 2060 | The 4 7-bit fields in the higher 28 bits are used for numeric properties |
| 2061 | WEIGHT, SLANT, WIDTH, and SIZE. */ | 2061 | WEIGHT, SLANT, WIDTH, and SIZE. */ |
| 2062 | 2062 | ||
| 2063 | /* How many bits to shift to store the difference value of each font | 2063 | /* How many bits to shift to store the difference value of each font |
| 2064 | property in a score. Note that flots for FONT_TYPE_INDEX and | 2064 | property in a score. Note that floats for FONT_TYPE_INDEX and |
| 2065 | FONT_REGISTRY_INDEX are not used. */ | 2065 | FONT_REGISTRY_INDEX are not used. */ |
| 2066 | static int sort_shift_bits[FONT_SIZE_INDEX + 1]; | 2066 | static int sort_shift_bits[FONT_SIZE_INDEX + 1]; |
| 2067 | 2067 | ||
| @@ -2598,7 +2598,7 @@ font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) | |||
| 2598 | static Lisp_Object scratch_font_spec, scratch_font_prefer; | 2598 | static Lisp_Object scratch_font_spec, scratch_font_prefer; |
| 2599 | 2599 | ||
| 2600 | /* Check each font-entity in VEC, and return a list of font-entities | 2600 | /* Check each font-entity in VEC, and return a list of font-entities |
| 2601 | that satisfy this condition: | 2601 | that satisfy these conditions: |
| 2602 | (1) matches with SPEC and SIZE if SPEC is not nil, and | 2602 | (1) matches with SPEC and SIZE if SPEC is not nil, and |
| 2603 | (2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil). | 2603 | (2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil). |
| 2604 | */ | 2604 | */ |
| @@ -3018,8 +3018,8 @@ font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) | |||
| 3018 | attrs[LFACE_FONT_INDEX] = font; | 3018 | attrs[LFACE_FONT_INDEX] = font; |
| 3019 | } | 3019 | } |
| 3020 | 3020 | ||
| 3021 | /* Selecte a font from ENTITIES (list of font-entity vectors) that | 3021 | /* Select a font from ENTITIES (list of font-entity vectors) that |
| 3022 | supports C and matches best with ATTRS and PIXEL_SIZE. */ | 3022 | supports C and is the best match for ATTRS and PIXEL_SIZE. */ |
| 3023 | 3023 | ||
| 3024 | static Lisp_Object | 3024 | static Lisp_Object |
| 3025 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) | 3025 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) |
| @@ -3062,8 +3062,8 @@ font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, | |||
| 3062 | return font_sort_entities (entities, prefer, frame, c); | 3062 | return font_sort_entities (entities, prefer, frame, c); |
| 3063 | } | 3063 | } |
| 3064 | 3064 | ||
| 3065 | /* Return a font-entity satisfying SPEC and best matching with face's | 3065 | /* Return a font-entity that satisfies SPEC and is the best match for |
| 3066 | font related attributes in ATTRS. C, if not negative, is a | 3066 | face's font related attributes in ATTRS. C, if not negative, is a |
| 3067 | character that the entity must support. */ | 3067 | character that the entity must support. */ |
| 3068 | 3068 | ||
| 3069 | Lisp_Object | 3069 | Lisp_Object |
| @@ -3254,8 +3254,8 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O | |||
| 3254 | } | 3254 | } |
| 3255 | 3255 | ||
| 3256 | 3256 | ||
| 3257 | /* Find a font satisfying SPEC and best matching with face's | 3257 | /* Find a font that satisfies SPEC and is the best match for |
| 3258 | attributes in ATTRS on FRAME, and return the opened | 3258 | face's attributes in ATTRS on FRAME, and return the opened |
| 3259 | font-object. */ | 3259 | font-object. */ |
| 3260 | 3260 | ||
| 3261 | Lisp_Object | 3261 | Lisp_Object |
| @@ -3267,8 +3267,7 @@ font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) | |||
| 3267 | if (NILP (entity)) | 3267 | if (NILP (entity)) |
| 3268 | { | 3268 | { |
| 3269 | /* No font is listed for SPEC, but each font-backend may have | 3269 | /* No font is listed for SPEC, but each font-backend may have |
| 3270 | the different criteria about "font matching". So, try | 3270 | different criteria about "font matching". So, try it. */ |
| 3271 | it. */ | ||
| 3272 | entity = font_matching_entity (f, attrs, spec); | 3271 | entity = font_matching_entity (f, attrs, spec); |
| 3273 | if (NILP (entity)) | 3272 | if (NILP (entity)) |
| 3274 | return Qnil; | 3273 | return Qnil; |
| @@ -3307,7 +3306,7 @@ font_done_for_face (FRAME_PTR f, struct face *face) | |||
| 3307 | } | 3306 | } |
| 3308 | 3307 | ||
| 3309 | 3308 | ||
| 3310 | /* Open a font matching with font-spec SPEC on frame F. If no proper | 3309 | /* Open a font that is a match for font-spec SPEC on frame F. If no proper |
| 3311 | font is found, return Qnil. */ | 3310 | font is found, return Qnil. */ |
| 3312 | 3311 | ||
| 3313 | Lisp_Object | 3312 | Lisp_Object |
| @@ -3331,7 +3330,7 @@ font_open_by_spec (FRAME_PTR f, Lisp_Object spec) | |||
| 3331 | } | 3330 | } |
| 3332 | 3331 | ||
| 3333 | 3332 | ||
| 3334 | /* Open a font matching with NAME on frame F. If no proper font is | 3333 | /* Open a font that matches NAME on frame F. If no proper font is |
| 3335 | found, return Qnil. */ | 3334 | found, return Qnil. */ |
| 3336 | 3335 | ||
| 3337 | Lisp_Object | 3336 | Lisp_Object |
| @@ -3355,7 +3354,7 @@ font_open_by_name (FRAME_PTR f, const char *name) | |||
| 3355 | /* Register font-driver DRIVER. This function is used in two ways. | 3354 | /* Register font-driver DRIVER. This function is used in two ways. |
| 3356 | 3355 | ||
| 3357 | The first is with frame F non-NULL. In this case, make DRIVER | 3356 | The first is with frame F non-NULL. In this case, make DRIVER |
| 3358 | available (but not yet activated) on F. All frame creaters | 3357 | available (but not yet activated) on F. All frame creators |
| 3359 | (e.g. Fx_create_frame) must call this function at least once with | 3358 | (e.g. Fx_create_frame) must call this function at least once with |
| 3360 | an available font-driver. | 3359 | an available font-driver. |
| 3361 | 3360 | ||
| @@ -3682,7 +3681,7 @@ font_at (int c, EMACS_INT pos, struct face *face, struct window *w, | |||
| 3682 | #ifdef HAVE_WINDOW_SYSTEM | 3681 | #ifdef HAVE_WINDOW_SYSTEM |
| 3683 | 3682 | ||
| 3684 | /* Check how many characters after POS (at most to *LIMIT) can be | 3683 | /* Check how many characters after POS (at most to *LIMIT) can be |
| 3685 | displayed by the same font on the window W. FACE, if non-NULL, is | 3684 | displayed by the same font in the window W. FACE, if non-NULL, is |
| 3686 | the face selected for the character at POS. If STRING is not nil, | 3685 | the face selected for the character at POS. If STRING is not nil, |
| 3687 | it is the string to check instead of the current buffer. In that | 3686 | it is the string to check instead of the current buffer. In that |
| 3688 | case, FACE must be not NULL. | 3687 | case, FACE must be not NULL. |
| @@ -3826,7 +3825,7 @@ GSUB and GPOS may contain `nil' element. In such a case, the font | |||
| 3826 | must not have any of the remaining elements. | 3825 | must not have any of the remaining elements. |
| 3827 | 3826 | ||
| 3828 | For instance, if the VALUE is `(thai nil nil (mark))', the font must | 3827 | For instance, if the VALUE is `(thai nil nil (mark))', the font must |
| 3829 | be an OpenType font, and whose GPOS table of `thai' script's default | 3828 | be an OpenType font whose GPOS table of `thai' script's default |
| 3830 | language system must contain `mark' feature. | 3829 | language system must contain `mark' feature. |
| 3831 | 3830 | ||
| 3832 | usage: (font-spec ARGS...) */) | 3831 | usage: (font-spec ARGS...) */) |
| @@ -4189,7 +4188,7 @@ DEFUN ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, | |||
| 4189 | FONT is a font-spec, font-entity, or font-object. | 4188 | FONT is a font-spec, font-entity, or font-object. |
| 4190 | If the name is too long for XLFD (maximum 255 chars), return nil. | 4189 | If the name is too long for XLFD (maximum 255 chars), return nil. |
| 4191 | If the 2nd optional arg FOLD-WILDCARDS is non-nil, | 4190 | If the 2nd optional arg FOLD-WILDCARDS is non-nil, |
| 4192 | the consecutive wildcards are folded to one. */) | 4191 | the consecutive wildcards are folded into one. */) |
| 4193 | (Lisp_Object font, Lisp_Object fold_wildcards) | 4192 | (Lisp_Object font, Lisp_Object fold_wildcards) |
| 4194 | { | 4193 | { |
| 4195 | char name[256]; | 4194 | char name[256]; |
| @@ -4436,7 +4435,7 @@ the value is 0. | |||
| 4436 | If GSTRING-OUT is too short to hold produced glyphs, no glyphs are | 4435 | If GSTRING-OUT is too short to hold produced glyphs, no glyphs are |
| 4437 | produced in GSTRING-OUT, and the value is nil. | 4436 | produced in GSTRING-OUT, and the value is nil. |
| 4438 | 4437 | ||
| 4439 | See the documentation of `font-make-gstring' for the format of | 4438 | See the documentation of `composition-get-gstring' for the format of |
| 4440 | glyph-string. */) | 4439 | glyph-string. */) |
| 4441 | (Lisp_Object otf_features, Lisp_Object gstring_in, Lisp_Object from, Lisp_Object to, Lisp_Object gstring_out, Lisp_Object index) | 4440 | (Lisp_Object otf_features, Lisp_Object gstring_in, Lisp_Object from, Lisp_Object to, Lisp_Object gstring_out, Lisp_Object index) |
| 4442 | { | 4441 | { |
| @@ -4571,10 +4570,10 @@ The value is a vector: | |||
| 4571 | [ NAME FILENAME PIXEL-SIZE SIZE ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH | 4570 | [ NAME FILENAME PIXEL-SIZE SIZE ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH |
| 4572 | CAPABILITY ] | 4571 | CAPABILITY ] |
| 4573 | 4572 | ||
| 4574 | NAME is a string of the font name (or nil if the font backend doesn't | 4573 | NAME is the font name, a string (or nil if the font backend doesn't |
| 4575 | provide a name). | 4574 | provide a name). |
| 4576 | 4575 | ||
| 4577 | FILENAME is a string of the font file (or nil if the font backend | 4576 | FILENAME is the font file name, a string (or nil if the font backend |
| 4578 | doesn't provide a file name). | 4577 | doesn't provide a file name). |
| 4579 | 4578 | ||
| 4580 | PIXEL-SIZE is a pixel size by which the font is opened. | 4579 | PIXEL-SIZE is a pixel size by which the font is opened. |
diff --git a/src/font.h b/src/font.h index 4b3ceed1dd3..0ca9e8baec4 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -36,22 +36,22 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | 36 | ||
| 37 | FONT-ENTITY | 37 | FONT-ENTITY |
| 38 | 38 | ||
| 39 | Pseudo vector (length FONT_ENTITY_MAX) of fully instanciated | 39 | Pseudo vector (length FONT_ENTITY_MAX) of fully instantiated |
| 40 | font properties that a font-driver returns upon a request of | 40 | font properties that a font-driver returns upon a request of |
| 41 | FONT-SPEC. | 41 | FONT-SPEC. |
| 42 | 42 | ||
| 43 | Note: Only the method `list' and `match' of a font-driver can | 43 | Note: Only the method `list' and `match' of a font-driver can |
| 44 | create this object, and should never be modified by Lisp. | 44 | create this object, and it should never be modified by Lisp. |
| 45 | 45 | ||
| 46 | FONT-OBJECT | 46 | FONT-OBJECT |
| 47 | 47 | ||
| 48 | Pseudo vector (length FONT_OBJECT_MAX) of a opend font. | 48 | Pseudo vector (length FONT_OBJECT_MAX) of an opened font. |
| 49 | 49 | ||
| 50 | Lisp object encapsulating "struct font". This corresponds to | 50 | Lisp object encapsulating "struct font". This corresponds to |
| 51 | an opened font. | 51 | an opened font. |
| 52 | 52 | ||
| 53 | Note: Only the method `open' of a font-driver can create this | 53 | Note: Only the method `open' of a font-driver can create this |
| 54 | object, and should never be modified by Lisp. */ | 54 | object, and it should never be modified by Lisp. */ |
| 55 | 55 | ||
| 56 | extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 56 | extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
| 57 | 57 | ||
| @@ -68,7 +68,7 @@ struct glyph_string; | |||
| 68 | enum font_property_index | 68 | enum font_property_index |
| 69 | { | 69 | { |
| 70 | /* FONT-TYPE is a symbol indicating a font backend; currently `x', | 70 | /* FONT-TYPE is a symbol indicating a font backend; currently `x', |
| 71 | `xft', `ftx' are available on X, `uniscribe' and `gdi' on | 71 | `xft', and `ftx' are available on X, `uniscribe' and `gdi' on |
| 72 | Windows, and `ns' under Cocoa / GNUstep. */ | 72 | Windows, and `ns' under Cocoa / GNUstep. */ |
| 73 | FONT_TYPE_INDEX, | 73 | FONT_TYPE_INDEX, |
| 74 | 74 | ||
| @@ -86,26 +86,26 @@ enum font_property_index | |||
| 86 | FONT_REGISTRY_INDEX, | 86 | FONT_REGISTRY_INDEX, |
| 87 | 87 | ||
| 88 | /* FONT-WEIGHT is a numeric value of weight (e.g. medium, bold) of | 88 | /* FONT-WEIGHT is a numeric value of weight (e.g. medium, bold) of |
| 89 | the font. The lowest 8-bit is an index determining the | 89 | the font. The lowest 8 bits is an index determining the |
| 90 | symbolic name, and the higher bits is the actual numeric value | 90 | symbolic name, and the higher bits is the actual numeric value |
| 91 | defined in `font-weight-table'. */ | 91 | defined in `font-weight-table'. */ |
| 92 | FONT_WEIGHT_INDEX, | 92 | FONT_WEIGHT_INDEX, |
| 93 | 93 | ||
| 94 | /* FONT-SLANT is a numeric value of slant (e.g. r, i, o) of the | 94 | /* FONT-SLANT is a numeric value of slant (e.g. r, i, o) of the |
| 95 | font. The lowest 8-bit is an index determining the symbolic | 95 | font. The lowest 8 bits is an index determining the symbolic |
| 96 | name, and the higher bits is the actual numeric value defined | 96 | name, and the higher bits is the actual numeric value defined |
| 97 | in `font-slant-table'. */ | 97 | in `font-slant-table'. */ |
| 98 | FONT_SLANT_INDEX, | 98 | FONT_SLANT_INDEX, |
| 99 | 99 | ||
| 100 | /* FONT-WIDTH is a numeric value of setwidth (e.g. normal) of the | 100 | /* FONT-WIDTH is a numeric value of setwidth (e.g. normal) of the |
| 101 | font. The lowest 8-bit is an index determining the symbolic | 101 | font. The lowest 8 bits is an index determining the symbolic |
| 102 | name, and the higher bits is the actual numeric value defined | 102 | name, and the higher bits is the actual numeric value defined |
| 103 | `font-width-table'. */ | 103 | `font-width-table'. */ |
| 104 | FONT_WIDTH_INDEX, | 104 | FONT_WIDTH_INDEX, |
| 105 | 105 | ||
| 106 | /* FONT-SIZE is a size of the font. If integer, it is a pixel | 106 | /* FONT-SIZE is a size of the font. If integer, it is a pixel |
| 107 | size. For a font-spec, the value can be float specifying a | 107 | size. For a font-spec, the value can be a float specifying |
| 108 | point size. The value zero means that the font is | 108 | the point size. The value zero means that the font is |
| 109 | scalable. */ | 109 | scalable. */ |
| 110 | FONT_SIZE_INDEX, | 110 | FONT_SIZE_INDEX, |
| 111 | 111 | ||
| @@ -129,18 +129,18 @@ enum font_property_index | |||
| 129 | 129 | ||
| 130 | /* FONT-STYLE is a 24-bit integer containing indices for | 130 | /* FONT-STYLE is a 24-bit integer containing indices for |
| 131 | style-related properties WEIGHT, SLANT, and WIDTH. The lowest | 131 | style-related properties WEIGHT, SLANT, and WIDTH. The lowest |
| 132 | 8-bit is an indice to the weight table AREF (font_style_table, | 132 | 8 bits is an index to the weight table AREF (font_style_table, |
| 133 | 0), the next 8-bit is an indice to the slant table AREF | 133 | 0), the next 8 bits is an index to the slant table AREF |
| 134 | (font_style_table, 1), the highest 8-bit is an indice to the | 134 | (font_style_table, 1), the highest 8 bits is an index to the |
| 135 | slant table AREF (font_style_table, 2). The indice 0 indicates | 135 | slant table AREF (font_style_table, 2). The index 0 indicates |
| 136 | that the corresponding style is not specified. This way, we | 136 | that the corresponding style is not specified. This way, we |
| 137 | can represent at most 255 different names for each style, which | 137 | can represent at most 255 different names for each style, which |
| 138 | is surely sufficient. */ | 138 | is surely sufficient. */ |
| 139 | FONT_STYLE_INDEX, | 139 | FONT_STYLE_INDEX, |
| 140 | 140 | ||
| 141 | /* FONT-METRICS is a 27-bit integer containing metrics-related | 141 | /* FONT-METRICS is a 27-bit integer containing metrics-related |
| 142 | properties DPI, AVGWIDTH, SPACING. The lowest 12-bit is for | 142 | properties DPI, AVGWIDTH, SPACING. The lowest 12 bits is for |
| 143 | DPI, the next 12-bit is for AVGWIDTH, the highest 3-bit is for | 143 | DPI, the next 12 bits is for AVGWIDTH, the highest 3 bits is for |
| 144 | SPACING. In each bit field, the highest bit indicates that the | 144 | SPACING. In each bit field, the highest bit indicates that the |
| 145 | corresponding value is set or not. This way, we can represent | 145 | corresponding value is set or not. This way, we can represent |
| 146 | DPI by 11-bit (0 to 2047), AVGWIDTH by 11-bit (0 to 2047), | 146 | DPI by 11-bit (0 to 2047), AVGWIDTH by 11-bit (0 to 2047), |
| @@ -176,7 +176,7 @@ enum font_property_index | |||
| 176 | FONT_NAME_INDEX = FONT_ENTITY_MAX, | 176 | FONT_NAME_INDEX = FONT_ENTITY_MAX, |
| 177 | 177 | ||
| 178 | /* Full name of the font (string). It is the name extracted from | 178 | /* Full name of the font (string). It is the name extracted from |
| 179 | the opend font, and may be different from the above. It may be | 179 | the opened font, and may be different from the above. It may be |
| 180 | nil if the opened font doesn't give a name. */ | 180 | nil if the opened font doesn't give a name. */ |
| 181 | FONT_FULLNAME_INDEX, | 181 | FONT_FULLNAME_INDEX, |
| 182 | 182 | ||
| @@ -300,7 +300,7 @@ struct font | |||
| 300 | int space_width; | 300 | int space_width; |
| 301 | 301 | ||
| 302 | /* Average width of glyphs in the font. If the font itself doesn't | 302 | /* Average width of glyphs in the font. If the font itself doesn't |
| 303 | have that information but has glyphs of ASCII character, the | 303 | have that information but has glyphs of ASCII characters, the |
| 304 | value is the average with of those glyphs. Otherwise, the value | 304 | value is the average with of those glyphs. Otherwise, the value |
| 305 | is 0. */ | 305 | is 0. */ |
| 306 | int average_width; | 306 | int average_width; |
| @@ -321,7 +321,7 @@ struct font | |||
| 321 | int underline_position; | 321 | int underline_position; |
| 322 | 322 | ||
| 323 | /* 1 if `vertical-centering-font-regexp' matches this font name. | 323 | /* 1 if `vertical-centering-font-regexp' matches this font name. |
| 324 | In this case, we render characters at vartical center positions | 324 | In this case, we render characters at vertical center positions |
| 325 | of lines. */ | 325 | of lines. */ |
| 326 | int vertical_centering; | 326 | int vertical_centering; |
| 327 | 327 | ||
| @@ -335,27 +335,27 @@ struct font | |||
| 335 | unsigned char encoding_type; | 335 | unsigned char encoding_type; |
| 336 | 336 | ||
| 337 | /* The baseline position of a font is normally `ascent' value of the | 337 | /* The baseline position of a font is normally `ascent' value of the |
| 338 | font. However, there exists many fonts which don't set `ascent' | 338 | font. However, there exist many fonts which don't set `ascent' to |
| 339 | an appropriate value to be used as baseline position. This is | 339 | an appropriate value to be used as baseline position. This is |
| 340 | typical in such ASCII fonts which are designed to be used with | 340 | typical in such ASCII fonts which are designed to be used with |
| 341 | Chinese, Japanese, Korean characters. When we use mixture of | 341 | Chinese, Japanese, Korean characters. When we use mixture of |
| 342 | such fonts and normal fonts (having correct `ascent' value), a | 342 | such fonts and normal fonts (having correct `ascent' value), a |
| 343 | display line gets very ugly. Since we have no way to fix it | 343 | display line gets very ugly. Since we have no way to fix it |
| 344 | automatically, it is users responsibility to supply well designed | 344 | automatically, it is user's responsibility to supply well designed |
| 345 | fonts or correct `ascent' value of fonts. But, the latter | 345 | fonts or correct `ascent' value of fonts. But, the latter |
| 346 | requires heavy work (modifying all bitmap data in BDF files). | 346 | requires heavy work (modifying all bitmap data in BDF files). |
| 347 | So, Emacs accepts a private font property | 347 | So, Emacs accepts a private font property |
| 348 | `_MULE_BASELINE_OFFSET'. If a font has this property, we | 348 | `_MULE_BASELINE_OFFSET'. If a font has this property, we |
| 349 | calculate the baseline position by subtracting the value from | 349 | calculate the baseline position by subtracting the value from |
| 350 | `ascent'. In other words, the value indicates how many bits | 350 | `ascent'. In other words, the value indicates how many pixels |
| 351 | higher we should draw a character of the font than normal ASCII | 351 | higher than normal ASCII text we should draw a character of the |
| 352 | text for a better looking. | 352 | font for better appearance. |
| 353 | 353 | ||
| 354 | We also have to consider the fact that the concept of `baseline' | 354 | We also have to consider the fact that the concept of `baseline' |
| 355 | differs among scripts to which each character belongs. For | 355 | differs among scripts to which each character belongs. For |
| 356 | instance, baseline should be at the bottom most position of all | 356 | instance, baseline should be at the bottom-most position of all |
| 357 | glyphs for Chinese, Japanese, and Korean. But, many of existing | 357 | glyphs for Chinese, Japanese, and Korean. But, many of existing |
| 358 | fonts for those characters doesn't have correct `ascent' values | 358 | fonts for those characters don't have correct `ascent' values |
| 359 | because they are designed to be used with ASCII fonts. To | 359 | because they are designed to be used with ASCII fonts. To |
| 360 | display characters of different language on the same line, the | 360 | display characters of different language on the same line, the |
| 361 | best way will be to arrange them in the middle of the line. So, | 361 | best way will be to arrange them in the middle of the line. So, |
| @@ -365,20 +365,20 @@ struct font | |||
| 365 | of a line. */ | 365 | of a line. */ |
| 366 | int baseline_offset; | 366 | int baseline_offset; |
| 367 | 367 | ||
| 368 | /* Non zero means a character should be composed at a position | 368 | /* Non-zero means a character should be composed at a position |
| 369 | relative to the height (or depth) of previous glyphs in the | 369 | relative to the height (or depth) of previous glyphs in the |
| 370 | following cases: | 370 | following cases: |
| 371 | (1) The bottom of the character is higher than this value. In | 371 | (1) The bottom of the character is higher than this value. In |
| 372 | this case, the character is drawn above the previous glyphs. | 372 | this case, the character is drawn above the previous glyphs. |
| 373 | (2) The top of the character is lower than 0 (i.e. baseline | 373 | (2) The top of the character is lower than 0 (i.e. baseline |
| 374 | height). In this case, the character is drawn beneath the | 374 | height). In this case, the character is drawn below the |
| 375 | previous glyphs. | 375 | previous glyphs. |
| 376 | 376 | ||
| 377 | This value is taken from a private font property | 377 | This value is taken from a private font property |
| 378 | `_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */ | 378 | `_MULE_RELATIVE_COMPOSE' which is introduced by Emacs. */ |
| 379 | int relative_compose; | 379 | int relative_compose; |
| 380 | 380 | ||
| 381 | /* Non zero means an ascent value to be used for a character | 381 | /* Non-zero means an ascent value to be used for a character |
| 382 | registered in char-table `use-default-ascent'. */ | 382 | registered in char-table `use-default-ascent'. */ |
| 383 | int default_ascent; | 383 | int default_ascent; |
| 384 | 384 | ||
| @@ -398,8 +398,8 @@ struct font | |||
| 398 | determine it. */ | 398 | determine it. */ |
| 399 | int repertory_charset; | 399 | int repertory_charset; |
| 400 | 400 | ||
| 401 | /* There will be more to this structure, but they are private to a | 401 | /* There are more members in this structure, but they are private |
| 402 | font-driver. */ | 402 | to the font-driver. */ |
| 403 | }; | 403 | }; |
| 404 | 404 | ||
| 405 | enum font_spacing | 405 | enum font_spacing |
| @@ -484,8 +484,8 @@ struct font_bitmap | |||
| 484 | #define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5) | 484 | #define POINT_TO_PIXEL(POINT, DPI) ((POINT) * (DPI) / PT_PER_INCH + 0.5) |
| 485 | 485 | ||
| 486 | /* Return a point size corresponding to POINT size (integer) | 486 | /* Return a point size corresponding to POINT size (integer) |
| 487 | on resolution DPI. Note that though point size is a double, we expect | 487 | on resolution DPI. Note that though point size is a double, we expect |
| 488 | it to be rounded to an int, so we add 0.5 here. If the desired value | 488 | it to be rounded to an int, so we add 0.5 here. If the desired value |
| 489 | is tenths of points (as in xfld specs), then the pixel size should | 489 | is tenths of points (as in xfld specs), then the pixel size should |
| 490 | be multiplied BEFORE the conversion to avoid magnifying the error. */ | 490 | be multiplied BEFORE the conversion to avoid magnifying the error. */ |
| 491 | #define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5) | 491 | #define PIXEL_TO_POINT(PIXEL, DPI) ((PIXEL) * PT_PER_INCH / (DPI) + 0.5) |
| @@ -582,7 +582,7 @@ struct font_driver | |||
| 582 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ | 582 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ |
| 583 | unsigned (*encode_char) (struct font *font, int c); | 583 | unsigned (*encode_char) (struct font *font, int c); |
| 584 | 584 | ||
| 585 | /* Computate the total metrics of the NGLYPHS glyphs specified by | 585 | /* Compute the total metrics of the NGLYPHS glyphs specified by |
| 586 | the font FONT and the sequence of glyph codes CODE, and store the | 586 | the font FONT and the sequence of glyph codes CODE, and store the |
| 587 | result in METRICS. */ | 587 | result in METRICS. */ |
| 588 | int (*text_extents) (struct font *font, | 588 | int (*text_extents) (struct font *font, |
| @@ -635,7 +635,7 @@ struct font_driver | |||
| 635 | 635 | ||
| 636 | FEATURES specifies which OTF features to apply in this format: | 636 | FEATURES specifies which OTF features to apply in this format: |
| 637 | (SCRIPT LANGSYS GSUB-FEATURE GPOS-FEATURE) | 637 | (SCRIPT LANGSYS GSUB-FEATURE GPOS-FEATURE) |
| 638 | See the documentation of `font-drive-otf' for the detail. | 638 | See the documentation of `font-drive-otf' for the details. |
| 639 | 639 | ||
| 640 | This method applies the specified features to the codes in the | 640 | This method applies the specified features to the codes in the |
| 641 | elements of GSTRING-IN (between FROMth and TOth). The output | 641 | elements of GSTRING-IN (between FROMth and TOth). The output |
| @@ -710,7 +710,7 @@ struct font_driver | |||
| 710 | 710 | ||
| 711 | struct font_driver_list | 711 | struct font_driver_list |
| 712 | { | 712 | { |
| 713 | /* 1 iff this driver is currently used. It is igonred in the global | 713 | /* 1 iff this driver is currently used. It is ignored in the global |
| 714 | font driver list.*/ | 714 | font driver list.*/ |
| 715 | int on; | 715 | int on; |
| 716 | /* Pointer to the font driver. */ | 716 | /* Pointer to the font driver. */ |
diff --git a/src/frame.c b/src/frame.c index ce92a83b86c..74e222f85fc 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1347,7 +1347,14 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1347 | = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), | 1347 | = Fcons (list3 (Qrun_hook_with_args, Qdelete_frame_functions, frame), |
| 1348 | pending_funcalls); | 1348 | pending_funcalls); |
| 1349 | else | 1349 | else |
| 1350 | safe_call2 (Qrun_hook_with_args, Qdelete_frame_functions, frame); | 1350 | { |
| 1351 | #ifdef HAVE_X_WINDOWS | ||
| 1352 | /* Also, save clipboard to the the clipboard manager. */ | ||
| 1353 | x_clipboard_manager_save_frame (frame); | ||
| 1354 | #endif | ||
| 1355 | |||
| 1356 | safe_call2 (Qrun_hook_with_args, Qdelete_frame_functions, frame); | ||
| 1357 | } | ||
| 1351 | 1358 | ||
| 1352 | /* The hook may sometimes (indirectly) cause the frame to be deleted. */ | 1359 | /* The hook may sometimes (indirectly) cause the frame to be deleted. */ |
| 1353 | if (! FRAME_LIVE_P (f)) | 1360 | if (! FRAME_LIVE_P (f)) |
diff --git a/src/image.c b/src/image.c index d3702a180c6..0f269f46492 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7352,6 +7352,10 @@ gif_load (struct frame *f, struct image *img) | |||
| 7352 | 7352 | ||
| 7353 | Lisp_Object Qimagemagick; | 7353 | Lisp_Object Qimagemagick; |
| 7354 | 7354 | ||
| 7355 | static int imagemagick_image_p (Lisp_Object); | ||
| 7356 | static int imagemagick_load (struct frame *, struct image *); | ||
| 7357 | static void imagemagick_clear_image (struct frame *, struct image *); | ||
| 7358 | |||
| 7355 | /* Indices of image specification fields in imagemagick_format. */ | 7359 | /* Indices of image specification fields in imagemagick_format. */ |
| 7356 | 7360 | ||
| 7357 | enum imagemagick_keyword_index | 7361 | enum imagemagick_keyword_index |
| @@ -7394,6 +7398,18 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] = | |||
| 7394 | {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} | 7398 | {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} |
| 7395 | }; | 7399 | }; |
| 7396 | 7400 | ||
| 7401 | /* Structure describing the image type for any image handled via | ||
| 7402 | ImageMagick. */ | ||
| 7403 | |||
| 7404 | static struct image_type imagemagick_type = | ||
| 7405 | { | ||
| 7406 | &Qimagemagick, | ||
| 7407 | imagemagick_image_p, | ||
| 7408 | imagemagick_load, | ||
| 7409 | imagemagick_clear_image, | ||
| 7410 | NULL | ||
| 7411 | }; | ||
| 7412 | |||
| 7397 | /* Free X resources of imagemagick image IMG which is used on frame F. */ | 7413 | /* Free X resources of imagemagick image IMG which is used on frame F. */ |
| 7398 | 7414 | ||
| 7399 | static void | 7415 | static void |
| @@ -7425,34 +7441,27 @@ imagemagick_image_p (Lisp_Object object) | |||
| 7425 | #define DrawRectangle DrawRectangleGif | 7441 | #define DrawRectangle DrawRectangleGif |
| 7426 | #include <wand/MagickWand.h> | 7442 | #include <wand/MagickWand.h> |
| 7427 | 7443 | ||
| 7428 | /* imagemagick_load_image is a helper function for imagemagick_load, | 7444 | /* Helper function for imagemagick_load, which does the actual loading |
| 7429 | which does the actual loading given contents and size, apart from | 7445 | given contents and size, apart from frame and image structures, |
| 7430 | frame and image structures, passed from imagemagick_load. | 7446 | passed from imagemagick_load. Uses librimagemagick to do most of |
| 7447 | the image processing. | ||
| 7431 | 7448 | ||
| 7432 | Uses librimagemagick to do most of the image processing. | 7449 | F is a pointer to the Emacs frame; IMG to the image structure to |
| 7450 | prepare; CONTENTS is the string containing the IMAGEMAGICK data to | ||
| 7451 | be parsed; SIZE is the number of bytes of data; and FILENAME is | ||
| 7452 | either the file name or the image data. | ||
| 7433 | 7453 | ||
| 7434 | Return non-zero if successful. | 7454 | Return non-zero if successful. */ |
| 7435 | */ | ||
| 7436 | 7455 | ||
| 7437 | static int | 7456 | static int |
| 7438 | imagemagick_load_image (/* Pointer to emacs frame structure. */ | 7457 | imagemagick_load_image (struct frame *f, struct image *img, |
| 7439 | struct frame *f, | 7458 | unsigned char *contents, unsigned int size, |
| 7440 | /* Pointer to emacs image structure. */ | 7459 | unsigned char *filename) |
| 7441 | struct image *img, | ||
| 7442 | /* String containing the IMAGEMAGICK data to | ||
| 7443 | be parsed. */ | ||
| 7444 | unsigned char *contents, | ||
| 7445 | /* Size of data in bytes. */ | ||
| 7446 | unsigned int size, | ||
| 7447 | /* Filename, either pass filename or | ||
| 7448 | contents/size. */ | ||
| 7449 | unsigned char *filename) | ||
| 7450 | { | 7460 | { |
| 7451 | unsigned long width; | 7461 | unsigned long width; |
| 7452 | unsigned long height; | 7462 | unsigned long height; |
| 7453 | 7463 | ||
| 7454 | MagickBooleanType | 7464 | MagickBooleanType status; |
| 7455 | status; | ||
| 7456 | 7465 | ||
| 7457 | XImagePtr ximg; | 7466 | XImagePtr ximg; |
| 7458 | Lisp_Object specified_bg; | 7467 | Lisp_Object specified_bg; |
| @@ -7514,8 +7523,8 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7514 | 7523 | ||
| 7515 | DestroyMagickWand (ping_wand); | 7524 | DestroyMagickWand (ping_wand); |
| 7516 | 7525 | ||
| 7517 | /* Now, after pinging, we know how many images are inside the | 7526 | /* Now we know how many images are inside the file. If it's not a |
| 7518 | file. If it's not a bundle, the number is one. */ | 7527 | bundle, the number is one. */ |
| 7519 | 7528 | ||
| 7520 | if (filename != NULL) | 7529 | if (filename != NULL) |
| 7521 | { | 7530 | { |
| @@ -7628,8 +7637,8 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7628 | } | 7637 | } |
| 7629 | } | 7638 | } |
| 7630 | 7639 | ||
| 7631 | /* Finaly we are done manipulating the image, figure out resulting | 7640 | /* Finally we are done manipulating the image. Figure out the |
| 7632 | width, height, and then transfer ownerwship to Emacs. */ | 7641 | resulting width/height and transfer ownerwship to Emacs. */ |
| 7633 | height = MagickGetImageHeight (image_wand); | 7642 | height = MagickGetImageHeight (image_wand); |
| 7634 | width = MagickGetImageWidth (image_wand); | 7643 | width = MagickGetImageWidth (image_wand); |
| 7635 | 7644 | ||
| @@ -7784,8 +7793,7 @@ imagemagick_load_image (/* Pointer to emacs frame structure. */ | |||
| 7784 | the prototype thus needs to be compatible with that structure. */ | 7793 | the prototype thus needs to be compatible with that structure. */ |
| 7785 | 7794 | ||
| 7786 | static int | 7795 | static int |
| 7787 | imagemagick_load (struct frame *f, | 7796 | imagemagick_load (struct frame *f, struct image *img) |
| 7788 | struct image *img) | ||
| 7789 | { | 7797 | { |
| 7790 | int success_p = 0; | 7798 | int success_p = 0; |
| 7791 | Lisp_Object file_name; | 7799 | Lisp_Object file_name; |
| @@ -7823,36 +7831,18 @@ imagemagick_load (struct frame *f, | |||
| 7823 | return success_p; | 7831 | return success_p; |
| 7824 | } | 7832 | } |
| 7825 | 7833 | ||
| 7826 | /* Structure describing the image type `imagemagick'. Its the same | ||
| 7827 | type of structure defined for all image formats, handled by Emacs | ||
| 7828 | image functions. See struct image_type in dispextern.h. */ | ||
| 7829 | |||
| 7830 | static struct image_type imagemagick_type = | ||
| 7831 | { | ||
| 7832 | /* An identifier showing that this is an image structure for the | ||
| 7833 | IMAGEMAGICK format. */ | ||
| 7834 | &Qimagemagick, | ||
| 7835 | /* Handle to a function that can be used to identify a IMAGEMAGICK | ||
| 7836 | file. */ | ||
| 7837 | imagemagick_image_p, | ||
| 7838 | /* Handle to function used to load a IMAGEMAGICK file. */ | ||
| 7839 | imagemagick_load, | ||
| 7840 | /* Handle to function to free resources for IMAGEMAGICK. */ | ||
| 7841 | imagemagick_clear_image, | ||
| 7842 | /* An internal field to link to the next image type in a list of | ||
| 7843 | image types, will be filled in when registering the format. */ | ||
| 7844 | NULL | ||
| 7845 | }; | ||
| 7846 | |||
| 7847 | |||
| 7848 | DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, | 7834 | DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, |
| 7849 | doc: /* Return the image types supported by ImageMagick. | 7835 | doc: /* Return a list of image types supported by ImageMagick. |
| 7850 | Note that ImageMagick recognizes many file-types that Emacs does not recognize | 7836 | Each entry in this list is a symbol named after an ImageMagick format |
| 7851 | as images, such as .c. */) | 7837 | tag. See the ImageMagick manual for a list of ImageMagick formats and |
| 7838 | their descriptions (http://www.imagemagick.org/script/formats.php). | ||
| 7839 | |||
| 7840 | Note that ImageMagick recognizes many file-types that Emacs does not | ||
| 7841 | recognize as images, such as C. See `imagemagick-types-inhibit'. */) | ||
| 7852 | (void) | 7842 | (void) |
| 7853 | { | 7843 | { |
| 7854 | Lisp_Object typelist = Qnil; | 7844 | Lisp_Object typelist = Qnil; |
| 7855 | unsigned long numf; | 7845 | unsigned long numf = 0; |
| 7856 | ExceptionInfo ex; | 7846 | ExceptionInfo ex; |
| 7857 | char **imtypes = GetMagickList ("*", &numf, &ex); | 7847 | char **imtypes = GetMagickList ("*", &numf, &ex); |
| 7858 | int i; | 7848 | int i; |
diff --git a/src/xselect.c b/src/xselect.c index 8741cb89967..73ef4abc0a4 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -489,10 +489,10 @@ struct selection_data | |||
| 489 | 489 | ||
| 490 | /* Linked list of the above (in support of MULTIPLE targets). */ | 490 | /* Linked list of the above (in support of MULTIPLE targets). */ |
| 491 | 491 | ||
| 492 | struct selection_data *converted_selections; | 492 | static struct selection_data *converted_selections; |
| 493 | 493 | ||
| 494 | /* "Data" to send a requestor for a failed MULTIPLE subtarget. */ | 494 | /* "Data" to send a requestor for a failed MULTIPLE subtarget. */ |
| 495 | Atom conversion_fail_tag; | 495 | static Atom conversion_fail_tag; |
| 496 | 496 | ||
| 497 | /* Used as an unwind-protect clause so that, if a selection-converter signals | 497 | /* Used as an unwind-protect clause so that, if a selection-converter signals |
| 498 | an error, we tell the requester that we were unable to do what they wanted | 498 | an error, we tell the requester that we were unable to do what they wanted |
| @@ -2107,6 +2107,7 @@ frame's display, or the first available X display. */) | |||
| 2107 | return (owner ? Qt : Qnil); | 2107 | return (owner ? Qt : Qnil); |
| 2108 | } | 2108 | } |
| 2109 | 2109 | ||
| 2110 | |||
| 2110 | /* Send the clipboard manager a SAVE_TARGETS request with a | 2111 | /* Send the clipboard manager a SAVE_TARGETS request with a |
| 2111 | UTF8_STRING property, as described by | 2112 | UTF8_STRING property, as described by |
| 2112 | http://www.freedesktop.org/wiki/ClipboardManager */ | 2113 | http://www.freedesktop.org/wiki/ClipboardManager */ |
| @@ -2126,54 +2127,53 @@ x_clipboard_manager_save (struct x_display_info *dpyinfo, | |||
| 2126 | Qnil, frame); | 2127 | Qnil, frame); |
| 2127 | } | 2128 | } |
| 2128 | 2129 | ||
| 2129 | DEFUN ("x-clipboard-manager-save", Fx_clipboard_manager_save, | 2130 | /* Called from delete_frame: save any clipboard owned by FRAME to the |
| 2130 | Sx_clipboard_manager_save, 0, 1, 0, | 2131 | clipboard manager. Do nothing if FRAME does not own the clipboard, |
| 2131 | doc: /* Save the clipboard contents to the clipboard manager. | 2132 | or if no clipboard manager is present. */ |
| 2132 | This function is intended to run from `delete-frame-functions' and | 2133 | |
| 2133 | `kill-emacs-hook', to transfer clipboard data owned by Emacs to a | 2134 | void |
| 2134 | clipboard manager prior to deleting a frame or killing Emacs. | 2135 | x_clipboard_manager_save_frame (Lisp_Object frame) |
| 2135 | |||
| 2136 | FRAME specifies a frame owning a clipboard; do nothing if FRAME does | ||
| 2137 | not own the clipboard, or if no clipboard manager is present. If | ||
| 2138 | FRAME is nil, save all clipboard contents owned by Emacs. */) | ||
| 2139 | (Lisp_Object frame) | ||
| 2140 | { | 2136 | { |
| 2141 | if (FRAMEP (frame)) | 2137 | struct frame *f; |
| 2138 | |||
| 2139 | if (FRAMEP (frame) | ||
| 2140 | && (f = XFRAME (frame), FRAME_X_P (f)) | ||
| 2141 | && FRAME_LIVE_P (f)) | ||
| 2142 | { | 2142 | { |
| 2143 | struct frame *f = XFRAME (frame); | 2143 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 2144 | if (FRAME_LIVE_P (f) && FRAME_X_P (f)) | 2144 | Lisp_Object local_selection |
| 2145 | { | 2145 | = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); |
| 2146 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 2146 | |
| 2147 | Lisp_Object local_selection | 2147 | if (!NILP (local_selection) |
| 2148 | = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); | 2148 | && EQ (frame, XCAR (XCDR (XCDR (XCDR (local_selection))))) |
| 2149 | 2149 | && XGetSelectionOwner (dpyinfo->display, | |
| 2150 | if (!NILP (local_selection) | 2150 | dpyinfo->Xatom_CLIPBOARD_MANAGER)) |
| 2151 | && EQ (frame, XCAR (XCDR (XCDR (XCDR (local_selection))))) | 2151 | x_clipboard_manager_save (dpyinfo, frame); |
| 2152 | && XGetSelectionOwner (dpyinfo->display, | ||
| 2153 | dpyinfo->Xatom_CLIPBOARD_MANAGER)) | ||
| 2154 | x_clipboard_manager_save (dpyinfo, frame); | ||
| 2155 | } | ||
| 2156 | } | 2152 | } |
| 2157 | else if (NILP (frame)) | 2153 | } |
| 2154 | |||
| 2155 | /* Called from Fkill_emacs: save any clipboard owned by FRAME to the | ||
| 2156 | clipboard manager. Do nothing if FRAME does not own the clipboard, | ||
| 2157 | or if no clipboard manager is present. */ | ||
| 2158 | |||
| 2159 | void | ||
| 2160 | x_clipboard_manager_save_all (void) | ||
| 2161 | { | ||
| 2162 | /* Loop through all X displays, saving owned clipboards. */ | ||
| 2163 | struct x_display_info *dpyinfo; | ||
| 2164 | Lisp_Object local_selection, local_frame; | ||
| 2165 | for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) | ||
| 2158 | { | 2166 | { |
| 2159 | /* Loop through all X displays, saving owned clipboards. */ | 2167 | local_selection = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); |
| 2160 | struct x_display_info *dpyinfo; | 2168 | if (NILP (local_selection) |
| 2161 | Lisp_Object local_selection, local_frame; | 2169 | || !XGetSelectionOwner (dpyinfo->display, |
| 2162 | for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) | 2170 | dpyinfo->Xatom_CLIPBOARD_MANAGER)) |
| 2163 | { | 2171 | continue; |
| 2164 | local_selection = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); | ||
| 2165 | if (NILP (local_selection) | ||
| 2166 | || !XGetSelectionOwner (dpyinfo->display, | ||
| 2167 | dpyinfo->Xatom_CLIPBOARD_MANAGER)) | ||
| 2168 | continue; | ||
| 2169 | |||
| 2170 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); | ||
| 2171 | if (FRAME_LIVE_P (XFRAME (local_frame))) | ||
| 2172 | x_clipboard_manager_save (dpyinfo, local_frame); | ||
| 2173 | } | ||
| 2174 | } | ||
| 2175 | 2172 | ||
| 2176 | return Qnil; | 2173 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); |
| 2174 | if (FRAME_LIVE_P (XFRAME (local_frame))) | ||
| 2175 | x_clipboard_manager_save (dpyinfo, local_frame); | ||
| 2176 | } | ||
| 2177 | } | 2177 | } |
| 2178 | 2178 | ||
| 2179 | 2179 | ||
| @@ -2586,7 +2586,6 @@ syms_of_xselect (void) | |||
| 2586 | defsubr (&Sx_disown_selection_internal); | 2586 | defsubr (&Sx_disown_selection_internal); |
| 2587 | defsubr (&Sx_selection_owner_p); | 2587 | defsubr (&Sx_selection_owner_p); |
| 2588 | defsubr (&Sx_selection_exists_p); | 2588 | defsubr (&Sx_selection_exists_p); |
| 2589 | defsubr (&Sx_clipboard_manager_save); | ||
| 2590 | 2589 | ||
| 2591 | defsubr (&Sx_get_atom_name); | 2590 | defsubr (&Sx_get_atom_name); |
| 2592 | defsubr (&Sx_send_client_message); | 2591 | defsubr (&Sx_send_client_message); |
diff --git a/src/xterm.h b/src/xterm.h index c44978d5386..2938de9b339 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1024,6 +1024,8 @@ extern Lisp_Object x_property_data_to_lisp (struct frame *, | |||
| 1024 | Atom, | 1024 | Atom, |
| 1025 | int, | 1025 | int, |
| 1026 | unsigned long); | 1026 | unsigned long); |
| 1027 | extern void x_clipboard_manager_save_frame (Lisp_Object); | ||
| 1028 | extern void x_clipboard_manager_save_all (void); | ||
| 1027 | 1029 | ||
| 1028 | /* Defined in xfns.c */ | 1030 | /* Defined in xfns.c */ |
| 1029 | 1031 | ||