1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-17 17:58:46 +00:00

auto upstream

This commit is contained in:
Joakim Verona 2012-12-27 09:31:53 +01:00
commit a5418f7080
29 changed files with 304 additions and 124 deletions

View File

@ -1,3 +1,8 @@
2012-12-27 Andreas Schwab <schwab@linux-m68k.org>
* configure.ac (SIGNALS_VIA_CHARACTERS): Also define for darwin.
(Bug#13222)
2012-12-26 Paul Eggert <eggert@cs.ucla.edu>
Revert static checking of stack smashing.

View File

@ -3734,7 +3734,7 @@ AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by
case $opsys in
dnl Perry Smith <pedz@ddivt1.austin.ibm.com> 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)
;;

View File

@ -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

View File

@ -1,3 +1,7 @@
2012-12-27 Glenn Morris <rgm@gnu.org>
* files.texi (File Names): Mention Cygwin conversion functions.
2012-12-22 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Selecting Windows): Reword description of

View File

@ -1733,12 +1733,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.

View File

@ -1,3 +1,28 @@
2012-12-27 Glenn Morris <rgm@gnu.org>
* 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.
(Grammar format, Understanding the automaton): Avoid overfill.
* bovine.texi (Optional Lambda Expression): Allow line break.
* 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):
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.
* Makefile.in (gfdl): New variable. Use throughout where
appropriate so that targets depend on doclicense.texi.
2012-12-25 Lars Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Customizing the IMAP Connection): Mention the other

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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
@ -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}])

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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})

View File

@ -1833,10 +1833,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.
@ -2039,7 +2039,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
@ -2088,7 +2089,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

View File

@ -360,13 +360,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")
@ -383,11 +384,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!")))

View File

@ -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
@ -1029,7 +1029,6 @@ state 8
$default reduce using rule 2 (exp)
state 9
exp -> exp . '+' exp (rule 1)
@ -1044,7 +1043,6 @@ state 9
$default reduce using rule 3 (exp)
state 10
exp -> exp . '+' exp (rule 1)

View File

@ -1205,14 +1205,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'.
+++

View File

@ -1,3 +1,17 @@
2012-12-27 Dmitry Gutov <dgutov@yandex.ru>
* 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).
* progmodes/ruby-mode.el: Bump the version to 1.2 (Bug#13200).
2012-12-27 Alan Mackenzie <acm@muc.de>
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-27 Vitalie Spinu <spinuvit@gmail.com> (tiny change)
* comint.el (comint-adjust-window-point): New function.

View File

@ -1,3 +1,15 @@
2012-12-27 Glenn Morris <rgm@gnu.org>
* plstore.el (plstore-passphrase-callback-function):
Use plstore-get-file.
2012-12-27 Andreas Schwab <schwab@linux-m68k.org>
* nnimap.el (nnimap-find-article-by-message-id):
Don't error out if group is nil.
* shr.el (shr-tag-em): Render as italic, not bold.
2012-12-26 Katsumi Yamaoka <yamaoka@jpl.org>
* mml2015.el (mml2015-epg-key-image): Use mm-set-buffer-multibyte.

View File

@ -980,7 +980,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)))

View File

@ -126,8 +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 (buffer-file-name
(plstore--get-buffer plstore))))
(let* ((file (file-truename (plstore-get-file plstore)))
(entry (assoc file plstore-passphrase-alist))
passphrase)
(or (copy-sequence (cdr entry))

View File

@ -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

View File

@ -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.
@ -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

View File

@ -1,3 +1,23 @@
2012-12-27 Glenn Morris <rgm@gnu.org>
* cygw32.c (Fcygwin_convert_file_name_to_windows)
(Fcygwin_convert_file_name_from_windows): Doc fixes.
2012-12-27 Eli Zaretskii <eliz@gnu.org>
* 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-26 Dmitry Antipov <dmantipov@yandex.ru>
* lisp.h (toplevel): Add two notices to the comment about

View File

@ -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);
}

View File

@ -379,12 +379,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 */
@ -459,12 +473,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)
{
@ -483,14 +499,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;
}
@ -526,16 +545,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 "". */
@ -551,14 +572,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;
}
@ -594,7 +618,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));
}
@ -1044,7 +1069,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);
@ -1066,7 +1091,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;
@ -1090,6 +1126,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)
{
@ -1148,6 +1191,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];
@ -1157,7 +1201,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;
}
@ -1165,10 +1209,17 @@ filesystem tree, not (expand-file-name ".." dirname). */)
if (drive)
{
if (!getdefdir (c_toupper (drive) - 'A' + 1, adir))
newdir = "/";
strcpy (adir, "/");
}
else
getcwd (adir, MAXPATHLEN + 1);
if (multibyte)
{
Lisp_Object tem = build_string (adir);
tem = DECODE_FILE (tem);
memcpy (adir, SSDATA (tem), SBYTES (tem) + 1);
}
newdir = adir;
}
@ -1255,7 +1306,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);
@ -1341,9 +1392,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 */
@ -1625,18 +1681,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);

View File

@ -1,3 +1,8 @@
2012-12-27 Dmitry Gutov <dgutov@yandex.ru>
* automated/ruby-mode-tests.el
(ruby-indent-after-block-in-continued-expression): New test.
2012-12-14 Dmitry Gutov <dgutov@yandex.ru>
* automated/ruby-mode-tests.el

View File

@ -224,6 +224,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 ()
(ruby-with-temp-buffer "def f\nend"
(beginning-of-line)