diff options
| author | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2014-07-05 23:07:57 +0900 |
| commit | aeb894a9a06d84d29b93ca04432d7cbed366e665 (patch) | |
| tree | e2b73f9a76bc826c7a443e9a8d4fb3b49bdf7332 | |
| parent | 763a11d0d0dcf543e89a22c98f55ea07c40ceefa (diff) | |
| parent | a984543a4488ed08778eb775d62f7091db117945 (diff) | |
| download | emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.tar.gz emacs-aeb894a9a06d84d29b93ca04432d7cbed366e665.zip | |
merge trunk
81 files changed, 1025 insertions, 620 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a85b56c3af7..76d692ae9a6 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * help.texi (Misc Help): | ||
| 4 | * trouble.texi (Checklist): "Online" help doesn't mean what it | ||
| 5 | used to any more. | ||
| 6 | |||
| 1 | 2014-06-23 Glenn Morris <rgm@gnu.org> | 7 | 2014-06-23 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * Makefile.in (%.texi): Disable implicit rules. | 9 | * Makefile.in (%.texi): Disable implicit rules. |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index f47600d97ec..10b5fcfb095 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -490,8 +490,7 @@ currently in use. @xref{Coding Systems}. | |||
| 490 | @kindex C-h i | 490 | @kindex C-h i |
| 491 | @findex info | 491 | @findex info |
| 492 | @cindex Info | 492 | @cindex Info |
| 493 | @cindex manuals, on-line | 493 | @cindex manuals, included |
| 494 | @cindex on-line manuals | ||
| 495 | @kbd{C-h i} (@code{info}) runs the Info program, which browses | 494 | @kbd{C-h i} (@code{info}) runs the Info program, which browses |
| 496 | structured documentation files. The entire Emacs manual is available | 495 | structured documentation files. The entire Emacs manual is available |
| 497 | within Info, along with many other manuals for the GNU system. Type | 496 | within Info, along with many other manuals for the GNU system. Type |
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index f0cbbcc5721..09260a1e5a9 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -847,7 +847,7 @@ conclusion from our observations. | |||
| 847 | @item | 847 | @item |
| 848 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual | 848 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual |
| 849 | fails to describe the actual behavior of Emacs, or that the text is | 849 | fails to describe the actual behavior of Emacs, or that the text is |
| 850 | confusing, copy in the text from the online manual which you think is | 850 | confusing, copy in the text from the manual which you think is |
| 851 | at fault. If the section is small, just the section name is enough. | 851 | at fault. If the section is small, just the section name is enough. |
| 852 | 852 | ||
| 853 | @item | 853 | @item |
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 13bc65eef4a..1ac7258e85a 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi (Note for Novices, Finding More, Conclusion): | ||
| 4 | "Online" help doesn't mean what it used to any more. | ||
| 5 | |||
| 1 | 2014-06-23 Glenn Morris <rgm@gnu.org> | 6 | 2014-06-23 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in (%.texi): Disable implicit rules. | 8 | * Makefile.in (%.texi): Disable implicit rules. |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 6001e3d0084..7ff91758670 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -903,7 +903,7 @@ file, @file{cl.el}, that adds many Common Lisp features to Emacs Lisp.) | |||
| 903 | If you don't know GNU Emacs, you can still read this document | 903 | If you don't know GNU Emacs, you can still read this document |
| 904 | profitably. However, I recommend you learn Emacs, if only to learn to | 904 | profitably. However, I recommend you learn Emacs, if only to learn to |
| 905 | move around your computer screen. You can teach yourself how to use | 905 | move around your computer screen. You can teach yourself how to use |
| 906 | Emacs with the on-line tutorial. To use it, type @kbd{C-h t}. (This | 906 | Emacs with the built-in tutorial. To use it, type @kbd{C-h t}. (This |
| 907 | means you press and release the @key{CTRL} key and the @kbd{h} at the | 907 | means you press and release the @key{CTRL} key and the @kbd{h} at the |
| 908 | same time, and then press and release @kbd{t}.) | 908 | same time, and then press and release @kbd{t}.) |
| 909 | 909 | ||
| @@ -4657,7 +4657,7 @@ specialized library, such as a law library or an engineering library, | |||
| 4657 | rather than a general library. Each library, or file, contains | 4657 | rather than a general library. Each library, or file, contains |
| 4658 | functions that relate to a particular topic or activity, such as | 4658 | functions that relate to a particular topic or activity, such as |
| 4659 | @file{abbrev.el} for handling abbreviations and other typing | 4659 | @file{abbrev.el} for handling abbreviations and other typing |
| 4660 | shortcuts, and @file{help.el} for on-line help. (Sometimes several | 4660 | shortcuts, and @file{help.el} for help. (Sometimes several |
| 4661 | libraries provide code for a single activity, as the various | 4661 | libraries provide code for a single activity, as the various |
| 4662 | @file{rmail@dots{}} files provide code for reading electronic mail.) | 4662 | @file{rmail@dots{}} files provide code for reading electronic mail.) |
| 4663 | In @cite{The GNU Emacs Manual}, you will see sentences such as ``The | 4663 | In @cite{The GNU Emacs Manual}, you will see sentences such as ``The |
| @@ -18685,9 +18685,9 @@ easy-to-read description of Emacs Lisp. It is written not only for | |||
| 18685 | experts, but for people who know what you know. (The @cite{Reference | 18685 | experts, but for people who know what you know. (The @cite{Reference |
| 18686 | Manual} comes with the standard GNU Emacs distribution. Like this | 18686 | Manual} comes with the standard GNU Emacs distribution. Like this |
| 18687 | introduction, it comes as a Texinfo source file, so you can read it | 18687 | introduction, it comes as a Texinfo source file, so you can read it |
| 18688 | on-line and as a typeset, printed book.) | 18688 | on your computer and as a typeset, printed book.) |
| 18689 | 18689 | ||
| 18690 | Go to the other on-line help that is part of GNU Emacs: the on-line | 18690 | Go to the other built-in help that is part of GNU Emacs: the built-in |
| 18691 | documentation for all functions and variables, and @code{find-tag}, | 18691 | documentation for all functions and variables, and @code{find-tag}, |
| 18692 | the program that takes you to sources. | 18692 | the program that takes you to sources. |
| 18693 | 18693 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4302b53a63a..cc372b006ed 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * help.texi (Help Functions): "Online" help doesn't mean what it | ||
| 4 | used to any more. | ||
| 5 | |||
| 6 | 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * keymaps.texi (Key Lookup): Remove mention of indirect entries. | ||
| 9 | (Scanning Keymaps): Reword the `noindirect' argument. | ||
| 10 | |||
| 1 | 2014-06-28 Glenn Morris <rgm@gnu.org> | 11 | 2014-06-28 Glenn Morris <rgm@gnu.org> |
| 2 | 12 | ||
| 3 | * minibuf.texi (Intro to Minibuffers): Batch mode is basic. | 13 | * minibuf.texi (Intro to Minibuffers): Batch mode is basic. |
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 9a763b60938..20fb0e651f9 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -508,7 +508,7 @@ non-@code{nil}, the return value is always a vector. | |||
| 508 | @node Help Functions | 508 | @node Help Functions |
| 509 | @section Help Functions | 509 | @section Help Functions |
| 510 | 510 | ||
| 511 | Emacs provides a variety of on-line help functions, all accessible to | 511 | Emacs provides a variety of built-in help functions, all accessible to |
| 512 | the user as subcommands of the prefix @kbd{C-h}. For more information | 512 | the user as subcommands of the prefix @kbd{C-h}. For more information |
| 513 | about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here | 513 | about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here |
| 514 | we describe some program-level interfaces to the same information. | 514 | we describe some program-level interfaces to the same information. |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 7cc2b393456..e652da03385 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -1043,22 +1043,6 @@ lambda expression. This is presumed to be a function, and is treated | |||
| 1043 | as such (see above). In order to execute properly as a key binding, | 1043 | as such (see above). In order to execute properly as a key binding, |
| 1044 | this function must be a command---it must have an @code{interactive} | 1044 | this function must be a command---it must have an @code{interactive} |
| 1045 | specification. @xref{Defining Commands}. | 1045 | specification. @xref{Defining Commands}. |
| 1046 | |||
| 1047 | @item | ||
| 1048 | If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event | ||
| 1049 | type, then this is an @dfn{indirect entry}: | ||
| 1050 | |||
| 1051 | @example | ||
| 1052 | (@var{othermap} . @var{othertype}) | ||
| 1053 | @end example | ||
| 1054 | |||
| 1055 | When key lookup encounters an indirect entry, it looks up instead the | ||
| 1056 | binding of @var{othertype} in @var{othermap} and uses that. | ||
| 1057 | |||
| 1058 | This feature permits you to define one key as an alias for another key. | ||
| 1059 | For example, an entry whose @sc{car} is the keymap called @code{esc-map} | ||
| 1060 | and whose @sc{cdr} is 32 (the code for @key{SPC}) means, ``Use the global | ||
| 1061 | binding of @kbd{Meta-@key{SPC}}, whatever that may be''. | ||
| 1062 | @end itemize | 1046 | @end itemize |
| 1063 | 1047 | ||
| 1064 | @item @var{symbol} | 1048 | @item @var{symbol} |
| @@ -1066,9 +1050,7 @@ binding of @kbd{Meta-@key{SPC}}, whatever that may be''. | |||
| 1066 | The function definition of @var{symbol} is used in place of | 1050 | The function definition of @var{symbol} is used in place of |
| 1067 | @var{symbol}. If that too is a symbol, then this process is repeated, | 1051 | @var{symbol}. If that too is a symbol, then this process is repeated, |
| 1068 | any number of times. Ultimately this should lead to an object that is | 1052 | any number of times. Ultimately this should lead to an object that is |
| 1069 | a keymap, a command, or a keyboard macro. A list is allowed if it is a | 1053 | a keymap, a command, or a keyboard macro. |
| 1070 | keymap or a command, but indirect entries are not understood when found | ||
| 1071 | via symbols. | ||
| 1072 | 1054 | ||
| 1073 | Note that keymaps and keyboard macros (strings and vectors) are not | 1055 | Note that keymaps and keyboard macros (strings and vectors) are not |
| 1074 | valid functions, so a symbol with a keymap, string, or vector as its | 1056 | valid functions, so a symbol with a keymap, string, or vector as its |
| @@ -1097,8 +1079,7 @@ binding is not executable as a command. | |||
| 1097 | @end table | 1079 | @end table |
| 1098 | 1080 | ||
| 1099 | In short, a keymap entry may be a keymap, a command, a keyboard | 1081 | In short, a keymap entry may be a keymap, a command, a keyboard |
| 1100 | macro, a symbol that leads to one of them, or an indirection or | 1082 | macro, a symbol that leads to one of them, or @code{nil}. |
| 1101 | @code{nil}. | ||
| 1102 | 1083 | ||
| 1103 | @node Functions for Key Lookup | 1084 | @node Functions for Key Lookup |
| 1104 | @section Functions for Key Lookup | 1085 | @section Functions for Key Lookup |
| @@ -1945,9 +1926,9 @@ entirely of @acronym{ASCII} characters (or meta variants of @acronym{ASCII} | |||
| 1945 | characters) are preferred to all other key sequences and that the | 1926 | characters) are preferred to all other key sequences and that the |
| 1946 | return value can never be a menu binding. | 1927 | return value can never be a menu binding. |
| 1947 | 1928 | ||
| 1948 | If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't | 1929 | If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't look |
| 1949 | follow indirect keymap bindings. This makes it possible to search for | 1930 | inside menu-items to find their commands. This makes it possible to search for |
| 1950 | an indirect definition itself. | 1931 | a menu-item itself. |
| 1951 | 1932 | ||
| 1952 | The fifth argument, @var{no-remap}, determines how this function | 1933 | The fifth argument, @var{no-remap}, determines how this function |
| 1953 | treats command remappings (@pxref{Remapping Commands}). There are two | 1934 | treats command remappings (@pxref{Remapping Commands}). There are two |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index d7b030fb1aa..6726007c6d8 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-07-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * trampver.texi: Update release number. | ||
| 4 | |||
| 5 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * info.texi, mh-e.texi: "Online help" doesn't mean what it | ||
| 8 | used to any more. | ||
| 9 | |||
| 10 | * idlwave.texi (Introduction): Comment out dead http screenshot links. | ||
| 11 | |||
| 1 | 2014-06-24 Leo Liu <sdl.web@gmail.com> | 12 | 2014-06-24 Leo Liu <sdl.web@gmail.com> |
| 2 | 13 | ||
| 3 | * dired-x.texi (Omitting Files in Dired, Omitting Variables): | 14 | * dired-x.texi (Omitting Files in Dired, Omitting Variables): |
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 87ddcd4a4ee..5c1c8ba350f 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi | |||
| @@ -239,24 +239,27 @@ Examining variables and expressions with a mouse click. | |||
| 239 | And much, much more... | 239 | And much, much more... |
| 240 | @end itemize | 240 | @end itemize |
| 241 | 241 | ||
| 242 | @c Dead links, 2014/06. | ||
| 243 | @ignore | ||
| 242 | @ifnottex | 244 | @ifnottex |
| 243 | @cindex Screenshots | 245 | @cindex Screenshots |
| 244 | Here are a number of screenshots showing IDLWAVE in action: | 246 | Here are a number of screenshots showing IDLWAVE in action: |
| 245 | 247 | ||
| 246 | @itemize @bullet | 248 | @itemize @bullet |
| 247 | @item | 249 | @item |
| 248 | @uref{http://idlwave.org/screenshots/emacs_21_nav.gif,An IDLWAVE buffer} | 250 | @uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_nav.gif,An IDLWAVE buffer} |
| 249 | @item | 251 | @item |
| 250 | @uref{http://idlwave.org/screenshots/emacs_21_keys.gif,A keyword being completed} | 252 | @uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_keys.gif,A keyword being completed} |
| 251 | @item | 253 | @item |
| 252 | @uref{http://idlwave.org/screenshots/emacs_21_help.gif,Online help text.} | 254 | @uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_help.gif,Online help text.} |
| 253 | @item | 255 | @item |
| 254 | @uref{http://idlwave.org/screenshots/emacs_21_ri.gif,Routine information displayed} | 256 | @uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_ri.gif,Routine information displayed} |
| 255 | @item | 257 | @item |
| 256 | @uref{http://idlwave.org/screenshots/emacs_21_bp.gif,Debugging code | 258 | @uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_bp.gif,Debugging code |
| 257 | stopped at a breakpoint} | 259 | stopped at a breakpoint} |
| 258 | @end itemize | 260 | @end itemize |
| 259 | @end ifnottex | 261 | @end ifnottex |
| 262 | @end ignore | ||
| 260 | 263 | ||
| 261 | IDLWAVE is the distant successor to the @file{idl.el} and | 264 | IDLWAVE is the distant successor to the @file{idl.el} and |
| 262 | @file{idl-shell.el} files written by Chris Chase. The modes and files | 265 | @file{idl-shell.el} files written by Chris Chase. The modes and files |
diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 87e7794c61e..a3a14a35b80 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | @comment %**end of header | 12 | @comment %**end of header |
| 13 | 13 | ||
| 14 | @copying | 14 | @copying |
| 15 | This file describes how to use Info, the on-line, menu-driven GNU | 15 | This file describes how to use Info, the menu-driven GNU |
| 16 | documentation system. | 16 | documentation system. |
| 17 | 17 | ||
| 18 | Copyright @copyright{} 1989, 1992, 1996--2014 Free Software Foundation, Inc. | 18 | Copyright @copyright{} 1989, 1992, 1996--2014 Free Software Foundation, Inc. |
| @@ -51,7 +51,7 @@ modify this GNU manual.'' | |||
| 51 | @node Top | 51 | @node Top |
| 52 | @top Info: An Introduction | 52 | @top Info: An Introduction |
| 53 | 53 | ||
| 54 | The GNU Project distributes most of its on-line manuals in the | 54 | The GNU Project distributes most of its manuals in the |
| 55 | @dfn{Info format}, which you read using an @dfn{Info reader}. You are | 55 | @dfn{Info format}, which you read using an @dfn{Info reader}. You are |
| 56 | probably using an Info reader to read this now. | 56 | probably using an Info reader to read this now. |
| 57 | 57 | ||
| @@ -98,7 +98,7 @@ program on a computer, so that you can try Info commands while reading | |||
| 98 | about them. Reading it on paper or with an HTML browser is less | 98 | about them. Reading it on paper or with an HTML browser is less |
| 99 | effective, since you must take it on faith that the commands described | 99 | effective, since you must take it on faith that the commands described |
| 100 | really do what the manual says. By all means go through this manual | 100 | really do what the manual says. By all means go through this manual |
| 101 | now that you have it; but please try going through the on-line version | 101 | now that you have it; but please try going through the Info version |
| 102 | as well. | 102 | as well. |
| 103 | 103 | ||
| 104 | @cindex Info reader, how to invoke | 104 | @cindex Info reader, how to invoke |
diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi index bad2554e60c..6b64a108af5 100644 --- a/doc/misc/mh-e.texi +++ b/doc/misc/mh-e.texi | |||
| @@ -227,7 +227,7 @@ have, see @ref{Getting Started}. | |||
| 227 | @kindex C-h t | 227 | @kindex C-h t |
| 228 | 228 | ||
| 229 | If you don't already use GNU Emacs but want to learn more, you can | 229 | If you don't already use GNU Emacs but want to learn more, you can |
| 230 | read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} | 230 | read a built-in tutorial by starting GNU Emacs and typing @kbd{C-h t} |
| 231 | (@code{help-with-tutorial}). (To learn about this notation, see | 231 | (@code{help-with-tutorial}). (To learn about this notation, see |
| 232 | @ref{Conventions}.) If you want to take the plunge, consult the | 232 | @ref{Conventions}.) If you want to take the plunge, consult the |
| 233 | @iftex | 233 | @iftex |
| @@ -1066,9 +1066,9 @@ This chapter begins the meat of the manual which goes into more detail | |||
| 1066 | about every MH-E command and option. | 1066 | about every MH-E command and option. |
| 1067 | 1067 | ||
| 1068 | @cindex Emacs, info | 1068 | @cindex Emacs, info |
| 1069 | @cindex Emacs, online help | 1069 | @cindex Emacs, built-in help |
| 1070 | @cindex info | 1070 | @cindex info |
| 1071 | @cindex online help | 1071 | @cindex built-in help |
| 1072 | @findex describe-mode | 1072 | @findex describe-mode |
| 1073 | @findex mh-help | 1073 | @findex mh-help |
| 1074 | @kindex ? | 1074 | @kindex ? |
| @@ -1083,12 +1083,12 @@ summaries at the beginning of each chapter. In case you have or would | |||
| 1083 | like to rebind the keys, the command summaries also list the | 1083 | like to rebind the keys, the command summaries also list the |
| 1084 | associated Emacs Lisp function. Furthermore, even if you're stranded | 1084 | associated Emacs Lisp function. Furthermore, even if you're stranded |
| 1085 | on a desert island with a laptop and are without your manuals, you can | 1085 | on a desert island with a laptop and are without your manuals, you can |
| 1086 | get a summary of all these commands with GNU Emacs online help: use | 1086 | get a summary of all these commands with GNU Emacs built-in help: use |
| 1087 | @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, | 1087 | @kbd{C-h m} (@code{describe-mode}) for a brief summary of commands, |
| 1088 | @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This | 1088 | @kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This |
| 1089 | help appears in a buffer called @file{*MH-E Help*} | 1089 | help appears in a buffer called @file{*MH-E Help*} |
| 1090 | (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h | 1090 | (@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h |
| 1091 | i} to read this manual via Info. The online help is quite good; try | 1091 | i} to read this manual via Info. The built-in help is quite good; try |
| 1092 | running @kbd{C-h C-h}. This brings up a list of available help topics, | 1092 | running @kbd{C-h C-h}. This brings up a list of available help topics, |
| 1093 | one of which displays the documentation for a given key (like @kbd{C-h | 1093 | one of which displays the documentation for a given key (like @kbd{C-h |
| 1094 | k C-n}). Another useful help feature is to view the manual section | 1094 | k C-n}). Another useful help feature is to view the manual section |
| @@ -1120,21 +1120,21 @@ exist, | |||
| 1120 | @c Yes, some of the stuff in the following sections is redundant, but | 1120 | @c Yes, some of the stuff in the following sections is redundant, but |
| 1121 | @c TeX barfs if the @ifs are inside the @footnote. | 1121 | @c TeX barfs if the @ifs are inside the @footnote. |
| 1122 | @iftex | 1122 | @iftex |
| 1123 | @footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available | 1123 | @footnote{The @cite{GNU Emacs Lisp Reference Manual} should be available |
| 1124 | online in the Info system by typing @kbd{C-h i m Emacs Lisp | 1124 | via the Info system by typing @kbd{C-h i m Emacs Lisp |
| 1125 | @key{RET}}. It is also available online at @* | 1125 | @key{RET}}. It is also available online at @* |
| 1126 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} | 1126 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} |
| 1127 | @end iftex | 1127 | @end iftex |
| 1128 | @ifinfo | 1128 | @ifinfo |
| 1129 | @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU | 1129 | @footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU |
| 1130 | Emacs Lisp Reference Manual}, which may be available online in the | 1130 | Emacs Lisp Reference Manual}, which should be available via the |
| 1131 | Info system. It is also available online at | 1131 | Info system. It is also available online at |
| 1132 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} | 1132 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html}.} |
| 1133 | @end ifinfo | 1133 | @end ifinfo |
| 1134 | @ifhtml | 1134 | @ifhtml |
| 1135 | @footnote{The | 1135 | @footnote{The |
| 1136 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html, | 1136 | @uref{http://www.gnu.org/software/emacs/manual/elisp.html, |
| 1137 | The GNU Emacs Lisp Reference Manual} may also be available online in | 1137 | The GNU Emacs Lisp Reference Manual} should be available via |
| 1138 | the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}.} | 1138 | the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}.} |
| 1139 | @end ifhtml | 1139 | @end ifhtml |
| 1140 | and you can look at the code itself for examples. Look in the Emacs | 1140 | and you can look at the code itself for examples. Look in the Emacs |
| @@ -1142,7 +1142,7 @@ Lisp directory on your system (such as | |||
| 1142 | @file{/usr/local/share/emacs/lisp/mh-e}) and find all the @file{mh-*.el} | 1142 | @file{/usr/local/share/emacs/lisp/mh-e}) and find all the @file{mh-*.el} |
| 1143 | files there. When calling MH-E and other Emacs Lisp functions directly | 1143 | files there. When calling MH-E and other Emacs Lisp functions directly |
| 1144 | from Emacs Lisp code, you'll need to know the correct arguments. Use | 1144 | from Emacs Lisp code, you'll need to know the correct arguments. Use |
| 1145 | the online help for this. For example, try @kbd{C-h f | 1145 | the built-in help for this. For example, try @kbd{C-h f |
| 1146 | mh-execute-commands @key{RET}}. If you write your own functions, | 1146 | mh-execute-commands @key{RET}}. If you write your own functions, |
| 1147 | please do not prefix your symbols (variables and functions) with | 1147 | please do not prefix your symbols (variables and functions) with |
| 1148 | @samp{mh-}. This prefix is reserved for the MH-E package. To avoid | 1148 | @samp{mh-}. This prefix is reserved for the MH-E package. To avoid |
| @@ -6405,7 +6405,7 @@ see the section | |||
| 6405 | The Menu Bar} in @cite{The GNU Emacs Manual}. | 6405 | The Menu Bar} in @cite{The GNU Emacs Manual}. |
| 6406 | @end ifhtml | 6406 | @end ifhtml |
| 6407 | 6407 | ||
| 6408 | The Emacs manual describes how to get online help for a particular | 6408 | The Emacs manual describes how to get help for a particular |
| 6409 | menu item. You can also look up a menu item in the index of this | 6409 | menu item. You can also look up a menu item in the index of this |
| 6410 | manual in two ways: all of the menu items are listed alphabetically, | 6410 | manual in two ways: all of the menu items are listed alphabetically, |
| 6411 | and you can also browse all of the items under the index entry | 6411 | and you can also browse all of the items under the index entry |
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index b98903972f7..cfcb6640183 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | @c Copyright (C) 2003-2014 Free Software Foundation, Inc. | 5 | @c Copyright (C) 2003-2014 Free Software Foundation, Inc. |
| 6 | @c See file doclicense.texi for copying conditions. | 6 | @c See file doclicense.texi for copying conditions. |
| 7 | 7 | ||
| 8 | @c In the Tramp CVS, the version number is auto-frobbed from | 8 | @c In the Tramp GIT, the version number is auto-frobbed from |
| 9 | @c configure.ac, so you should edit that file and run | 9 | @c configure.ac, so you should edit that file and run |
| 10 | @c "autoconf && ./configure" to change the version number. | 10 | @c "autoconf && ./configure" to change the version number. |
| 11 | @set trampver 2.2.10 | 11 | @set trampver 2.2.11-pre |
| 12 | 12 | ||
| 13 | @c Other flags from configuration | 13 | @c Other flags from configuration |
| 14 | @set instprefix /usr/local | 14 | @set instprefix /usr/local |
diff --git a/etc/ChangeLog b/etc/ChangeLog index ae44fc45c3c..5dfb205dce4 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * refcards/calccard.tex (section{Getting Help}): | ||
| 4 | Meaning of "on-line" has changed. | ||
| 5 | |||
| 1 | 2014-06-28 Glenn Morris <rgm@gnu.org> | 6 | 2014-06-28 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * publicsuffix.txt: Update from source. | 8 | * publicsuffix.txt: Update from source. |
diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex index 982382ecd89..03bc37d8856 100644 --- a/etc/refcards/calccard.tex +++ b/etc/refcards/calccard.tex | |||
| @@ -297,7 +297,7 @@ The \kbd{h} prefix key is Calc's analogue of \kbd{C-h} in Emacs. | |||
| 297 | \key{describe key briefly}{h c} | 297 | \key{describe key briefly}{h c} |
| 298 | \key{describe key fully}{h k} | 298 | \key{describe key fully}{h k} |
| 299 | \key{describe function or command}{h f} | 299 | \key{describe function or command}{h f} |
| 300 | \key{read on-line manual}{h i{\rm\enskip or\enskip}\calcprefix i} | 300 | \key{read Info manual}{h i{\rm\enskip or\enskip}\calcprefix i} |
| 301 | \key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s} | 301 | \key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s} |
| 302 | 302 | ||
| 303 | \section{Error Recovery} | 303 | \section{Error Recovery} |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b90c3c98ad..5c91db50037 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,134 @@ | |||
| 1 | 2014-07-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/dbus.el (dbus-peer-handler): New defun. | ||
| 4 | (dbus-register-service): Register it. (Bug#17858) | ||
| 5 | (dbus-managed-objects-handler): Fix docstring. | ||
| 6 | |||
| 7 | 2014-07-04 Phil Sainty <psainty@orcon.net.nz> (tiny change) | ||
| 8 | |||
| 9 | * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var. | ||
| 10 | (narrow-to-defun): New arg include-comments, defaulting to it | ||
| 11 | (bug#16328). | ||
| 12 | |||
| 13 | 2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 14 | |||
| 15 | * rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with | ||
| 16 | different calling convention to rectangle--unhighlight-for-redisplay. | ||
| 17 | |||
| 18 | 2014-07-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 19 | |||
| 20 | * net/tramp.el (tramp-call-process): Handle error strings. | ||
| 21 | |||
| 22 | * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. | ||
| 23 | |||
| 24 | * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime) | ||
| 25 | (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. | ||
| 26 | |||
| 27 | * net/trampver.el: Update release number. | ||
| 28 | |||
| 29 | 2014-07-03 Juri Linkov <juri@jurta.org> | ||
| 30 | |||
| 31 | * desktop.el (desktop-save): Rename arg `auto-save' to | ||
| 32 | `only-if-changed'. Doc fix. (Bug#17873) | ||
| 33 | |||
| 34 | 2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 35 | |||
| 36 | * mouse.el (mouse-yank-primary, mouse-yank-secondary): | ||
| 37 | Use insert-for-yank (bug#17271). | ||
| 38 | |||
| 39 | 2014-07-03 Leo Liu <sdl.web@gmail.com> | ||
| 40 | |||
| 41 | * emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp): | ||
| 42 | Support lexical-binding. | ||
| 43 | |||
| 44 | 2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 45 | |||
| 46 | * vc/log-edit.el (log-edit-goto-eoh): New function. | ||
| 47 | (log-edit--match-first-line): Use it (bug#17861). | ||
| 48 | |||
| 49 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 50 | |||
| 51 | * vc/log-edit.el (log-edit-hook): Add missing :version. | ||
| 52 | |||
| 53 | 2014-07-03 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 54 | |||
| 55 | * progmodes/python.el (python-indent-post-self-insert-function): | ||
| 56 | Enhancements to electric indentation behavior inside | ||
| 57 | parens. (Bug#17658) | ||
| 58 | |||
| 59 | 2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 60 | |||
| 61 | * ps-def.el (ps-generate-postscript-with-faces1): Don't mess with | ||
| 62 | buffer-invisibility-spec (bug#17867). | ||
| 63 | |||
| 64 | 2014-07-03 Andreas Schwab <schwab@linux-m68k.org> | ||
| 65 | |||
| 66 | * vc/vc-git.el (vc-git-checkin): When operating on the whole tree | ||
| 67 | pass "-a". | ||
| 68 | |||
| 69 | 2014-07-03 Glenn Morris <rgm@gnu.org> | ||
| 70 | |||
| 71 | * cus-edit.el (help): | ||
| 72 | * finder.el (finder-known-keywords): | ||
| 73 | * help.el (help-for-help-internal): | ||
| 74 | * vc/ediff-mult.el (ediff-meta-buffer-verbose-message) | ||
| 75 | (ediff-redraw-registry-buffer): | ||
| 76 | * vc/ediff-ptch.el (ediff-patch-file-internal): | ||
| 77 | Doc fixes re "online" help. (Bug#17803) | ||
| 78 | |||
| 79 | * progmodes/idlwave.el (idlwave): Update url-link for custom group. | ||
| 80 | (idlwave-mode): Doc URL update. | ||
| 81 | |||
| 82 | 2014-07-01 Juri Linkov <juri@jurta.org> | ||
| 83 | |||
| 84 | * man.el: Display man pages immediately and use process-filter | ||
| 85 | to format them asynchronously. | ||
| 86 | (Man-width): Doc fix. | ||
| 87 | (man): Doc fix. | ||
| 88 | (Man-start-calling): Use `with-selected-window' to get | ||
| 89 | `frame-width' and `window-width'. | ||
| 90 | (Man-getpage-in-background): Call `Man-notify-when-ready' | ||
| 91 | immediately after creating a new buffer. Call `Man-mode' and set | ||
| 92 | `mode-line-process' in the created buffer. Set process-filter to | ||
| 93 | `Man-bgproc-filter' in start-process branch. In call-process branch | ||
| 94 | call either `Man-fontify-manpage' or `Man-cleanup-manpage'. | ||
| 95 | Use `Man-start-calling' inside `with-current-buffer'. | ||
| 96 | (Man-fontify-manpage): Don't print messages. Fix boundary condition. | ||
| 97 | (Man-cleanup-manpage): Don't print messages. | ||
| 98 | (Man-bgproc-filter): New function. | ||
| 99 | (Man-bgproc-sentinel): Add `save-excursion' to keep point when | ||
| 100 | user moved it during asynchronous formatting. Move calls of | ||
| 101 | `Man-fontify-manpage' and `Man-cleanup-manpage' to | ||
| 102 | `Man-bgproc-filter'. Move the call of `Man-mode' to | ||
| 103 | `Man-getpage-in-background'. Use `quit-restore-window' | ||
| 104 | instead of `kill-buffer'. Use `message' instead of `error' | ||
| 105 | because errors are caught by process sentinel. | ||
| 106 | (Man-mode): Move calls of `Man-build-page-list', | ||
| 107 | `Man-strip-page-headers', `Man-unindent', `Man-goto-page' to | ||
| 108 | `Man-bgproc-sentinel'. Doc fix. (Bug#2588, bug#5054, bug#9084, bug#17831) | ||
| 109 | |||
| 110 | * man.el (Man-bgproc-sentinel): Use `Man-page-from-arguments' | ||
| 111 | for the message about the man page cleaned up. | ||
| 112 | |||
| 113 | 2014-07-01 Mario Lang <mlang@delysid.org> | ||
| 114 | |||
| 115 | * net/gnutls.el (gnutls-negotiate): Prevent destructive modification of | ||
| 116 | cosutomization option `gnutls-verify-error'. | ||
| 117 | |||
| 118 | 2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 119 | |||
| 120 | * simple.el (deactivate-mark, set-mark-command, handle-shift-selection): | ||
| 121 | Don't keep transient-mark-mode buffer-local when not needed (bug#6316). | ||
| 122 | |||
| 123 | * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) | ||
| 124 | (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal | ||
| 125 | is suspended (bug#17857). | ||
| 126 | |||
| 127 | 2014-07-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 128 | |||
| 129 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): | ||
| 130 | Prefer utf-8 coding. (Bug#17859) | ||
| 131 | |||
| 1 | 2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org> | 132 | 2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 133 | ||
| 3 | * emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias | 134 | * emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias |
| @@ -35,8 +166,7 @@ | |||
| 35 | Don't call c-parse-state when c++-template-syntax-table is active. | 166 | Don't call c-parse-state when c++-template-syntax-table is active. |
| 36 | * progmodes/cc-engine.el (c-guess-continued-construct CASE G) | 167 | * progmodes/cc-engine.el (c-guess-continued-construct CASE G) |
| 37 | (c-guess-basic-syntax CASE 5D.3): Rearrange so that | 168 | (c-guess-basic-syntax CASE 5D.3): Rearrange so that |
| 38 | c-syntactic-skip-backwards isn't called with the pertinent syntax | 169 | c-syntactic-skip-backwards isn't called with the pertinent syntax table. |
| 39 | table. | ||
| 40 | 170 | ||
| 41 | 2014-06-28 Stephen Berman <stephen.berman@gmx.net> | 171 | 2014-06-28 Stephen Berman <stephen.berman@gmx.net> |
| 42 | 172 | ||
| @@ -1638,7 +1768,7 @@ | |||
| 1638 | Remove HISTFILE and HISTSIZE; it's too late to set them here. | 1768 | Remove HISTFILE and HISTSIZE; it's too late to set them here. |
| 1639 | Add :version entry. | 1769 | Add :version entry. |
| 1640 | (tramp-open-shell): Do not let-bind `tramp-end-of-output'. | 1770 | (tramp-open-shell): Do not let-bind `tramp-end-of-output'. |
| 1641 | Add "HISTSIZE=/dev/null" to the shell's env arguments. Do not send | 1771 | Add "HISTFILE=/dev/null" to the shell's env arguments. Do not send |
| 1642 | extra "PSx=..." commands. | 1772 | extra "PSx=..." commands. |
| 1643 | (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null. | 1773 | (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null. |
| 1644 | (Bug#17295) | 1774 | (Bug#17295) |
| @@ -3338,7 +3468,7 @@ | |||
| 3338 | 2014-03-10 Michael Albinus <michael.albinus@gmx.de> | 3468 | 2014-03-10 Michael Albinus <michael.albinus@gmx.de> |
| 3339 | 3469 | ||
| 3340 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): | 3470 | * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): |
| 3341 | Do not add `nil' to the environment, when there's no remote `locale'. | 3471 | Do not add nil to the environment, when there's no remote `locale'. |
| 3342 | (tramp-find-inline-encoding): Check, that the remote host has | 3472 | (tramp-find-inline-encoding): Check, that the remote host has |
| 3343 | installed perl, before sending scripts. | 3473 | installed perl, before sending scripts. |
| 3344 | 3474 | ||
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 212e29069eb..b54898a171c 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -324,7 +324,7 @@ | |||
| 324 | :group 'emacs) | 324 | :group 'emacs) |
| 325 | 325 | ||
| 326 | (defgroup help nil | 326 | (defgroup help nil |
| 327 | "Support for on-line help systems." | 327 | "Support for Emacs help systems." |
| 328 | :group 'emacs) | 328 | :group 'emacs) |
| 329 | 329 | ||
| 330 | (defgroup multimedia nil | 330 | (defgroup multimedia nil |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 26d288bf9cd..4bb6fba3532 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -942,12 +942,13 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved." | |||
| 942 | :predicate #'desktop--check-dont-save)))) | 942 | :predicate #'desktop--check-dont-save)))) |
| 943 | 943 | ||
| 944 | ;;;###autoload | 944 | ;;;###autoload |
| 945 | (defun desktop-save (dirname &optional release auto-save) | 945 | (defun desktop-save (dirname &optional release only-if-changed) |
| 946 | "Save the desktop in a desktop file. | 946 | "Save the desktop in a desktop file. |
| 947 | Parameter DIRNAME specifies where to save the desktop file. | 947 | Parameter DIRNAME specifies where to save the desktop file. |
| 948 | Optional parameter RELEASE says whether we're done with this desktop. | 948 | Optional parameter RELEASE says whether we're done with this desktop. |
| 949 | If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, | 949 | If ONLY-IF-CHANGED is non-nil, compare the current desktop information |
| 950 | and don't save the buffer if they are the same." | 950 | to that in the desktop file, and if the desktop information has not |
| 951 | changed since it was last saved then do not rewrite the file." | ||
| 951 | (interactive (list | 952 | (interactive (list |
| 952 | ;; Or should we just use (car desktop-path)? | 953 | ;; Or should we just use (car desktop-path)? |
| 953 | (let ((default (if (member "." desktop-path) | 954 | (let ((default (if (member "." desktop-path) |
| @@ -1020,7 +1021,7 @@ and don't save the buffer if they are the same." | |||
| 1020 | 1021 | ||
| 1021 | (setq default-directory desktop-dirname) | 1022 | (setq default-directory desktop-dirname) |
| 1022 | ;; When auto-saving, avoid writing if nothing has changed since the last write. | 1023 | ;; When auto-saving, avoid writing if nothing has changed since the last write. |
| 1023 | (let* ((beg (and auto-save | 1024 | (let* ((beg (and only-if-changed |
| 1024 | (save-excursion | 1025 | (save-excursion |
| 1025 | (goto-char (point-min)) | 1026 | (goto-char (point-min)) |
| 1026 | ;; Don't check the header with changing timestamp | 1027 | ;; Don't check the header with changing timestamp |
diff --git a/lisp/ehelp.el b/lisp/ehelp.el index dd6c6c4cb28..46db552c3f5 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; This package provides a pre-packaged `Electric Help Mode' for | 27 | ;; This package provides a pre-packaged `Electric Help Mode' for |
| 28 | ;; browsing on-line help screens. There is one entry point, | 28 | ;; browsing Emacs help screens. There is one entry point, |
| 29 | ;; `with-electric-help'; all you have to give it is a no-argument | 29 | ;; `with-electric-help'; all you have to give it is a no-argument |
| 30 | ;; function that generates the actual text of the help into the current | 30 | ;; function that generates the actual text of the help into the current |
| 31 | ;; buffer. | 31 | ;; buffer. |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 23b021df177..30fee64635c 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -522,11 +522,15 @@ it marks the next defun after the ones already marked." | |||
| 522 | (beginning-of-defun)) | 522 | (beginning-of-defun)) |
| 523 | (re-search-backward "^\n" (- (point) 1) t))))) | 523 | (re-search-backward "^\n" (- (point) 1) t))))) |
| 524 | 524 | ||
| 525 | (defun narrow-to-defun (&optional _arg) | 525 | (defvar narrow-to-defun-include-comments nil |
| 526 | "If non-nil, `narrow-to-defun' will also show comments preceding the defun.") | ||
| 527 | |||
| 528 | (defun narrow-to-defun (&optional include-comments) | ||
| 526 | "Make text outside current defun invisible. | 529 | "Make text outside current defun invisible. |
| 527 | The defun visible is the one that contains point or follows point. | 530 | The current defun is the one that contains point or follows point. |
| 528 | Optional ARG is ignored." | 531 | Preceding comments are included if INCLUDE-COMMENTS is non-nil. |
| 529 | (interactive) | 532 | Interactively, the behavior depends on `narrow-to-defun-include-comments'." |
| 533 | (interactive (list narrow-to-defun-include-comments)) | ||
| 530 | (save-excursion | 534 | (save-excursion |
| 531 | (widen) | 535 | (widen) |
| 532 | (let ((opoint (point)) | 536 | (let ((opoint (point)) |
| @@ -562,6 +566,18 @@ Optional ARG is ignored." | |||
| 562 | (setq end (point)) | 566 | (setq end (point)) |
| 563 | (beginning-of-defun) | 567 | (beginning-of-defun) |
| 564 | (setq beg (point))) | 568 | (setq beg (point))) |
| 569 | (when include-comments | ||
| 570 | (goto-char beg) | ||
| 571 | ;; Move back past all preceding comments (and whitespace). | ||
| 572 | (when (forward-comment -1) | ||
| 573 | (while (forward-comment -1)) | ||
| 574 | ;; Move forwards past any page breaks within these comments. | ||
| 575 | (when (and page-delimiter (not (string= page-delimiter ""))) | ||
| 576 | (while (re-search-forward page-delimiter beg t))) | ||
| 577 | ;; Lastly, move past any empty lines. | ||
| 578 | (skip-chars-forward "[:space:]\n") | ||
| 579 | (beginning-of-line) | ||
| 580 | (setq beg (point)))) | ||
| 565 | (goto-char end) | 581 | (goto-char end) |
| 566 | (re-search-backward "^\n" (- (point) 1) t) | 582 | (re-search-backward "^\n" (- (point) 1) t) |
| 567 | (narrow-to-region beg end)))) | 583 | (narrow-to-region beg end)))) |
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 0e4139e1aeb..dd012fab9da 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el | |||
| @@ -129,7 +129,7 @@ Also add the value to the front of the list in the variable `values'." | |||
| 129 | (interactive | 129 | (interactive |
| 130 | (list (read--expression "Eval: "))) | 130 | (list (read--expression "Eval: "))) |
| 131 | (message "Evaluating...") | 131 | (message "Evaluating...") |
| 132 | (setq values (cons (eval expression) values)) | 132 | (setq values (cons (eval expression lexical-binding) values)) |
| 133 | (pp-display-expression (car values) "*Pp Eval Output*")) | 133 | (pp-display-expression (car values) "*Pp Eval Output*")) |
| 134 | 134 | ||
| 135 | ;;;###autoload | 135 | ;;;###autoload |
| @@ -165,7 +165,7 @@ With argument, pretty-print output into current buffer. | |||
| 165 | Ignores leading comment characters." | 165 | Ignores leading comment characters." |
| 166 | (interactive "P") | 166 | (interactive "P") |
| 167 | (if arg | 167 | (if arg |
| 168 | (insert (pp-to-string (eval (pp-last-sexp)))) | 168 | (insert (pp-to-string (eval (pp-last-sexp) lexical-binding))) |
| 169 | (pp-eval-expression (pp-last-sexp)))) | 169 | (pp-eval-expression (pp-last-sexp)))) |
| 170 | 170 | ||
| 171 | ;;;###autoload | 171 | ;;;###autoload |
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 650b8acbb81..d1353bdc8fa 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el | |||
| @@ -107,7 +107,7 @@ | |||
| 107 | ;; ---------------- | 107 | ;; ---------------- |
| 108 | ;; Bug reports and ideas contributed by many users have helped | 108 | ;; Bug reports and ideas contributed by many users have helped |
| 109 | ;; improve Viper and the various versions of VIP. | 109 | ;; improve Viper and the various versions of VIP. |
| 110 | ;; See the on-line manual for a complete list of contributors. | 110 | ;; See the manual for a complete list of contributors. |
| 111 | ;; | 111 | ;; |
| 112 | ;; | 112 | ;; |
| 113 | ;;; Notes: | 113 | ;;; Notes: |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 8d2ea62b231..d43be54de2b 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | ;; Andreas Fuchs (afs@void.at) | 9 | ;; Andreas Fuchs (afs@void.at) |
| 10 | ;; Gergely Nagy (algernon@midgard.debian.net) | 10 | ;; Gergely Nagy (algernon@midgard.debian.net) |
| 11 | ;; David Edmondson (dme@dme.org) | 11 | ;; David Edmondson (dme@dme.org) |
| 12 | ;; Kelvin White <kelvin.white77@gmail.com> | 12 | ;; Kelvin White (kwhite@gnu.org) |
| 13 | ;; Maintainer: emacs-devel@gnu.org | 13 | ;; Maintainer: emacs-devel@gnu.org |
| 14 | ;; Keywords: IRC, chat, client, Internet | 14 | ;; Keywords: IRC, chat, client, Internet |
| 15 | ;; Version: 5.3 | 15 | ;; Version: 5.3 |
| @@ -4252,7 +4252,7 @@ also `erc-format-nick-function'." | |||
| 4252 | (let ((nick (erc-server-user-nickname user))) | 4252 | (let ((nick (erc-server-user-nickname user))) |
| 4253 | (concat (erc-propertize | 4253 | (concat (erc-propertize |
| 4254 | (erc-get-user-mode-prefix nick) | 4254 | (erc-get-user-mode-prefix nick) |
| 4255 | 'face 'erc-nick-prefix-face) nick nick)))) | 4255 | 'face 'erc-nick-prefix-face) nick)))) |
| 4256 | 4256 | ||
| 4257 | (defun erc-format-my-nick () | 4257 | (defun erc-format-my-nick () |
| 4258 | "Return the beginning of this user's message, correctly propertized." | 4258 | "Return the beginning of this user's message, correctly propertized." |
diff --git a/lisp/finder.el b/lisp/finder.el index 092a2ddd8a4..bb5b441e26d 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | (frames . "Emacs frames and window systems") | 52 | (frames . "Emacs frames and window systems") |
| 53 | (games . "games, jokes and amusements") | 53 | (games . "games, jokes and amusements") |
| 54 | (hardware . "interfacing with system hardware") | 54 | (hardware . "interfacing with system hardware") |
| 55 | (help . "on-line help systems") | 55 | (help . "Emacs help systems") |
| 56 | (hypermedia . "links between text or other media types") | 56 | (hypermedia . "links between text or other media types") |
| 57 | (i18n . "internationalization and character-set support") | 57 | (i18n . "internationalization and character-set support") |
| 58 | (internal . "code for Emacs internals, build process, defaults") | 58 | (internal . "code for Emacs internals, build process, defaults") |
diff --git a/lisp/help.el b/lisp/help.el index 8ba3d86004b..63a658f391c 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; This code implements GNU Emacs's on-line help system, the one invoked by | 26 | ;; This code implements GNU Emacs's built-in help system, the one invoked by |
| 27 | ;; `M-x help-for-help'. | 27 | ;; `M-x help-for-help'. |
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| @@ -198,13 +198,13 @@ d PATTERN Show a list of functions, variables, and other items whose | |||
| 198 | documentation matches the PATTERN (a list of words or a regexp). | 198 | documentation matches the PATTERN (a list of words or a regexp). |
| 199 | e Go to the *Messages* buffer which logs echo-area messages. | 199 | e Go to the *Messages* buffer which logs echo-area messages. |
| 200 | f FUNCTION Display documentation for the given function. | 200 | f FUNCTION Display documentation for the given function. |
| 201 | F COMMAND Show the on-line manual's section that describes the command. | 201 | F COMMAND Show the Emacs manual's section that describes the command. |
| 202 | g Display information about the GNU project. | 202 | g Display information about the GNU project. |
| 203 | h Display the HELLO file which illustrates various scripts. | 203 | h Display the HELLO file which illustrates various scripts. |
| 204 | i Start the Info documentation reader: read on-line manuals. | 204 | i Start the Info documentation reader: read included manuals. |
| 205 | I METHOD Describe a specific input method, or RET for current. | 205 | I METHOD Describe a specific input method, or RET for current. |
| 206 | k KEYS Display the full documentation for the key sequence. | 206 | k KEYS Display the full documentation for the key sequence. |
| 207 | K KEYS Show the on-line manual's section for the command bound to KEYS. | 207 | K KEYS Show the Emacs manual's section for the command bound to KEYS. |
| 208 | l Show last 300 input keystrokes (lossage). | 208 | l Show last 300 input keystrokes (lossage). |
| 209 | L LANG-ENV Describes a specific language environment, or RET for current. | 209 | L LANG-ENV Describes a specific language environment, or RET for current. |
| 210 | m Display documentation of current minor modes and current major mode, | 210 | m Display documentation of current minor modes and current major mode, |
| @@ -214,7 +214,7 @@ p TOPIC Find packages matching a given topic keyword. | |||
| 214 | P PACKAGE Describe the given Emacs Lisp package. | 214 | P PACKAGE Describe the given Emacs Lisp package. |
| 215 | r Display the Emacs manual in Info mode. | 215 | r Display the Emacs manual in Info mode. |
| 216 | s Display contents of current syntax table, plus explanations. | 216 | s Display contents of current syntax table, plus explanations. |
| 217 | S SYMBOL Show the section for the given symbol in the on-line manual | 217 | S SYMBOL Show the section for the given symbol in the Info manual |
| 218 | for the programming language used in this buffer. | 218 | for the programming language used in this buffer. |
| 219 | t Start the Emacs learn-by-doing tutorial. | 219 | t Start the Emacs learn-by-doing tutorial. |
| 220 | v VARIABLE Display the given variable's documentation and value. | 220 | v VARIABLE Display the given variable's documentation and value. |
diff --git a/lisp/man.el b/lisp/man.el index 35fab2040a5..4b235302f8b 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -173,13 +173,12 @@ Any other value of `Man-notify-method' is equivalent to `meek'." | |||
| 173 | 173 | ||
| 174 | (defcustom Man-width nil | 174 | (defcustom Man-width nil |
| 175 | "Number of columns for which manual pages should be formatted. | 175 | "Number of columns for which manual pages should be formatted. |
| 176 | If nil, the width of the window selected at the moment of man | 176 | If nil, use the width of the window where the manpage is displayed. |
| 177 | invocation is used. If non-nil, the width of the frame selected | 177 | If non-nil, use the width of the frame where the manpage is displayed. |
| 178 | at the moment of man invocation is used. The value also can be a | 178 | The value also can be a positive integer for a fixed width." |
| 179 | positive integer." | ||
| 180 | :type '(choice (const :tag "Window width" nil) | 179 | :type '(choice (const :tag "Window width" nil) |
| 181 | (const :tag "Frame width" t) | 180 | (const :tag "Frame width" t) |
| 182 | (integer :tag "Specific width" :value 65)) | 181 | (integer :tag "Fixed width" :value 65)) |
| 183 | :group 'man) | 182 | :group 'man) |
| 184 | 183 | ||
| 185 | (defcustom Man-frame-parameters nil | 184 | (defcustom Man-frame-parameters nil |
| @@ -930,12 +929,14 @@ test/automated/man-tests.el in the emacs bzr repository." | |||
| 930 | ;;;###autoload | 929 | ;;;###autoload |
| 931 | (defun man (man-args) | 930 | (defun man (man-args) |
| 932 | "Get a Un*x manual page and put it in a buffer. | 931 | "Get a Un*x manual page and put it in a buffer. |
| 933 | This command is the top-level command in the man package. It | 932 | This command is the top-level command in the man package. |
| 934 | runs a Un*x command to retrieve and clean a manpage in the | 933 | It runs a Un*x command to retrieve and clean a manpage in the |
| 935 | background and places the results in a `Man-mode' browsing | 934 | background and places the results in a `Man-mode' browsing |
| 936 | buffer. See variable `Man-notify-method' for what happens when | 935 | buffer. The variable `Man-width' defines the number of columns in |
| 937 | the buffer is ready. If a buffer already exists for this man | 936 | formatted manual pages. The buffer is displayed immediately. |
| 938 | page, it will display immediately. | 937 | The variable `Man-notify-method' defines how the buffer is displayed. |
| 938 | If a buffer already exists for this man page, it will be displayed | ||
| 939 | without running the man command. | ||
| 939 | 940 | ||
| 940 | For a manpage from a particular section, use either of the | 941 | For a manpage from a particular section, use either of the |
| 941 | following. \"cat(1)\" is how cross-references appear and is | 942 | following. \"cat(1)\" is how cross-references appear and is |
| @@ -1030,15 +1031,22 @@ names or descriptions. The pattern argument is usually an | |||
| 1030 | ;; ther is available). | 1031 | ;; ther is available). |
| 1031 | (when (or window-system | 1032 | (when (or window-system |
| 1032 | (not (or (getenv "MANWIDTH") (getenv "COLUMNS")))) | 1033 | (not (or (getenv "MANWIDTH") (getenv "COLUMNS")))) |
| 1033 | ;; This isn't strictly correct, since we don't know how | 1034 | ;; Since the page buffer is displayed beforehand, |
| 1034 | ;; the page will actually be displayed, but it seems | 1035 | ;; we can select its window and get the window/frame width. |
| 1035 | ;; reasonable. | ||
| 1036 | (setenv "COLUMNS" (number-to-string | 1036 | (setenv "COLUMNS" (number-to-string |
| 1037 | (cond | 1037 | (cond |
| 1038 | ((and (integerp Man-width) (> Man-width 0)) | 1038 | ((and (integerp Man-width) (> Man-width 0)) |
| 1039 | Man-width) | 1039 | Man-width) |
| 1040 | (Man-width (frame-width)) | 1040 | (Man-width |
| 1041 | ((window-width)))))) | 1041 | (if (window-live-p (get-buffer-window (current-buffer) t)) |
| 1042 | (with-selected-window (get-buffer-window (current-buffer) t) | ||
| 1043 | (frame-width)) | ||
| 1044 | (frame-width))) | ||
| 1045 | (t | ||
| 1046 | (if (window-live-p (get-buffer-window (current-buffer) t)) | ||
| 1047 | (with-selected-window (get-buffer-window (current-buffer) t) | ||
| 1048 | (window-width)) | ||
| 1049 | (window-width))))))) | ||
| 1042 | ;; Since man-db 2.4.3-1, man writes plain text with no escape | 1050 | ;; Since man-db 2.4.3-1, man writes plain text with no escape |
| 1043 | ;; sequences when stdout is not a tty. In 2.5.0, the following | 1051 | ;; sequences when stdout is not a tty. In 2.5.0, the following |
| 1044 | ;; env-var was added to allow control of this (see Debian Bug#340673). | 1052 | ;; env-var was added to allow control of this (see Debian Bug#340673). |
| @@ -1057,33 +1065,45 @@ Return the buffer in which the manpage will appear." | |||
| 1057 | (message "Invoking %s %s in the background" manual-program man-args) | 1065 | (message "Invoking %s %s in the background" manual-program man-args) |
| 1058 | (setq buffer (generate-new-buffer bufname)) | 1066 | (setq buffer (generate-new-buffer bufname)) |
| 1059 | (with-current-buffer buffer | 1067 | (with-current-buffer buffer |
| 1068 | (Man-notify-when-ready buffer) | ||
| 1060 | (setq buffer-undo-list t) | 1069 | (setq buffer-undo-list t) |
| 1061 | (setq Man-original-frame (selected-frame)) | 1070 | (setq Man-original-frame (selected-frame)) |
| 1062 | (setq Man-arguments man-args)) | 1071 | (setq Man-arguments man-args) |
| 1063 | (Man-start-calling | 1072 | (Man-mode) |
| 1064 | (if (fboundp 'start-process) | 1073 | (setq mode-line-process |
| 1065 | (set-process-sentinel | 1074 | (concat " " (propertize (if Man-fontify-manpage-flag |
| 1066 | (start-process manual-program buffer | 1075 | "[formatting...]" |
| 1067 | (if (memq system-type '(cygwin windows-nt)) | 1076 | "[cleaning...]") |
| 1068 | shell-file-name | 1077 | 'face 'mode-line-emphasis))) |
| 1069 | "sh") | 1078 | (Man-start-calling |
| 1070 | shell-command-switch | 1079 | (if (fboundp 'start-process) |
| 1071 | (format (Man-build-man-command) man-args)) | 1080 | (let ((proc (start-process |
| 1072 | 'Man-bgproc-sentinel) | 1081 | manual-program buffer |
| 1073 | (let ((exit-status | 1082 | (if (memq system-type '(cygwin windows-nt)) |
| 1074 | (call-process shell-file-name nil (list buffer nil) nil | 1083 | shell-file-name |
| 1075 | shell-command-switch | 1084 | "sh") |
| 1076 | (format (Man-build-man-command) man-args))) | 1085 | shell-command-switch |
| 1077 | (msg "")) | 1086 | (format (Man-build-man-command) man-args)))) |
| 1078 | (or (and (numberp exit-status) | 1087 | (set-process-sentinel proc 'Man-bgproc-sentinel) |
| 1079 | (= exit-status 0)) | 1088 | (set-process-filter proc 'Man-bgproc-filter)) |
| 1080 | (and (numberp exit-status) | 1089 | (let* ((inhibit-read-only t) |
| 1081 | (setq msg | 1090 | (exit-status |
| 1082 | (format "exited abnormally with code %d" | 1091 | (call-process shell-file-name nil (list buffer nil) nil |
| 1083 | exit-status))) | 1092 | shell-command-switch |
| 1084 | (setq msg exit-status)) | 1093 | (format (Man-build-man-command) man-args))) |
| 1085 | (Man-bgproc-sentinel bufname msg))))) | 1094 | (msg "")) |
| 1086 | buffer)) | 1095 | (or (and (numberp exit-status) |
| 1096 | (= exit-status 0)) | ||
| 1097 | (and (numberp exit-status) | ||
| 1098 | (setq msg | ||
| 1099 | (format "exited abnormally with code %d" | ||
| 1100 | exit-status))) | ||
| 1101 | (setq msg exit-status)) | ||
| 1102 | (if Man-fontify-manpage-flag | ||
| 1103 | (Man-fontify-manpage) | ||
| 1104 | (Man-cleanup-manpage)) | ||
| 1105 | (Man-bgproc-sentinel bufname msg)))))) | ||
| 1106 | buffer)) | ||
| 1087 | 1107 | ||
| 1088 | (defun Man-update-manpage () | 1108 | (defun Man-update-manpage () |
| 1089 | "Reformat current manpage by calling the man command again synchronously." | 1109 | "Reformat current manpage by calling the man command again synchronously." |
| @@ -1168,7 +1188,6 @@ See the variable `Man-notify-method' for the different notification behaviors." | |||
| 1168 | "Convert overstriking and underlining to the correct fonts. | 1188 | "Convert overstriking and underlining to the correct fonts. |
| 1169 | Same for the ANSI bold and normal escape sequences." | 1189 | Same for the ANSI bold and normal escape sequences." |
| 1170 | (interactive) | 1190 | (interactive) |
| 1171 | (message "Please wait: formatting the %s man page..." Man-arguments) | ||
| 1172 | (goto-char (point-min)) | 1191 | (goto-char (point-min)) |
| 1173 | ;; Fontify ANSI escapes. | 1192 | ;; Fontify ANSI escapes. |
| 1174 | (let ((ansi-color-apply-face-function | 1193 | (let ((ansi-color-apply-face-function |
| @@ -1183,7 +1202,7 @@ Same for the ANSI bold and normal escape sequences." | |||
| 1183 | ;; Multibyte characters exist. | 1202 | ;; Multibyte characters exist. |
| 1184 | (progn | 1203 | (progn |
| 1185 | (goto-char (point-min)) | 1204 | (goto-char (point-min)) |
| 1186 | (while (search-forward "__\b\b" nil t) | 1205 | (while (and (search-forward "__\b\b" nil t) (not (eobp))) |
| 1187 | (backward-delete-char 4) | 1206 | (backward-delete-char 4) |
| 1188 | (put-text-property (point) (1+ (point)) 'face 'Man-underline)) | 1207 | (put-text-property (point) (1+ (point)) 'face 'Man-underline)) |
| 1189 | (goto-char (point-min)) | 1208 | (goto-char (point-min)) |
| @@ -1191,7 +1210,7 @@ Same for the ANSI bold and normal escape sequences." | |||
| 1191 | (backward-delete-char 4) | 1210 | (backward-delete-char 4) |
| 1192 | (put-text-property (1- (point)) (point) 'face 'Man-underline)))) | 1211 | (put-text-property (1- (point)) (point) 'face 'Man-underline)))) |
| 1193 | (goto-char (point-min)) | 1212 | (goto-char (point-min)) |
| 1194 | (while (search-forward "_\b" nil t) | 1213 | (while (and (search-forward "_\b" nil t) (not (eobp))) |
| 1195 | (backward-delete-char 2) | 1214 | (backward-delete-char 2) |
| 1196 | (put-text-property (point) (1+ (point)) 'face 'Man-underline)) | 1215 | (put-text-property (point) (1+ (point)) 'face 'Man-underline)) |
| 1197 | (goto-char (point-min)) | 1216 | (goto-char (point-min)) |
| @@ -1223,8 +1242,7 @@ Same for the ANSI bold and normal escape sequences." | |||
| 1223 | (while (re-search-forward Man-heading-regexp nil t) | 1242 | (while (re-search-forward Man-heading-regexp nil t) |
| 1224 | (put-text-property (match-beginning 0) | 1243 | (put-text-property (match-beginning 0) |
| 1225 | (match-end 0) | 1244 | (match-end 0) |
| 1226 | 'face 'Man-overstrike))) | 1245 | 'face 'Man-overstrike)))) |
| 1227 | (message "%s man page formatted" (Man-page-from-arguments Man-arguments))) | ||
| 1228 | 1246 | ||
| 1229 | (defun Man-highlight-references (&optional xref-man-type) | 1247 | (defun Man-highlight-references (&optional xref-man-type) |
| 1230 | "Highlight the references on mouse-over. | 1248 | "Highlight the references on mouse-over. |
| @@ -1286,8 +1304,6 @@ Normally skip any jobs that should have been done by the sed script, | |||
| 1286 | but when called interactively, do those jobs even if the sed | 1304 | but when called interactively, do those jobs even if the sed |
| 1287 | script would have done them." | 1305 | script would have done them." |
| 1288 | (interactive "p") | 1306 | (interactive "p") |
| 1289 | (message "Please wait: cleaning up the %s man page..." | ||
| 1290 | Man-arguments) | ||
| 1291 | (if (or interactive (not Man-sed-script)) | 1307 | (if (or interactive (not Man-sed-script)) |
| 1292 | (progn | 1308 | (progn |
| 1293 | (goto-char (point-min)) | 1309 | (goto-char (point-min)) |
| @@ -1309,8 +1325,35 @@ script would have done them." | |||
| 1309 | ;; their preceding chars (but don't put Man-overstrike). (Bug#5566) | 1325 | ;; their preceding chars (but don't put Man-overstrike). (Bug#5566) |
| 1310 | (goto-char (point-min)) | 1326 | (goto-char (point-min)) |
| 1311 | (while (re-search-forward ".\b" nil t) (backward-delete-char 2)) | 1327 | (while (re-search-forward ".\b" nil t) (backward-delete-char 2)) |
| 1312 | (Man-softhyphen-to-minus) | 1328 | (Man-softhyphen-to-minus)) |
| 1313 | (message "%s man page cleaned up" Man-arguments)) | 1329 | |
| 1330 | (defun Man-bgproc-filter (process string) | ||
| 1331 | "Manpage background process filter. | ||
| 1332 | When manpage command is run asynchronously, PROCESS is the process | ||
| 1333 | object for the manpage command; when manpage command is run | ||
| 1334 | synchronously, PROCESS is the name of the buffer where the manpage | ||
| 1335 | command is run. Second argument STRING is the entire string of output." | ||
| 1336 | (save-excursion | ||
| 1337 | (let ((Man-buffer (process-buffer process))) | ||
| 1338 | (if (null (buffer-name Man-buffer)) ;; deleted buffer | ||
| 1339 | (set-process-buffer process nil) | ||
| 1340 | |||
| 1341 | (with-current-buffer Man-buffer | ||
| 1342 | (let ((inhibit-read-only t) | ||
| 1343 | (beg (marker-position (process-mark process)))) | ||
| 1344 | (save-excursion | ||
| 1345 | (goto-char beg) | ||
| 1346 | (insert string) | ||
| 1347 | (save-restriction | ||
| 1348 | (narrow-to-region | ||
| 1349 | (save-excursion | ||
| 1350 | (goto-char beg) | ||
| 1351 | (line-beginning-position)) | ||
| 1352 | (point)) | ||
| 1353 | (if Man-fontify-manpage-flag | ||
| 1354 | (Man-fontify-manpage) | ||
| 1355 | (Man-cleanup-manpage))) | ||
| 1356 | (set-marker (process-mark process) (point-max))))))))) | ||
| 1314 | 1357 | ||
| 1315 | (defun Man-bgproc-sentinel (process msg) | 1358 | (defun Man-bgproc-sentinel (process msg) |
| 1316 | "Manpage background process sentinel. | 1359 | "Manpage background process sentinel. |
| @@ -1329,63 +1372,75 @@ manpage command." | |||
| 1329 | (set-process-buffer process nil)) | 1372 | (set-process-buffer process nil)) |
| 1330 | 1373 | ||
| 1331 | (with-current-buffer Man-buffer | 1374 | (with-current-buffer Man-buffer |
| 1332 | (let ((case-fold-search nil)) | 1375 | (save-excursion |
| 1333 | (goto-char (point-min)) | 1376 | (let ((case-fold-search nil)) |
| 1334 | (cond ((or (looking-at "No \\(manual \\)*entry for") | 1377 | (goto-char (point-min)) |
| 1335 | (looking-at "[^\n]*: nothing appropriate$")) | 1378 | (cond ((or (looking-at "No \\(manual \\)*entry for") |
| 1336 | (setq err-mess (buffer-substring (point) | 1379 | (looking-at "[^\n]*: nothing appropriate$")) |
| 1337 | (progn | 1380 | (setq err-mess (buffer-substring (point) |
| 1338 | (end-of-line) (point))) | 1381 | (progn |
| 1339 | delete-buff t)) | 1382 | (end-of-line) (point))) |
| 1340 | 1383 | delete-buff t)) | |
| 1341 | ;; "-k foo", successful exit, but no output (from man-db) | 1384 | |
| 1342 | ;; ENHANCE-ME: share the check for -k with | 1385 | ;; "-k foo", successful exit, but no output (from man-db) |
| 1343 | ;; `Man-highlight-references'. The \\s- bits here are | 1386 | ;; ENHANCE-ME: share the check for -k with |
| 1344 | ;; meant to allow for multiple options with -k among them. | 1387 | ;; `Man-highlight-references'. The \\s- bits here are |
| 1345 | ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments) | 1388 | ;; meant to allow for multiple options with -k among them. |
| 1346 | (eq (process-status process) 'exit) | 1389 | ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments) |
| 1347 | (= (process-exit-status process) 0) | 1390 | (eq (process-status process) 'exit) |
| 1348 | (= (point-min) (point-max))) | 1391 | (= (process-exit-status process) 0) |
| 1349 | (setq err-mess (format "%s: no matches" Man-arguments) | 1392 | (= (point-min) (point-max))) |
| 1350 | delete-buff t)) | 1393 | (setq err-mess (format "%s: no matches" Man-arguments) |
| 1351 | 1394 | delete-buff t)) | |
| 1352 | ((or (stringp process) | 1395 | |
| 1353 | (not (and (eq (process-status process) 'exit) | 1396 | ((or (stringp process) |
| 1354 | (= (process-exit-status process) 0)))) | 1397 | (not (and (eq (process-status process) 'exit) |
| 1355 | (or (zerop (length msg)) | 1398 | (= (process-exit-status process) 0)))) |
| 1356 | (progn | 1399 | (or (zerop (length msg)) |
| 1357 | (setq err-mess | 1400 | (progn |
| 1358 | (concat (buffer-name Man-buffer) | 1401 | (setq err-mess |
| 1359 | ": process " | 1402 | (concat (buffer-name Man-buffer) |
| 1360 | (let ((eos (1- (length msg)))) | 1403 | ": process " |
| 1361 | (if (= (aref msg eos) ?\n) | 1404 | (let ((eos (1- (length msg)))) |
| 1362 | (substring msg 0 eos) msg)))) | 1405 | (if (= (aref msg eos) ?\n) |
| 1363 | (goto-char (point-max)) | 1406 | (substring msg 0 eos) msg)))) |
| 1364 | (insert (format "\nprocess %s" msg)))) | 1407 | (goto-char (point-max)) |
| 1365 | )) | 1408 | (insert (format "\nprocess %s" msg)))) |
| 1366 | (if delete-buff | 1409 | )) |
| 1367 | (kill-buffer Man-buffer) | 1410 | (if delete-buff |
| 1368 | (if Man-fontify-manpage-flag | 1411 | (if (window-live-p (get-buffer-window Man-buffer t)) |
| 1369 | (Man-fontify-manpage) | 1412 | (quit-restore-window |
| 1370 | (Man-cleanup-manpage)) | 1413 | (get-buffer-window Man-buffer t) 'kill) |
| 1371 | 1414 | (kill-buffer Man-buffer)) | |
| 1372 | (run-hooks 'Man-cooked-hook) | 1415 | |
| 1373 | (Man-mode) | 1416 | (run-hooks 'Man-cooked-hook) |
| 1374 | 1417 | ||
| 1375 | (if (not Man-page-list) | 1418 | (Man-build-page-list) |
| 1376 | (let ((args Man-arguments)) | 1419 | (Man-strip-page-headers) |
| 1377 | (kill-buffer (current-buffer)) | 1420 | (Man-unindent) |
| 1378 | (user-error "Can't find the %s manpage" | 1421 | (Man-goto-page 1 t) |
| 1379 | (Man-page-from-arguments args))) | 1422 | |
| 1380 | (set-buffer-modified-p nil)))) | 1423 | (if (not Man-page-list) |
| 1381 | ;; Restore case-fold-search before calling | 1424 | (let ((args Man-arguments)) |
| 1382 | ;; Man-notify-when-ready because it may switch buffers. | 1425 | (if (window-live-p (get-buffer-window (current-buffer) t)) |
| 1383 | 1426 | (quit-restore-window | |
| 1384 | (if (not delete-buff) | 1427 | (get-buffer-window (current-buffer) t) 'kill) |
| 1385 | (Man-notify-when-ready Man-buffer)) | 1428 | (kill-buffer (current-buffer))) |
| 1429 | (message "Can't find the %s manpage" | ||
| 1430 | (Man-page-from-arguments args))) | ||
| 1431 | |||
| 1432 | (if Man-fontify-manpage-flag | ||
| 1433 | (message "%s man page formatted" | ||
| 1434 | (Man-page-from-arguments Man-arguments)) | ||
| 1435 | (message "%s man page cleaned up" | ||
| 1436 | (Man-page-from-arguments Man-arguments))) | ||
| 1437 | (unless (and (processp process) | ||
| 1438 | (not (eq (process-status process) 'exit))) | ||
| 1439 | (setq mode-line-process nil)) | ||
| 1440 | (set-buffer-modified-p nil))))) | ||
| 1386 | 1441 | ||
| 1387 | (if err-mess | 1442 | (if err-mess |
| 1388 | (error "%s" err-mess)) | 1443 | (message "%s" err-mess)) |
| 1389 | )))) | 1444 | )))) |
| 1390 | 1445 | ||
| 1391 | (defun Man-page-from-arguments (args) | 1446 | (defun Man-page-from-arguments (args) |
| @@ -1429,7 +1484,7 @@ The following man commands are available in the buffer. Try | |||
| 1429 | The following variables may be of some use. Try | 1484 | The following variables may be of some use. Try |
| 1430 | \"\\[describe-variable] <variable-name> RET\" for more information: | 1485 | \"\\[describe-variable] <variable-name> RET\" for more information: |
| 1431 | 1486 | ||
| 1432 | `Man-notify-method' What happens when manpage formatting is done. | 1487 | `Man-notify-method' What happens when manpage is ready to display. |
| 1433 | `Man-downcase-section-letters-flag' Force section letters to lower case. | 1488 | `Man-downcase-section-letters-flag' Force section letters to lower case. |
| 1434 | `Man-circular-pages-flag' Treat multiple manpage list as circular. | 1489 | `Man-circular-pages-flag' Treat multiple manpage list as circular. |
| 1435 | `Man-section-translations-alist' List of section numbers and their Un*x equiv. | 1490 | `Man-section-translations-alist' List of section numbers and their Un*x equiv. |
| @@ -1458,11 +1513,7 @@ The following key bindings are currently in effect in the buffer: | |||
| 1458 | (set (make-local-variable 'outline-regexp) Man-heading-regexp) | 1513 | (set (make-local-variable 'outline-regexp) Man-heading-regexp) |
| 1459 | (set (make-local-variable 'outline-level) (lambda () 1)) | 1514 | (set (make-local-variable 'outline-level) (lambda () 1)) |
| 1460 | (set (make-local-variable 'bookmark-make-record-function) | 1515 | (set (make-local-variable 'bookmark-make-record-function) |
| 1461 | 'Man-bookmark-make-record) | 1516 | 'Man-bookmark-make-record)) |
| 1462 | (Man-build-page-list) | ||
| 1463 | (Man-strip-page-headers) | ||
| 1464 | (Man-unindent) | ||
| 1465 | (Man-goto-page 1 t)) | ||
| 1466 | 1517 | ||
| 1467 | (defsubst Man-build-section-alist () | 1518 | (defsubst Man-build-section-alist () |
| 1468 | "Build the list of manpage sections." | 1519 | "Build the list of manpage sections." |
| @@ -1516,7 +1567,6 @@ The following key bindings are currently in effect in the buffer: | |||
| 1516 | (page-end (point-max)) | 1567 | (page-end (point-max)) |
| 1517 | (header "")) | 1568 | (header "")) |
| 1518 | (goto-char page-start) | 1569 | (goto-char page-start) |
| 1519 | ;; (switch-to-buffer (current-buffer))(debug) | ||
| 1520 | (while (not (eobp)) | 1570 | (while (not (eobp)) |
| 1521 | (setq header | 1571 | (setq header |
| 1522 | (if (looking-at Man-page-header-regexp) | 1572 | (if (looking-at Man-page-header-regexp) |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 7beea8e26e6..d3bcf02f217 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1079,7 +1079,7 @@ regardless of where you click." | |||
| 1079 | (unless primary | 1079 | (unless primary |
| 1080 | (error "No selection is available")) | 1080 | (error "No selection is available")) |
| 1081 | (push-mark (point)) | 1081 | (push-mark (point)) |
| 1082 | (insert primary))) | 1082 | (insert-for-yank primary))) |
| 1083 | 1083 | ||
| 1084 | (defun mouse-kill-ring-save (click) | 1084 | (defun mouse-kill-ring-save (click) |
| 1085 | "Copy the region between point and the mouse click in the kill ring. | 1085 | "Copy the region between point and the mouse click in the kill ring. |
| @@ -1361,7 +1361,7 @@ regardless of where you click." | |||
| 1361 | (or mouse-yank-at-point (mouse-set-point click)) | 1361 | (or mouse-yank-at-point (mouse-set-point click)) |
| 1362 | (let ((secondary (x-get-selection 'SECONDARY))) | 1362 | (let ((secondary (x-get-selection 'SECONDARY))) |
| 1363 | (if secondary | 1363 | (if secondary |
| 1364 | (insert secondary) | 1364 | (insert-for-yank secondary) |
| 1365 | (error "No secondary selection")))) | 1365 | (error "No secondary selection")))) |
| 1366 | 1366 | ||
| 1367 | (defun mouse-kill-secondary () | 1367 | (defun mouse-kill-secondary () |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 66170dafef8..582f54faf4e 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -544,6 +544,10 @@ placed in the queue. | |||
| 544 | 544 | ||
| 545 | `:already-owner': Service is already the primary owner." | 545 | `:already-owner': Service is already the primary owner." |
| 546 | 546 | ||
| 547 | ;; Add Peer handler. | ||
| 548 | (dbus-register-method | ||
| 549 | bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register) | ||
| 550 | |||
| 547 | ;; Add ObjectManager handler. | 551 | ;; Add ObjectManager handler. |
| 548 | (dbus-register-method | 552 | (dbus-register-method |
| 549 | bus service nil dbus-interface-objectmanager "GetManagedObjects" | 553 | bus service nil dbus-interface-objectmanager "GetManagedObjects" |
| @@ -1151,6 +1155,22 @@ apply | |||
| 1151 | bus service dbus-path-dbus dbus-interface-peer "Ping"))) | 1155 | bus service dbus-path-dbus dbus-interface-peer "Ping"))) |
| 1152 | (dbus-error nil))) | 1156 | (dbus-error nil))) |
| 1153 | 1157 | ||
| 1158 | (defun dbus-peer-handler () | ||
| 1159 | "Default handler for the \"org.freedesktop.DBus.Peer\" interface. | ||
| 1160 | It will be registered for all objects created by `dbus-register-service'." | ||
| 1161 | (let* ((last-input-event last-input-event) | ||
| 1162 | (method (dbus-event-member-name last-input-event))) | ||
| 1163 | (cond | ||
| 1164 | ;; "Ping" does not return an output parameter. | ||
| 1165 | ((string-equal method "Ping") | ||
| 1166 | :ignore) | ||
| 1167 | ;; "GetMachineId" returns "s". | ||
| 1168 | ((string-equal method "GetMachineId") | ||
| 1169 | (signal | ||
| 1170 | 'dbus-error | ||
| 1171 | (list | ||
| 1172 | (format "%s.GetMachineId not implemented" dbus-interface-peer))))))) | ||
| 1173 | |||
| 1154 | 1174 | ||
| 1155 | ;;; D-Bus introspection. | 1175 | ;;; D-Bus introspection. |
| 1156 | 1176 | ||
| @@ -1672,7 +1692,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow." | |||
| 1672 | 1692 | ||
| 1673 | (defun dbus-managed-objects-handler () | 1693 | (defun dbus-managed-objects-handler () |
| 1674 | "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface. | 1694 | "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface. |
| 1675 | It will be registered for all objects created by `dbus-register-method'." | 1695 | It will be registered for all objects created by `dbus-register-service'." |
| 1676 | (let* ((last-input-event last-input-event) | 1696 | (let* ((last-input-event last-input-event) |
| 1677 | (bus (dbus-event-bus-name last-input-event)) | 1697 | (bus (dbus-event-bus-name last-input-event)) |
| 1678 | (path (dbus-event-path-name last-input-event))) | 1698 | (path (dbus-event-path-name last-input-event))) |
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index ea4c0351be7..0c650f38d95 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el | |||
| @@ -214,7 +214,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." | |||
| 214 | (cl-mapcan | 214 | (cl-mapcan |
| 215 | (lambda (check) | 215 | (lambda (check) |
| 216 | (when (string-match (car check) hostname) | 216 | (when (string-match (car check) hostname) |
| 217 | (cdr check))) | 217 | (copy-sequence (cdr check)))) |
| 218 | gnutls-verify-error)) | 218 | gnutls-verify-error)) |
| 219 | ;; else it's nil | 219 | ;; else it's nil |
| 220 | (t nil)))) | 220 | (t nil)))) |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 4f6d5807ba5..16017eebba3 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -458,9 +458,7 @@ Emacs dired can't find files." | |||
| 458 | (insert " " (mapconcat 'identity sorted-lines "\n "))) | 458 | (insert " " (mapconcat 'identity sorted-lines "\n "))) |
| 459 | ;; Add final newline. | 459 | ;; Add final newline. |
| 460 | (goto-char (point-max)) | 460 | (goto-char (point-max)) |
| 461 | (unless (= (point) (line-beginning-position)) | 461 | (unless (bolp) (insert "\n")))) |
| 462 | (insert "\n")))) | ||
| 463 | |||
| 464 | 462 | ||
| 465 | (defun tramp-adb-ls-output-time-less-p (a b) | 463 | (defun tramp-adb-ls-output-time-less-p (a b) |
| 466 | "Sort \"ls\" output by time, descending." | 464 | "Sort \"ls\" output by time, descending." |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 68f1ef472f1..315bc08d0ef 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -1265,8 +1265,7 @@ target of the symlink differ." | |||
| 1265 | (format "%s -ild %s" | 1265 | (format "%s -ild %s" |
| 1266 | (tramp-get-ls-command v) | 1266 | (tramp-get-ls-command v) |
| 1267 | (tramp-shell-quote-argument localname))) | 1267 | (tramp-shell-quote-argument localname))) |
| 1268 | (setq attr (buffer-substring (point) | 1268 | (setq attr (buffer-substring (point) (point-at-eol)))) |
| 1269 | (progn (end-of-line) (point))))) | ||
| 1270 | (tramp-set-file-property | 1269 | (tramp-set-file-property |
| 1271 | v localname "visited-file-modtime-ild" attr)) | 1270 | v localname "visited-file-modtime-ild" attr)) |
| 1272 | (when (boundp 'last-coding-system-used) | 1271 | (when (boundp 'last-coding-system-used) |
| @@ -1317,8 +1316,7 @@ of." | |||
| 1317 | (tramp-get-ls-command v) | 1316 | (tramp-get-ls-command v) |
| 1318 | (tramp-shell-quote-argument localname))) | 1317 | (tramp-shell-quote-argument localname))) |
| 1319 | (with-current-buffer (tramp-get-buffer v) | 1318 | (with-current-buffer (tramp-get-buffer v) |
| 1320 | (setq attr (buffer-substring | 1319 | (setq attr (buffer-substring (point) (point-at-eol)))) |
| 1321 | (point) (progn (end-of-line) (point))))) | ||
| 1322 | (equal | 1320 | (equal |
| 1323 | attr | 1321 | attr |
| 1324 | (tramp-get-file-property | 1322 | (tramp-get-file-property |
| @@ -3964,15 +3962,16 @@ process to set up. VEC specifies the connection." | |||
| 3964 | ;; Try to set up the coding system correctly. | 3962 | ;; Try to set up the coding system correctly. |
| 3965 | ;; CCC this can't be the right way to do it. Hm. | 3963 | ;; CCC this can't be the right way to do it. Hm. |
| 3966 | (tramp-message vec 5 "Determining coding system") | 3964 | (tramp-message vec 5 "Determining coding system") |
| 3967 | (tramp-send-command vec "echo foo ; echo bar" t) | ||
| 3968 | (with-current-buffer (process-buffer proc) | 3965 | (with-current-buffer (process-buffer proc) |
| 3969 | (goto-char (point-min)) | ||
| 3970 | (if (featurep 'mule) | 3966 | (if (featurep 'mule) |
| 3971 | ;; Use MULE to select the right EOL convention for communicating | 3967 | ;; Use MULE to select the right EOL convention for communicating |
| 3972 | ;; with the process. | 3968 | ;; with the process. |
| 3973 | (let* ((cs (or (tramp-compat-funcall 'process-coding-system proc) | 3969 | (let ((cs (or (when (string-match |
| 3974 | (cons 'undecided 'undecided))) | 3970 | "utf8" (or (tramp-get-remote-locale vec) "")) |
| 3975 | cs-decode cs-encode) | 3971 | (cons 'utf-8 'utf-8)) |
| 3972 | (tramp-compat-funcall 'process-coding-system proc) | ||
| 3973 | (cons 'undecided 'undecided))) | ||
| 3974 | cs-decode cs-encode) | ||
| 3976 | (when (symbolp cs) (setq cs (cons cs cs))) | 3975 | (when (symbolp cs) (setq cs (cons cs cs))) |
| 3977 | (setq cs-decode (car cs)) | 3976 | (setq cs-decode (car cs)) |
| 3978 | (setq cs-encode (cdr cs)) | 3977 | (setq cs-encode (cdr cs)) |
| @@ -3980,6 +3979,8 @@ process to set up. VEC specifies the connection." | |||
| 3980 | (unless cs-encode (setq cs-encode 'undecided)) | 3979 | (unless cs-encode (setq cs-encode 'undecided)) |
| 3981 | (setq cs-encode (tramp-compat-coding-system-change-eol-conversion | 3980 | (setq cs-encode (tramp-compat-coding-system-change-eol-conversion |
| 3982 | cs-encode 'unix)) | 3981 | cs-encode 'unix)) |
| 3982 | (tramp-send-command vec "echo foo ; echo bar" t) | ||
| 3983 | (goto-char (point-min)) | ||
| 3983 | (when (search-forward "\r" nil t) | 3984 | (when (search-forward "\r" nil t) |
| 3984 | (setq cs-decode (tramp-compat-coding-system-change-eol-conversion | 3985 | (setq cs-decode (tramp-compat-coding-system-change-eol-conversion |
| 3985 | cs-decode 'dos))) | 3986 | cs-decode 'dos))) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6be737eb3f0..921c70135df 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4127,10 +4127,9 @@ ALIST is of the form ((FROM . TO) ...)." | |||
| 4127 | (defun tramp-call-process | 4127 | (defun tramp-call-process |
| 4128 | (vec program &optional infile destination display &rest args) | 4128 | (vec program &optional infile destination display &rest args) |
| 4129 | "Calls `call-process' on the local host. | 4129 | "Calls `call-process' on the local host. |
| 4130 | This is needed because for some Emacs flavors Tramp has | 4130 | It always returns a return code. The Lisp error raised when |
| 4131 | defadvised `call-process' to behave like `process-file'. The | 4131 | PROGRAM is nil is trapped also, returning 1. Furthermore, traces |
| 4132 | Lisp error raised when PROGRAM is nil is trapped also, returning 1. | 4132 | are written with verbosity of 6." |
| 4133 | Furthermore, traces are written with verbosity of 6." | ||
| 4134 | (let ((v (or vec | 4133 | (let ((v (or vec |
| 4135 | (vector tramp-current-method tramp-current-user | 4134 | (vector tramp-current-method tramp-current-user |
| 4136 | tramp-current-host nil nil))) | 4135 | tramp-current-host nil nil))) |
| @@ -4144,6 +4143,9 @@ Furthermore, traces are written with verbosity of 6." | |||
| 4144 | (setq result | 4143 | (setq result |
| 4145 | (apply | 4144 | (apply |
| 4146 | 'call-process program infile (or destination t) display args)) | 4145 | 'call-process program infile (or destination t) display args)) |
| 4146 | ;; `result' could also be an error string. | ||
| 4147 | (when (stringp result) | ||
| 4148 | (signal 'file-error (list result))) | ||
| 4147 | (with-current-buffer | 4149 | (with-current-buffer |
| 4148 | (if (bufferp destination) destination (current-buffer)) | 4150 | (if (bufferp destination) destination (current-buffer)) |
| 4149 | (tramp-message v 6 "%d\n%s" result (buffer-string)))) | 4151 | (tramp-message v 6 "%d\n%s" result (buffer-string)))) |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 9c0beb114bc..065c3f33ebe 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -24,14 +24,14 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Code: | 25 | ;;; Code: |
| 26 | 26 | ||
| 27 | ;; In the Tramp CVS repository, the version number and the bug report | 27 | ;; In the Tramp GIT repository, the version number and the bug report |
| 28 | ;; address are auto-frobbed from configure.ac, so you should edit that | 28 | ;; address are auto-frobbed from configure.ac, so you should edit that |
| 29 | ;; file and run "autoconf && ./configure" to change them. (X)Emacs | 29 | ;; file and run "autoconf && ./configure" to change them. (X)Emacs |
| 30 | ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; | 30 | ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; |
| 31 | ;; should be changed only there. | 31 | ;; should be changed only there. |
| 32 | 32 | ||
| 33 | ;;;###tramp-autoload | 33 | ;;;###tramp-autoload |
| 34 | (defconst tramp-version "2.2.10" | 34 | (defconst tramp-version "2.2.11-pre" |
| 35 | "This version of Tramp.") | 35 | "This version of Tramp.") |
| 36 | 36 | ||
| 37 | ;;;###tramp-autoload | 37 | ;;;###tramp-autoload |
| @@ -44,7 +44,7 @@ | |||
| 44 | (= emacs-major-version 21) | 44 | (= emacs-major-version 21) |
| 45 | (>= emacs-minor-version 4))) | 45 | (>= emacs-minor-version 4))) |
| 46 | "ok" | 46 | "ok" |
| 47 | (format "Tramp 2.2.10 is not fit for %s" | 47 | (format "Tramp 2.2.11-pre is not fit for %s" |
| 48 | (when (string-match "^.*$" (emacs-version)) | 48 | (when (string-match "^.*$" (emacs-version)) |
| 49 | (match-string 0 (emacs-version))))))) | 49 | (match-string 0 (emacs-version))))))) |
| 50 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) | 50 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 6431fa4aaf2..c7f018f5f15 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -71,8 +71,8 @@ | |||
| 71 | ;; For example: | 71 | ;; For example: |
| 72 | ;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode)) | 72 | ;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode)) |
| 73 | 73 | ||
| 74 | ;; Once you have entered f90-mode, you may get more info by using | 74 | ;; Once you have entered f90-mode, you can get more info by using |
| 75 | ;; the command describe-mode (C-h m). For online help use | 75 | ;; the command describe-mode (C-h m). For help use |
| 76 | ;; C-h f <Name of function you want described>, or | 76 | ;; C-h f <Name of function you want described>, or |
| 77 | ;; C-h v <Name of variable you want described>. | 77 | ;; C-h v <Name of variable you want described>. |
| 78 | 78 | ||
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 6585668b927..f6562f32e94 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el | |||
| @@ -138,7 +138,8 @@ | |||
| 138 | 138 | ||
| 139 | (defcustom hide-ifdef-exclude-define-regexp nil | 139 | (defcustom hide-ifdef-exclude-define-regexp nil |
| 140 | "Ignore #define names if those names match this exclusion pattern." | 140 | "Ignore #define names if those names match this exclusion pattern." |
| 141 | :type 'string) | 141 | :type 'string |
| 142 | :version "24.5") | ||
| 142 | 143 | ||
| 143 | (defvar hide-ifdef-mode-submap | 144 | (defvar hide-ifdef-mode-submap |
| 144 | ;; Set up the submap that goes after the prefix key. | 145 | ;; Set up the submap that goes after the prefix key. |
diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index 39951730ab3..6cb04a03b7e 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el | |||
| @@ -49,14 +49,14 @@ | |||
| 49 | ;; | 49 | ;; |
| 50 | ;; New versions of IDLWAVE, documentation, and more information available | 50 | ;; New versions of IDLWAVE, documentation, and more information available |
| 51 | ;; from: | 51 | ;; from: |
| 52 | ;; http://idlwave.org | 52 | ;; http://github.com/jdtsmith/idlwave |
| 53 | ;; | 53 | ;; |
| 54 | ;; INSTALLATION | 54 | ;; INSTALLATION |
| 55 | ;; ============ | 55 | ;; ============ |
| 56 | ;; Put this file on the emacs load path and load it with the following | 56 | ;; Put this file on the emacs load path and load it with the following |
| 57 | ;; line in your init file: | 57 | ;; line in your init file: |
| 58 | ;; | 58 | ;; |
| 59 | ;; (add-hook 'idlwave-load-hook | 59 | ;; (add-hook 'idlwave-load-hook |
| 60 | ;; (lambda () (require 'idlw-complete-structtag))) | 60 | ;; (lambda () (require 'idlw-complete-structtag))) |
| 61 | ;; | 61 | ;; |
| 62 | ;; DESCRIPTION | 62 | ;; DESCRIPTION |
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index b9c41c9d699..3d42fe231bd 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; along with new versions of IDLWAVE, documentation, and more | 32 | ;; along with new versions of IDLWAVE, documentation, and more |
| 33 | ;; information, at: | 33 | ;; information, at: |
| 34 | ;; | 34 | ;; |
| 35 | ;; http://idlwave.org | 35 | ;; http://github.com/jdtsmith/idlwave |
| 36 | ;; | 36 | ;; |
| 37 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 37 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 38 | 38 | ||
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index a0683d1c409..876695b0809 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ;; | 40 | ;; |
| 41 | ;; New versions of IDLWAVE, documentation, and more information | 41 | ;; New versions of IDLWAVE, documentation, and more information |
| 42 | ;; available from: | 42 | ;; available from: |
| 43 | ;; http://idlwave.org | 43 | ;; http://github.com/jdtsmith/idlwave |
| 44 | ;; | 44 | ;; |
| 45 | ;; INSTALLATION: | 45 | ;; INSTALLATION: |
| 46 | ;; ============= | 46 | ;; ============= |
| @@ -58,7 +58,7 @@ | |||
| 58 | ;; The newest version of this file can be found on the maintainers | 58 | ;; The newest version of this file can be found on the maintainers |
| 59 | ;; web site. | 59 | ;; web site. |
| 60 | ;; | 60 | ;; |
| 61 | ;; http://idlwave.org | 61 | ;; http://github.com/jdtsmith/idlwave |
| 62 | ;; | 62 | ;; |
| 63 | ;; DOCUMENTATION | 63 | ;; DOCUMENTATION |
| 64 | ;; ============= | 64 | ;; ============= |
| @@ -923,7 +923,7 @@ IDL has currently stepped.") | |||
| 923 | Info documentation for this package is available. Use \\[idlwave-info] | 923 | Info documentation for this package is available. Use \\[idlwave-info] |
| 924 | to display (complain to your sysadmin if that does not work). | 924 | to display (complain to your sysadmin if that does not work). |
| 925 | For PostScript and HTML versions of the documentation, check IDLWAVE's | 925 | For PostScript and HTML versions of the documentation, check IDLWAVE's |
| 926 | homepage at URL `http://idlwave.org'. | 926 | homepage at URL `http://github.com/jdtsmith/idlwave'. |
| 927 | IDLWAVE has customize support - see the group `idlwave'. | 927 | IDLWAVE has customize support - see the group `idlwave'. |
| 928 | 928 | ||
| 929 | 8. Keybindings | 929 | 8. Keybindings |
diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 7844890c22a..45672be7d97 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | ;; New versions of IDLWAVE, documentation, and more information | 30 | ;; New versions of IDLWAVE, documentation, and more information |
| 31 | ;; available from: | 31 | ;; available from: |
| 32 | ;; http://idlwave.org | 32 | ;; http://github.com/jdtsmith/idlwave |
| 33 | 33 | ||
| 34 | 34 | ||
| 35 | ;;; Code: | 35 | ;;; Code: |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 86a16036e10..e66c9655df1 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | ;; | 44 | ;; |
| 45 | ;; New versions of IDLWAVE, documentation, and more information | 45 | ;; New versions of IDLWAVE, documentation, and more information |
| 46 | ;; available from: | 46 | ;; available from: |
| 47 | ;; http://idlwave.org | 47 | ;; http://github.com/jdtsmith/idlwave |
| 48 | ;; | 48 | ;; |
| 49 | ;; INSTALLATION | 49 | ;; INSTALLATION |
| 50 | ;; ============ | 50 | ;; ============ |
| @@ -64,7 +64,7 @@ | |||
| 64 | ;; The newest version of this file is available from the maintainer's | 64 | ;; The newest version of this file is available from the maintainer's |
| 65 | ;; Webpage: | 65 | ;; Webpage: |
| 66 | ;; | 66 | ;; |
| 67 | ;; http://idlwave.org | 67 | ;; http://github.com/jdtsmith/idlwave |
| 68 | ;; | 68 | ;; |
| 69 | ;; DOCUMENTATION | 69 | ;; DOCUMENTATION |
| 70 | ;; ============= | 70 | ;; ============= |
| @@ -179,7 +179,7 @@ | |||
| 179 | "Major mode for editing IDL .pro files." | 179 | "Major mode for editing IDL .pro files." |
| 180 | :tag "IDLWAVE" | 180 | :tag "IDLWAVE" |
| 181 | :link '(url-link :tag "Home Page" | 181 | :link '(url-link :tag "Home Page" |
| 182 | "http://idlwave.org") | 182 | "http://github.com/jdtsmith/idlwave") |
| 183 | :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" | 183 | :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" |
| 184 | "idlw-shell.el") | 184 | "idlw-shell.el") |
| 185 | :link '(emacs-commentary-link :tag "Commentary in idlwave.el" "idlwave.el") | 185 | :link '(emacs-commentary-link :tag "Commentary in idlwave.el" "idlwave.el") |
| @@ -1878,7 +1878,8 @@ The main features of this mode are | |||
| 1878 | Info documentation for this package is available. Use | 1878 | Info documentation for this package is available. Use |
| 1879 | \\[idlwave-info] to display (complain to your sysadmin if that does | 1879 | \\[idlwave-info] to display (complain to your sysadmin if that does |
| 1880 | not work). For Postscript, PDF, and HTML versions of the | 1880 | not work). For Postscript, PDF, and HTML versions of the |
| 1881 | documentation, check IDLWAVE's homepage at URL `http://idlwave.org'. | 1881 | documentation, check IDLWAVE's homepage at URL |
| 1882 | `http://github.com/jdtsmith/idlwave'. | ||
| 1882 | IDLWAVE has customize support - see the group `idlwave'. | 1883 | IDLWAVE has customize support - see the group `idlwave'. |
| 1883 | 1884 | ||
| 1884 | 10.Keybindings | 1885 | 10.Keybindings |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index cedc2986eda..f32d4641af0 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -26,8 +26,8 @@ | |||
| 26 | ;; ===== | 26 | ;; ===== |
| 27 | 27 | ||
| 28 | ;; Emacs should enter Pascal mode when you find a Pascal source file. | 28 | ;; Emacs should enter Pascal mode when you find a Pascal source file. |
| 29 | ;; When you have entered Pascal mode, you may get more info by pressing | 29 | ;; When you have entered Pascal mode, you can get more info by pressing |
| 30 | ;; C-h m. You may also get online help describing various functions by: | 30 | ;; C-h m. You can also get help describing various functions by: |
| 31 | ;; C-h f <Name of function you want described> | 31 | ;; C-h f <Name of function you want described> |
| 32 | 32 | ||
| 33 | ;; If you want to customize Pascal mode to fit you better, you may add | 33 | ;; If you want to customize Pascal mode to fit you better, you may add |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 743981b3714..065a182904f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1096,16 +1096,28 @@ the line will be re-indented automatically if needed." | |||
| 1096 | (when (and electric-indent-mode | 1096 | (when (and electric-indent-mode |
| 1097 | (eq (char-before) last-command-event)) | 1097 | (eq (char-before) last-command-event)) |
| 1098 | (cond | 1098 | (cond |
| 1099 | ((and (not (bolp)) | 1099 | ;; Electric indent inside parens |
| 1100 | (memq (char-after) '(?\) ?\] ?\}))) | 1100 | ((and |
| 1101 | (not (bolp)) | ||
| 1102 | (let ((paren-start (python-syntax-context 'paren))) | ||
| 1103 | ;; Check that point is inside parens. | ||
| 1104 | (when paren-start | ||
| 1105 | (not | ||
| 1106 | ;; Filter the case where input is happening in the same | ||
| 1107 | ;; line where the open paren is. | ||
| 1108 | (= (line-number-at-pos) | ||
| 1109 | (line-number-at-pos paren-start))))) | ||
| 1110 | ;; When content has been added before the closing paren or a | ||
| 1111 | ;; comma has been inserted, it's ok to do the trick. | ||
| 1112 | (or | ||
| 1113 | (memq (char-after) '(?\) ?\] ?\})) | ||
| 1114 | (eq (char-before) ?,))) | ||
| 1101 | (save-excursion | 1115 | (save-excursion |
| 1102 | (goto-char (line-beginning-position)) | 1116 | (goto-char (line-beginning-position)) |
| 1103 | ;; If after going to the beginning of line the point | 1117 | (let ((indentation (python-indent-calculate-indentation))) |
| 1104 | ;; is still inside a paren it's ok to do the trick | 1118 | (when (< (current-indentation) indentation) |
| 1105 | (when (python-syntax-context 'paren) | 1119 | (indent-line-to indentation))))) |
| 1106 | (let ((indentation (python-indent-calculate-indentation))) | 1120 | ;; Electric colon |
| 1107 | (when (< (current-indentation) indentation) | ||
| 1108 | (indent-line-to indentation)))))) | ||
| 1109 | ((and (eq ?: last-command-event) | 1121 | ((and (eq ?: last-command-event) |
| 1110 | (memq ?: electric-indent-chars) | 1122 | (memq ?: electric-indent-chars) |
| 1111 | (not current-prefix-arg) | 1123 | (not current-prefix-arg) |
diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 92a2e0b38cd..db0694549e1 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el | |||
| @@ -325,8 +325,6 @@ | |||
| 325 | ;; Emacs | 325 | ;; Emacs |
| 326 | (property-change from) | 326 | (property-change from) |
| 327 | (overlay-change from) | 327 | (overlay-change from) |
| 328 | (save-buffer-invisibility-spec buffer-invisibility-spec) | ||
| 329 | (buffer-invisibility-spec nil) | ||
| 330 | before-string after-string) | 328 | before-string after-string) |
| 331 | (while (< from to) | 329 | (while (< from to) |
| 332 | (and (< property-change to) ; Don't search for property change | 330 | (and (< property-change to) ; Don't search for property change |
diff --git a/lisp/rect.el b/lisp/rect.el index ac861a0824b..a2f8e4f6371 100644 --- a/lisp/rect.el +++ b/lisp/rect.el | |||
| @@ -719,7 +719,7 @@ Ignores `line-move-visual'." | |||
| 719 | ((not rectangle-mark-mode) | 719 | ((not rectangle-mark-mode) |
| 720 | (funcall orig start end window rol)) | 720 | (funcall orig start end window rol)) |
| 721 | (rectangle--inhibit-region-highlight | 721 | (rectangle--inhibit-region-highlight |
| 722 | (rectangle--unhighlight-for-redisplay orig rol) | 722 | (funcall redisplay-unhighlight-region-function rol) |
| 723 | nil) | 723 | nil) |
| 724 | ((and (eq 'rectangle (car-safe rol)) | 724 | ((and (eq 'rectangle (car-safe rol)) |
| 725 | (eq (nth 1 rol) (buffer-chars-modified-tick)) | 725 | (eq (nth 1 rol) (buffer-chars-modified-tick)) |
diff --git a/lisp/simple.el b/lisp/simple.el index a8689aaf2e3..6fd50197a10 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4527,9 +4527,11 @@ run `deactivate-mark-hook'." | |||
| 4527 | (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). | 4527 | (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). |
| 4528 | (cond | 4528 | (cond |
| 4529 | ((eq (car-safe transient-mark-mode) 'only) | 4529 | ((eq (car-safe transient-mark-mode) 'only) |
| 4530 | (setq transient-mark-mode (cdr transient-mark-mode))) | 4530 | (setq transient-mark-mode (cdr transient-mark-mode)) |
| 4531 | (if (eq transient-mark-mode (default-value 'transient-mark-mode)) | ||
| 4532 | (kill-local-variable 'transient-mark-mode))) | ||
| 4531 | ((eq transient-mark-mode 'lambda) | 4533 | ((eq transient-mark-mode 'lambda) |
| 4532 | (setq transient-mark-mode nil))) | 4534 | (kill-local-variable 'transient-mark-mode))) |
| 4533 | (setq mark-active nil) | 4535 | (setq mark-active nil) |
| 4534 | (run-hooks 'deactivate-mark-hook) | 4536 | (run-hooks 'deactivate-mark-hook) |
| 4535 | (redisplay--update-region-highlight (selected-window)))) | 4537 | (redisplay--update-region-highlight (selected-window)))) |
| @@ -4756,7 +4758,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong | |||
| 4756 | purposes. See the documentation of `set-mark' for more information." | 4758 | purposes. See the documentation of `set-mark' for more information." |
| 4757 | (interactive "P") | 4759 | (interactive "P") |
| 4758 | (cond ((eq transient-mark-mode 'lambda) | 4760 | (cond ((eq transient-mark-mode 'lambda) |
| 4759 | (setq transient-mark-mode nil)) | 4761 | (kill-local-variable 'transient-mark-mode)) |
| 4760 | ((eq (car-safe transient-mark-mode) 'only) | 4762 | ((eq (car-safe transient-mark-mode) 'only) |
| 4761 | (deactivate-mark))) | 4763 | (deactivate-mark))) |
| 4762 | (cond | 4764 | (cond |
| @@ -4894,6 +4896,8 @@ its earlier value." | |||
| 4894 | (push-mark nil nil t))) | 4896 | (push-mark nil nil t))) |
| 4895 | ((eq (car-safe transient-mark-mode) 'only) | 4897 | ((eq (car-safe transient-mark-mode) 'only) |
| 4896 | (setq transient-mark-mode (cdr transient-mark-mode)) | 4898 | (setq transient-mark-mode (cdr transient-mark-mode)) |
| 4899 | (if (eq transient-mark-mode (default-value 'transient-mark-mode)) | ||
| 4900 | (kill-local-variable 'transient-mark-mode)) | ||
| 4897 | (deactivate-mark)))) | 4901 | (deactivate-mark)))) |
| 4898 | 4902 | ||
| 4899 | (define-minor-mode transient-mark-mode | 4903 | (define-minor-mode transient-mark-mode |
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 9837c20b84d..56ff13fbbb6 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el | |||
| @@ -140,7 +140,7 @@ Useful commands (type ? to hide them and free up screen): | |||
| 140 | uh/um:\tunmark all sessions marked for hiding/operation | 140 | uh/um:\tunmark all sessions marked for hiding/operation |
| 141 | n,SPC:\tnext session | 141 | n,SPC:\tnext session |
| 142 | p,DEL:\tprevious session | 142 | p,DEL:\tprevious session |
| 143 | E:\tbrowse Ediff on-line manual | 143 | E:\tbrowse Ediff manual |
| 144 | T:\ttoggle truncation of long file names | 144 | T:\ttoggle truncation of long file names |
| 145 | q:\tquit this session group | 145 | q:\tquit this session group |
| 146 | ") | 146 | ") |
| @@ -1464,7 +1464,7 @@ Useful commands: | |||
| 1464 | R in any Ediff session: display session registry | 1464 | R in any Ediff session: display session registry |
| 1465 | n,SPC: next session | 1465 | n,SPC: next session |
| 1466 | p,DEL: previous session | 1466 | p,DEL: previous session |
| 1467 | E: browse Ediff on-line manual | 1467 | E: browse Ediff manual |
| 1468 | q: bury registry | 1468 | q: bury registry |
| 1469 | 1469 | ||
| 1470 | 1470 | ||
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index d1332351a74..bb6ab1062c1 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el | |||
| @@ -735,7 +735,7 @@ The second problem might be due to an incompatibility among these settings: | |||
| 735 | ediff-patch-program = %S ediff-patch-options = %S | 735 | ediff-patch-program = %S ediff-patch-options = %S |
| 736 | ediff-backup-extension = %S ediff-backup-specs = %S | 736 | ediff-backup-extension = %S ediff-backup-specs = %S |
| 737 | 737 | ||
| 738 | See Ediff on-line manual for more details on these variables. | 738 | See Ediff manual for more details on these variables. |
| 739 | In particular, check the documentation for `ediff-backup-specs'. | 739 | In particular, check the documentation for `ediff-backup-specs'. |
| 740 | 740 | ||
| 741 | In any of the above cases, Ediff doesn't compare files automatically. | 741 | In any of the above cases, Ediff doesn't compare files automatically. |
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 927a3ba7fb6..5418039143f 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | ;; compressed files. Details are given below. | 64 | ;; compressed files. Details are given below. |
| 65 | 65 | ||
| 66 | ;; Finally, Ediff supports directory-level comparison, merging and patching. | 66 | ;; Finally, Ediff supports directory-level comparison, merging and patching. |
| 67 | ;; See the on-line manual for details. | 67 | ;; See the Ediff manual for details. |
| 68 | 68 | ||
| 69 | ;; This package builds upon the ideas borrowed from emerge.el and several | 69 | ;; This package builds upon the ideas borrowed from emerge.el and several |
| 70 | ;; Ediff's functions are adaptations from emerge.el. Much of the functionality | 70 | ;; Ediff's functions are adaptations from emerge.el. Much of the functionality |
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index e6bd897f4ac..1d75411ec1f 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el | |||
| @@ -132,6 +132,8 @@ This applies when its SETUP argument is non-nil." | |||
| 132 | log-edit-insert-changelog | 132 | log-edit-insert-changelog |
| 133 | log-edit-show-files) | 133 | log-edit-show-files) |
| 134 | "Hook run at the end of `log-edit'." | 134 | "Hook run at the end of `log-edit'." |
| 135 | ;; Added log-edit-insert-message-template, moved log-edit-show-files. | ||
| 136 | :version "24.4" | ||
| 135 | :group 'log-edit | 137 | :group 'log-edit |
| 136 | :type '(hook :options (log-edit-insert-message-template | 138 | :type '(hook :options (log-edit-insert-message-template |
| 137 | log-edit-insert-cvs-rcstemplate | 139 | log-edit-insert-cvs-rcstemplate |
| @@ -355,9 +357,15 @@ The first subexpression is the actual text of the field.") | |||
| 355 | (set-match-data (list start (point))) | 357 | (set-match-data (list start (point))) |
| 356 | (point)))) | 358 | (point)))) |
| 357 | 359 | ||
| 360 | (defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh! | ||
| 361 | (goto-char (point-min)) | ||
| 362 | (when (re-search-forward | ||
| 363 | "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move) | ||
| 364 | (goto-char (match-beginning 0)))) | ||
| 365 | |||
| 358 | (defun log-edit--match-first-line (limit) | 366 | (defun log-edit--match-first-line (limit) |
| 359 | (let ((start (point))) | 367 | (let ((start (point))) |
| 360 | (rfc822-goto-eoh) | 368 | (log-edit-goto-eoh) |
| 361 | (skip-chars-forward "\n") | 369 | (skip-chars-forward "\n") |
| 362 | (and (< start (line-end-position)) | 370 | (and (< start (line-end-position)) |
| 363 | (< (point) limit) | 371 | (< (point) limit) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index c7cae8359bf..9c8ab3ba393 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -674,7 +674,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 674 | (cl-flet ((boolean-arg-fn | 674 | (cl-flet ((boolean-arg-fn |
| 675 | (argument) | 675 | (argument) |
| 676 | (lambda (value) (when (equal value "yes") (list argument))))) | 676 | (lambda (value) (when (equal value "yes") (list argument))))) |
| 677 | ;; When operating on the whole tree, better pass nil than ".", since "." | 677 | ;; When operating on the whole tree, better pass "-a" than ".", since "." |
| 678 | ;; fails when we're committing a merge. | 678 | ;; fails when we're committing a merge. |
| 679 | (apply 'vc-git-command nil 0 (if only files) | 679 | (apply 'vc-git-command nil 0 (if only files) |
| 680 | (nconc (list "commit" "-m") | 680 | (nconc (list "commit" "-m") |
| @@ -684,7 +684,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 684 | ("Amend" . ,(boolean-arg-fn "--amend")) | 684 | ("Amend" . ,(boolean-arg-fn "--amend")) |
| 685 | ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) | 685 | ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) |
| 686 | comment) | 686 | comment) |
| 687 | (if only (list "--only" "--"))))))) | 687 | (if only (list "--only" "--") '("-a"))))))) |
| 688 | 688 | ||
| 689 | (defun vc-git-find-revision (file rev buffer) | 689 | (defun vc-git-find-revision (file rev buffer) |
| 690 | (let* (process-file-side-effects | 690 | (let* (process-file-side-effects |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f9e89880dae..e5e77405b02 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -312,7 +312,8 @@ terminals that support it.") | |||
| 312 | "Enable xterm mouse tracking on TERMINAL." | 312 | "Enable xterm mouse tracking on TERMINAL." |
| 313 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) | 313 | (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) |
| 314 | ;; Avoid the initial terminal which is not a termcap device. | 314 | ;; Avoid the initial terminal which is not a termcap device. |
| 315 | ;; FIXME: is there more elegant way to detect the initial terminal? | 315 | ;; FIXME: is there more elegant way to detect the initial |
| 316 | ;; terminal? | ||
| 316 | (not (string= (terminal-name terminal) "initial_terminal"))) | 317 | (not (string= (terminal-name terminal) "initial_terminal"))) |
| 317 | (unless (terminal-parameter terminal 'xterm-mouse-mode) | 318 | (unless (terminal-parameter terminal 'xterm-mouse-mode) |
| 318 | ;; Simulate selecting a terminal by selecting one of its frames | 319 | ;; Simulate selecting a terminal by selecting one of its frames |
| @@ -320,7 +321,13 @@ terminals that support it.") | |||
| 320 | (with-selected-frame (car (frames-on-display-list terminal)) | 321 | (with-selected-frame (car (frames-on-display-list terminal)) |
| 321 | (define-key input-decode-map "\e[M" 'xterm-mouse-translate) | 322 | (define-key input-decode-map "\e[M" 'xterm-mouse-translate) |
| 322 | (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) | 323 | (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) |
| 323 | (send-string-to-terminal xterm-mouse-tracking-enable-sequence terminal) | 324 | (condition-case err |
| 325 | (send-string-to-terminal xterm-mouse-tracking-enable-sequence | ||
| 326 | terminal) | ||
| 327 | ;; FIXME: This should use a dedicated error signal. | ||
| 328 | (error (if (equal (cadr err) "Terminal is currently suspended") | ||
| 329 | nil ;The sequence will be sent upon resume. | ||
| 330 | (signal (car err) (cdr err))))) | ||
| 324 | (push xterm-mouse-tracking-enable-sequence | 331 | (push xterm-mouse-tracking-enable-sequence |
| 325 | (terminal-parameter nil 'tty-mode-set-strings)) | 332 | (terminal-parameter nil 'tty-mode-set-strings)) |
| 326 | (push xterm-mouse-tracking-disable-sequence | 333 | (push xterm-mouse-tracking-disable-sequence |
| @@ -338,7 +345,13 @@ terminals that support it.") | |||
| 338 | ;; command too many times (or to catch an unintended key sequence), than | 345 | ;; command too many times (or to catch an unintended key sequence), than |
| 339 | ;; to send it too few times (or to fail to let xterm-mouse events | 346 | ;; to send it too few times (or to fail to let xterm-mouse events |
| 340 | ;; pass by untranslated). | 347 | ;; pass by untranslated). |
| 341 | (send-string-to-terminal xterm-mouse-tracking-disable-sequence terminal) | 348 | (condition-case err |
| 349 | (send-string-to-terminal xterm-mouse-tracking-disable-sequence | ||
| 350 | terminal) | ||
| 351 | ;; FIXME: This should use a dedicated error signal. | ||
| 352 | (error (if (equal (cadr err) "Terminal is currently suspended") | ||
| 353 | nil | ||
| 354 | (signal (car err) (cdr err))))) | ||
| 342 | (setf (terminal-parameter nil 'tty-mode-set-strings) | 355 | (setf (terminal-parameter nil 'tty-mode-set-strings) |
| 343 | (remq xterm-mouse-tracking-enable-sequence | 356 | (remq xterm-mouse-tracking-enable-sequence |
| 344 | (terminal-parameter nil 'tty-mode-set-strings))) | 357 | (terminal-parameter nil 'tty-mode-set-strings))) |
diff --git a/src/ChangeLog b/src/ChangeLog index 1db9e8768e3..61ada3aa0d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,9 +1,101 @@ | |||
| 1 | 2014-07-01 K. Handa <handa@gnu.org> | 1 | 2014-07-04 K. Handa <handa@gnu.org> |
| 2 | 2 | ||
| 3 | * coding.c (MIN_CHARBUF_SIZE): Delete it. | 3 | * coding.c (MIN_CHARBUF_SIZE): Delete it. |
| 4 | (MAX_CHARBUF_EXTRA_SIZE): New macro. | 4 | (MAX_CHARBUF_EXTRA_SIZE): New macro. |
| 5 | (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE. | 5 | (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE. |
| 6 | 6 | ||
| 7 | 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 8 | |||
| 9 | * font.h (struct font_driver): Remove get_outline and free_outline; | ||
| 10 | not used by any font driver. | ||
| 11 | * ftfont.c (ftfont_driver): | ||
| 12 | * macfont.m (macfont_driver): | ||
| 13 | * nsfont.m (nsfont_driver): | ||
| 14 | * w32font.c (w32font_driver): | ||
| 15 | * w32uniscribe.c (uniscribe_font_driver): | ||
| 16 | * xfont.c (xfont_driver): Related users changed. | ||
| 17 | * xselect.c (x_get_window_property): Use convenient xmalloc. | ||
| 18 | Call to xfree only if some data was really allocated. | ||
| 19 | |||
| 20 | 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 21 | |||
| 22 | On MS-Windows, display busy cursor on all GUI frames. | ||
| 23 | This is similar to what we have on X. Quickly tested by Dani Moncayo. | ||
| 24 | * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used. | ||
| 25 | (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window): | ||
| 26 | Likewise. | ||
| 27 | (hide_hourglass, show_hourglass): Redesign to match X counterparts. | ||
| 28 | * xdisp.c (start_hourglass): Remove Windows-specific bits. | ||
| 29 | |||
| 30 | 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 31 | |||
| 32 | Use convenient alists to manage per-frame font driver-specific data. | ||
| 33 | * frame.h (struct frame): Rename font_data_list to... | ||
| 34 | [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. | ||
| 35 | * font.h (struct font_data_list): Remove; no longer need a special | ||
| 36 | data type. | ||
| 37 | (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: | ||
| 38 | Adjust prototypes. | ||
| 39 | * font.c (font_put_frame_data, font_get_frame_data) | ||
| 40 | [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list | ||
| 41 | management. | ||
| 42 | * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame): | ||
| 43 | Related users changed. | ||
| 44 | * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise. | ||
| 45 | Prefer convenient xmalloc and xfree. | ||
| 46 | |||
| 47 | 2014-07-03 Eli Zaretskii <eliz@gnu.org> | ||
| 48 | |||
| 49 | * dispnew.c (prepare_desired_row): Accept 2 additional arguments: | ||
| 50 | the window whose glyph row is being prepared and a flag whether it | ||
| 51 | is for mode/header line. Make sure the glyph row's marginal areas | ||
| 52 | are in sync with what the window wants. | ||
| 53 | (Bug#17892) | ||
| 54 | |||
| 55 | * xdisp.c (display_line, display_mode_line): Call | ||
| 56 | prepare_desired_row with additional arguments, as appropriate. | ||
| 57 | |||
| 58 | * dispextern.h (prepare_desired_row): Adjust prototype. | ||
| 59 | |||
| 60 | 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 61 | |||
| 62 | * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889). | ||
| 63 | * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash | ||
| 64 | caused by xw_popup_dialog in daemon mode (Bug#17891). | ||
| 65 | |||
| 66 | 2014-07-03 Eli Zaretskii <eliz@gnu.org> | ||
| 67 | |||
| 68 | * frame.c (do_switch_frame): When switching to another TTY frame, | ||
| 69 | make sure FrameCols and FrameRows are in sync with the new frame's | ||
| 70 | data. (Bug#17875) | ||
| 71 | |||
| 72 | 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 73 | |||
| 74 | Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects. | ||
| 75 | * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and | ||
| 76 | min_char slots. Adjust comment. | ||
| 77 | (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS. | ||
| 78 | Add SUB_CHAR_TABLE_OFFSET member. | ||
| 79 | (make_uninit_sub_char_table): New function. | ||
| 80 | (toplevel): Add compile-time assert to verify suitable member layout | ||
| 81 | in Lisp_Sub_Char_Table. | ||
| 82 | * alloc.c (mark_char_table): Add extra argument to denote char table | ||
| 83 | subtype. Adjust to match new layout of sub char-table. | ||
| 84 | (mark_object): Always mark sub char-tables with mark_char_table. | ||
| 85 | * chartab.c (make_sub_char_table, copy_sub_char_table) | ||
| 86 | (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set) | ||
| 87 | (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table) | ||
| 88 | (map_sub_char_table_for_charset, uniprop_table_uncompress): | ||
| 89 | All related users changed. | ||
| 90 | * lread.c (read1): Adjust to match new layout of sub char-table. | ||
| 91 | * print.c (print_object): Likewise (Bug#17898). | ||
| 92 | |||
| 93 | 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 94 | |||
| 95 | * keymap.c (get_keyelt): Simplify. | ||
| 96 | (copy_keymap_item): Remove left-over code for when we had | ||
| 97 | key-shortcut caches. | ||
| 98 | |||
| 7 | 2014-06-30 Jan Djärv <jan.h.d@swipnet.se> | 99 | 2014-06-30 Jan Djärv <jan.h.d@swipnet.se> |
| 8 | 100 | ||
| 9 | * nsterm.m (judge): EmacsScroller: Move dealloc code here. | 101 | * nsterm.m (judge): EmacsScroller: Move dealloc code here. |
| @@ -25,8 +117,7 @@ | |||
| 25 | (mouseMoved:): Set any_help_event_p to YES if help event is | 117 | (mouseMoved:): Set any_help_event_p to YES if help event is |
| 26 | generated. Remove else with empty help event that triggered redisplay | 118 | generated. Remove else with empty help event that triggered redisplay |
| 27 | for every mouse move. | 119 | for every mouse move. |
| 28 | (windowDidResignKey:): If any_help_event_p, generate empty help | 120 | (windowDidResignKey:): If any_help_event_p, generate empty help event. |
| 29 | event. | ||
| 30 | 121 | ||
| 31 | 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru> | 122 | 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru> |
| 32 | 123 | ||
diff --git a/src/alloc.c b/src/alloc.c index e2213db853d..6eb2e756ed1 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5958,14 +5958,15 @@ mark_vectorlike (struct Lisp_Vector *ptr) | |||
| 5958 | symbols. */ | 5958 | symbols. */ |
| 5959 | 5959 | ||
| 5960 | static void | 5960 | static void |
| 5961 | mark_char_table (struct Lisp_Vector *ptr) | 5961 | mark_char_table (struct Lisp_Vector *ptr, enum pvec_type pvectype) |
| 5962 | { | 5962 | { |
| 5963 | int size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK; | 5963 | int size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK; |
| 5964 | int i; | 5964 | /* Consult the Lisp_Sub_Char_Table layout before changing this. */ |
| 5965 | int i, idx = (pvectype == PVEC_SUB_CHAR_TABLE ? SUB_CHAR_TABLE_OFFSET : 0); | ||
| 5965 | 5966 | ||
| 5966 | eassert (!VECTOR_MARKED_P (ptr)); | 5967 | eassert (!VECTOR_MARKED_P (ptr)); |
| 5967 | VECTOR_MARK (ptr); | 5968 | VECTOR_MARK (ptr); |
| 5968 | for (i = 0; i < size; i++) | 5969 | for (i = idx; i < size; i++) |
| 5969 | { | 5970 | { |
| 5970 | Lisp_Object val = ptr->contents[i]; | 5971 | Lisp_Object val = ptr->contents[i]; |
| 5971 | 5972 | ||
| @@ -5974,7 +5975,7 @@ mark_char_table (struct Lisp_Vector *ptr) | |||
| 5974 | if (SUB_CHAR_TABLE_P (val)) | 5975 | if (SUB_CHAR_TABLE_P (val)) |
| 5975 | { | 5976 | { |
| 5976 | if (! VECTOR_MARKED_P (XVECTOR (val))) | 5977 | if (! VECTOR_MARKED_P (XVECTOR (val))) |
| 5977 | mark_char_table (XVECTOR (val)); | 5978 | mark_char_table (XVECTOR (val), PVEC_SUB_CHAR_TABLE); |
| 5978 | } | 5979 | } |
| 5979 | else | 5980 | else |
| 5980 | mark_object (val); | 5981 | mark_object (val); |
| @@ -6320,7 +6321,8 @@ mark_object (Lisp_Object arg) | |||
| 6320 | break; | 6321 | break; |
| 6321 | 6322 | ||
| 6322 | case PVEC_CHAR_TABLE: | 6323 | case PVEC_CHAR_TABLE: |
| 6323 | mark_char_table (ptr); | 6324 | case PVEC_SUB_CHAR_TABLE: |
| 6325 | mark_char_table (ptr, (enum pvec_type) pvectype); | ||
| 6324 | break; | 6326 | break; |
| 6325 | 6327 | ||
| 6326 | case PVEC_BOOL_VECTOR: | 6328 | case PVEC_BOOL_VECTOR: |
| @@ -7218,7 +7220,7 @@ The time is in seconds as a floating point value. */); | |||
| 7218 | union | 7220 | union |
| 7219 | { | 7221 | { |
| 7220 | enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS; | 7222 | enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS; |
| 7221 | enum CHAR_TABLE_STANDARD_SLOTS CHAR_TABLE_STANDARD_SLOTS; | 7223 | enum char_table_specials char_table_specials; |
| 7222 | enum char_bits char_bits; | 7224 | enum char_bits char_bits; |
| 7223 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; | 7225 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; |
| 7224 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; | 7226 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; |
diff --git a/src/chartab.c b/src/chartab.c index 4d4e6381b19..3906ad30b37 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -140,15 +140,11 @@ the char-table has no extra slot. */) | |||
| 140 | static Lisp_Object | 140 | static Lisp_Object |
| 141 | make_sub_char_table (int depth, int min_char, Lisp_Object defalt) | 141 | make_sub_char_table (int depth, int min_char, Lisp_Object defalt) |
| 142 | { | 142 | { |
| 143 | Lisp_Object table; | 143 | int i; |
| 144 | int size = (PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) | 144 | Lisp_Object table = make_uninit_sub_char_table (depth, min_char); |
| 145 | + chartab_size[depth]); | ||
| 146 | |||
| 147 | table = Fmake_vector (make_number (size), defalt); | ||
| 148 | XSETPVECTYPE (XVECTOR (table), PVEC_SUB_CHAR_TABLE); | ||
| 149 | XSUB_CHAR_TABLE (table)->depth = make_number (depth); | ||
| 150 | XSUB_CHAR_TABLE (table)->min_char = make_number (min_char); | ||
| 151 | 145 | ||
| 146 | for (i = 0; i < chartab_size[depth]; i++) | ||
| 147 | XSUB_CHAR_TABLE (table)->contents[i] = defalt; | ||
| 152 | return table; | 148 | return table; |
| 153 | } | 149 | } |
| 154 | 150 | ||
| @@ -172,8 +168,8 @@ char_table_ascii (Lisp_Object table) | |||
| 172 | static Lisp_Object | 168 | static Lisp_Object |
| 173 | copy_sub_char_table (Lisp_Object table) | 169 | copy_sub_char_table (Lisp_Object table) |
| 174 | { | 170 | { |
| 175 | int depth = XINT (XSUB_CHAR_TABLE (table)->depth); | 171 | int depth = XSUB_CHAR_TABLE (table)->depth; |
| 176 | int min_char = XINT (XSUB_CHAR_TABLE (table)->min_char); | 172 | int min_char = XSUB_CHAR_TABLE (table)->min_char; |
| 177 | Lisp_Object copy = make_sub_char_table (depth, min_char, Qnil); | 173 | Lisp_Object copy = make_sub_char_table (depth, min_char, Qnil); |
| 178 | int i; | 174 | int i; |
| 179 | 175 | ||
| @@ -220,10 +216,8 @@ static Lisp_Object | |||
| 220 | sub_char_table_ref (Lisp_Object table, int c, bool is_uniprop) | 216 | sub_char_table_ref (Lisp_Object table, int c, bool is_uniprop) |
| 221 | { | 217 | { |
| 222 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 218 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 223 | int depth = XINT (tbl->depth); | ||
| 224 | int min_char = XINT (tbl->min_char); | ||
| 225 | Lisp_Object val; | 219 | Lisp_Object val; |
| 226 | int idx = CHARTAB_IDX (c, depth, min_char); | 220 | int idx = CHARTAB_IDX (c, tbl->depth, tbl->min_char); |
| 227 | 221 | ||
| 228 | val = tbl->contents[idx]; | 222 | val = tbl->contents[idx]; |
| 229 | if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val)) | 223 | if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val)) |
| @@ -265,8 +259,7 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, | |||
| 265 | Lisp_Object defalt, bool is_uniprop) | 259 | Lisp_Object defalt, bool is_uniprop) |
| 266 | { | 260 | { |
| 267 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 261 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 268 | int depth = XINT (tbl->depth); | 262 | int depth = tbl->depth, min_char = tbl->min_char; |
| 269 | int min_char = XINT (tbl->min_char); | ||
| 270 | int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; | 263 | int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; |
| 271 | Lisp_Object val; | 264 | Lisp_Object val; |
| 272 | 265 | ||
| @@ -402,8 +395,7 @@ static void | |||
| 402 | sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, bool is_uniprop) | 395 | sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, bool is_uniprop) |
| 403 | { | 396 | { |
| 404 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 397 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 405 | int depth = XINT ((tbl)->depth); | 398 | int depth = tbl->depth, min_char = tbl->min_char; |
| 406 | int min_char = XINT ((tbl)->min_char); | ||
| 407 | int i = CHARTAB_IDX (c, depth, min_char); | 399 | int i = CHARTAB_IDX (c, depth, min_char); |
| 408 | Lisp_Object sub; | 400 | Lisp_Object sub; |
| 409 | 401 | ||
| @@ -458,8 +450,7 @@ sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val, | |||
| 458 | bool is_uniprop) | 450 | bool is_uniprop) |
| 459 | { | 451 | { |
| 460 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 452 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 461 | int depth = XINT ((tbl)->depth); | 453 | int depth = tbl->depth, min_char = tbl->min_char; |
| 462 | int min_char = XINT ((tbl)->min_char); | ||
| 463 | int chars_in_block = chartab_chars[depth]; | 454 | int chars_in_block = chartab_chars[depth]; |
| 464 | int i, c, lim = chartab_size[depth]; | 455 | int i, c, lim = chartab_size[depth]; |
| 465 | 456 | ||
| @@ -689,9 +680,8 @@ static Lisp_Object | |||
| 689 | optimize_sub_char_table (Lisp_Object table, Lisp_Object test) | 680 | optimize_sub_char_table (Lisp_Object table, Lisp_Object test) |
| 690 | { | 681 | { |
| 691 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 682 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 692 | int depth = XINT (tbl->depth); | 683 | int i, depth = tbl->depth; |
| 693 | Lisp_Object elt, this; | 684 | Lisp_Object elt, this; |
| 694 | int i; | ||
| 695 | bool optimizable; | 685 | bool optimizable; |
| 696 | 686 | ||
| 697 | elt = XSUB_CHAR_TABLE (table)->contents[0]; | 687 | elt = XSUB_CHAR_TABLE (table)->contents[0]; |
| @@ -778,8 +768,8 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), | |||
| 778 | { | 768 | { |
| 779 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 769 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 780 | 770 | ||
| 781 | depth = XINT (tbl->depth); | 771 | depth = tbl->depth; |
| 782 | min_char = XINT (tbl->min_char); | 772 | min_char = tbl->min_char; |
| 783 | max_char = min_char + chartab_chars[depth - 1] - 1; | 773 | max_char = min_char + chartab_chars[depth - 1] - 1; |
| 784 | } | 774 | } |
| 785 | else | 775 | else |
| @@ -973,12 +963,10 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), | |||
| 973 | unsigned from, unsigned to) | 963 | unsigned from, unsigned to) |
| 974 | { | 964 | { |
| 975 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); | 965 | struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); |
| 976 | int depth = XINT (tbl->depth); | 966 | int i, c = tbl->min_char, depth = tbl->depth; |
| 977 | int c, i; | ||
| 978 | 967 | ||
| 979 | if (depth < 3) | 968 | if (depth < 3) |
| 980 | for (i = 0, c = XINT (tbl->min_char); i < chartab_size[depth]; | 969 | for (i = 0; i < chartab_size[depth]; i++, c += chartab_chars[depth]) |
| 981 | i++, c += chartab_chars[depth]) | ||
| 982 | { | 970 | { |
| 983 | Lisp_Object this; | 971 | Lisp_Object this; |
| 984 | 972 | ||
| @@ -1000,7 +988,7 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), | |||
| 1000 | } | 988 | } |
| 1001 | } | 989 | } |
| 1002 | else | 990 | else |
| 1003 | for (i = 0, c = XINT (tbl->min_char); i < chartab_size[depth]; i++, c ++) | 991 | for (i = 0; i < chartab_size[depth]; i++, c++) |
| 1004 | { | 992 | { |
| 1005 | Lisp_Object this; | 993 | Lisp_Object this; |
| 1006 | unsigned code; | 994 | unsigned code; |
| @@ -1147,8 +1135,7 @@ static Lisp_Object | |||
| 1147 | uniprop_table_uncompress (Lisp_Object table, int idx) | 1135 | uniprop_table_uncompress (Lisp_Object table, int idx) |
| 1148 | { | 1136 | { |
| 1149 | Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[idx]; | 1137 | Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[idx]; |
| 1150 | int min_char = (XINT (XSUB_CHAR_TABLE (table)->min_char) | 1138 | int min_char = XSUB_CHAR_TABLE (table)->min_char + chartab_chars[2] * idx; |
| 1151 | + chartab_chars[2] * idx); | ||
| 1152 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); | 1139 | Lisp_Object sub = make_sub_char_table (3, min_char, Qnil); |
| 1153 | const unsigned char *p, *pend; | 1140 | const unsigned char *p, *pend; |
| 1154 | 1141 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index 5396aeb6c8e..0e04cc466d3 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3460,7 +3460,7 @@ void increment_matrix_positions (struct glyph_matrix *, | |||
| 3460 | void blank_row (struct window *, struct glyph_row *, int); | 3460 | void blank_row (struct window *, struct glyph_row *, int); |
| 3461 | void clear_glyph_matrix_rows (struct glyph_matrix *, int, int); | 3461 | void clear_glyph_matrix_rows (struct glyph_matrix *, int, int); |
| 3462 | void clear_glyph_row (struct glyph_row *); | 3462 | void clear_glyph_row (struct glyph_row *); |
| 3463 | void prepare_desired_row (struct glyph_row *); | 3463 | void prepare_desired_row (struct window *, struct glyph_row *, bool); |
| 3464 | void update_single_window (struct window *, bool); | 3464 | void update_single_window (struct window *, bool); |
| 3465 | void do_pending_window_change (bool); | 3465 | void do_pending_window_change (bool); |
| 3466 | void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); | 3466 | void change_frame_size (struct frame *, int, int, bool, bool, bool, bool); |
diff --git a/src/dispnew.c b/src/dispnew.c index 163780952a6..2d137b4abbd 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -449,7 +449,8 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 449 | + x); | 449 | + x); |
| 450 | 450 | ||
| 451 | if (w == NULL | 451 | if (w == NULL |
| 452 | || row == matrix->rows + dim.height - 1 | 452 | || (row == matrix->rows + dim.height - 1 |
| 453 | && WINDOW_WANTS_MODELINE_P (w)) | ||
| 453 | || (row == matrix->rows && matrix->header_line_p)) | 454 | || (row == matrix->rows && matrix->header_line_p)) |
| 454 | { | 455 | { |
| 455 | row->glyphs[TEXT_AREA] | 456 | row->glyphs[TEXT_AREA] |
| @@ -492,8 +493,9 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 492 | = xnrealloc (row->glyphs[LEFT_MARGIN_AREA], | 493 | = xnrealloc (row->glyphs[LEFT_MARGIN_AREA], |
| 493 | dim.width, sizeof (struct glyph)); | 494 | dim.width, sizeof (struct glyph)); |
| 494 | 495 | ||
| 495 | /* The mode line never has marginal areas. */ | 496 | /* The mode line, if displayed, never has marginal areas. */ |
| 496 | if (row == matrix->rows + dim.height - 1 | 497 | if ((row == matrix->rows + dim.height - 1 |
| 498 | && !(w && WINDOW_WANTS_MODELINE_P (w))) | ||
| 497 | || (row == matrix->rows && matrix->header_line_p)) | 499 | || (row == matrix->rows && matrix->header_line_p)) |
| 498 | { | 500 | { |
| 499 | row->glyphs[TEXT_AREA] | 501 | row->glyphs[TEXT_AREA] |
| @@ -1049,13 +1051,16 @@ find_glyph_row_slice (struct glyph_matrix *window_matrix, | |||
| 1049 | 1051 | ||
| 1050 | #endif /* 0 */ | 1052 | #endif /* 0 */ |
| 1051 | 1053 | ||
| 1052 | /* Prepare ROW for display. Desired rows are cleared lazily, | 1054 | /* Prepare ROW for display in windows W. Desired rows are cleared |
| 1053 | i.e. they are only marked as to be cleared by setting their | 1055 | lazily, i.e. they are only marked as to be cleared by setting their |
| 1054 | enabled_p flag to zero. When a row is to be displayed, a prior | 1056 | enabled_p flag to zero. When a row is to be displayed, a prior |
| 1055 | call to this function really clears it. */ | 1057 | call to this function really clears it. In addition, this function |
| 1058 | makes sure the marginal areas of ROW are in sync with the window's | ||
| 1059 | display margins. MODE_LINE_P non-zero means we are preparing a | ||
| 1060 | glyph row for header line or mode line. */ | ||
| 1056 | 1061 | ||
| 1057 | void | 1062 | void |
| 1058 | prepare_desired_row (struct glyph_row *row) | 1063 | prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p) |
| 1059 | { | 1064 | { |
| 1060 | if (!row->enabled_p) | 1065 | if (!row->enabled_p) |
| 1061 | { | 1066 | { |
| @@ -1065,6 +1070,39 @@ prepare_desired_row (struct glyph_row *row) | |||
| 1065 | row->enabled_p = true; | 1070 | row->enabled_p = true; |
| 1066 | row->reversed_p = rp; | 1071 | row->reversed_p = rp; |
| 1067 | } | 1072 | } |
| 1073 | if (mode_line_p) | ||
| 1074 | { | ||
| 1075 | /* Mode and header lines, if displayed, never have marginal | ||
| 1076 | areas. If we are called with MODE_LINE_P non-zero, we are | ||
| 1077 | displaying the mode/header line in this window, and so the | ||
| 1078 | marginal areas of this glyph row should be eliminated. This | ||
| 1079 | is needed when the mode/header line is switched on in a | ||
| 1080 | window that has display margins. */ | ||
| 1081 | if (w->left_margin_cols > 0) | ||
| 1082 | row->glyphs[TEXT_AREA] = row->glyphs[LEFT_MARGIN_AREA]; | ||
| 1083 | if (w->right_margin_cols > 0) | ||
| 1084 | row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA]; | ||
| 1085 | } | ||
| 1086 | else if (row == MATRIX_MODE_LINE_ROW (w->desired_matrix) | ||
| 1087 | || row == MATRIX_HEADER_LINE_ROW (w->desired_matrix)) | ||
| 1088 | { | ||
| 1089 | /* The real number of glyphs reserved for the margins is | ||
| 1090 | recorded in the glyph matrix, and can be different from | ||
| 1091 | window's left_margin_cols and right_margin_cols; see | ||
| 1092 | margin_glyphs_to_reserve for when that happens. */ | ||
| 1093 | int left = w->desired_matrix->left_margin_glyphs; | ||
| 1094 | int right = w->desired_matrix->right_margin_glyphs; | ||
| 1095 | |||
| 1096 | /* Make sure the marginal areas of this row are in sync with | ||
| 1097 | what the window wants, when the 1st/last row of the matrix | ||
| 1098 | actually displays text and not header/mode line. */ | ||
| 1099 | if (w->left_margin_cols > 0 | ||
| 1100 | && (left != row->glyphs[TEXT_AREA] - row->glyphs[LEFT_MARGIN_AREA])) | ||
| 1101 | row->glyphs[TEXT_AREA] = row->glyphs[LEFT_MARGIN_AREA] + left; | ||
| 1102 | if (w->right_margin_cols > 0 | ||
| 1103 | && (right != row->glyphs[LAST_AREA] - row->glyphs[RIGHT_MARGIN_AREA])) | ||
| 1104 | row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA] - right; | ||
| 1105 | } | ||
| 1068 | } | 1106 | } |
| 1069 | 1107 | ||
| 1070 | 1108 | ||
diff --git a/src/font.c b/src/font.c index 251d43ba8b2..7b9edcd3fb8 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3539,53 +3539,34 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers) | |||
| 3539 | return active_drivers; | 3539 | return active_drivers; |
| 3540 | } | 3540 | } |
| 3541 | 3541 | ||
| 3542 | int | 3542 | #if defined (HAVE_XFT) || defined (HAVE_FREETYPE) |
| 3543 | font_put_frame_data (struct frame *f, struct font_driver *driver, void *data) | ||
| 3544 | { | ||
| 3545 | struct font_data_list *list, *prev; | ||
| 3546 | 3543 | ||
| 3547 | for (prev = NULL, list = f->font_data_list; list; | 3544 | void |
| 3548 | prev = list, list = list->next) | 3545 | font_put_frame_data (struct frame *f, Lisp_Object driver, void *data) |
| 3549 | if (list->driver == driver) | 3546 | { |
| 3550 | break; | 3547 | Lisp_Object val = assq_no_quit (driver, f->font_data); |
| 3551 | if (! data) | ||
| 3552 | { | ||
| 3553 | if (list) | ||
| 3554 | { | ||
| 3555 | if (prev) | ||
| 3556 | prev->next = list->next; | ||
| 3557 | else | ||
| 3558 | f->font_data_list = list->next; | ||
| 3559 | xfree (list); | ||
| 3560 | } | ||
| 3561 | return 0; | ||
| 3562 | } | ||
| 3563 | 3548 | ||
| 3564 | if (! list) | 3549 | if (!data) |
| 3550 | f->font_data = Fdelq (val, f->font_data); | ||
| 3551 | else | ||
| 3565 | { | 3552 | { |
| 3566 | list = xmalloc (sizeof *list); | 3553 | if (NILP (val)) |
| 3567 | list->driver = driver; | 3554 | f->font_data = Fcons (Fcons (driver, make_save_ptr (data)), |
| 3568 | list->next = f->font_data_list; | 3555 | f->font_data); |
| 3569 | f->font_data_list = list; | 3556 | else |
| 3557 | XSETCDR (val, make_save_ptr (data)); | ||
| 3570 | } | 3558 | } |
| 3571 | list->data = data; | ||
| 3572 | return 0; | ||
| 3573 | } | 3559 | } |
| 3574 | 3560 | ||
| 3575 | |||
| 3576 | void * | 3561 | void * |
| 3577 | font_get_frame_data (struct frame *f, struct font_driver *driver) | 3562 | font_get_frame_data (struct frame *f, Lisp_Object driver) |
| 3578 | { | 3563 | { |
| 3579 | struct font_data_list *list; | 3564 | Lisp_Object val = assq_no_quit (driver, f->font_data); |
| 3580 | 3565 | ||
| 3581 | for (list = f->font_data_list; list; list = list->next) | 3566 | return NILP (val) ? NULL : XSAVE_POINTER (XCDR (val), 0); |
| 3582 | if (list->driver == driver) | ||
| 3583 | break; | ||
| 3584 | if (! list) | ||
| 3585 | return NULL; | ||
| 3586 | return list->data; | ||
| 3587 | } | 3567 | } |
| 3588 | 3568 | ||
| 3569 | #endif /* HAVE_XFT || HAVE_FREETYPE */ | ||
| 3589 | 3570 | ||
| 3590 | /* Sets attributes on a font. Any properties that appear in ALIST and | 3571 | /* Sets attributes on a font. Any properties that appear in ALIST and |
| 3591 | BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. | 3572 | BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. |
diff --git a/src/font.h b/src/font.h index 42137deeaa4..c23b826bd46 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -614,15 +614,6 @@ struct font_driver | |||
| 614 | #endif /* HAVE_WINDOW_SYSTEM */ | 614 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 615 | 615 | ||
| 616 | /* Optional. | 616 | /* Optional. |
| 617 | Return an outline data for glyph-code CODE of FONT. The format | ||
| 618 | of the outline data depends on the font-driver. */ | ||
| 619 | void *(*get_outline) (struct font *font, unsigned code); | ||
| 620 | |||
| 621 | /* Optional. | ||
| 622 | Free OUTLINE (that is obtained by the above method). */ | ||
| 623 | void (*free_outline) (struct font *font, void *outline); | ||
| 624 | |||
| 625 | /* Optional. | ||
| 626 | Get coordinates of the INDEXth anchor point of the glyph whose | 617 | Get coordinates of the INDEXth anchor point of the glyph whose |
| 627 | code is CODE. Store the coordinates in *X and *Y. Return 0 if | 618 | code is CODE. Store the coordinates in *X and *Y. Return 0 if |
| 628 | the operations was successful. Otherwise return -1. */ | 619 | the operations was successful. Otherwise return -1. */ |
| @@ -723,20 +714,6 @@ struct font_driver_list | |||
| 723 | struct font_driver_list *next; | 714 | struct font_driver_list *next; |
| 724 | }; | 715 | }; |
| 725 | 716 | ||
| 726 | |||
| 727 | /* Chain of arbitrary data specific to each font driver. | ||
| 728 | Each frame has its own font data list at F->font_data_list. */ | ||
| 729 | |||
| 730 | struct font_data_list | ||
| 731 | { | ||
| 732 | /* Pointer to the font driver. */ | ||
| 733 | struct font_driver *driver; | ||
| 734 | /* Data specific to the font driver. */ | ||
| 735 | void *data; | ||
| 736 | /* Pointer to the next element of the chain. */ | ||
| 737 | struct font_data_list *next; | ||
| 738 | }; | ||
| 739 | |||
| 740 | extern Lisp_Object copy_font_spec (Lisp_Object); | 717 | extern Lisp_Object copy_font_spec (Lisp_Object); |
| 741 | extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object); | 718 | extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object); |
| 742 | 719 | ||
| @@ -809,11 +786,10 @@ extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object); | |||
| 809 | extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, | 786 | extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop, |
| 810 | Lisp_Object val); | 787 | Lisp_Object val); |
| 811 | 788 | ||
| 812 | extern int font_put_frame_data (struct frame *f, | 789 | #if defined (HAVE_XFT) || defined (HAVE_FREETYPE) |
| 813 | struct font_driver *driver, | 790 | extern void font_put_frame_data (struct frame *, Lisp_Object, void *); |
| 814 | void *data); | 791 | extern void *font_get_frame_data (struct frame *f, Lisp_Object); |
| 815 | extern void *font_get_frame_data (struct frame *f, | 792 | #endif /* HAVE_XFT || HAVE_FREETYPE */ |
| 816 | struct font_driver *driver); | ||
| 817 | 793 | ||
| 818 | extern void font_filter_properties (Lisp_Object font, | 794 | extern void font_filter_properties (Lisp_Object font, |
| 819 | Lisp_Object alist, | 795 | Lisp_Object alist, |
diff --git a/src/frame.c b/src/frame.c index c67a233f099..0ccc0f6fcfd 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -46,6 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 46 | #ifdef HAVE_WINDOW_SYSTEM | 46 | #ifdef HAVE_WINDOW_SYSTEM |
| 47 | #include "fontset.h" | 47 | #include "fontset.h" |
| 48 | #endif | 48 | #endif |
| 49 | #include "cm.h" | ||
| 49 | #ifdef MSDOS | 50 | #ifdef MSDOS |
| 50 | #include "msdos.h" | 51 | #include "msdos.h" |
| 51 | #include "dosfns.h" | 52 | #include "dosfns.h" |
| @@ -854,7 +855,9 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor | |||
| 854 | 855 | ||
| 855 | if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) | 856 | if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame))) |
| 856 | { | 857 | { |
| 857 | Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame; | 858 | struct frame *f = XFRAME (frame); |
| 859 | struct tty_display_info *tty = FRAME_TTY (f); | ||
| 860 | Lisp_Object top_frame = tty->top_frame; | ||
| 858 | 861 | ||
| 859 | /* Don't mark the frame garbaged and/or obscured if we are | 862 | /* Don't mark the frame garbaged and/or obscured if we are |
| 860 | switching to the frame that is already the top frame of that | 863 | switching to the frame that is already the top frame of that |
| @@ -864,9 +867,16 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor | |||
| 864 | if (FRAMEP (top_frame)) | 867 | if (FRAMEP (top_frame)) |
| 865 | /* Mark previously displayed frame as now obscured. */ | 868 | /* Mark previously displayed frame as now obscured. */ |
| 866 | SET_FRAME_VISIBLE (XFRAME (top_frame), 2); | 869 | SET_FRAME_VISIBLE (XFRAME (top_frame), 2); |
| 867 | SET_FRAME_VISIBLE (XFRAME (frame), 1); | 870 | SET_FRAME_VISIBLE (f, 1); |
| 871 | /* If the new TTY frame changed dimensions, we need to | ||
| 872 | resync term.c's idea of the frame size with the new | ||
| 873 | frame's data. */ | ||
| 874 | if (FRAME_COLS (f) != FrameCols (tty)) | ||
| 875 | FrameCols (tty) = FRAME_COLS (f); | ||
| 876 | if (FRAME_LINES (f) != FrameRows (tty)) | ||
| 877 | FrameRows (tty) = FRAME_LINES (f); | ||
| 868 | } | 878 | } |
| 869 | FRAME_TTY (XFRAME (frame))->top_frame = frame; | 879 | tty->top_frame = frame; |
| 870 | } | 880 | } |
| 871 | 881 | ||
| 872 | selected_frame = frame; | 882 | selected_frame = frame; |
diff --git a/src/frame.h b/src/frame.h index 2da9fff2d4a..4fb98278a51 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -159,6 +159,11 @@ struct frame | |||
| 159 | tool bar only supports top. */ | 159 | tool bar only supports top. */ |
| 160 | Lisp_Object tool_bar_position; | 160 | Lisp_Object tool_bar_position; |
| 161 | 161 | ||
| 162 | #if defined (HAVE_XFT) || defined (HAVE_FREETYPE) | ||
| 163 | /* List of data specific to font-driver and frame, but common to faces. */ | ||
| 164 | Lisp_Object font_data; | ||
| 165 | #endif | ||
| 166 | |||
| 162 | /* Beyond here, there should be no more Lisp_Object components. */ | 167 | /* Beyond here, there should be no more Lisp_Object components. */ |
| 163 | 168 | ||
| 164 | /* Cache of realized faces. */ | 169 | /* Cache of realized faces. */ |
| @@ -328,9 +333,6 @@ struct frame | |||
| 328 | 333 | ||
| 329 | /* List of font-drivers available on the frame. */ | 334 | /* List of font-drivers available on the frame. */ |
| 330 | struct font_driver_list *font_driver_list; | 335 | struct font_driver_list *font_driver_list; |
| 331 | /* List of data specific to font-driver and frame, but common to | ||
| 332 | faces. */ | ||
| 333 | struct font_data_list *font_data_list; | ||
| 334 | 336 | ||
| 335 | /* Total width of fringes reserved for drawing truncation bitmaps, | 337 | /* Total width of fringes reserved for drawing truncation bitmaps, |
| 336 | continuation bitmaps and alike. The width is in canonical char | 338 | continuation bitmaps and alike. The width is in canonical char |
diff --git a/src/ftfont.c b/src/ftfont.c index 0f23b086cf5..7c5d01208d2 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -538,8 +538,6 @@ struct font_driver ftfont_driver = | |||
| 538 | NULL, /* draw */ | 538 | NULL, /* draw */ |
| 539 | ftfont_get_bitmap, | 539 | ftfont_get_bitmap, |
| 540 | NULL, /* free_bitmap */ | 540 | NULL, /* free_bitmap */ |
| 541 | NULL, /* get_outline */ | ||
| 542 | NULL, /* free_outline */ | ||
| 543 | ftfont_anchor_point, | 541 | ftfont_anchor_point, |
| 544 | #ifdef HAVE_LIBOTF | 542 | #ifdef HAVE_LIBOTF |
| 545 | ftfont_otf_capability, | 543 | ftfont_otf_capability, |
diff --git a/src/ftxfont.c b/src/ftxfont.c index 53f2616bb62..63e3477ebf4 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -59,7 +59,7 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr | |||
| 59 | XColor color; | 59 | XColor color; |
| 60 | XGCValues xgcv; | 60 | XGCValues xgcv; |
| 61 | int i; | 61 | int i; |
| 62 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); | 62 | struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx); |
| 63 | struct ftxfont_frame_data *prev = NULL, *this = NULL, *new; | 63 | struct ftxfont_frame_data *prev = NULL, *this = NULL, *new; |
| 64 | 64 | ||
| 65 | if (data) | 65 | if (data) |
| @@ -78,19 +78,11 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr | |||
| 78 | } | 78 | } |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | new = malloc (sizeof *new); | 81 | new = xmalloc (sizeof *new); |
| 82 | if (! new) | ||
| 83 | return NULL; | ||
| 84 | new->next = this; | 82 | new->next = this; |
| 85 | if (prev) | 83 | if (prev) |
| 86 | { | ||
| 87 | prev->next = new; | 84 | prev->next = new; |
| 88 | } | 85 | font_put_frame_data (f, Qftx, new); |
| 89 | else if (font_put_frame_data (f, &ftxfont_driver, new) < 0) | ||
| 90 | { | ||
| 91 | free (new); | ||
| 92 | return NULL; | ||
| 93 | } | ||
| 94 | 86 | ||
| 95 | new->colors[0].pixel = background; | 87 | new->colors[0].pixel = background; |
| 96 | new->colors[1].pixel = foreground; | 88 | new->colors[1].pixel = foreground; |
| @@ -123,8 +115,8 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr | |||
| 123 | if (prev) | 115 | if (prev) |
| 124 | prev->next = new->next; | 116 | prev->next = new->next; |
| 125 | else if (data) | 117 | else if (data) |
| 126 | font_put_frame_data (f, &ftxfont_driver, new->next); | 118 | font_put_frame_data (f, Qftx, new->next); |
| 127 | free (new); | 119 | xfree (new); |
| 128 | return NULL; | 120 | return NULL; |
| 129 | } | 121 | } |
| 130 | return new->gcs; | 122 | return new->gcs; |
| @@ -337,7 +329,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 337 | static int | 329 | static int |
| 338 | ftxfont_end_for_frame (struct frame *f) | 330 | ftxfont_end_for_frame (struct frame *f) |
| 339 | { | 331 | { |
| 340 | struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); | 332 | struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx); |
| 341 | 333 | ||
| 342 | block_input (); | 334 | block_input (); |
| 343 | while (data) | 335 | while (data) |
| @@ -347,11 +339,11 @@ ftxfont_end_for_frame (struct frame *f) | |||
| 347 | 339 | ||
| 348 | for (i = 0; i < 6; i++) | 340 | for (i = 0; i < 6; i++) |
| 349 | XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); | 341 | XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); |
| 350 | free (data); | 342 | xfree (data); |
| 351 | data = next; | 343 | data = next; |
| 352 | } | 344 | } |
| 353 | unblock_input (); | 345 | unblock_input (); |
| 354 | font_put_frame_data (f, &ftxfont_driver, NULL); | 346 | font_put_frame_data (f, Qftx, NULL); |
| 355 | return 0; | 347 | return 0; |
| 356 | } | 348 | } |
| 357 | 349 | ||
diff --git a/src/keymap.c b/src/keymap.c index 0b2b61dcc05..76119606643 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -727,11 +727,6 @@ get_keyelt (Lisp_Object object, bool autoload) | |||
| 727 | /* This is really the value. */ | 727 | /* This is really the value. */ |
| 728 | return object; | 728 | return object; |
| 729 | 729 | ||
| 730 | /* If the keymap contents looks like (keymap ...) or (lambda ...) | ||
| 731 | then use itself. */ | ||
| 732 | else if (EQ (XCAR (object), Qkeymap) || EQ (XCAR (object), Qlambda)) | ||
| 733 | return object; | ||
| 734 | |||
| 735 | /* If the keymap contents looks like (menu-item name . DEFN) | 730 | /* If the keymap contents looks like (menu-item name . DEFN) |
| 736 | or (menu-item name DEFN ...) then use DEFN. | 731 | or (menu-item name DEFN ...) then use DEFN. |
| 737 | This is a new format menu item. */ | 732 | This is a new format menu item. */ |
| @@ -768,25 +763,8 @@ get_keyelt (Lisp_Object object, bool autoload) | |||
| 768 | Keymap alist elements like (CHAR MENUSTRING . DEFN) | 763 | Keymap alist elements like (CHAR MENUSTRING . DEFN) |
| 769 | will be used by HierarKey menus. */ | 764 | will be used by HierarKey menus. */ |
| 770 | else if (STRINGP (XCAR (object))) | 765 | else if (STRINGP (XCAR (object))) |
| 771 | { | 766 | object = XCDR (object); |
| 772 | object = XCDR (object); | ||
| 773 | /* Also remove a menu help string, if any, | ||
| 774 | following the menu item name. */ | ||
| 775 | if (CONSP (object) && STRINGP (XCAR (object))) | ||
| 776 | object = XCDR (object); | ||
| 777 | /* Also remove the sublist that caches key equivalences, if any. */ | ||
| 778 | if (CONSP (object) && CONSP (XCAR (object))) | ||
| 779 | { | ||
| 780 | Lisp_Object carcar; | ||
| 781 | carcar = XCAR (XCAR (object)); | ||
| 782 | if (NILP (carcar) || VECTORP (carcar)) | ||
| 783 | object = XCDR (object); | ||
| 784 | } | ||
| 785 | } | ||
| 786 | 767 | ||
| 787 | /* If the contents are (KEYMAP . ELEMENT), go indirect. */ | ||
| 788 | else if (KEYMAPP (XCAR (object))) | ||
| 789 | error ("Wow, indirect keymap entry!!"); | ||
| 790 | else | 768 | else |
| 791 | return object; | 769 | return object; |
| 792 | } | 770 | } |
| @@ -990,9 +968,6 @@ copy_keymap_item (Lisp_Object elt) | |||
| 990 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) | 968 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) |
| 991 | XSETCAR (elt, Fcopy_keymap (tem)); | 969 | XSETCAR (elt, Fcopy_keymap (tem)); |
| 992 | tem = XCDR (elt); | 970 | tem = XCDR (elt); |
| 993 | if (CONSP (tem) && CONSP (XCAR (tem))) | ||
| 994 | /* Delete cache for key equivalences. */ | ||
| 995 | XSETCDR (elt, XCDR (tem)); | ||
| 996 | } | 971 | } |
| 997 | } | 972 | } |
| 998 | else | 973 | else |
| @@ -1011,16 +986,6 @@ copy_keymap_item (Lisp_Object elt) | |||
| 1011 | elt = XCDR (elt); | 986 | elt = XCDR (elt); |
| 1012 | tem = XCDR (elt); | 987 | tem = XCDR (elt); |
| 1013 | } | 988 | } |
| 1014 | /* There may also be a list that caches key equivalences. | ||
| 1015 | Just delete it for the new keymap. */ | ||
| 1016 | if (CONSP (tem) | ||
| 1017 | && CONSP (XCAR (tem)) | ||
| 1018 | && (NILP (XCAR (XCAR (tem))) | ||
| 1019 | || VECTORP (XCAR (XCAR (tem))))) | ||
| 1020 | { | ||
| 1021 | XSETCDR (elt, XCDR (tem)); | ||
| 1022 | tem = XCDR (tem); | ||
| 1023 | } | ||
| 1024 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) | 989 | if (CONSP (tem) && EQ (XCAR (tem), Qkeymap)) |
| 1025 | XSETCDR (elt, Fcopy_keymap (tem)); | 990 | XSETCDR (elt, Fcopy_keymap (tem)); |
| 1026 | } | 991 | } |
| @@ -2572,9 +2537,8 @@ If FIRSTONLY has another non-nil value, prefer bindings | |||
| 2572 | that use the modifier key specified in `where-is-preferred-modifier' | 2537 | that use the modifier key specified in `where-is-preferred-modifier' |
| 2573 | \(or their meta variants) and entirely reject menu bindings. | 2538 | \(or their meta variants) and entirely reject menu bindings. |
| 2574 | 2539 | ||
| 2575 | If optional 4th arg NOINDIRECT is non-nil, don't follow indirections | 2540 | If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside |
| 2576 | to other keymaps or slots. This makes it possible to search for an | 2541 | menu-items. This makes it possible to search for a menu-item itself. |
| 2577 | indirect definition itself. | ||
| 2578 | 2542 | ||
| 2579 | The optional 5th arg NO-REMAP alters how command remapping is handled: | 2543 | The optional 5th arg NO-REMAP alters how command remapping is handled: |
| 2580 | 2544 | ||
diff --git a/src/lisp.h b/src/lisp.h index fb832b80940..6af390604d6 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1407,10 +1407,11 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val) | |||
| 1407 | sense to handle a char-table with type struct Lisp_Vector. An | 1407 | sense to handle a char-table with type struct Lisp_Vector. An |
| 1408 | element of a char table can be any Lisp objects, but if it is a sub | 1408 | element of a char table can be any Lisp objects, but if it is a sub |
| 1409 | char-table, we treat it a table that contains information of a | 1409 | char-table, we treat it a table that contains information of a |
| 1410 | specific range of characters. A sub char-table has the same | 1410 | specific range of characters. A sub char-table is like a vector but |
| 1411 | structure as a vector. A sub char table appears only in an element | 1411 | with two integer fields between the header and Lisp data, which means |
| 1412 | of a char-table, and there's no way to access it directly from | 1412 | that it has to be marked with some precautions (see mark_char_table |
| 1413 | Emacs Lisp program. */ | 1413 | in alloc.c). A sub char-table appears only in an element of a char-table, |
| 1414 | and there's no way to access it directly from Emacs Lisp program. */ | ||
| 1414 | 1415 | ||
| 1415 | enum CHARTAB_SIZE_BITS | 1416 | enum CHARTAB_SIZE_BITS |
| 1416 | { | 1417 | { |
| @@ -1465,10 +1466,10 @@ struct Lisp_Sub_Char_Table | |||
| 1465 | contains 32 elements, and each element covers 128 characters. A | 1466 | contains 32 elements, and each element covers 128 characters. A |
| 1466 | sub char-table of depth 3 contains 128 elements, and each element | 1467 | sub char-table of depth 3 contains 128 elements, and each element |
| 1467 | is for one character. */ | 1468 | is for one character. */ |
| 1468 | Lisp_Object depth; | 1469 | int depth; |
| 1469 | 1470 | ||
| 1470 | /* Minimum character covered by the sub char-table. */ | 1471 | /* Minimum character covered by the sub char-table. */ |
| 1471 | Lisp_Object min_char; | 1472 | int min_char; |
| 1472 | 1473 | ||
| 1473 | /* Use set_sub_char_table_contents to set this. */ | 1474 | /* Use set_sub_char_table_contents to set this. */ |
| 1474 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER]; | 1475 | Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER]; |
| @@ -1539,12 +1540,16 @@ struct Lisp_Subr | |||
| 1539 | const char *doc; | 1540 | const char *doc; |
| 1540 | }; | 1541 | }; |
| 1541 | 1542 | ||
| 1542 | /* This is the number of slots that every char table must have. This | 1543 | enum char_table_specials |
| 1543 | counts the ordinary slots and the top, defalt, parent, and purpose | ||
| 1544 | slots. */ | ||
| 1545 | enum CHAR_TABLE_STANDARD_SLOTS | ||
| 1546 | { | 1544 | { |
| 1547 | CHAR_TABLE_STANDARD_SLOTS = PSEUDOVECSIZE (struct Lisp_Char_Table, extras) | 1545 | /* This is the number of slots that every char table must have. This |
| 1546 | counts the ordinary slots and the top, defalt, parent, and purpose | ||
| 1547 | slots. */ | ||
| 1548 | CHAR_TABLE_STANDARD_SLOTS = PSEUDOVECSIZE (struct Lisp_Char_Table, extras), | ||
| 1549 | |||
| 1550 | /* This is an index of first Lisp_Object field in Lisp_Sub_Char_Table | ||
| 1551 | when the latter is treated as an ordinary Lisp_Vector. */ | ||
| 1552 | SUB_CHAR_TABLE_OFFSET = PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) | ||
| 1548 | }; | 1553 | }; |
| 1549 | 1554 | ||
| 1550 | /* Return the number of "extra" slots in the char table CT. */ | 1555 | /* Return the number of "extra" slots in the char table CT. */ |
| @@ -1556,7 +1561,11 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct) | |||
| 1556 | - CHAR_TABLE_STANDARD_SLOTS); | 1561 | - CHAR_TABLE_STANDARD_SLOTS); |
| 1557 | } | 1562 | } |
| 1558 | 1563 | ||
| 1559 | 1564 | /* Make sure that sub char-table contents slot | |
| 1565 | is aligned on a multiple of Lisp_Objects. */ | ||
| 1566 | verify ((offsetof (struct Lisp_Sub_Char_Table, contents) | ||
| 1567 | - offsetof (struct Lisp_Sub_Char_Table, depth)) % word_size == 0); | ||
| 1568 | |||
| 1560 | /*********************************************************************** | 1569 | /*********************************************************************** |
| 1561 | Symbols | 1570 | Symbols |
| 1562 | ***********************************************************************/ | 1571 | ***********************************************************************/ |
| @@ -3723,6 +3732,20 @@ make_uninit_vector (ptrdiff_t size) | |||
| 3723 | return v; | 3732 | return v; |
| 3724 | } | 3733 | } |
| 3725 | 3734 | ||
| 3735 | /* Like above, but special for sub char-tables. */ | ||
| 3736 | |||
| 3737 | INLINE Lisp_Object | ||
| 3738 | make_uninit_sub_char_table (int depth, int min_char) | ||
| 3739 | { | ||
| 3740 | int slots = SUB_CHAR_TABLE_OFFSET + chartab_size[depth]; | ||
| 3741 | Lisp_Object v = make_uninit_vector (slots); | ||
| 3742 | |||
| 3743 | XSETPVECTYPE (XVECTOR (v), PVEC_SUB_CHAR_TABLE); | ||
| 3744 | XSUB_CHAR_TABLE (v)->depth = depth; | ||
| 3745 | XSUB_CHAR_TABLE (v)->min_char = min_char; | ||
| 3746 | return v; | ||
| 3747 | } | ||
| 3748 | |||
| 3726 | extern struct Lisp_Vector *allocate_pseudovector (int, int, enum pvec_type); | 3749 | extern struct Lisp_Vector *allocate_pseudovector (int, int, enum pvec_type); |
| 3727 | #define ALLOCATE_PSEUDOVECTOR(typ,field,tag) \ | 3750 | #define ALLOCATE_PSEUDOVECTOR(typ,field,tag) \ |
| 3728 | ((typ*) \ | 3751 | ((typ*) \ |
diff --git a/src/lread.c b/src/lread.c index f252993207d..639d574ac6b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2619,21 +2619,38 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2619 | c = READCHAR; | 2619 | c = READCHAR; |
| 2620 | if (c == '[') | 2620 | if (c == '[') |
| 2621 | { | 2621 | { |
| 2622 | Lisp_Object tmp; | 2622 | /* Sub char-table can't be read as a regular |
| 2623 | int depth; | 2623 | vector because of a two C integer fields. */ |
| 2624 | ptrdiff_t size; | 2624 | Lisp_Object tbl, tmp = read_list (1, readcharfun); |
| 2625 | ptrdiff_t size = XINT (Flength (tmp)); | ||
| 2626 | int i, depth, min_char; | ||
| 2627 | struct Lisp_Cons *cell; | ||
| 2625 | 2628 | ||
| 2626 | tmp = read_vector (readcharfun, 0); | ||
| 2627 | size = ASIZE (tmp); | ||
| 2628 | if (size == 0) | 2629 | if (size == 0) |
| 2629 | error ("Invalid size char-table"); | 2630 | error ("Zero-sized sub char-table"); |
| 2630 | if (! RANGED_INTEGERP (1, AREF (tmp, 0), 3)) | 2631 | |
| 2631 | error ("Invalid depth in char-table"); | 2632 | if (! RANGED_INTEGERP (1, XCAR (tmp), 3)) |
| 2632 | depth = XINT (AREF (tmp, 0)); | 2633 | error ("Invalid depth in sub char-table"); |
| 2634 | depth = XINT (XCAR (tmp)); | ||
| 2633 | if (chartab_size[depth] != size - 2) | 2635 | if (chartab_size[depth] != size - 2) |
| 2634 | error ("Invalid size char-table"); | 2636 | error ("Invalid size in sub char-table"); |
| 2635 | XSETPVECTYPE (XVECTOR (tmp), PVEC_SUB_CHAR_TABLE); | 2637 | cell = XCONS (tmp), tmp = XCDR (tmp), size--; |
| 2636 | return tmp; | 2638 | free_cons (cell); |
| 2639 | |||
| 2640 | if (! RANGED_INTEGERP (0, XCAR (tmp), MAX_CHAR)) | ||
| 2641 | error ("Invalid minimum character in sub-char-table"); | ||
| 2642 | min_char = XINT (XCAR (tmp)); | ||
| 2643 | cell = XCONS (tmp), tmp = XCDR (tmp), size--; | ||
| 2644 | free_cons (cell); | ||
| 2645 | |||
| 2646 | tbl = make_uninit_sub_char_table (depth, min_char); | ||
| 2647 | for (i = 0; i < size; i++) | ||
| 2648 | { | ||
| 2649 | XSUB_CHAR_TABLE (tbl)->contents[i] = XCAR (tmp); | ||
| 2650 | cell = XCONS (tmp), tmp = XCDR (tmp); | ||
| 2651 | free_cons (cell); | ||
| 2652 | } | ||
| 2653 | return tbl; | ||
| 2637 | } | 2654 | } |
| 2638 | invalid_syntax ("#^^"); | 2655 | invalid_syntax ("#^^"); |
| 2639 | } | 2656 | } |
diff --git a/src/macfont.m b/src/macfont.m index 9b3cb2c29f6..82ee54cdc63 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -1580,8 +1580,6 @@ static struct font_driver macfont_driver = | |||
| 1580 | macfont_draw, | 1580 | macfont_draw, |
| 1581 | NULL, /* get_bitmap */ | 1581 | NULL, /* get_bitmap */ |
| 1582 | NULL, /* free_bitmap */ | 1582 | NULL, /* free_bitmap */ |
| 1583 | NULL, /* get_outline */ | ||
| 1584 | NULL, /* free_outline */ | ||
| 1585 | NULL, /* anchor_point */ | 1583 | NULL, /* anchor_point */ |
| 1586 | NULL, /* otf_capability */ | 1584 | NULL, /* otf_capability */ |
| 1587 | NULL, /* otf_drive */ | 1585 | NULL, /* otf_drive */ |
diff --git a/src/menu.c b/src/menu.c index a523cfc6010..e0f226562f8 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -1529,6 +1529,11 @@ for instance using the window manager, then this produces a quit and | |||
| 1529 | but I don't want to make one now. */ | 1529 | but I don't want to make one now. */ |
| 1530 | CHECK_WINDOW (window); | 1530 | CHECK_WINDOW (window); |
| 1531 | 1531 | ||
| 1532 | /* Note that xw_popup_dialog can call menu code, so | ||
| 1533 | Vmenu_updating_frame should be set (Bug#17891). */ | ||
| 1534 | eassert (f && FRAME_LIVE_P (f)); | ||
| 1535 | XSETFRAME (Vmenu_updating_frame, f); | ||
| 1536 | |||
| 1532 | /* Force a redisplay before showing the dialog. If a frame is created | 1537 | /* Force a redisplay before showing the dialog. If a frame is created |
| 1533 | just before showing the dialog, its contents may not have been fully | 1538 | just before showing the dialog, its contents may not have been fully |
| 1534 | drawn, as this depends on timing of events from the X server. Redisplay | 1539 | drawn, as this depends on timing of events from the X server. Redisplay |
diff --git a/src/nsfont.m b/src/nsfont.m index 2c5e25b993c..cadc68f9933 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -649,7 +649,7 @@ struct font_driver nsfont_driver = | |||
| 649 | nsfont_encode_char, | 649 | nsfont_encode_char, |
| 650 | nsfont_text_extents, | 650 | nsfont_text_extents, |
| 651 | nsfont_draw, | 651 | nsfont_draw, |
| 652 | /* excluded: get_bitmap, free_bitmap, get_outline, free_outline, | 652 | /* excluded: get_bitmap, free_bitmap, |
| 653 | anchor_point, otf_capability, otf_driver, | 653 | anchor_point, otf_capability, otf_driver, |
| 654 | start_for_frame, end_for_frame, shape */ | 654 | start_for_frame, end_for_frame, shape */ |
| 655 | }; | 655 | }; |
diff --git a/src/print.c b/src/print.c index 9050a0cb773..2f52f5d03ec 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1968,7 +1968,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1968 | Otherwise we'll make a line extremely long, which | 1968 | Otherwise we'll make a line extremely long, which |
| 1969 | results in slow redisplay. */ | 1969 | results in slow redisplay. */ |
| 1970 | if (SUB_CHAR_TABLE_P (obj) | 1970 | if (SUB_CHAR_TABLE_P (obj) |
| 1971 | && XINT (XSUB_CHAR_TABLE (obj)->depth) == 3) | 1971 | && XSUB_CHAR_TABLE (obj)->depth == 3) |
| 1972 | PRINTCHAR ('\n'); | 1972 | PRINTCHAR ('\n'); |
| 1973 | PRINTCHAR ('#'); | 1973 | PRINTCHAR ('#'); |
| 1974 | PRINTCHAR ('^'); | 1974 | PRINTCHAR ('^'); |
| @@ -1981,16 +1981,24 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1981 | 1981 | ||
| 1982 | PRINTCHAR ('['); | 1982 | PRINTCHAR ('['); |
| 1983 | { | 1983 | { |
| 1984 | register int i; | 1984 | int i, idx = SUB_CHAR_TABLE_P (obj) ? SUB_CHAR_TABLE_OFFSET : 0; |
| 1985 | register Lisp_Object tem; | 1985 | register Lisp_Object tem; |
| 1986 | ptrdiff_t real_size = size; | 1986 | ptrdiff_t real_size = size; |
| 1987 | 1987 | ||
| 1988 | /* For a sub char-table, print heading non-Lisp data first. */ | ||
| 1989 | if (SUB_CHAR_TABLE_P (obj)) | ||
| 1990 | { | ||
| 1991 | i = sprintf (buf, "%d %d", XSUB_CHAR_TABLE (obj)->depth, | ||
| 1992 | XSUB_CHAR_TABLE (obj)->min_char); | ||
| 1993 | strout (buf, i, i, printcharfun); | ||
| 1994 | } | ||
| 1995 | |||
| 1988 | /* Don't print more elements than the specified maximum. */ | 1996 | /* Don't print more elements than the specified maximum. */ |
| 1989 | if (NATNUMP (Vprint_length) | 1997 | if (NATNUMP (Vprint_length) |
| 1990 | && XFASTINT (Vprint_length) < size) | 1998 | && XFASTINT (Vprint_length) < size) |
| 1991 | size = XFASTINT (Vprint_length); | 1999 | size = XFASTINT (Vprint_length); |
| 1992 | 2000 | ||
| 1993 | for (i = 0; i < size; i++) | 2001 | for (i = idx; i < size; i++) |
| 1994 | { | 2002 | { |
| 1995 | if (i) PRINTCHAR (' '); | 2003 | if (i) PRINTCHAR (' '); |
| 1996 | tem = AREF (obj, i); | 2004 | tem = AREF (obj, i); |
diff --git a/src/w32fns.c b/src/w32fns.c index e24148af4ff..def9d8acb7a 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -89,9 +89,6 @@ extern void w32_free_menu_strings (HWND); | |||
| 89 | extern const char *map_w32_filename (const char *, const char **); | 89 | extern const char *map_w32_filename (const char *, const char **); |
| 90 | extern char * w32_strerror (int error_no); | 90 | extern char * w32_strerror (int error_no); |
| 91 | 91 | ||
| 92 | /* If non-NULL, a handle to a frame where to display the hourglass cursor. */ | ||
| 93 | static HWND hourglass_hwnd = NULL; | ||
| 94 | |||
| 95 | #ifndef IDC_HAND | 92 | #ifndef IDC_HAND |
| 96 | #define IDC_HAND MAKEINTRESOURCE(32649) | 93 | #define IDC_HAND MAKEINTRESOURCE(32649) |
| 97 | #endif | 94 | #endif |
| @@ -233,10 +230,6 @@ static int menubar_in_use = 0; | |||
| 233 | extern void syms_of_w32uniscribe (void); | 230 | extern void syms_of_w32uniscribe (void); |
| 234 | extern int uniscribe_available; | 231 | extern int uniscribe_available; |
| 235 | 232 | ||
| 236 | /* Function prototypes for hourglass support. */ | ||
| 237 | static void w32_show_hourglass (struct frame *); | ||
| 238 | static void w32_hide_hourglass (void); | ||
| 239 | |||
| 240 | #ifdef WINDOWSNT | 233 | #ifdef WINDOWSNT |
| 241 | /* From w32inevt.c */ | 234 | /* From w32inevt.c */ |
| 242 | extern int faked_key; | 235 | extern int faked_key; |
| @@ -5500,95 +5493,62 @@ no value of TYPE (always string in the MS Windows case). */) | |||
| 5500 | Busy cursor | 5493 | Busy cursor |
| 5501 | ***********************************************************************/ | 5494 | ***********************************************************************/ |
| 5502 | 5495 | ||
| 5503 | void | 5496 | /* Display an hourglass cursor. Set the hourglass_p flag in display info |
| 5504 | w32_note_current_window (void) | 5497 | to indicate that an hourglass cursor is shown. */ |
| 5505 | { | ||
| 5506 | struct frame * f = SELECTED_FRAME (); | ||
| 5507 | |||
| 5508 | if (!FRAME_W32_P (f)) | ||
| 5509 | return; | ||
| 5510 | |||
| 5511 | hourglass_hwnd = FRAME_W32_WINDOW (f); | ||
| 5512 | } | ||
| 5513 | 5498 | ||
| 5514 | void | 5499 | void |
| 5515 | show_hourglass (struct atimer *timer) | 5500 | show_hourglass (struct atimer *timer) |
| 5516 | { | 5501 | { |
| 5517 | struct frame *f; | ||
| 5518 | |||
| 5519 | hourglass_atimer = NULL; | 5502 | hourglass_atimer = NULL; |
| 5520 | 5503 | ||
| 5521 | block_input (); | 5504 | if (!hourglass_shown_p) |
| 5522 | f = x_window_to_frame (&one_w32_display_info, | ||
| 5523 | hourglass_hwnd); | ||
| 5524 | |||
| 5525 | if (f) | ||
| 5526 | f->output_data.w32->hourglass_p = 0; | ||
| 5527 | else | ||
| 5528 | f = SELECTED_FRAME (); | ||
| 5529 | |||
| 5530 | if (!FRAME_W32_P (f)) | ||
| 5531 | { | 5505 | { |
| 5532 | unblock_input (); | 5506 | Lisp_Object tail, frame; |
| 5533 | return; | ||
| 5534 | } | ||
| 5535 | |||
| 5536 | w32_show_hourglass (f); | ||
| 5537 | unblock_input (); | ||
| 5538 | } | ||
| 5539 | 5507 | ||
| 5540 | void | 5508 | block_input (); |
| 5541 | hide_hourglass (void) | 5509 | FOR_EACH_FRAME (tail, frame) |
| 5542 | { | 5510 | { |
| 5543 | block_input (); | 5511 | struct frame *f = XFRAME (frame); |
| 5544 | w32_hide_hourglass (); | ||
| 5545 | unblock_input (); | ||
| 5546 | } | ||
| 5547 | |||
| 5548 | |||
| 5549 | /* Display an hourglass cursor. Set the hourglass_p flag in display info | ||
| 5550 | to indicate that an hourglass cursor is shown. */ | ||
| 5551 | 5512 | ||
| 5552 | static void | 5513 | if (FRAME_W32_P (f) && !menubar_in_use && !current_popup_menu) |
| 5553 | w32_show_hourglass (struct frame *f) | 5514 | { |
| 5554 | { | 5515 | f->output_data.w32->hourglass_p = 1; |
| 5555 | if (!hourglass_shown_p) | 5516 | SetCursor (f->output_data.w32->hourglass_cursor); |
| 5556 | { | 5517 | } |
| 5557 | f->output_data.w32->hourglass_p = 1; | 5518 | } |
| 5558 | if (!menubar_in_use && !current_popup_menu) | 5519 | unblock_input (); |
| 5559 | SetCursor (f->output_data.w32->hourglass_cursor); | ||
| 5560 | hourglass_shown_p = 1; | 5520 | hourglass_shown_p = 1; |
| 5561 | } | 5521 | } |
| 5562 | } | 5522 | } |
| 5563 | 5523 | ||
| 5564 | |||
| 5565 | /* Hide the hourglass cursor on all frames, if it is currently shown. */ | 5524 | /* Hide the hourglass cursor on all frames, if it is currently shown. */ |
| 5566 | 5525 | ||
| 5567 | static void | 5526 | void |
| 5568 | w32_hide_hourglass (void) | 5527 | hide_hourglass (void) |
| 5569 | { | 5528 | { |
| 5570 | if (hourglass_shown_p) | 5529 | if (hourglass_shown_p) |
| 5571 | { | 5530 | { |
| 5572 | struct frame *f = x_window_to_frame (&one_w32_display_info, | 5531 | Lisp_Object tail, frame; |
| 5573 | hourglass_hwnd); | ||
| 5574 | if (f) | ||
| 5575 | f->output_data.w32->hourglass_p = 0; | ||
| 5576 | else | ||
| 5577 | /* If frame was deleted, restore to selected frame's cursor. */ | ||
| 5578 | f = SELECTED_FRAME (); | ||
| 5579 | 5532 | ||
| 5580 | if (FRAME_W32_P (f)) | 5533 | block_input (); |
| 5581 | SetCursor (f->output_data.w32->current_cursor); | 5534 | FOR_EACH_FRAME (tail, frame) |
| 5582 | else | 5535 | { |
| 5583 | /* No cursors on non GUI frames - restore to stock arrow cursor. */ | 5536 | struct frame *f = XFRAME (frame); |
| 5584 | SetCursor (w32_load_cursor (IDC_ARROW)); | ||
| 5585 | 5537 | ||
| 5538 | if (FRAME_W32_P (f)) | ||
| 5539 | { | ||
| 5540 | f->output_data.w32->hourglass_p = 0; | ||
| 5541 | SetCursor (f->output_data.w32->current_cursor); | ||
| 5542 | } | ||
| 5543 | else | ||
| 5544 | /* No cursors on non GUI frames - restore to stock arrow cursor. */ | ||
| 5545 | SetCursor (w32_load_cursor (IDC_ARROW)); | ||
| 5546 | } | ||
| 5547 | unblock_input (); | ||
| 5586 | hourglass_shown_p = 0; | 5548 | hourglass_shown_p = 0; |
| 5587 | } | 5549 | } |
| 5588 | } | 5550 | } |
| 5589 | 5551 | ||
| 5590 | |||
| 5591 | |||
| 5592 | /*********************************************************************** | 5552 | /*********************************************************************** |
| 5593 | Tool tips | 5553 | Tool tips |
| 5594 | ***********************************************************************/ | 5554 | ***********************************************************************/ |
| @@ -8415,9 +8375,6 @@ only be necessary if the default setting causes problems. */); | |||
| 8415 | #endif | 8375 | #endif |
| 8416 | 8376 | ||
| 8417 | defsubr (&Sset_message_beep); | 8377 | defsubr (&Sset_message_beep); |
| 8418 | |||
| 8419 | hourglass_hwnd = NULL; | ||
| 8420 | |||
| 8421 | defsubr (&Sx_show_tip); | 8378 | defsubr (&Sx_show_tip); |
| 8422 | defsubr (&Sx_hide_tip); | 8379 | defsubr (&Sx_hide_tip); |
| 8423 | tip_timer = Qnil; | 8380 | tip_timer = Qnil; |
diff --git a/src/w32font.c b/src/w32font.c index 5262f38663f..43b592ee450 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -757,19 +757,6 @@ w32font_get_bitmap (struct font *font, unsigned code, | |||
| 757 | static void | 757 | static void |
| 758 | w32font_free_bitmap (struct font *font, struct font_bitmap *bitmap); | 758 | w32font_free_bitmap (struct font *font, struct font_bitmap *bitmap); |
| 759 | */ | 759 | */ |
| 760 | /* w32 implementation of get_outline for font backend. | ||
| 761 | Optional. | ||
| 762 | Return an outline data for glyph-code CODE of FONT. The format | ||
| 763 | of the outline data depends on the font-driver. | ||
| 764 | static void * | ||
| 765 | w32font_get_outline (struct font *font, unsigned code); | ||
| 766 | */ | ||
| 767 | /* w32 implementation of free_outline for font backend. | ||
| 768 | Optional. | ||
| 769 | Free OUTLINE (that is obtained by the above method). | ||
| 770 | static void | ||
| 771 | w32font_free_outline (struct font *font, void *outline); | ||
| 772 | */ | ||
| 773 | /* w32 implementation of anchor_point for font backend. | 760 | /* w32 implementation of anchor_point for font backend. |
| 774 | Optional. | 761 | Optional. |
| 775 | Get coordinates of the INDEXth anchor point of the glyph whose | 762 | Get coordinates of the INDEXth anchor point of the glyph whose |
| @@ -2557,8 +2544,6 @@ struct font_driver w32font_driver = | |||
| 2557 | w32font_draw, | 2544 | w32font_draw, |
| 2558 | NULL, /* get_bitmap */ | 2545 | NULL, /* get_bitmap */ |
| 2559 | NULL, /* free_bitmap */ | 2546 | NULL, /* free_bitmap */ |
| 2560 | NULL, /* get_outline */ | ||
| 2561 | NULL, /* free_outline */ | ||
| 2562 | NULL, /* anchor_point */ | 2547 | NULL, /* anchor_point */ |
| 2563 | NULL, /* otf_capability */ | 2548 | NULL, /* otf_capability */ |
| 2564 | NULL, /* otf_drive */ | 2549 | NULL, /* otf_drive */ |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 5bb444f519a..24fc753e708 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -604,8 +604,6 @@ uniscribe_encode_char (struct font *font, int c) | |||
| 604 | int uniscribe_get_bitmap (struct font *font, unsigned code, | 604 | int uniscribe_get_bitmap (struct font *font, unsigned code, |
| 605 | struct font_bitmap *bitmap, int bits_per_pixel); | 605 | struct font_bitmap *bitmap, int bits_per_pixel); |
| 606 | void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap); | 606 | void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap); |
| 607 | void * uniscribe_get_outline (struct font *font, unsigned code); | ||
| 608 | void uniscribe_free_outline (struct font *font, void *outline); | ||
| 609 | int uniscribe_anchor_point (struct font *font, unsigned code, | 607 | int uniscribe_anchor_point (struct font *font, unsigned code, |
| 610 | int index, int *x, int *y); | 608 | int index, int *x, int *y); |
| 611 | int uniscribe_start_for_frame (struct frame *f); | 609 | int uniscribe_start_for_frame (struct frame *f); |
| @@ -981,8 +979,6 @@ struct font_driver uniscribe_font_driver = | |||
| 981 | w32font_draw, | 979 | w32font_draw, |
| 982 | NULL, /* get_bitmap */ | 980 | NULL, /* get_bitmap */ |
| 983 | NULL, /* free_bitmap */ | 981 | NULL, /* free_bitmap */ |
| 984 | NULL, /* get_outline */ | ||
| 985 | NULL, /* free_outline */ | ||
| 986 | NULL, /* anchor_point */ | 982 | NULL, /* anchor_point */ |
| 987 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ | 983 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ |
| 988 | NULL, /* otf_drive - use shape instead. */ | 984 | NULL, /* otf_drive - use shape instead. */ |
diff --git a/src/window.h b/src/window.h index bdc5dddb7e5..b9c2b1f5ba8 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -271,8 +271,10 @@ struct window | |||
| 271 | int left_fringe_width; | 271 | int left_fringe_width; |
| 272 | int right_fringe_width; | 272 | int right_fringe_width; |
| 273 | 273 | ||
| 274 | /* Width of left and right marginal areas in columns. | 274 | /* Requested width of left and right marginal areas in columns. A |
| 275 | A value of 0 means no margin. */ | 275 | value of 0 means no margin. The actual values are recorded in |
| 276 | the window's glyph matrix, in the left_margin_glyphs and | ||
| 277 | right_margin_glyphs members. */ | ||
| 276 | int left_margin_cols; | 278 | int left_margin_cols; |
| 277 | int right_margin_cols; | 279 | int right_margin_cols; |
| 278 | 280 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 31d293143f3..6cec0bf1925 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -19878,7 +19878,7 @@ display_line (struct it *it) | |||
| 19878 | } | 19878 | } |
| 19879 | 19879 | ||
| 19880 | /* Clear the result glyph row and enable it. */ | 19880 | /* Clear the result glyph row and enable it. */ |
| 19881 | prepare_desired_row (row); | 19881 | prepare_desired_row (it->w, row, false); |
| 19882 | 19882 | ||
| 19883 | row->y = it->current_y; | 19883 | row->y = it->current_y; |
| 19884 | row->start = it->start; | 19884 | row->start = it->start; |
| @@ -21517,7 +21517,7 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) | |||
| 21517 | /* Don't extend on a previously drawn mode-line. | 21517 | /* Don't extend on a previously drawn mode-line. |
| 21518 | This may happen if called from pos_visible_p. */ | 21518 | This may happen if called from pos_visible_p. */ |
| 21519 | it.glyph_row->enabled_p = false; | 21519 | it.glyph_row->enabled_p = false; |
| 21520 | prepare_desired_row (it.glyph_row); | 21520 | prepare_desired_row (w, it.glyph_row, true); |
| 21521 | 21521 | ||
| 21522 | it.glyph_row->mode_line_p = 1; | 21522 | it.glyph_row->mode_line_p = 1; |
| 21523 | 21523 | ||
| @@ -30683,13 +30683,6 @@ start_hourglass (void) | |||
| 30683 | else | 30683 | else |
| 30684 | delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0); | 30684 | delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0); |
| 30685 | 30685 | ||
| 30686 | #ifdef HAVE_NTGUI | ||
| 30687 | { | ||
| 30688 | extern void w32_note_current_window (void); | ||
| 30689 | w32_note_current_window (); | ||
| 30690 | } | ||
| 30691 | #endif /* HAVE_NTGUI */ | ||
| 30692 | |||
| 30693 | hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, | 30686 | hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, |
| 30694 | show_hourglass, NULL); | 30687 | show_hourglass, NULL); |
| 30695 | } | 30688 | } |
diff --git a/src/xfaces.c b/src/xfaces.c index 4571137a249..ead14f0116d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -676,19 +676,9 @@ init_frame_faces (struct frame *f) | |||
| 676 | } | 676 | } |
| 677 | #endif /* HAVE_WINDOW_SYSTEM */ | 677 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 678 | 678 | ||
| 679 | /* Realize basic faces. Must have enough information in frame | 679 | /* Realize faces early (Bug#17889). */ |
| 680 | parameters to realize basic faces at this point. */ | 680 | if (!realize_basic_faces (f)) |
| 681 | #ifdef HAVE_X_WINDOWS | 681 | emacs_abort (); |
| 682 | if (!FRAME_X_P (f) || FRAME_X_WINDOW (f)) | ||
| 683 | #endif | ||
| 684 | #ifdef HAVE_NTGUI | ||
| 685 | if (!FRAME_WINDOW_P (f) || FRAME_W32_WINDOW (f)) | ||
| 686 | #endif | ||
| 687 | #ifdef HAVE_NS | ||
| 688 | if (!FRAME_NS_P (f) || FRAME_NS_WINDOW (f)) | ||
| 689 | #endif | ||
| 690 | if (!realize_basic_faces (f)) | ||
| 691 | emacs_abort (); | ||
| 692 | } | 682 | } |
| 693 | 683 | ||
| 694 | 684 | ||
diff --git a/src/xfont.c b/src/xfont.c index f90904a018e..baed9abbc7e 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -146,7 +146,7 @@ struct font_driver xfont_driver = | |||
| 146 | xfont_encode_char, | 146 | xfont_encode_char, |
| 147 | xfont_text_extents, | 147 | xfont_text_extents, |
| 148 | xfont_draw, | 148 | xfont_draw, |
| 149 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 149 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
| 150 | xfont_check, | 150 | xfont_check, |
| 151 | NULL, /* get_variation_glyphs */ | 151 | NULL, /* get_variation_glyphs */ |
| 152 | NULL, /* filter_properties */ | 152 | NULL, /* filter_properties */ |
diff --git a/src/xftfont.c b/src/xftfont.c index 2b4ec065734..bd3f2c92142 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -593,7 +593,7 @@ xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct | |||
| 593 | static XftDraw * | 593 | static XftDraw * |
| 594 | xftfont_get_xft_draw (struct frame *f) | 594 | xftfont_get_xft_draw (struct frame *f) |
| 595 | { | 595 | { |
| 596 | XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver); | 596 | XftDraw *xft_draw = font_get_frame_data (f, Qxft); |
| 597 | 597 | ||
| 598 | if (! xft_draw) | 598 | if (! xft_draw) |
| 599 | { | 599 | { |
| @@ -604,7 +604,7 @@ xftfont_get_xft_draw (struct frame *f) | |||
| 604 | FRAME_X_COLORMAP (f)); | 604 | FRAME_X_COLORMAP (f)); |
| 605 | unblock_input (); | 605 | unblock_input (); |
| 606 | eassert (xft_draw != NULL); | 606 | eassert (xft_draw != NULL); |
| 607 | font_put_frame_data (f, &xftfont_driver, xft_draw); | 607 | font_put_frame_data (f, Qxft, xft_draw); |
| 608 | } | 608 | } |
| 609 | return xft_draw; | 609 | return xft_draw; |
| 610 | } | 610 | } |
| @@ -680,14 +680,14 @@ xftfont_end_for_frame (struct frame *f) | |||
| 680 | /* Don't do anything if display is dead */ | 680 | /* Don't do anything if display is dead */ |
| 681 | if (FRAME_X_DISPLAY (f) == NULL) return 0; | 681 | if (FRAME_X_DISPLAY (f) == NULL) return 0; |
| 682 | 682 | ||
| 683 | xft_draw = font_get_frame_data (f, &xftfont_driver); | 683 | xft_draw = font_get_frame_data (f, Qxft); |
| 684 | 684 | ||
| 685 | if (xft_draw) | 685 | if (xft_draw) |
| 686 | { | 686 | { |
| 687 | block_input (); | 687 | block_input (); |
| 688 | XftDrawDestroy (xft_draw); | 688 | XftDrawDestroy (xft_draw); |
| 689 | unblock_input (); | 689 | unblock_input (); |
| 690 | font_put_frame_data (f, &xftfont_driver, NULL); | 690 | font_put_frame_data (f, Qxft, NULL); |
| 691 | } | 691 | } |
| 692 | return 0; | 692 | return 0; |
| 693 | } | 693 | } |
diff --git a/src/xselect.c b/src/xselect.c index 89ec1da30b2..f23256346cb 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1299,9 +1299,7 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1299 | if (total_size_max < bytes_remaining) | 1299 | if (total_size_max < bytes_remaining) |
| 1300 | goto size_overflow; | 1300 | goto size_overflow; |
| 1301 | total_size = bytes_remaining; | 1301 | total_size = bytes_remaining; |
| 1302 | data = malloc (total_size + 1); | 1302 | data = xmalloc (total_size + 1); |
| 1303 | if (! data) | ||
| 1304 | goto memory_exhausted; | ||
| 1305 | 1303 | ||
| 1306 | /* Now read, until we've gotten it all. */ | 1304 | /* Now read, until we've gotten it all. */ |
| 1307 | while (bytes_remaining) | 1305 | while (bytes_remaining) |
| @@ -1352,9 +1350,7 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1352 | if (remaining_lim < 0 || remaining_lim < bytes_remaining) | 1350 | if (remaining_lim < 0 || remaining_lim < bytes_remaining) |
| 1353 | goto size_overflow; | 1351 | goto size_overflow; |
| 1354 | total_size = offset + bytes_gotten + bytes_remaining; | 1352 | total_size = offset + bytes_gotten + bytes_remaining; |
| 1355 | data1 = realloc (data, total_size + 1); | 1353 | data1 = xrealloc (data, total_size + 1); |
| 1356 | if (! data1) | ||
| 1357 | goto memory_exhausted; | ||
| 1358 | data = data1; | 1354 | data = data1; |
| 1359 | } | 1355 | } |
| 1360 | 1356 | ||
| @@ -1386,14 +1382,10 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1386 | return; | 1382 | return; |
| 1387 | 1383 | ||
| 1388 | size_overflow: | 1384 | size_overflow: |
| 1389 | free (data); | 1385 | if (data) |
| 1386 | xfree (data); | ||
| 1390 | unblock_input (); | 1387 | unblock_input (); |
| 1391 | memory_full (SIZE_MAX); | 1388 | memory_full (SIZE_MAX); |
| 1392 | |||
| 1393 | memory_exhausted: | ||
| 1394 | free (data); | ||
| 1395 | unblock_input (); | ||
| 1396 | memory_full (total_size + 1); | ||
| 1397 | } | 1389 | } |
| 1398 | 1390 | ||
| 1399 | /* Use xfree, not XFree, to free the data obtained with this function. */ | 1391 | /* Use xfree, not XFree, to free the data obtained with this function. */ |
diff --git a/test/ChangeLog b/test/ChangeLog index 8c28eaf30dc..029360f5664 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2014-07-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * automated/dbus-tests.el (dbus-test02-register-service-session) | ||
| 4 | (dbus-test02-register-service-system): Fix docstring. | ||
| 5 | (dbus-test02-register-service-own-bus) | ||
| 6 | (dbus-test03-peer-interface): New tests. | ||
| 7 | |||
| 8 | 2014-07-03 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 9 | |||
| 10 | * automated/python-tests.el (python-tests-self-insert): New function. | ||
| 11 | (python-triple-quote-pairing): Use it. | ||
| 12 | (python-util-forward-comment-1): New test. (Bug#17658) | ||
| 13 | |||
| 1 | 2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org> | 14 | 2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 15 | ||
| 3 | * automated/subr-x-tests.el: New file. | 16 | * automated/subr-x-tests.el: New file. |
diff --git a/test/automated/dbus-tests.el b/test/automated/dbus-tests.el index 1af5c77de53..b157a365a4c 100644 --- a/test/automated/dbus-tests.el +++ b/test/automated/dbus-tests.el | |||
| @@ -103,7 +103,7 @@ | |||
| 103 | (should-error (dbus-unregister-service bus dbus-service-dbus))) | 103 | (should-error (dbus-unregister-service bus dbus-service-dbus))) |
| 104 | 104 | ||
| 105 | (ert-deftest dbus-test02-register-service-session () | 105 | (ert-deftest dbus-test02-register-service-session () |
| 106 | "Check service registration at `:session'." | 106 | "Check service registration at `:session' bus." |
| 107 | (skip-unless (and dbus--test-enabled-session-bus | 107 | (skip-unless (and dbus--test-enabled-session-bus |
| 108 | (dbus-register-service :session dbus-service-emacs))) | 108 | (dbus-register-service :session dbus-service-emacs))) |
| 109 | (dbus--test-register-service :session) | 109 | (dbus--test-register-service :session) |
| @@ -121,11 +121,57 @@ | |||
| 121 | (should (eq (dbus-unregister-service :session service) :not-owner))))) | 121 | (should (eq (dbus-unregister-service :session service) :not-owner))))) |
| 122 | 122 | ||
| 123 | (ert-deftest dbus-test02-register-service-system () | 123 | (ert-deftest dbus-test02-register-service-system () |
| 124 | "Check service registration at `:system'." | 124 | "Check service registration at `:system' bus." |
| 125 | (skip-unless (and dbus--test-enabled-system-bus | 125 | (skip-unless (and dbus--test-enabled-system-bus |
| 126 | (dbus-register-service :system dbus-service-emacs))) | 126 | (dbus-register-service :system dbus-service-emacs))) |
| 127 | (dbus--test-register-service :system)) | 127 | (dbus--test-register-service :system)) |
| 128 | 128 | ||
| 129 | (ert-deftest dbus-test02-register-service-own-bus () | ||
| 130 | "Check service registration with an own bus. | ||
| 131 | This includes initialization and closing the bus." | ||
| 132 | ;; Start bus. | ||
| 133 | (let ((output | ||
| 134 | (ignore-errors | ||
| 135 | (shell-command-to-string "dbus-launch --sh-syntax"))) | ||
| 136 | bus pid) | ||
| 137 | (skip-unless (stringp output)) | ||
| 138 | (when (string-match "DBUS_SESSION_BUS_ADDRESS='\\(.+\\)';" output) | ||
| 139 | (setq bus (match-string 1 output))) | ||
| 140 | (when (string-match "DBUS_SESSION_BUS_PID=\\([[:digit:]]+\\);" output) | ||
| 141 | (setq pid (match-string 1 output))) | ||
| 142 | (unwind-protect | ||
| 143 | (progn | ||
| 144 | (skip-unless | ||
| 145 | (dbus-ignore-errors | ||
| 146 | (and bus pid | ||
| 147 | (featurep 'dbusbind) | ||
| 148 | (dbus-init-bus bus) | ||
| 149 | (dbus-get-unique-name bus) | ||
| 150 | (dbus-register-service bus dbus-service-emacs)))) | ||
| 151 | ;; Run the test. | ||
| 152 | (dbus--test-register-service bus)) | ||
| 153 | |||
| 154 | ;; Save exit. | ||
| 155 | (when pid (call-process "kill" nil nil nil pid))))) | ||
| 156 | |||
| 157 | (ert-deftest dbus-test03-peer-interface () | ||
| 158 | "Check `dbus-interface-peer' methods." | ||
| 159 | (skip-unless | ||
| 160 | (and dbus--test-enabled-session-bus | ||
| 161 | (dbus-register-service :session dbus-service-emacs) | ||
| 162 | ;; "GetMachineId" is not implemented (yet). When it returns a | ||
| 163 | ;; value, another D-Bus client like dbus-monitor is reacting | ||
| 164 | ;; on `dbus-interface-peer'. We cannot test then. | ||
| 165 | (not | ||
| 166 | (dbus-ignore-errors | ||
| 167 | (dbus-call-method | ||
| 168 | :session dbus-service-emacs dbus-path-dbus | ||
| 169 | dbus-interface-peer "GetMachineId" :timeout 100))))) | ||
| 170 | |||
| 171 | (should (dbus-ping :session dbus-service-emacs 100)) | ||
| 172 | (dbus-unregister-service :session dbus-service-emacs) | ||
| 173 | (should-not (dbus-ping :session dbus-service-emacs 100))) | ||
| 174 | |||
| 129 | (defun dbus-test-all (&optional interactive) | 175 | (defun dbus-test-all (&optional interactive) |
| 130 | "Run all tests for \\[dbus]." | 176 | "Run all tests for \\[dbus]." |
| 131 | (interactive "p") | 177 | (interactive "p") |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index f580e946b8f..a35242fe882 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -86,6 +86,24 @@ STRING, it is skipped so the next STRING occurrence is selected." | |||
| 86 | found-point | 86 | found-point |
| 87 | (and restore-point (goto-char starting-point))))) | 87 | (and restore-point (goto-char starting-point))))) |
| 88 | 88 | ||
| 89 | (defun python-tests-self-insert (char-or-str) | ||
| 90 | "Call `self-insert-command' for chars in CHAR-OR-STR." | ||
| 91 | (let ((chars | ||
| 92 | (cond | ||
| 93 | ((characterp char-or-str) | ||
| 94 | (list char-or-str)) | ||
| 95 | ((stringp char-or-str) | ||
| 96 | (string-to-list char-or-str)) | ||
| 97 | ((not | ||
| 98 | (cl-remove-if #'characterp char-or-str)) | ||
| 99 | char-or-str) | ||
| 100 | (t (error "CHAR-OR-STR must be a char, string, or list of char"))))) | ||
| 101 | (mapc | ||
| 102 | (lambda (char) | ||
| 103 | (let ((last-command-event char)) | ||
| 104 | (call-interactively 'self-insert-command))) | ||
| 105 | chars))) | ||
| 106 | |||
| 89 | 107 | ||
| 90 | ;;; Tests for your tests, so you can test while you test. | 108 | ;;; Tests for your tests, so you can test while you test. |
| 91 | 109 | ||
| @@ -2715,9 +2733,6 @@ def foo(a, b, c): | |||
| 2715 | (should (string= (python-util-strip-string "\n \t \n\r ") "")) | 2733 | (should (string= (python-util-strip-string "\n \t \n\r ") "")) |
| 2716 | (should (string= (python-util-strip-string "") ""))) | 2734 | (should (string= (python-util-strip-string "") ""))) |
| 2717 | 2735 | ||
| 2718 | |||
| 2719 | ;;; Electricity | ||
| 2720 | |||
| 2721 | (ert-deftest python-util-forward-comment-1 () | 2736 | (ert-deftest python-util-forward-comment-1 () |
| 2722 | (python-tests-with-temp-buffer | 2737 | (python-tests-with-temp-buffer |
| 2723 | (concat | 2738 | (concat |
| @@ -2730,36 +2745,85 @@ def foo(a, b, c): | |||
| 2730 | (python-util-forward-comment -1) | 2745 | (python-util-forward-comment -1) |
| 2731 | (should (= (point) (point-min))))) | 2746 | (should (= (point) (point-min))))) |
| 2732 | 2747 | ||
| 2748 | |||
| 2749 | ;;; Electricity | ||
| 2750 | |||
| 2751 | (ert-deftest python-parens-electric-indent-1 () | ||
| 2752 | (require 'electric) | ||
| 2753 | (let ((eim electric-indent-mode)) | ||
| 2754 | (unwind-protect | ||
| 2755 | (progn | ||
| 2756 | (python-tests-with-temp-buffer | ||
| 2757 | " | ||
| 2758 | from django.conf.urls import patterns, include, url | ||
| 2759 | |||
| 2760 | from django.contrib import admin | ||
| 2761 | |||
| 2762 | from myapp import views | ||
| 2763 | |||
| 2764 | |||
| 2765 | urlpatterns = patterns('', | ||
| 2766 | url(r'^$', views.index | ||
| 2767 | ) | ||
| 2768 | " | ||
| 2769 | (electric-indent-mode 1) | ||
| 2770 | (python-tests-look-at "views.index") | ||
| 2771 | (end-of-line) | ||
| 2772 | |||
| 2773 | ;; Inserting commas within the same line should leave | ||
| 2774 | ;; indentation unchanged. | ||
| 2775 | (python-tests-self-insert ",") | ||
| 2776 | (should (= (current-indentation) 4)) | ||
| 2777 | |||
| 2778 | ;; As well as any other input happening within the same | ||
| 2779 | ;; set of parens. | ||
| 2780 | (python-tests-self-insert " name='index')") | ||
| 2781 | (should (= (current-indentation) 4)) | ||
| 2782 | |||
| 2783 | ;; But a comma outside it, should trigger indentation. | ||
| 2784 | (python-tests-self-insert ",") | ||
| 2785 | (should (= (current-indentation) 23)) | ||
| 2786 | |||
| 2787 | ;; Newline indents to the first argument column | ||
| 2788 | (python-tests-self-insert "\n") | ||
| 2789 | (should (= (current-indentation) 23)) | ||
| 2790 | |||
| 2791 | ;; All this input must not change indentation | ||
| 2792 | (indent-line-to 4) | ||
| 2793 | (python-tests-self-insert "url(r'^/login$', views.login)") | ||
| 2794 | (should (= (current-indentation) 4)) | ||
| 2795 | |||
| 2796 | ;; But this comma does | ||
| 2797 | (python-tests-self-insert ",") | ||
| 2798 | (should (= (current-indentation) 23)))) | ||
| 2799 | (or eim (electric-indent-mode -1))))) | ||
| 2800 | |||
| 2733 | (ert-deftest python-triple-quote-pairing () | 2801 | (ert-deftest python-triple-quote-pairing () |
| 2734 | (require 'electric) | 2802 | (require 'electric) |
| 2735 | (let ((epm electric-pair-mode)) | 2803 | (let ((epm electric-pair-mode)) |
| 2736 | (unwind-protect | 2804 | (unwind-protect |
| 2737 | (progn | 2805 | (progn |
| 2738 | (python-tests-with-temp-buffer | 2806 | (python-tests-with-temp-buffer |
| 2739 | "\"\"\n" | 2807 | "\"\"\n" |
| 2740 | (or epm (electric-pair-mode 1)) | 2808 | (or epm (electric-pair-mode 1)) |
| 2741 | (goto-char (1- (point-max))) | 2809 | (goto-char (1- (point-max))) |
| 2742 | (let ((last-command-event ?\")) | 2810 | (python-tests-self-insert ?\") |
| 2743 | (call-interactively 'self-insert-command)) | 2811 | (should (string= (buffer-string) |
| 2744 | (should (string= (buffer-string) | 2812 | "\"\"\"\"\"\"\n")) |
| 2745 | "\"\"\"\"\"\"\n")) | 2813 | (should (= (point) 4))) |
| 2746 | (should (= (point) 4))) | ||
| 2747 | (python-tests-with-temp-buffer | 2814 | (python-tests-with-temp-buffer |
| 2748 | "\n" | 2815 | "\n" |
| 2749 | (let ((last-command-event ?\")) | 2816 | (python-tests-self-insert (list ?\" ?\" ?\")) |
| 2750 | (dotimes (i 3) | 2817 | (should (string= (buffer-string) |
| 2751 | (call-interactively 'self-insert-command))) | 2818 | "\"\"\"\"\"\"\n")) |
| 2752 | (should (string= (buffer-string) | 2819 | (should (= (point) 4))) |
| 2753 | "\"\"\"\"\"\"\n")) | ||
| 2754 | (should (= (point) 4))) | ||
| 2755 | (python-tests-with-temp-buffer | 2820 | (python-tests-with-temp-buffer |
| 2756 | "\"\n\"\"\n" | 2821 | "\"\n\"\"\n" |
| 2757 | (goto-char (1- (point-max))) | 2822 | (goto-char (1- (point-max))) |
| 2758 | (let ((last-command-event ?\")) | 2823 | (python-tests-self-insert ?\") |
| 2759 | (call-interactively 'self-insert-command)) | 2824 | (should (= (point) (1- (point-max)))) |
| 2760 | (should (= (point) (1- (point-max)))) | 2825 | (should (string= (buffer-string) |
| 2761 | (should (string= (buffer-string) | 2826 | "\"\n\"\"\"\n")))) |
| 2762 | "\"\n\"\"\"\n")))) | ||
| 2763 | (or epm (electric-pair-mode -1))))) | 2827 | (or epm (electric-pair-mode -1))))) |
| 2764 | 2828 | ||
| 2765 | 2829 | ||