From 2075e8431a97332aa9de5a81d9181b4a8308a73f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 22 Dec 2012 12:53:19 -0800 Subject: [PATCH 01/18] Two more dash fixes in documentation. --- doc/emacs/maintaining.texi | 2 +- doc/misc/idlwave.texi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 84cd3ae7f01..becd4482a67 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1065,7 +1065,7 @@ the version control system which the VC Directory buffer should use. @cindex CVS directory mode In addition to the VC Directory buffer, Emacs has a similar facility called PCL-CVS which is specialized for CVS@. @xref{Top, , About -PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. +PCL-CVS, pcl-cvs, PCL-CVS---The Emacs Front-End to CVS}. @end ifnottex @menu diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index c9ada95cd00..f17535ed510 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -4067,7 +4067,7 @@ sure you check the following things: @itemize @bullet @item When you download the IDLWAVE distribution, make sure you save the file under the names @file{idlwave.tar.gz}. -@item M-TAB switches among running programs --- use Esc-TAB +@item M-TAB switches among running programs---use Esc-TAB instead. @item Other issues as yet unnamed... @end itemize From 88edc57f6f15458f9a21b021f24f67fed9f487ea Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 13:01:50 -0800 Subject: [PATCH 02/18] Fix some doc/misc cross-references to separate manuals. --- doc/misc/ChangeLog | 3 +++ doc/misc/autotype.texi | 34 +++++++++++++++++----------------- doc/misc/bovine.texi | 2 +- doc/misc/ede.texi | 5 +++-- doc/misc/eieio.texi | 9 +++++---- doc/misc/pcl-cvs.texi | 4 ++-- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 95faf64aa6e..e3e73965f1b 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,8 @@ 2012-12-22 Glenn Morris + * autotype.texi, bovine.texi, ede.texi, eieio.texi, pcl-cvs.texi: + Fix cross-references to separate manuals. + * Makefile.in (gfdl): New variable. Use throughout where appropriate so that targets depend on doclicense.texi. diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 9af47adfbe3..b68229ff5cb 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -58,7 +58,7 @@ over and over again. This is especially true of form letters and programming language constructs. Project-specific header comments, flow-control constructs or magic numbers are essentially the same every time. Emacs has various features for doing tedious and repetitive typing chores for you -in addition to the Abbrev features (@pxref{(emacs)Abbrevs}). +in addition to the Abbrev features (@pxref{Abbrevs,,, emacs, The GNU Emacs Manual}). One solution is using skeletons, flexible rules that say what to insert, and how to do it. Various programming language modes offer some @@ -113,7 +113,7 @@ completions and expansions of text at point. programming language you are using, skeletons are a means of accomplishing this. Normally skeletons each have a command of their own, that, when called, will insert the skeleton. These commands can be issued in the usual ways -(@pxref{(emacs)Commands}). Modes that offer various skeletons will often +(@pxref{Commands,,, emacs, The GNU Emacs Manual}). Modes that offer various skeletons will often bind these to key-sequences on the @kbd{C-c} prefix, as well as having an @cite{Insert} menu and maybe even predefined abbrevs for them (@pxref{Skeletons as Abbrevs}). @@ -146,18 +146,18 @@ accomplishing this, and can even, in the case of programming languages, reindent the wrapped code for you. Skeleton commands take an optional numeric prefix argument -(@pxref{(emacs)Arguments}). This is interpreted in two different ways depending +(@pxref{Arguments,,, emacs, The GNU Emacs Manual}). This is interpreted in two different ways depending on whether the prefix is positive, i.e., forwards oriented, or negative, i.e., backwards oriented. A positive prefix means to wrap the skeleton around that many following words. This is accomplished by putting the words there where the point is normally left after that skeleton is inserted (@pxref{Using -Skeletons}). The point (@pxref{(emacs)Point}) is left at the next +Skeletons}). The point (@pxref{Point,,, emacs, The GNU Emacs Manual}) is left at the next interesting spot in the skeleton instead. A negative prefix means to do something similar with that many previously -marked interregions (@pxref{(emacs)Mark}). In the simplest case, if you type +marked interregions (@pxref{Mark,,, emacs, The GNU Emacs Manual}). In the simplest case, if you type @kbd{M--} just before issuing the skeleton command, that will wrap the skeleton around the current region, just like a positive argument would have wrapped it around a number of words. @@ -189,8 +189,8 @@ tried to follow the order in which you marked these points. @cindex skeletons as abbrevs Rather than use a key binding for every skeleton command, you can also -define an abbreviation (@pxref{(emacs)Defining Abbrevs}) that will expand -(@pxref{(emacs)Expanding Abbrevs}) into the skeleton. +define an abbreviation (@pxref{Defining Abbrevs,,, emacs, The GNU Emacs Manual}) that will expand +(@pxref{Expanding Abbrevs,,, emacs, The GNU Emacs Manual}) into the skeleton. Say you want @samp{ifst} to be an abbreviation for the C language if statement. You will tell Emacs that @samp{ifst} expands to the empty string @@ -290,7 +290,7 @@ skeleton. The first argument is the command name, the second is a documentation string, and the rest is an interactor and any number of skeleton elements together forming a skeleton. This skeleton is assigned to a variable of the same name as the command and can thus be overridden from your -@file{~/.emacs} file (@pxref{(emacs)Init File}). +@file{~/.emacs} file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). @@ -309,14 +309,14 @@ fingers backwards, this can be quite relieving too. @findex skeleton-pair-insert-maybe @vindex skeleton-pair - This is done by binding the first key (@pxref{(emacs)Rebinding}) of + This is done by binding the first key (@pxref{Rebinding,,, emacs, The GNU Emacs Manual}) of the pair to @code{skeleton-pair-insert-maybe} instead of @code{self-insert-command}. The ``maybe'' comes from the fact that this at-first surprising behavior is initially turned off. To enable it, you must set @code{skeleton-pair} to some non-@code{nil} value. -And even then, a positive argument (@pxref{(emacs)Arguments}) will +And even then, a positive argument (@pxref{Arguments,,, emacs, The GNU Emacs Manual}) will make this key behave like a self-inserting key -(@pxref{(emacs)Inserting Text}). +(@pxref{Inserting Text,,, emacs, The GNU Emacs Manual}). @vindex skeleton-pair-on-word While this breaks with the stated intention of always balancing pairs, it @@ -354,7 +354,7 @@ the buffer. The main application for this function, as its name suggests, is to have it be called automatically every time an empty, and only an empty file is visited. This is accomplished by putting @code{(add-hook 'find-file-hook 'auto-insert)} into your @file{~/.emacs} file -(@pxref{(emacs)Init File}). +(@pxref{Init File,,, emacs, The GNU Emacs Manual}). @vindex auto-insert-alist What gets inserted, if anything, is determined by the variable @@ -392,10 +392,10 @@ source files insert the usual header, with a copyright of your environment variable @env{$ORGANIZATION} or else the FSF, and prompt for valid keywords describing the contents. Files in a @file{bin} directory for which Emacs could determine no specialized mode -(@pxref{(emacs)Choosing Modes}) are set to Shell script mode. +(@pxref{Choosing Modes,,, emacs, The GNU Emacs Manual}) are set to Shell script mode. @findex define-auto-insert - In Lisp (@pxref{(emacs)Init File}) you can use the function + In Lisp (@pxref{Init File,,, emacs, The GNU Emacs Manual}) you can use the function @code{define-auto-insert} to add to or modify @code{auto-insert-alist}. See its documentation with @kbd{C-h f define-auto-insert}. @@ -438,7 +438,7 @@ expression that matched the filename. @kbd{M-x copyright} is a skeleton inserting command, that adds a copyright notice at the point. The ``by'' part is taken from your environment variable @env{$ORGANIZATION} or if that isn't set you are prompted for it. If the -buffer has a comment syntax (@pxref{(emacs)Comments}), this is inserted as a comment. +buffer has a comment syntax (@pxref{Comments,,, emacs, The GNU Emacs Manual}), this is inserted as a comment. @findex copyright-update @vindex copyright-limit @@ -450,13 +450,13 @@ existing ones, in the same format as the preceding year, i.e., 1994, '94 or 94. If a dash-separated year list up to last year is found, that is extended to current year, else the year is added separated by a comma. Or it replaces them when this is called with a prefix argument. If a header referring to a -wrong version of the GNU General Public License (@pxref{(emacs)Copying}) is found, +wrong version of the GNU General Public License (@pxref{Copying,,, emacs, The GNU Emacs Manual}) is found, that is updated too. An interesting application for this function is to have it be called automatically every time a file is saved. This is accomplished by putting @code{(add-hook 'before-save-hook 'copyright-update)} into -your @file{~/.emacs} file (@pxref{(emacs)Init File}). Alternative, +your @file{~/.emacs} file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). Alternative, you can do @kbd{M-x customize-variable @key{RET} before-save-hook @key{RET}}. @code{copyright-update} is conveniently listed as an option in the customization buffer. diff --git a/doc/misc/bovine.texi b/doc/misc/bovine.texi index f1a72f4cc3e..c546f94d1a3 100644 --- a/doc/misc/bovine.texi +++ b/doc/misc/bovine.texi @@ -138,7 +138,7 @@ of simplified Emacs Lisp expressions for concocting the parse tree. In bison, each time an element of @var{components} is found, it is @dfn{shifted} onto the parser stack. (The stack of matched elements.) When all @var{components}' elements have been matched, it is -@dfn{reduced} to @var{result}. @xref{(bison)Algorithm}. +@dfn{reduced} to @var{result}. @xref{Algorithm,,, bison, The GNU Bison Manual}. A particular @var{result} written into your grammar becomes the parser's goal. It is designated by a @code{%start} statement diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi index 78fcefb9e76..cfa64feefec 100644 --- a/doc/misc/ede.texi +++ b/doc/misc/ede.texi @@ -1110,7 +1110,7 @@ superclasses. In this way, specific behaviors such as how a project is saved, or how a target is compiled can be customized by a project author in detail. @ede{} communicates to these project objects via an API using methods. The commands you use in @ede{} mode are high-level -functional wrappers over these methods. @xref{(eieio)Top}. For +functional wrappers over these methods. @xref{Top,,, eieio, EIEIO manual}. For details on using @eieio{} to extending classes, and writing methods. If you intend to extend @ede{}, it is most likely that a new target type is @@ -1361,7 +1361,8 @@ association when a file is loaded. It is generally unnecessary to override this unless you keep auxiliary files. @end table -These methods are used by the semantic package extensions @xref{(semantic)Top}. +These methods are used by the semantic package extensions. +@xref{Top,,, semantic, Semantic manual}. @table @code @item ede-buffer-header-file diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index f898a2b3319..3f1beff645a 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -446,7 +446,7 @@ that default value with @code{oset-default}. @ref{Accessing Slots}. @item :type An unquoted type specifier used to validate data set into this slot. -@xref{(cl)Type Predicates}. +@xref{Type Predicates,,,cl,Common Lisp Extensions}. Here are some examples: @table @code @item symbol @@ -1571,7 +1571,7 @@ all these classes, subsection headings, and indexes. Each class will be indexed using the texinfo labeled index @var{indexstring} which is a two letter description. -@xref{(texinfo) New Indices}. +@xref{New Indices,,,texinfo,Texinfo manual}. To use this command, the texinfo macro @@ -1874,8 +1874,9 @@ instead pre-builds a method that gets the slot's value. @item :type Specifier uses the @code{typep} function from the @file{cl} -package. @xref{(cl)Type Predicates}. It therefore has the same issues as -that package. Extensions include the ability to provide object names. +package. @xref{Type Predicates,,,cl,Common Lisp Extensions}. +It therefore has the same issues as that package. Extensions include +the ability to provide object names. @end table Defclass also supports class options, but does not currently use values diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi index f55fb2cb3bc..156f78b00d0 100644 --- a/doc/misc/pcl-cvs.texi +++ b/doc/misc/pcl-cvs.texi @@ -1169,13 +1169,13 @@ kill the contents of the buffer with @kbd{C-w}. @findex log-edit-insert-changelog If you work by writing entries in the @file{ChangeLog} -(@pxref{(emacs)Change Log}) and then commit the change under revision +(@pxref{Change Log,,, emacs, The GNU Emacs Manual}) and then commit the change under revision control, you can generate the Log Edit text from the ChangeLog using @kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for entries for the file(s) concerned in the top entry in the ChangeLog and uses those paragraphs as the log text. This text is only inserted if the top entry was made under your user name on the current date. -@xref{(emacs)Change Logs and VC}, for the opposite way of +@xref{Change Logs and VC,,, emacs, The GNU Emacs Manual}, for the opposite way of working---generating ChangeLog entries from the revision control log. In the Log Edit buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files}) From ceccabdb93e2fc0509e8e70223fcc659376506f2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 13:09:40 -0800 Subject: [PATCH 03/18] Tweak some over/underfull lines * doc/misc/ada-mode.texi (Project file variables): Reword to reduce underfull hbox. (No project files, Use GNAT project file): Use smallexample to make some overfull lines less terrible. --- doc/misc/ChangeLog | 5 +++++ doc/misc/ada-mode.texi | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index e3e73965f1b..23bc19a6862 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,10 @@ 2012-12-22 Glenn Morris + * ada-mode.texi (Project file variables): + Reword to reduce underfull hbox. + (No project files, Use GNAT project file): + Use smallexample to make some overfull lines less terrible. + * autotype.texi, bovine.texi, ede.texi, eieio.texi, pcl-cvs.texi: Fix cross-references to separate manuals. diff --git a/doc/misc/ada-mode.texi b/doc/misc/ada-mode.texi index f4c29bb6e16..191babf97bd 100644 --- a/doc/misc/ada-mode.texi +++ b/doc/misc/ada-mode.texi @@ -521,8 +521,8 @@ ada_project_path_sep=: ada_project_path=$GDS_ROOT/makerules ada_project_path=../opentoken @end example -the environment variable @code{ADA_PROJECT_PATH} will be set to -@code{"/home/shared/makerules:/home/opentoken/"}. +then as a result the environment variable @code{ADA_PROJECT_PATH} will +be set to @code{"/home/shared/makerules:/home/opentoken/"}. The default value is not the current value of this environment variable, because that will typically have been set by another @@ -730,7 +730,7 @@ In buffer @file{hello.adb}, invoke @samp{Ada | Check file}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_1/ gnatmake -u -c -gnatc -g c:/Examples/Example_1/hello.adb -cargs -gnatq -gnatQ gcc -c -Ic:/Examples/Example_1/ -gnatc -g -gnatq -gnatQ -I- c:/Examples/Example_1/hello.adb @@ -738,7 +738,7 @@ hello.adb:4:04: "Put_Line" is not visible hello.adb:4:04: non-visible declaration at a-textio.ads:264 hello.adb:4:04: non-visible declaration at a-textio.ads:260 gnatmake: "c:/Examples/Example_1/hello.adb" compilation error -@end example +@end smallexample If you have enabled font-lock, the lines with actual errors (starting with @file{hello.adb}) are highlighted, with the file name in red. @@ -1045,14 +1045,14 @@ Then, again in @file{hello_4.adb}, invoke @samp{Ada | Set main and Build}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_4/Gnat_Project/ gnatmake -o hello_4 hello_4 -Phello_4.gpr -cargs -gnatq -gnatQ -bargs -largs gcc -c -g -gnatyt -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\Gnat_Project\hello_4.adb gcc -c -g -gnatyt -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\hello_pkg.adb hello_pkg.adb:2:08: keyword "body" expected here [see file name] gnatmake: "c:\examples\example_4\hello_pkg.adb" compilation error -@end example +@end smallexample Compare the @code{gcc} options to the compiler output in @ref{Set compiler options}; this shows that @file{hello_4.gpr} is being used to @@ -1112,14 +1112,14 @@ Then, again in @file{hello_5.adb}, invoke @samp{Ada | Set main and Build}. You should get a @code{*compilation*} buffer containing something like (the directory paths will be different): -@example +@smallexample cd c:/Examples/Example_5/ gnatmake -o hello_5 hello_5 -Phello_5.gpr -g -cargs -gnatq -gnatQ -bargs -largs gcc -c -g -gnatyt -g -gnatq -gnatQ -I- -gnatA c:\Examples\Example_5\hello_5.adb gcc -c -g -gnatyt -g -gnatq -gnatQ -I- -gnatA c:\Examples\Example_4\hello_pkg.adb hello_pkg.adb:2:08: keyword "body" expected here [see file name] gnatmake: "c:\examples\example_4\hello_pkg.adb" compilation error -@end example +@end smallexample Now type @kbd{C-x `}. @file{Example_4/hello_pkg.adb} is shown, demonstrating that @file{hello_5.gpr} and @file{hello_4.gpr} are being From 9fbc8f464285f37b9c6f85345a499b0e7cc2a681 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 13:12:07 -0800 Subject: [PATCH 04/18] * doc/misc/auth.texi (Help for users): Break long lines. --- doc/misc/ChangeLog | 2 ++ doc/misc/auth.texi | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 23bc19a6862..0d394a038b1 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,7 @@ 2012-12-22 Glenn Morris + * auth.texi (Help for users): Break long lines. + * ada-mode.texi (Project file variables): Reword to reduce underfull hbox. (No project files, Use GNAT project file): diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 6f3a5fe0a38..bb6ad46c26f 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -154,7 +154,8 @@ and simplest configuration is: (setq auth-sources '((:source "~/.authinfo.gpg"))) ;;; even shorter and the @emph{default}: (setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")) -;;; use the Secrets API @var{Login} collection (@pxref{Secret Service API}) +;;; use the Secrets API @var{Login} collection +;;; (@pxref{Secret Service API}) (setq auth-sources '("secrets:Login")) @end lisp @@ -167,7 +168,8 @@ have unusual setups and the remaining 10% are @emph{really} unusual). Here's a mixed example using two sources: @lisp -(setq auth-sources '((:source (:secrets default) :host "myserver" :user "joe") +(setq auth-sources '((:source (:secrets default) + :host "myserver" :user "joe") "~/.authinfo.gpg")) @end lisp From fd7620110dd93e2f83e5cc1e7cb72893ca1b5d1b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 13:15:44 -0800 Subject: [PATCH 05/18] * doc/misc/bovine.texi (Optional Lambda Expression): Allow line break. --- doc/misc/ChangeLog | 2 ++ doc/misc/bovine.texi | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 0d394a038b1..cbb780f998a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,7 @@ 2012-12-22 Glenn Morris + * bovine.texi (Optional Lambda Expression): Allow line break. + * auth.texi (Help for users): Break long lines. * ada-mode.texi (Project file variables): diff --git a/doc/misc/bovine.texi b/doc/misc/bovine.texi index c546f94d1a3..77c41e22777 100644 --- a/doc/misc/bovine.texi +++ b/doc/misc/bovine.texi @@ -368,8 +368,8 @@ Is the kind of tag being create, such as @code{function}, or @code{variable}, though any symbol will work. @item attributes -Is an optional set of labeled values such as @w{@code{:constant-flag t :parent -"parenttype"}}. +Is an optional set of labeled values such as @code{:constant-flag t :parent +"parenttype"}. @end table @item (TAG-VARIABLE @var{name} @var{type} @var{default-value} [@var{attributes}]) From 2ecfdaa6a9a2c14364f714b138c72e50f1ad30c8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 13:58:06 -0800 Subject: [PATCH 06/18] doc/misc/wisent.texi tweaks * doc/misc/wisent.texi (Wisent Overview): Fix xref. (Grammar format, Understanding the automaton): Avoid overfill. --- doc/misc/ChangeLog | 3 +++ doc/misc/wisent.texi | 12 +++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index cbb780f998a..83e91e55a36 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,8 @@ 2012-12-22 Glenn Morris + * wisent.texi (Wisent Overview): Fix xref. + (Grammar format, Understanding the automaton): Avoid overfill. + * bovine.texi (Optional Lambda Expression): Allow line break. * auth.texi (Help for users): Break long lines. diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi index c2c52837b97..83302fba219 100644 --- a/doc/misc/wisent.texi +++ b/doc/misc/wisent.texi @@ -112,7 +112,7 @@ of the GNU Compiler Compiler Bison. Its code is a port of the C code of GNU Bison 1.28 & 1.31. For more details on the basic concepts for understanding Wisent, it is -worthwhile to read the @ref{Top, Bison Manual, bison}. +worthwhile to read the @ref{Top, Bison Manual, , bison}. @ifhtml @uref{http://www.gnu.org/manual/bison/html_node/index.html}. @end ifhtml @@ -302,7 +302,7 @@ If @var{components} in a rule is @code{nil}, it means that the rule can match the empty string. For example, here is how to define a comma-separated sequence of zero or more @samp{exp} groupings: -@example +@smallexample @group (expseq (nil) ;; expseq: ;; empty ((expseq1)) ;; | expseq1 @@ -312,7 +312,7 @@ comma-separated sequence of zero or more @samp{exp} groupings: ((expseq1 ?, exp)) ;; | expseq1 ',' exp ) ;; ; @end group -@end example +@end smallexample @cindex precedence level @item precedence @@ -339,7 +339,7 @@ serves to stand for its precedence: Now the precedence of @code{UMINUS} can be used in specific rules: -@example +@smallexample @group (exp @dots{} ;; exp: @dots{} ((exp ?- exp)) ;; | exp '-' exp @@ -348,7 +348,7 @@ Now the precedence of @code{UMINUS} can be used in specific rules: @dots{} ;; @dots{} ) ;; ; @end group -@end example +@end smallexample If you forget to append @code{[UMINUS]} to the rule for unary minus, Wisent silently assumes that minus has its usual precedence. This @@ -1032,7 +1032,6 @@ state 8 $default reduce using rule 2 (exp) - state 9 exp -> exp . '+' exp (rule 1) @@ -1047,7 +1046,6 @@ state 9 $default reduce using rule 3 (exp) - state 10 exp -> exp . '+' exp (rule 1) From d227e322293aef0d6b6a1702ee9dd4c2b22558eb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 14:04:09 -0800 Subject: [PATCH 07/18] * doc/misc/widget.texi (Programming Example): Break some long lines. --- doc/misc/ChangeLog | 2 ++ doc/misc/widget.texi | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 83e91e55a36..f15dedb2b9f 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,7 @@ 2012-12-22 Glenn Morris + * widget.texi (Programming Example): Break some long lines. + * wisent.texi (Wisent Overview): Fix xref. (Grammar format, Understanding the automaton): Avoid overfill. diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index d5514fc936c..182dbb430ac 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -364,13 +364,14 @@ Interface}). (setq widget-example-repeat (widget-create 'editable-list :entry-format "%i %d %v" - :notify (lambda (widget &rest ignore) - (let ((old (widget-get widget - ':example-length)) - (new (length (widget-value widget)))) - (unless (eq old new) - (widget-put widget ':example-length new) - (message "You can count to %d." new)))) + :notify + (lambda (widget &rest ignore) + (let ((old (widget-get widget + ':example-length)) + (new (length (widget-value widget)))) + (unless (eq old new) + (widget-put widget ':example-length new) + (message "You can count to %d." new)))) :value '("One" "Eh, two?" "Five!") '(editable-field :value "three"))) (widget-insert "\n\nSelect multiple:\n\n") @@ -387,11 +388,13 @@ Interface}). :notify (lambda (widget &rest ignore) (message "You selected %s" (widget-value widget))) - '(item "One") '(item "Another One.") '(item "A Final One.")) + '(item "One") '(item "Another One.") + '(item "A Final One.")) (widget-insert "\n") (widget-create 'push-button :notify (lambda (&rest ignore) - (if (= (length (widget-value widget-example-repeat)) + (if (= (length + (widget-value widget-example-repeat)) 3) (message "Congratulation!") (error "Three was the count!"))) From 173076b47b1e789fd34ed93374983e6542388096 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Dec 2012 14:09:06 -0800 Subject: [PATCH 08/18] Avoid some overfull lines in doc/misc/viper --- doc/misc/ChangeLog | 3 +++ doc/misc/viper.texi | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index f15dedb2b9f..383833c1dc9 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,5 +1,8 @@ 2012-12-22 Glenn Morris + * viper.texi (Rudimentary Changes, Key Bindings, Key Bindings): + Avoid some overfull lines. + * widget.texi (Programming Example): Break some long lines. * wisent.texi (Wisent Overview): Fix xref. diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index 1297fdb672b..a0dc237c6c9 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -1838,10 +1838,10 @@ replacement regions, you can change @code{viper-replace-overlay-face} by specifying a new face. (Emacs faces are described in the Emacs Lisp reference.) On a color display, the following customization method is usually most effective: -@example +@smallexample (set-face-foreground viper-replace-overlay-face "DarkSlateBlue") (set-face-background viper-replace-overlay-face "yellow") -@end example +@end smallexample For a complete list of colors available to you, evaluate the expression @code{(x-defined-colors)}. (Type it in the buffer @code{*scratch*} and then hit the @kbd{C-j} key. @@ -2044,7 +2044,8 @@ can write this: @noindent To customize the binding for @kbd{C-h} in Insert state: @example -(define-key viper-insert-global-user-map "\C-h" 'my-del-backwards-function) +(define-key viper-insert-global-user-map "\C-h" + 'my-del-backwards-function) @end example @noindent @@ -2093,7 +2094,8 @@ Dired functions, the trick can be accomplished via the following code: (setq my-dired-vi-purist-map (make-sparse-keymap)) (define-key my-dired-vi-purist-map "k" 'viper-previous-line) (define-key my-dired-vi-purist-map "l" 'viper-forward-char) -(viper-modify-major-mode 'dired-mode 'emacs-state my-dired-vi-purist-map) +(viper-modify-major-mode 'dired-mode + 'emacs-state my-dired-vi-purist-map) @end example Yet another way to customize key bindings in a major mode is to edit the From 3f6b93cd7fa2b949e722408bcecf50e2b7b4322e Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 23 Dec 2012 11:36:15 +0000 Subject: [PATCH 09/18] Speed up fontification where there's large brace blocks. progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Add a limit to a call of c-beginning-of-decl-1. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/cc-fonts.el | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9de20493749..a0ae8fbc4f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-12-23 Alan Mackenzie + + Speed up fontification where there's large brace blocks. + * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Add a limit + to a call of c-beginning-of-decl-1. + 2012-12-21 Chong Yidong * sort.el (sort-subr): Doc fix (Bug#13056). diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 2d116e1ecdc..c29e2220211 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1591,6 +1591,7 @@ casts and declarations are fontified. Used on level 2 and higher." ;; prevent a repeat invocation. See elisp/lispref page "Search-based ;; Fontification". (let* ((paren-state (c-parse-state)) + (decl-search-lim (c-determine-limit 1000)) decl-context in-typedef ps-elt) ;; Are we in any nested struct/union/class/etc. braces? (while paren-state @@ -1599,7 +1600,7 @@ casts and declarations are fontified. Used on level 2 and higher." (when (and (atom ps-elt) (eq (char-after ps-elt) ?\{)) (goto-char ps-elt) - (setq decl-context (c-beginning-of-decl-1) + (setq decl-context (c-beginning-of-decl-1 decl-search-lim) in-typedef (looking-at c-typedef-key)) (if in-typedef (c-forward-token-2)) (when (and c-opt-block-decls-with-vars-key From d0ba8c8d78e51a70fe445f178eb51675cc5be5b6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 23 Dec 2012 18:43:34 +0100 Subject: [PATCH 10/18] shr: render as italic, not bold --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/shr.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 95063ef4fa4..2cb9489e86e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2012-12-23 Andreas Schwab + + * shr.el (shr-tag-em): Render as italic, not bold. + 2012-12-02 Andreas Schwab * gnus-sum.el (gnus-summary-mode-map): Bind gnus-summary-widget-forward diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 03704554459..322c1d5d081 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -894,7 +894,7 @@ ones, in case fg and bg are nil." (shr-fontize-cont cont 'italic)) (defun shr-tag-em (cont) - (shr-fontize-cont cont 'bold)) + (shr-fontize-cont cont 'italic)) (defun shr-tag-strong (cont) (shr-fontize-cont cont 'bold)) From ea0857a126fbd38e96fd499c7173341a3e8614b6 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 24 Dec 2012 11:14:49 +0400 Subject: [PATCH 11/18] * lisp/progmodes/ruby-mode.el: Bump the version to 1.2. Fixes: debbugs:13200 --- lisp/ChangeLog | 4 ++++ lisp/progmodes/ruby-mode.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0ae8fbc4f8..b5fa2e85fae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-24 Dmitry Gutov + + * progmodes/ruby-mode.el: Bump the version to 1.2 (Bug#13200). + 2012-12-23 Alan Mackenzie Speed up fontification where there's large brace blocks. diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e4bfffa73c1..41a9aaed6f9 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -7,7 +7,7 @@ ;; URL: http://www.emacswiki.org/cgi-bin/wiki/RubyMode ;; Created: Fri Feb 4 14:49:13 JST 1994 ;; Keywords: languages ruby -;; Version: 1.0 +;; Version: 1.2 ;; This file is part of GNU Emacs. From 02e7729e7b171f037d90543c6d62ad0016f2be3d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 24 Dec 2012 11:26:35 +0100 Subject: [PATCH 12/18] Fixes: debbugs:13222 * configure.ac (SIGNALS_VIA_CHARACTERS): Also define for darwin. --- ChangeLog | 5 +++++ configure.ac | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 181fa811543..d6a54782ecc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-12-24 Andreas Schwab + + * configure.ac (SIGNALS_VIA_CHARACTERS): Also define for darwin. + (Bug#13222) + 2012-12-20 Akinori MUSHA (tiny change) * Makefile.in (install-arch-dep): Ignore chmod errors. (Bug#13233) diff --git a/configure.ac b/configure.ac index 814b81a72bd..6c694fd7088 100644 --- a/configure.ac +++ b/configure.ac @@ -3633,7 +3633,7 @@ AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by case $opsys in dnl Perry Smith says this is correct for AIX. dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX. - aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) + aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin ) AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1) ;; From 0cbbcb45a5873968f056cbc8959dcfe88cb4b1eb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 24 Dec 2012 07:17:31 -0500 Subject: [PATCH 13/18] Auto-commit of generated files. --- autogen/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/configure b/autogen/configure index 833ef7bd6f1..6c7ef6bf42b 100755 --- a/autogen/configure +++ b/autogen/configure @@ -15332,7 +15332,7 @@ esac case $opsys in - aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) + aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin ) $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h ;; From 216ed9cc435743a596b04917605d29f5ea562e7e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 24 Dec 2012 17:03:39 +0100 Subject: [PATCH 14/18] * nnimap.el (nnimap-find-article-by-message-id): Don't error out if group is nil. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/nnimap.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2cb9489e86e..ece158142c6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-12-24 Andreas Schwab + + * nnimap.el (nnimap-find-article-by-message-id): Don't error out if + group is nil. + 2012-12-23 Andreas Schwab * shr.el (shr-tag-em): Render as italic, not bold. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 5126c25f66b..7a7d67517c6 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -971,7 +971,7 @@ textual parts.") (defun nnimap-find-article-by-message-id (group message-id) (with-current-buffer (nnimap-buffer) (erase-buffer) - (unless (equal group (nnimap-group nnimap-object)) + (unless (or (not group) (equal group (nnimap-group nnimap-object))) (setf (nnimap-group nnimap-object) nil) (setf (nnimap-examined nnimap-object) group) (nnimap-send-command "EXAMINE %S" (utf7-encode group t))) From f5c81c80c109fcaca04b25e08c34848110e2550b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 24 Dec 2012 18:15:13 +0200 Subject: [PATCH 15/18] Fix bug #13262 with crashes in completion on MS-Windows with non-ASCII filenames. src/fileio.c (file_name_as_directory, directory_file_name): Accept an additional argument MULTIBYTE to indicate whether the input C came from a multibyte or a unibyte Lisp string; all callers adjusted. Don't assume the input string is always multibyte. (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly: don't ENCODE_FILE them, and return a unibyte string if the input was unibyte. (Fexpand_file_name): Don't mix unibyte with multibyte strings, and don't assume the input strings will always be multibyte. If the input strings are multibyte, decode strings obtained from C library functions. --- src/ChangeLog | 15 +++++ src/fileio.c | 154 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 123 insertions(+), 46 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e8d5449a99e..c8cc486a9de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2012-12-24 Eli Zaretskii + + * fileio.c (file_name_as_directory, directory_file_name): Accept + an additional argument MULTIBYTE to indicate whether the input C + came from a multibyte or a unibyte Lisp string; all callers + adjusted. Don't assume the input string is always multibyte. + (Bug#13262) + (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly: + don't ENCODE_FILE them, and return a unibyte string if the input + was unibyte. + (Fexpand_file_name): Don't mix unibyte with multibyte strings, and + don't assume the input strings will always be multibyte. If the + input strings are multibyte, decode strings obtained from C + library functions. + 2012-12-22 Martin Rudalics * window.c (Fselect_window): Reword doc-string (Bug#13248). diff --git a/src/fileio.c b/src/fileio.c index b0c319cfa62..2d72583e506 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -373,12 +373,26 @@ Given a Unix syntax file name, returns a string ending in slash. */) strcat (res, "/"); beg = res; p = beg + strlen (beg); + dostounix_filename (beg); + tem_fn = make_specified_string (beg, -1, p - beg, + STRING_MULTIBYTE (filename)); } + else + tem_fn = make_specified_string (beg - 2, -1, p - beg + 2, + STRING_MULTIBYTE (filename)); } - tem_fn = ENCODE_FILE (make_specified_string (beg, -1, p - beg, - STRING_MULTIBYTE (filename))); - dostounix_filename (SSDATA (tem_fn)); - return DECODE_FILE (tem_fn); + else if (STRING_MULTIBYTE (filename)) + { + tem_fn = ENCODE_FILE (make_specified_string (beg, -1, p - beg, 1)); + dostounix_filename (SSDATA (tem_fn)); + tem_fn = DECODE_FILE (tem_fn); + } + else + { + dostounix_filename (beg); + tem_fn = make_specified_string (beg, -1, p - beg, 0); + } + return tem_fn; #else /* DOS_NT */ return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename)); #endif /* DOS_NT */ @@ -453,12 +467,14 @@ get a current directory to run processes in. */) return Ffile_name_directory (filename); } -/* Convert from file name SRC of length SRCLEN to directory name - in DST. On UNIX, just make sure there is a terminating /. - Return the length of DST in bytes. */ +/* Convert from file name SRC of length SRCLEN to directory name in + DST. MULTIBYTE non-zero means the file name in SRC is a multibyte + string. On UNIX, just make sure there is a terminating /. Return + the length of DST in bytes. */ static ptrdiff_t -file_name_as_directory (char *dst, const char *src, ptrdiff_t srclen) +file_name_as_directory (char *dst, const char *src, ptrdiff_t srclen, + bool multibyte) { if (srclen == 0) { @@ -477,14 +493,17 @@ file_name_as_directory (char *dst, const char *src, ptrdiff_t srclen) srclen++; } #ifdef DOS_NT - { - Lisp_Object tem_fn = make_specified_string (dst, -1, srclen, 1); + if (multibyte) + { + Lisp_Object tem_fn = make_specified_string (dst, -1, srclen, 1); - tem_fn = ENCODE_FILE (tem_fn); - dostounix_filename (SSDATA (tem_fn)); - tem_fn = DECODE_FILE (tem_fn); - memcpy (dst, SSDATA (tem_fn), (srclen = SBYTES (tem_fn)) + 1); - } + tem_fn = ENCODE_FILE (tem_fn); + dostounix_filename (SSDATA (tem_fn)); + tem_fn = DECODE_FILE (tem_fn); + memcpy (dst, SSDATA (tem_fn), (srclen = SBYTES (tem_fn)) + 1); + } + else + dostounix_filename (dst); #endif return srclen; } @@ -520,16 +539,18 @@ For a Unix-syntax file name, just appends a slash. */) } buf = alloca (SBYTES (file) + 10); - length = file_name_as_directory (buf, SSDATA (file), SBYTES (file)); + length = file_name_as_directory (buf, SSDATA (file), SBYTES (file), + STRING_MULTIBYTE (file)); return make_specified_string (buf, -1, length, STRING_MULTIBYTE (file)); } -/* Convert from directory name SRC of length SRCLEN to - file name in DST. On UNIX, just make sure there isn't - a terminating /. Return the length of DST in bytes. */ +/* Convert from directory name SRC of length SRCLEN to file name in + DST. MULTIBYTE non-zero means the file name in SRC is a multibyte + string. On UNIX, just make sure there isn't a terminating /. + Return the length of DST in bytes. */ static ptrdiff_t -directory_file_name (char *dst, char *src, ptrdiff_t srclen) +directory_file_name (char *dst, char *src, ptrdiff_t srclen, bool multibyte) { /* Process as Unix format: just remove any final slash. But leave "/" unchanged; do not change it to "". */ @@ -545,14 +566,17 @@ directory_file_name (char *dst, char *src, ptrdiff_t srclen) srclen--; } #ifdef DOS_NT - { - Lisp_Object tem_fn = make_specified_string (dst, -1, srclen, 1); + if (multibyte) + { + Lisp_Object tem_fn = make_specified_string (dst, -1, srclen, 1); - tem_fn = ENCODE_FILE (tem_fn); - dostounix_filename (SSDATA (tem_fn)); - tem_fn = DECODE_FILE (tem_fn); - memcpy (dst, SSDATA (tem_fn), (srclen = SBYTES (tem_fn)) + 1); - } + tem_fn = ENCODE_FILE (tem_fn); + dostounix_filename (SSDATA (tem_fn)); + tem_fn = DECODE_FILE (tem_fn); + memcpy (dst, SSDATA (tem_fn), (srclen = SBYTES (tem_fn)) + 1); + } + else + dostounix_filename (dst); #endif return srclen; } @@ -588,7 +612,8 @@ In Unix-syntax, this function just removes the final slash. */) } buf = alloca (SBYTES (directory) + 20); - length = directory_file_name (buf, SSDATA (directory), SBYTES (directory)); + length = directory_file_name (buf, SSDATA (directory), SBYTES (directory), + STRING_MULTIBYTE (directory)); return make_specified_string (buf, -1, length, STRING_MULTIBYTE (directory)); } @@ -1038,7 +1063,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) /* `egetenv' may return a unibyte string, which will bite us since we expect the directory to be multibyte. */ tem = build_string (newdir); - if (!STRING_MULTIBYTE (tem)) + if (multibyte && !STRING_MULTIBYTE (tem)) { hdir = DECODE_FILE (tem); newdir = SSDATA (hdir); @@ -1060,7 +1085,18 @@ filesystem tree, not (expand-file-name ".." dirname). */) unblock_input (); if (pw) { + Lisp_Object tem; + newdir = pw->pw_dir; + /* `getpwnam' may return a unibyte string, which will + bite us since we expect the directory to be + multibyte. */ + tem = build_string (newdir); + if (multibyte && !STRING_MULTIBYTE (tem)) + { + hdir = DECODE_FILE (tem); + newdir = SSDATA (hdir); + } nm = p; #ifdef DOS_NT collapse_newdir = 0; @@ -1084,6 +1120,13 @@ filesystem tree, not (expand-file-name ".." dirname). */) adir = alloca (MAXPATHLEN + 1); if (!getdefdir (c_toupper (drive) - 'A' + 1, adir)) adir = NULL; + else if (multibyte) + { + Lisp_Object tem = build_string (adir); + + tem = DECODE_FILE (tem); + memcpy (adir, SSDATA (tem), SBYTES (tem) + 1); + } } if (!adir) { @@ -1142,6 +1185,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) indirectly by prepending newdir to nm if necessary, and using cwd (or the wd of newdir's drive) as the new newdir. */ char *adir; + if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { drive = (unsigned char) newdir[0]; @@ -1151,7 +1195,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) { ptrdiff_t newlen = strlen (newdir); char *tmp = alloca (newlen + strlen (nm) + 2); - file_name_as_directory (tmp, newdir, newlen); + file_name_as_directory (tmp, newdir, newlen, multibyte); strcat (tmp, nm); nm = tmp; } @@ -1159,10 +1203,17 @@ filesystem tree, not (expand-file-name ".." dirname). */) if (drive) { if (!getdefdir (c_toupper (drive) - 'A' + 1, adir)) - newdir = "/"; + strcpy (adir, "/"); } else getwd (adir); + if (multibyte) + { + Lisp_Object tem = build_string (adir); + + tem = DECODE_FILE (tem); + memcpy (adir, SSDATA (tem), SBYTES (tem) + 1); + } newdir = adir; } @@ -1249,7 +1300,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) strcpy (target, newdir); } else - file_name_as_directory (target, newdir, length); + file_name_as_directory (target, newdir, length, multibyte); } strcat (target, nm); @@ -1335,9 +1386,14 @@ filesystem tree, not (expand-file-name ".." dirname). */) target[1] = ':'; } result = make_specified_string (target, -1, o - target, multibyte); - result = ENCODE_FILE (result); - dostounix_filename (SSDATA (result)); - result = DECODE_FILE (result); + if (multibyte) + { + result = ENCODE_FILE (result); + dostounix_filename (SSDATA (result)); + result = DECODE_FILE (result); + } + else + dostounix_filename (SSDATA (result)); #else /* !DOS_NT */ result = make_specified_string (target, -1, o - target, multibyte); #endif /* !DOS_NT */ @@ -1619,18 +1675,24 @@ those `/' is discarded. */) memcpy (nm, SDATA (filename), SBYTES (filename) + 1); #ifdef DOS_NT - { - Lisp_Object encoded_filename = ENCODE_FILE (filename); - Lisp_Object tem_fn; + if (multibyte) + { + Lisp_Object encoded_filename = ENCODE_FILE (filename); + Lisp_Object tem_fn; - dostounix_filename (SDATA (encoded_filename)); - tem_fn = DECODE_FILE (encoded_filename); - nm = alloca (SBYTES (tem_fn) + 1); - memcpy (nm, SDATA (tem_fn), SBYTES (tem_fn) + 1); - substituted = (memcmp (nm, SDATA (filename), SBYTES (filename)) != 0); - if (substituted) - filename = tem_fn; - } + dostounix_filename (SDATA (encoded_filename)); + tem_fn = DECODE_FILE (encoded_filename); + nm = alloca (SBYTES (tem_fn) + 1); + memcpy (nm, SDATA (tem_fn), SBYTES (tem_fn) + 1); + substituted = (memcmp (nm, SDATA (filename), SBYTES (filename)) != 0); + if (substituted) + filename = tem_fn; + } + else + { + dostounix_filename (nm); + substituted = (memcmp (nm, SDATA (filename), SBYTES (filename)) != 0); + } #endif endp = nm + SBYTES (filename); From db590ef6e30d0b962e226ce5c5a003cc52a17953 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 26 Dec 2012 20:45:19 +0400 Subject: [PATCH 16/18] * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class", "module" and "def" to have indentation before them. Regression from 2012-09-07T04:15:56Z!dgutov@yandex.ru (see the new test). * test/automated/ruby-mode-tests.el (ruby-indent-after-block-in-continued-expression): New test. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 5 +++-- test/ChangeLog | 5 +++++ test/automated/ruby-mode-tests.el | 13 +++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b5fa2e85fae..f7664b663ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-12-26 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class", + "module" and "def" to have indentation before them. Regression + from 109911 (see the new test). + 2012-12-24 Dmitry Gutov * progmodes/ruby-mode.el: Bump the version to 1.2 (Bug#13200). diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 41a9aaed6f9..4d50eec6d5e 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -64,8 +64,9 @@ "Regexp to match keywords that nest without blocks.") (defconst ruby-indent-beg-re - (concat "^\\s *" (regexp-opt '("class" "module" "def" "if" "unless" "case" - "while" "until" "for" "begin")) "\\_>") + (concat "^\\(\\s *" (regexp-opt '("class" "module" "def")) "\\|" + (regexp-opt '("if" "unless" "case" "while" "until" "for" "begin")) + "\\)\\_>") "Regexp to match where the indentation gets deeper.") (defconst ruby-modifier-beg-keywords diff --git a/test/ChangeLog b/test/ChangeLog index 72b44747bac..7344d8dfb95 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-12-26 Dmitry Gutov + + * automated/ruby-mode-tests.el + (ruby-indent-after-block-in-continued-expression): New test. + 2012-10-14 Eli Zaretskii * automated/compile-tests.el (compile-tests--test-regexps-data): diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 8da0041e9a4..28c2a2a070d 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el @@ -202,6 +202,19 @@ VALUES-PLIST is a list with alternating index and value elements." | end |")) +(ert-deftest ruby-indent-after-block-in-continued-expression () + (ruby-should-indent-buffer + "var = + | begin + | val + | end + |statement" + "var = + |begin + |val + |end + |statement")) + (ert-deftest ruby-move-to-block-stops-at-indentation () (with-temp-buffer (insert "def f\nend") From 1ab0c851fc0f1d2e1c54196bfaeb67a3bd916741 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 26 Dec 2012 23:55:14 -0800 Subject: [PATCH 17/18] Document cygwin-convert-file-name-{to|from}-windows * doc/lispref/files.texi (File Names): Mention Cygwin conversion functions. * src/cygw32.c (Fcygwin_convert_file_name_to_windows) (Fcygwin_convert_file_name_from_windows): Doc fixes. * etc/NEWS: Related markup. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/files.texi | 10 +++++++++- etc/NEWS | 4 +++- src/ChangeLog | 5 +++++ src/cygw32.c | 18 ++++++++++-------- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 09c70226d5d..f77e68aadc4 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2012-12-27 Glenn Morris + + * files.texi (File Names): Mention Cygwin conversion functions. + 2012-12-22 Martin Rudalics * windows.texi (Selecting Windows): Reword description of diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 863acbe3949..fc01b1cd187 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1699,12 +1699,20 @@ how to manipulate file names. can operate on file names that do not refer to an existing file or directory. +@findex cygwin-convert-file-name-from-windows +@findex cygwin-convert-file-name-to-windows +@cindex MS-Windows file-name syntax +@cindex converting file names from/to MS-Windows syntax On MS-DOS and MS-Windows, these functions (like the function that actually operate on files) accept MS-DOS or MS-Windows file-name syntax, where backslashes separate the components, as well as Unix syntax; but they always return Unix syntax. This enables Lisp programs to specify file names in Unix syntax and work properly on all systems without -change. +change.@footnote{In MS-Windows versions of Emacs compiled for the Cygwin +environment, you can use the functions +@code{cygwin-convert-file-name-to-windows} and +@code{cygwin-convert-file-name-from-windows} to convert between the +two file-name syntaxes.} @menu * File Name Components:: The directory part of a file name, and the rest. diff --git a/etc/NEWS b/etc/NEWS index 4cf2e9d6da9..292d2d04a13 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -997,14 +997,16 @@ takes precedence over most other maps for a short while (normally one key). ** Cygwin builds can use the native MS Windows user interface. Pass --with-w32 to configure. The default remains the X11 interface. ++++ ** Two new functions are available in Cygwin builds: `cygwin-convert-file-name-from-windows' and `cygwin-convert-file-name-to-windows'. These functions allow Lisp code to access the Cygwin file-name mapping machinery to convert between Cygwin and Windows-native file and directory names. +--- ** When invoked with the -nw switch to run on the Windows text-mode terminal, -Emacs now supports mouse highlight, help-echo (in the echo area), and +Emacs now supports `mouse-highlight', help-echo (in the echo area), and `mouse-autoselect-window'. +++ diff --git a/src/ChangeLog b/src/ChangeLog index c8cc486a9de..fccdc1dfcae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-12-27 Glenn Morris + + * cygw32.c (Fcygwin_convert_file_name_to_windows) + (Fcygwin_convert_file_name_from_windows): Doc fixes. + 2012-12-24 Eli Zaretskii * fileio.c (file_name_as_directory, directory_file_name): Accept diff --git a/src/cygw32.c b/src/cygw32.c index d9777d5e22e..5873a05dcf0 100644 --- a/src/cygw32.c +++ b/src/cygw32.c @@ -110,23 +110,25 @@ DEFUN ("cygwin-convert-file-name-to-windows", Fcygwin_convert_file_name_to_windows, Scygwin_convert_file_name_to_windows, 1, 2, 0, - doc: /* Convert PATH to a Windows path. If ABSOLUTE-P is -non-nil, return an absolute path.*/) - (Lisp_Object path, Lisp_Object absolute_p) + doc: /* Convert a Cygwin file name FILE to a Windows-style file name. +If ABSOLUTE-P is non-nil, return an absolute file name. +For the reverse operation, see `cygwin-convert-file-name-from-windows'. */) + (Lisp_Object file, Lisp_Object absolute_p) { return from_unicode ( - conv_filename_to_w32_unicode (path, EQ (absolute_p, Qnil) ? 0 : 1)); + conv_filename_to_w32_unicode (file, EQ (absolute_p, Qnil) ? 0 : 1)); } DEFUN ("cygwin-convert-file-name-from-windows", Fcygwin_convert_file_name_from_windows, Scygwin_convert_file_name_from_windows, 1, 2, 0, - doc: /* Convert a Windows path to a Cygwin path. If ABSOLUTE-P -is non-nil, return an absolute path.*/) - (Lisp_Object path, Lisp_Object absolute_p) + doc: /* Convert a Windows-style file name FILE to a Cygwin file name. +If ABSOLUTE-P is non-nil, return an absolute file name. +For the reverse operation, see `cygwin-convert-file-name-to-windows'. */) + (Lisp_Object file, Lisp_Object absolute_p) { - return conv_filename_from_w32_unicode (to_unicode (path, &path), + return conv_filename_from_w32_unicode (to_unicode (file, &file), EQ (absolute_p, Qnil) ? 0 : 1); } From e1da740354d9cab626bce82645adcfc6b0735b70 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 27 Dec 2012 00:11:33 -0800 Subject: [PATCH 18/18] * plstore.el (plstore-passphrase-callback-function): Fix file/buffer typo. Fixes: debbugs:13264 --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/plstore.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ece158142c6..1ece8bf9107 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-12-27 Glenn Morris + + * plstore.el (plstore-passphrase-callback-function): + Fix file/buffer typo. (Bug#13264) + 2012-12-24 Andreas Schwab * nnimap.el (nnimap-find-article-by-message-id): Don't error out if diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el index 6d5424e833d..b428cab64e3 100644 --- a/lisp/gnus/plstore.el +++ b/lisp/gnus/plstore.el @@ -126,7 +126,7 @@ symmetric encryption will be used.") (defun plstore-passphrase-callback-function (_context _key-id plstore) (if plstore-cache-passphrase-for-symmetric-encryption - (let* ((file (file-truename (plstore--get-buffer plstore))) + (let* ((file (file-truename (plstore-get-file plstore))) (entry (assoc file plstore-passphrase-alist)) passphrase) (or (copy-sequence (cdr entry))