mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
Merge from emacs-23 branch
This commit is contained in:
commit
857387516c
@ -1,3 +1,62 @@
|
||||
2010-03-30 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* mule.texi (Input Methods): Mention "C-x 8 RET" and add a
|
||||
cross-reference to "Inserting Text".
|
||||
|
||||
* basic.texi (Inserting Text): Add an index entry for "C-x 8 RET".
|
||||
Mention completion provided by `ucs-insert'.
|
||||
|
||||
2010-03-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* sending.texi (Sending Mail): Note variables that may need
|
||||
customizing.
|
||||
(Mail Sending): Expand discussion of send-mail-function.
|
||||
|
||||
2010-03-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
Document Message mode as the default mail mode.
|
||||
|
||||
* sending.texi (Sending Mail): Copyedits.
|
||||
(Mail Format, Mail Headers): Document mail-from-style changes.
|
||||
(Mail Commands): Rename from Mail mode. Document Message mode.
|
||||
(Mail Misc): Rename from Mail mode Misc.
|
||||
(Mail Sending, Header Editing, Mail Misc): Switch to Message mode
|
||||
command names and update keybindings.
|
||||
(Header Editing): Document message-tab. De-document
|
||||
mail-self-blind, mail-default-reply-to, and mail-archive-file-name in
|
||||
favor of mail-default-headers. Ad index entries for user-full-name and
|
||||
user-mail-address.
|
||||
(Citing Mail): Update changes in Message mode behavior. Document
|
||||
mail-yank-prefix.
|
||||
(Mail Signature): New node, moved from Mail Misc.
|
||||
(Mail Aliases): Mail abbrevs are the default with Message mode.
|
||||
(Mail Methods): Note that Message mode is now the default.
|
||||
|
||||
* rmail.texi (Rmail Reply):
|
||||
* text.texi (Text Mode):
|
||||
* major.texi (Major Modes):
|
||||
* mule.texi (Output Coding): Refer to Message mode.
|
||||
|
||||
* custom.texi (Init Examples): Add xref to Mail Header.
|
||||
|
||||
* emacs.texi (Top): Fix xrefs.
|
||||
|
||||
2010-03-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* maintaining.texi (VC With A Merging VCS): C-x v v now creates a
|
||||
repository if there is none.
|
||||
(VC Change Log): Rename from VC Status. Document vc-log-show-limit and
|
||||
vc-print-root-log.
|
||||
(Old Revisions): Copyedits. Document vc-root-diff.
|
||||
|
||||
* programs.texi (Program Modes): Mention Javascript mode.
|
||||
|
||||
* text.texi (HTML Mode): Note that nXML is now the default XML mode.
|
||||
* emacs.texi: Update node description.
|
||||
|
||||
* misc.texi (Navigation): Document doc-view-continuous.
|
||||
(Shell Ring): Document new M-r binding. M-s is no longer bound.
|
||||
|
||||
2010-03-30 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* search.texi (Other Repeating Search): Remove line that `occur'
|
||||
|
@ -100,13 +100,15 @@ character code, just like digits.
|
||||
character to insert (@pxref{Arguments}).
|
||||
|
||||
@findex ucs-insert
|
||||
@kindex C-x 8 RET
|
||||
@cindex Unicode
|
||||
Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}}
|
||||
(@code{ucs-insert}) to insert a character based on its Unicode name or
|
||||
code-point. This commands prompts for a character to insert, using
|
||||
the minibuffer; you can specify the character using either (i) the
|
||||
character's name in the Unicode standard, or (ii) the character's
|
||||
code-point in the Unicode standard.
|
||||
code-point in the Unicode standard. If you specify the character's
|
||||
name, the command provides completion.
|
||||
|
||||
@node Moving Point
|
||||
@section Changing the Location of Point
|
||||
|
@ -2269,8 +2269,9 @@ Specify your own email address, if Emacs can't figure it out correctly.
|
||||
(setq user-mail-address "cheney@@torture.gov")
|
||||
@end example
|
||||
|
||||
Various Emacs packages that need your own email address use the value of
|
||||
@code{user-mail-address}.
|
||||
Various Emacs packages, such as Message mode, consult
|
||||
@code{user-mail-address} when they need to know your email address.
|
||||
@xref{Mail Headers}.
|
||||
|
||||
@item
|
||||
Make Text mode the default mode for new buffers.
|
||||
|
@ -574,7 +574,7 @@ Commands for Human Languages
|
||||
* Text Mode:: The major modes for editing text files.
|
||||
* Outline Mode:: Editing outlines.
|
||||
* TeX Mode:: Editing input to the formatter TeX.
|
||||
* HTML Mode:: Editing HTML, SGML, and XML files.
|
||||
* HTML Mode:: Editing HTML and SGML files.
|
||||
* Nroff Mode:: Editing input to the formatter nroff.
|
||||
* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
|
||||
* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
|
||||
@ -796,7 +796,7 @@ Basic Editing under Version Control
|
||||
The Secondary Commands of VC
|
||||
|
||||
* Registering:: Putting a file under version control.
|
||||
* VC Status:: Viewing the VC status of files.
|
||||
* VC Change Log:: Viewing the VC Change Log.
|
||||
* VC Undo:: Canceling changes before or after check-in.
|
||||
|
||||
VC Directory Mode
|
||||
@ -888,16 +888,17 @@ Sending Mail
|
||||
* Mail Format:: Format of the mail being composed.
|
||||
* Mail Headers:: Details of some standard mail header fields.
|
||||
* Mail Aliases:: Abbreviating and grouping mail addresses.
|
||||
* Mail Mode:: Special commands for editing mail being composed.
|
||||
* Mail Commands:: Special commands for editing mail being composed.
|
||||
* Mail Signature:: Adding a signature to every message.
|
||||
* Mail Amusements:: Distracting the NSA; adding fortune messages.
|
||||
* Mail Methods:: Using alternative mail-composition methods.
|
||||
|
||||
Mail Mode
|
||||
Mail Commands
|
||||
|
||||
* Mail Sending:: Commands to send the message.
|
||||
* Header Editing:: Commands to move to header fields and edit them.
|
||||
* Citing Mail:: Copying all or part of a message you are replying to.
|
||||
* Mail Mode Misc:: Spell checking, signatures, etc.
|
||||
* Citing Mail:: Quoting a message you are replying to.
|
||||
* Mail Misc:: Attachments, spell checking, etc.
|
||||
|
||||
Reading Mail with Rmail
|
||||
|
||||
|
@ -224,7 +224,7 @@ the repository, along with a log entry for those changes.
|
||||
@cindex revision
|
||||
@cindex revision ID
|
||||
A copy of a file stored in a repository is called a @dfn{revision}.
|
||||
The history of a file is a sequence of revisions. Each revisions is
|
||||
The history of a file is a sequence of revisions. Each revision is
|
||||
named by a @dfn{revision ID}. The format of the revision ID depends
|
||||
on the version control system; in the simplest case, it is just an
|
||||
integer.
|
||||
@ -403,10 +403,10 @@ Directory buffer, and some files in it are marked, the VC fileset
|
||||
consists of the marked files (@pxref{VC Directory Mode}).
|
||||
|
||||
The principal VC command is an all-purpose command, @kbd{C-x v v}
|
||||
(@code{vc-next-action}), that performs either locking, merging or a
|
||||
check-in (depending on the situation) on the current VC fileset. You
|
||||
can use @kbd{C-x v v} in a file-visiting buffer or in a VC Directory
|
||||
buffer.
|
||||
(@code{vc-next-action}), that performs either registration, locking,
|
||||
merging or a check-in (depending on the situation) on the current VC
|
||||
fileset. You can use @kbd{C-x v v} in a file-visiting buffer or in a
|
||||
VC Directory buffer.
|
||||
|
||||
@table @kbd
|
||||
@itemx C-x v v
|
||||
@ -461,23 +461,31 @@ unmodified; it flips to @samp{:} as soon as you save any changes
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
If the work file is the same as in the repository, it does nothing.
|
||||
If the work file is in a directory that is not controlled by any
|
||||
version control system, prompt for a repository type. Then, create a
|
||||
version control repository of that type and register the file with it.
|
||||
|
||||
@item
|
||||
If the work file is in a directory that is controlled by a version
|
||||
control system but not registered with it, register the file.
|
||||
|
||||
@item
|
||||
If the work file is the same as in the repository, do nothing.
|
||||
|
||||
@item
|
||||
If you have not changed the work file, but some other user has checked
|
||||
in changes to the repository, @kbd{C-x v v} merges those changes into
|
||||
the work file.
|
||||
in changes to the repository, merge those changes into the work file.
|
||||
|
||||
@item
|
||||
If you have made modifications to the work file, @kbd{C-x v v}
|
||||
attempts to check in your changes. To do this, Emacs first reads the
|
||||
log entry for the new revision (@pxref{Log Buffer}). If some other
|
||||
user has checked in changes to the repository since you last checked
|
||||
it out, the checkin fails. In that case, type @kbd{C-x v v} again to
|
||||
merge those changes into your own work file; this puts the work file
|
||||
into a ``conflicted'' state. Type @kbd{C-x v v} to clear the
|
||||
``conflicted'' state; VC then regards the file as up-to-date and
|
||||
modified, and you can try to check it in again.
|
||||
If you have made modifications to the work file, attempts to check in
|
||||
your changes. To do this, Emacs first reads the log entry for the new
|
||||
revision (@pxref{Log Buffer}). If some other user has checked in
|
||||
changes to the repository since you last checked it out, the checkin
|
||||
fails. In that case, type @kbd{C-x v v} again to merge those changes
|
||||
into your own work file; this puts the work file into a ``conflicted''
|
||||
state. Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then
|
||||
regards the file as up-to-date and modified, and you can try to check
|
||||
it in again.
|
||||
|
||||
To pick up any recent changes from the repository @emph{without}
|
||||
trying to commit your own changes, type @kbd{C-x v m @key{RET}}.
|
||||
@ -485,15 +493,15 @@ trying to commit your own changes, type @kbd{C-x v m @key{RET}}.
|
||||
@end itemize
|
||||
|
||||
These rules also apply when you use RCS in its ``non-locking'' mode,
|
||||
except that changes will not be automatically merged from the
|
||||
repository. Nothing informs you if another user has checked in
|
||||
changes in the same file since you began editing it; when you check in
|
||||
your revision, his changes are removed (however, they remain in the
|
||||
repository and are thus not irrevocably lost). Therefore, you must
|
||||
verify that the current revision is unchanged before checking in your
|
||||
changes. In addition, locking is possible with RCS even in this mode:
|
||||
@kbd{C-x v v} with an unmodified file locks the file, just as it does
|
||||
with RCS in its normal locking mode (@pxref{VC With A Locking VCS}).
|
||||
except that changes are not automatically merged from the repository.
|
||||
Nothing informs you if another user has checked in changes in the same
|
||||
file since you began editing it; when you check in your revision, his
|
||||
changes are removed (however, they remain in the repository and are
|
||||
thus not irrevocably lost). Therefore, you must verify that the
|
||||
current revision is unchanged before checking in your changes. In
|
||||
addition, locking is possible with RCS even in this mode: @kbd{C-x v
|
||||
v} with an unmodified file locks the file, just as it does with RCS in
|
||||
its normal locking mode (@pxref{VC With A Locking VCS}).
|
||||
|
||||
@node VC With A Locking VCS
|
||||
@subsubsection Basic Version Control with Locking
|
||||
@ -501,26 +509,25 @@ with RCS in its normal locking mode (@pxref{VC With A Locking VCS}).
|
||||
Under a locking-based version control system (such as SCCS, and RCS
|
||||
in its default mode), @kbd{C-x v v} does the following:
|
||||
|
||||
@itemize @bullet
|
||||
@itemize @bullet
|
||||
@item
|
||||
If the file is not locked, @kbd{C-x v v} locks it, and makes it
|
||||
writable so that you can change it.
|
||||
If the file is not locked, lock it and make it writable, so that you
|
||||
can change it.
|
||||
|
||||
@item
|
||||
If the file is locked by you, and contains changes, @kbd{C-x v v}
|
||||
checks in the changes. In order to do this, it first reads the log
|
||||
entry for the new revision. @xref{Log Buffer}.
|
||||
If the file is locked by you, and contains changes, check in the
|
||||
changes. In order to do this, Emacs first reads the log entry for the
|
||||
new revision. @xref{Log Buffer}.
|
||||
|
||||
@item
|
||||
If the file is locked by you, but you have not changed it since you
|
||||
locked it, @kbd{C-x v v} releases the lock and makes the file
|
||||
read-only again.
|
||||
locked it, release the lock and makes the file read-only again.
|
||||
|
||||
@item
|
||||
If the file is locked by some other user, @kbd{C-x v v} asks you whether
|
||||
you want to ``steal the lock'' from that user. If you say yes, the file
|
||||
becomes locked by you, but a message is sent to the person who had
|
||||
formerly locked the file, to inform him of what has happened.
|
||||
If the file is locked by some other user, ask whether you want to
|
||||
``steal the lock'' from that user. If you say yes, the file becomes
|
||||
locked by you, but a message is sent to the person who had formerly
|
||||
locked the file, to inform him of what has happened.
|
||||
@end itemize
|
||||
|
||||
These rules also apply when you use CVS in locking mode, except
|
||||
@ -639,20 +646,23 @@ and @code{vc-log-mode-hook}. @xref{Hooks}.
|
||||
to examine any revision of a file, or compare two revisions.
|
||||
|
||||
@table @kbd
|
||||
@item C-x v ~ @var{revision} @key{RET}
|
||||
Examine revision @var{revision} of the visited file, in a buffer of its
|
||||
own.
|
||||
@item C-x v ~
|
||||
Prompt for a revision of the current file, and visit it in a buffer of
|
||||
its own (@code{vc-revision-other-window}).
|
||||
|
||||
@item C-x v =
|
||||
Compare the buffer contents associated with the current
|
||||
fileset with the working revision(s) from which you started editing.
|
||||
Compare the files in the current fileset with the working revision(s)
|
||||
you started from (@code{vc-diff}). With a prefix argument, prompt for
|
||||
two revisions of the current fileset and compare them.
|
||||
|
||||
@item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
|
||||
Compare the specified two repository revisions of the current fileset.
|
||||
@item C-x v D
|
||||
Compare the entire tree corresponding to the current fileset with the
|
||||
tree you started from (@code{vc-root-diff}). With a prefix argument,
|
||||
prompt for two revisions and compare their trees.
|
||||
|
||||
@item C-x v g
|
||||
Display an annotated version of the file: for each line, show the
|
||||
latest revision in which it was modified.
|
||||
latest revision in which it was modified (@code{vc-annotate}).
|
||||
@end table
|
||||
|
||||
@findex vc-revision-other-window
|
||||
@ -673,12 +683,11 @@ buffer in a separate window.
|
||||
|
||||
@findex vc-diff
|
||||
@kindex C-x v =
|
||||
@kbd{C-x v =} (@code{vc-diff}) compares the current buffer contents
|
||||
of each file in the current VC fileset (saving them if necessary) with
|
||||
the repository revision from which you started editing. Note that the
|
||||
latter may or may not be the latest revision of the file(s). The diff
|
||||
is displayed in a special buffer in another window. @xref{Comparing
|
||||
Files}.
|
||||
@kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC
|
||||
fileset (saving them if necessary) with the repository revision(s)
|
||||
from which you started editing. Note that the latter may or may not
|
||||
be the latest revision of the file(s). The diff is displayed in a
|
||||
special buffer in another window. @xref{Comparing Files}.
|
||||
|
||||
@findex vc-diff
|
||||
@kindex C-u C-x v =
|
||||
@ -700,6 +709,12 @@ revision ID for a multi-file fileset (as opposed to a symbolic tag
|
||||
name) is unlikely to return diffs that are connected in any meaningful
|
||||
way.
|
||||
|
||||
The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to
|
||||
@kbd{C-x v =}, but it compares the entire tree associated with the
|
||||
current VC fileset with the tree you started with. This means all the
|
||||
files controlled by the current version control repository, even those
|
||||
that are not part of the current VC fileset.
|
||||
|
||||
If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that
|
||||
is neither visiting a version-controlled file nor a VC directory
|
||||
buffer, these commands generate a diff of all registered files in the
|
||||
@ -801,7 +816,7 @@ the file contents without distraction from the annotations.
|
||||
|
||||
@menu
|
||||
* Registering:: Putting a file under version control.
|
||||
* VC Status:: Viewing the VC status of files.
|
||||
* VC Change Log:: Viewing the VC Change Log.
|
||||
* VC Undo:: Canceling changes before or after check-in.
|
||||
@end menu
|
||||
|
||||
@ -857,22 +872,36 @@ particular file using the minibuffer.
|
||||
initial comment to describe the purpose of this source file. Reading
|
||||
the initial comment works like reading a log entry (@pxref{Log Buffer}).
|
||||
|
||||
@node VC Status
|
||||
@subsubsection VC Status Commands
|
||||
@node VC Change Log
|
||||
@subsubsection VC Change Log
|
||||
|
||||
@table @kbd
|
||||
@item C-x v l
|
||||
Display revision control state and change history.
|
||||
Display revision control state and change history
|
||||
(@code{vc-print-log}).
|
||||
|
||||
@item C-x v L
|
||||
Display the change history for the current repository
|
||||
(@code{vc-print-root-log}).
|
||||
@end table
|
||||
|
||||
@kindex C-x v l
|
||||
@findex vc-print-log
|
||||
To view the detailed revision control status and history of a file,
|
||||
type @kbd{C-x v l} (@code{vc-print-log}). This pops up a special
|
||||
buffer named @samp{*vc-change-log*}, in a new window, that displays
|
||||
the history of changes to the current file, including the text of the
|
||||
log entries. The point is centered at the revision of the file that
|
||||
is currently being visited.
|
||||
The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
|
||||
named @samp{*vc-change-log*} in a new window. This buffer lists the
|
||||
changes to the current file, including the associated log entries.
|
||||
(These are the log entries associated with the version control system,
|
||||
i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log
|
||||
Buffer}.) Point is centered at the revision of the file currently
|
||||
being visited. With a prefix argument, the command prompts for the
|
||||
revision to center on, and the maximum number of revisions to display.
|
||||
|
||||
@findex vc-print-root-log
|
||||
Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a
|
||||
@samp{*vc-change-log*} buffer showing the history of the
|
||||
version-controlled directory tree as a whole. With a prefix argument,
|
||||
the command prompts for the maximum number of revisions to display.
|
||||
RCS, SCCS, and CVS do not support this feature.
|
||||
|
||||
In the @samp{*vc-change-log*} buffer, you can use the following keys
|
||||
to move between the logs of revisions and of files, to view past
|
||||
@ -926,6 +955,16 @@ This is useful to see all the changes to all files that the revision
|
||||
indicated on the current line did when it was committed.
|
||||
@end table
|
||||
|
||||
@vindex vc-log-show-limit
|
||||
Because fetching many log entries can be slow, the
|
||||
@samp{*vc-change-log*} buffer displays no more than 2000 revisions by
|
||||
default. The variable @code{vc-log-show-limit} specifies this limit;
|
||||
if you set the value to zero, that removes the limit. You can also
|
||||
increase the number of revisions shown in an existing
|
||||
@samp{*vc-change-log*} buffer by clicking on the @samp{Show 2X
|
||||
entries} or @samp{Show unlimited entries} buttons at the end of the
|
||||
buffer. However, RCS, SCCS, and CVS do not support this feature.
|
||||
|
||||
@node VC Undo
|
||||
@subsubsection Undoing Version Control Actions
|
||||
|
||||
|
@ -41,7 +41,7 @@ languages. These include Lisp mode (which has several variants), C
|
||||
mode, Fortran mode, and others. The remaining major modes are not
|
||||
intended for use on users' files; they are used in buffers created for
|
||||
specific purposes by Emacs, such as Dired mode for buffers made by
|
||||
Dired (@pxref{Dired}), Mail mode for buffers made by @kbd{C-x m}
|
||||
Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m}
|
||||
(@pxref{Sending Mail}), and Shell mode for buffers used for
|
||||
communicating with an inferior shell process (@pxref{Interactive
|
||||
Shell}).
|
||||
|
@ -84,11 +84,20 @@ When in DocView mode, you can scroll the current page using the usual
|
||||
Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
|
||||
the arrow keys.
|
||||
|
||||
@vindex doc-view-continuous
|
||||
By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
|
||||
scrolling at the beginning and end of the current page, respectively.
|
||||
However, if you change the variable @code{doc-view-continuous} to a
|
||||
non-@code{nil} value, then @kbd{C-p} displays the previous page if you
|
||||
are already at the beginning of the current page, and @kbd{C-n}
|
||||
displays the next page if you are at the end of the current page.
|
||||
|
||||
@findex doc-view-next-page
|
||||
@findex doc-view-previous-page
|
||||
To display the next page, type @kbd{n}, @key{next} or @kbd{C-x ]}
|
||||
(@code{doc-view-next-page}). To display the previous page, type
|
||||
@kbd{p}, @key{prior} or @kbd{C-x [} (@code{doc-view-previous-page}).
|
||||
You can also display the next page by typing @kbd{n}, @key{next} or
|
||||
@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous
|
||||
page, type @kbd{p}, @key{prior} or @kbd{C-x [}
|
||||
(@code{doc-view-previous-page}).
|
||||
|
||||
@findex doc-view-scroll-up-or-next-page
|
||||
@findex doc-view-scroll-down-or-previous-page
|
||||
@ -957,12 +966,9 @@ Fetch the next earlier old shell command.
|
||||
Fetch the next later old shell command.
|
||||
|
||||
@kindex M-r @r{(Shell mode)}
|
||||
@kindex M-s @r{(Shell mode)}
|
||||
@findex comint-previous-matching-input
|
||||
@findex comint-next-matching-input
|
||||
@item M-r @var{regexp} @key{RET}
|
||||
@itemx M-s @var{regexp} @key{RET}
|
||||
Search backwards or forwards for old shell commands that match @var{regexp}.
|
||||
@findex comint-history-isearch-backward-regexp
|
||||
@item M-r
|
||||
Begin an incremental regexp search of old shell commands.
|
||||
|
||||
@item C-c C-x
|
||||
@kindex C-c C-x @r{(Shell mode)}
|
||||
@ -995,15 +1001,15 @@ successively more recent shell commands from the buffer.
|
||||
@kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like
|
||||
@kbd{M-n}.
|
||||
|
||||
The history search commands @kbd{M-r} and @kbd{M-s} read a regular
|
||||
expression and search through the history for a matching command. Aside
|
||||
from the choice of which command to fetch, they work just like @kbd{M-p}
|
||||
and @kbd{M-n}. If you enter an empty regexp, these commands reuse the
|
||||
same regexp used last time.
|
||||
|
||||
When you find the previous input you want, you can resubmit it by
|
||||
typing @key{RET}, or you can edit it first and then resubmit it if you
|
||||
wish. Any partial input you were composing before navigating the
|
||||
The history search command @kbd{M-r} begins an incremental regular
|
||||
expression search of previous shell commands. After typing @kbd{M-r},
|
||||
start typing the desired string or regular expression; the last
|
||||
matching shell command will be displayed in the current line.
|
||||
Incremental search commands have their usual effects---for instance,
|
||||
@kbd{C-s} and @kbd{C-r} search forward and backward for the next match
|
||||
(@pxref{Incremental Search}). When you find the desired input, type
|
||||
@key{RET} to terminate the search. This puts the input in the command
|
||||
line. Any partial input you were composing before navigating the
|
||||
history list is restored when you go to the beginning or end of the
|
||||
history ring.
|
||||
|
||||
|
@ -540,6 +540,11 @@ most input methods---some disable this feature). If
|
||||
possible characters to type next is displayed in the echo area (but
|
||||
not when you are in the minibuffer).
|
||||
|
||||
Another facility for typing characters not on your keyboard is by
|
||||
using the @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single
|
||||
character based on its Unicode name or code-point; see @ref{Inserting
|
||||
Text}.
|
||||
|
||||
@node Select Input Method
|
||||
@section Selecting an Input Method
|
||||
|
||||
@ -968,15 +973,16 @@ still use an unsuitable coding system if you type its name in response
|
||||
to the question.)
|
||||
|
||||
@vindex sendmail-coding-system
|
||||
When you send a message with Mail mode (@pxref{Sending Mail}), Emacs has
|
||||
four different ways to determine the coding system to use for encoding
|
||||
the message text. It tries the buffer's own value of
|
||||
@code{buffer-file-coding-system}, if that is non-@code{nil}. Otherwise,
|
||||
it uses the value of @code{sendmail-coding-system}, if that is
|
||||
non-@code{nil}. The third way is to use the default coding system for
|
||||
new files, which is controlled by your choice of language environment,
|
||||
if that is non-@code{nil}. If all of these three values are @code{nil},
|
||||
Emacs encodes outgoing mail using the Latin-1 coding system.
|
||||
When you send a message with Message mode (@pxref{Sending Mail}),
|
||||
Emacs has four different ways to determine the coding system to use
|
||||
for encoding the message text. It tries the buffer's own value of
|
||||
@code{buffer-file-coding-system}, if that is non-@code{nil}.
|
||||
Otherwise, it uses the value of @code{sendmail-coding-system}, if that
|
||||
is non-@code{nil}. The third way is to use the default coding system
|
||||
for new files, which is controlled by your choice of language
|
||||
environment, if that is non-@code{nil}. If all of these three values
|
||||
are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding
|
||||
system.
|
||||
|
||||
@node Text Coding
|
||||
@section Specifying a Coding System for File Text
|
||||
|
@ -88,11 +88,12 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}.
|
||||
@cindex PostScript mode
|
||||
@cindex Conf mode
|
||||
@cindex DNS mode
|
||||
@cindex Javascript mode
|
||||
The existing programming language major modes include Lisp, Scheme
|
||||
(a variant of Lisp) and the Scheme-based DSSSL expression language,
|
||||
Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL
|
||||
(CORBA), IDLWAVE, Java, Metafont (@TeX{}'s companion for font
|
||||
creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike,
|
||||
(CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for
|
||||
font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike,
|
||||
PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An
|
||||
alternative mode for Perl is called CPerl mode. Modes are available
|
||||
for the scripting languages of the common GNU and Unix shells, VMS
|
||||
|
@ -683,12 +683,12 @@ standard meaning.
|
||||
@node Rmail Reply
|
||||
@section Sending Replies
|
||||
|
||||
Rmail has several commands that use Mail mode to send outgoing mail.
|
||||
@xref{Sending Mail}, for information on using Mail mode, including
|
||||
certain features meant to work with Rmail. What this section documents
|
||||
are the special commands of Rmail for entering Mail mode. Note that the
|
||||
usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and @kbd{C-x 5
|
||||
m}---also work normally in Rmail mode.
|
||||
Rmail has several commands to send outgoing mail. @xref{Sending
|
||||
Mail}, for information on using Message mode, including certain
|
||||
features meant to work with Rmail. What this section documents are
|
||||
the special commands of Rmail for entering the mail buffer. Note that
|
||||
the usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and
|
||||
@kbd{C-x 5 m}---also work normally in Rmail mode.
|
||||
|
||||
@table @kbd
|
||||
@item m
|
||||
@ -735,12 +735,12 @@ the reply command with a numeric argument: @kbd{C-u r} or @kbd{1 r}.
|
||||
This means to reply only to the sender of the original message.
|
||||
|
||||
Once the @samp{*mail*} buffer has been initialized, editing and
|
||||
sending the mail goes as usual (@pxref{Sending Mail}). You can edit the
|
||||
presupplied header fields if they are not what you want. You can also
|
||||
use the commands of Mail mode (@pxref{Mail Mode}), including @kbd{C-c
|
||||
C-y} which yanks in the message that you are replying to. You can
|
||||
also switch to the Rmail buffer, select a different message there, switch
|
||||
back, and yank the new current message.
|
||||
sending the mail goes as usual (@pxref{Sending Mail}). You can edit
|
||||
the presupplied header fields if they are not what you want. You can
|
||||
also use commands such as @kbd{C-c C-y}, which yanks in the message
|
||||
that you are replying to (@pxref{Mail Commands}). You can also switch
|
||||
to the Rmail buffer, select a different message there, switch back,
|
||||
and yank the new current message.
|
||||
|
||||
@kindex M-m @r{(Rmail)}
|
||||
@findex rmail-retry-failure
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -26,11 +26,16 @@ structure.
|
||||
@xref{Outline Mode}.
|
||||
@end iftex
|
||||
|
||||
@cindex nXML mode
|
||||
@cindex mode, XML
|
||||
@cindex mode, nXML
|
||||
@findex nxml-mode
|
||||
Emacs has other major modes for text which contains ``embedded''
|
||||
commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML, SGML,
|
||||
and XML (@pxref{HTML Mode}); and Groff and Nroff (@pxref{Nroff Mode}).
|
||||
In addition, you can edit formatted text in WYSIWYG style (``what you
|
||||
see is what you get''), using Enriched mode (@pxref{Formatted Text}).
|
||||
commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and
|
||||
SGML (@pxref{HTML Mode}); XML (@pxref{Top, nXML Mode,,nxml-mode, nXML
|
||||
Mode}); and Groff and Nroff (@pxref{Nroff Mode}). In addition, you
|
||||
can edit formatted text in WYSIWYG style (``what you see is what you
|
||||
get''), using Enriched mode (@pxref{Formatted Text}).
|
||||
|
||||
@cindex ASCII art
|
||||
If you need to edit pictures made out of text characters (commonly
|
||||
@ -61,7 +66,7 @@ for editing such pictures.
|
||||
* Text Mode:: The major modes for editing text files.
|
||||
* Outline Mode:: Editing outlines.
|
||||
* TeX Mode:: Editing input to the formatter TeX.
|
||||
* HTML Mode:: Editing HTML, SGML, and XML files.
|
||||
* HTML Mode:: Editing HTML and SGML files.
|
||||
* Nroff Mode:: Editing input to the formatter nroff.
|
||||
* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
|
||||
* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
|
||||
@ -923,10 +928,10 @@ type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.
|
||||
@vindex text-mode-hook
|
||||
Entering Text mode runs the hook @code{text-mode-hook}. Other major
|
||||
modes related to Text mode also run this hook, followed by hooks of
|
||||
their own; this includes Paragraph-Indent Text mode, Nroff mode, @TeX{}
|
||||
mode, Outline mode, and Mail mode. Hook functions on
|
||||
@code{text-mode-hook} can look at the value of @code{major-mode} to see
|
||||
which of these modes is actually being entered. @xref{Hooks}.
|
||||
their own; this includes Paragraph-Indent Text mode, Nroff mode,
|
||||
@TeX{} mode, Outline mode, and Message mode. Hook functions on
|
||||
@code{text-mode-hook} can look at the value of @code{major-mode} to
|
||||
see which of these modes is actually being entered. @xref{Hooks}.
|
||||
|
||||
@node Outline Mode
|
||||
@section Outline Mode
|
||||
@ -1743,29 +1748,17 @@ required. This is set up for Czech---customize the group
|
||||
Ref@TeX{}. @inforef{Top,, reftex}.
|
||||
|
||||
@node HTML Mode
|
||||
@section SGML, XML, and HTML Modes
|
||||
@section SGML and HTML Modes
|
||||
@cindex SGML mode
|
||||
@cindex HTML mode
|
||||
@cindex XML mode
|
||||
@cindex mode, SGML
|
||||
@cindex mode, HTML
|
||||
@cindex mode, XML
|
||||
@findex sgml-mode
|
||||
@findex html-mode
|
||||
@findex xml-mode
|
||||
|
||||
The major modes for SGML, XML, and HTML provide indentation support
|
||||
and commands for operating on tags. XML mode is actually identical to
|
||||
SGML mode (to be precise, @code{xml-mode} is an alias for
|
||||
@code{sgml-mode}), because XML is a strict subset of SGML. HTML mode
|
||||
is a slightly customized variant of SGML mode.
|
||||
|
||||
@vindex sgml-xml-mode
|
||||
In XML, every opening tag must have an explicit closing tag. When
|
||||
the variable @code{sgml-xml-mode} is non-@code{nil}, the tag insertion
|
||||
commands described below always insert explicit closing tags as well.
|
||||
When you visit a file, Emacs determines whether it is XML by examining
|
||||
the file contents, and sets @code{sgml-xml-mode} accordingly.
|
||||
The major modes for SGML and HTML provide indentation support and
|
||||
commands for operating on tags. HTML mode is a slightly customized
|
||||
variant of SGML mode.
|
||||
|
||||
@table @kbd
|
||||
@item C-c C-n
|
||||
@ -1855,13 +1848,22 @@ used as a cheap preview.
|
||||
@cindex mode, nXML
|
||||
@findex nxml-mode
|
||||
@cindex XML schema
|
||||
Emacs also provides a more advanced mode for editing XML
|
||||
documents, called nXML mode (@code{nxml-mode}). nXML mode is aware of
|
||||
many existing XML schema, and uses them to provide completion of XML
|
||||
elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as
|
||||
``on-the-fly'' validation of XML, with errors highlighted via Font
|
||||
Lock (@pxref{Font Lock}). It is described in its own manual.
|
||||
@xref{Top, nXML Mode,,nxml-mode, nXML Mode}.
|
||||
The default mode for editing XML documents is called nXML mode
|
||||
(@code{xml-mode} or @code{nxml-mode}). This is a powerful major mode
|
||||
that can recognize many existing XML schema and use them to provide
|
||||
completion of XML elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}},
|
||||
as well as ``on-the-fly'' XML validation with error highlighting. It
|
||||
is described in its own manual. @xref{Top, nXML Mode,,nxml-mode, nXML
|
||||
Mode}.
|
||||
|
||||
@vindex sgml-xml-mode
|
||||
However, you can also use SGML mode to edit XML, since XML is a
|
||||
strict subset of SGML. In XML, every opening tag must have an
|
||||
explicit closing tag. When the variable @code{sgml-xml-mode} is
|
||||
non-@code{nil}, the tag insertion commands described above always
|
||||
insert explicit closing tags as well. When you visit a file in SGML
|
||||
mode, Emacs determines whether it is XML by examining the file
|
||||
contents, and sets @code{sgml-xml-mode} accordingly.
|
||||
|
||||
@node Nroff Mode
|
||||
@section Nroff Mode
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-03-26 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* loading.texi (Hooks for Loading): Document after-load-functions.
|
||||
Copyedits.
|
||||
|
||||
2010-03-24 Arni Magnusson <arnima@hafro.is> (tiny change)
|
||||
|
||||
* frames.texi (Cursor Parameters): Fix typo. (Bug#5760)
|
||||
|
@ -920,8 +920,17 @@ library, to remove functions defined in the library.
|
||||
@cindex loading hooks
|
||||
@cindex hooks for loading
|
||||
|
||||
You can ask for code to be executed if and when a particular library is
|
||||
loaded, by calling @code{eval-after-load}.
|
||||
You can ask for code to be executed each time Emacs loads a library,
|
||||
by using the variable @code{after-load-functions}:
|
||||
|
||||
@defvar after-load-functions
|
||||
This abnormal hook is run after loading a file. Each function in the
|
||||
hook is called with a single argument, the absolute filename of the
|
||||
file that was just loaded.
|
||||
@end defvar
|
||||
|
||||
If you want code to be executed when a @emph{particular} library is
|
||||
loaded, use the function @code{eval-after-load}:
|
||||
|
||||
@defun eval-after-load library form
|
||||
This function arranges to evaluate @var{form} at the end of loading
|
||||
@ -930,7 +939,7 @@ the file @var{library}, each time @var{library} is loaded. If
|
||||
Don't forget to quote @var{form}!
|
||||
|
||||
You don't need to give a directory or extension in the file name
|
||||
@var{library}---normally you just give a bare file name, like this:
|
||||
@var{library}. Normally, you just give a bare file name, like this:
|
||||
|
||||
@example
|
||||
(eval-after-load "edebug" '(def-edebug-spec c-point t))
|
||||
@ -955,31 +964,30 @@ An error in @var{form} does not undo the load, but does prevent
|
||||
execution of the rest of @var{form}.
|
||||
@end defun
|
||||
|
||||
In general, well-designed Lisp programs should not use this feature.
|
||||
The clean and modular ways to interact with a Lisp library are (1)
|
||||
examine and set the library's variables (those which are meant for
|
||||
outside use), and (2) call the library's functions. If you wish to
|
||||
do (1), you can do it immediately---there is no need to wait for when
|
||||
the library is loaded. To do (2), you must load the library (preferably
|
||||
with @code{require}).
|
||||
Normally, well-designed Lisp programs should not use
|
||||
@code{eval-after-load}. If you need to examine and set the variables
|
||||
defined in another library (those meant for outside use), you can do
|
||||
it immediately---there is no need to wait until the library is loaded.
|
||||
If you need to call functions defined by that library, you should load
|
||||
the library, preferably with @code{require} (@pxref{Named Features}).
|
||||
|
||||
But it is OK to use @code{eval-after-load} in your personal
|
||||
customizations if you don't feel they must meet the design standards for
|
||||
programs meant for wider use.
|
||||
customizations if you don't feel that they must meet the design
|
||||
standards for programs meant for wider use.
|
||||
|
||||
@defvar after-load-alist
|
||||
This variable, an alist built by @code{eval-after-load}, holds the
|
||||
expressions to evaluate when particular libraries are loaded. Each
|
||||
element looks like this:
|
||||
This variable stores an alist built by @code{eval-after-load},
|
||||
containing the expressions to evaluate when certain libraries are
|
||||
loaded. Each element looks like this:
|
||||
|
||||
@example
|
||||
(@var{regexp-or-feature} @var{forms}@dots{})
|
||||
@end example
|
||||
|
||||
The key @var{regexp-or-feature} is either a regular expression or a
|
||||
symbol, and the value is a list of forms. The forms are evaluated when
|
||||
the key matches the absolute true name of the file being
|
||||
@code{load}ed or the symbol being @code{provide}d.
|
||||
symbol, and the value is a list of forms. The forms are evaluated
|
||||
when the key matches the absolute true name or feature name of the
|
||||
library being loaded.
|
||||
@end defvar
|
||||
|
||||
@ignore
|
||||
|
@ -1,3 +1,13 @@
|
||||
2010-03-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* images/icons/hicolor/scalable/apps/emacs.svg: Put preamble after
|
||||
svg tag (Bug#5790).
|
||||
|
||||
2010-03-30 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* PROBLEMS: Mention problems on MS-Windows with incompatible
|
||||
regex.h headers.
|
||||
|
||||
2010-03-28 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* HELLO: Reorder Arabic and Hebrew into logical order, and
|
||||
|
66
etc/NEWS.23
66
etc/NEWS.23
@ -148,7 +148,7 @@ subsequent kills are not duplicated in the `kill-ring'.
|
||||
+++
|
||||
*** The new completion-style `initials' is available.
|
||||
For instance, this can complete M-x lch to list-command-history.
|
||||
|
||||
---
|
||||
*** The new variable `completions-format' determines how completions
|
||||
are displayed in the *Completions* buffer. If you set it to
|
||||
`vertical', completions are sorted vertically in columns.
|
||||
@ -227,7 +227,7 @@ exempt buffers that do correspond to files, customize the value of
|
||||
Dired buffers to be reverted automatically on revisiting them.
|
||||
|
||||
** DocView
|
||||
|
||||
+++
|
||||
*** When `doc-view-continuous' is non-nil, scrolling a line
|
||||
on the page edge advances to the next/previous page.
|
||||
|
||||
@ -250,6 +250,7 @@ matched topics found in the index.
|
||||
manual that generates an Info file which gives the same information
|
||||
through a menu structure.
|
||||
|
||||
+++
|
||||
** Message mode is now the default mode for composing mail.
|
||||
|
||||
The default for `mail-user-agent' is now message-user-agent, so the
|
||||
@ -259,6 +260,7 @@ Message mode has been included in Emacs, as part of the Gnus package,
|
||||
for several years. It provides several features that are absent in
|
||||
Mail mode, such as MIME handling.
|
||||
|
||||
---
|
||||
*** If the user has not customized mail-user-agent, `compose-mail'
|
||||
checks for Mail mode customizations, and issues a warning if these
|
||||
customizations are found. This alerts users who may otherwise be
|
||||
@ -271,49 +273,59 @@ To disable this check, set compose-mail-user-agent-warnings to nil.
|
||||
Emacs will wait for the process sending mail to return. If you
|
||||
experience delays when sending mail, you may wish to set this to nil.
|
||||
|
||||
+++
|
||||
** nXML mode is now the default for editing XML files.
|
||||
|
||||
** Shell
|
||||
** Shell (and other comint modes)
|
||||
+++
|
||||
*** ansi-color is now enabled by default.
|
||||
*** M-s is no longer bound to `comint-next-matching-input'.
|
||||
+++
|
||||
*** M-r is now bound to `comint-history-isearch-backward-regexp'.
|
||||
This starts an incremental search of the comint/shell input history.
|
||||
+++
|
||||
*** ansi-color is now enabled by default in Shell mode.
|
||||
To disable it, set ansi-color-for-comint-mode to nil.
|
||||
|
||||
+++
|
||||
** Tramp
|
||||
|
||||
+++
|
||||
*** New connection methods "rsyncc", "imap" and "imaps".
|
||||
On systems which support GVFS-Fuse, Tramp offers also the new
|
||||
connection methods "dav", "davs", "obex" and "synce".
|
||||
|
||||
** VC and related modes
|
||||
|
||||
+++
|
||||
*** When using C-x v v or C-x v i on a unregistered file that is in a
|
||||
directory not controlled by any VCS, ask the user what VC backend to
|
||||
use to create a repository, create a new repository and register the
|
||||
file.
|
||||
|
||||
*** FIXME: add info about the new VC functions: vc-root-diff and
|
||||
vc-root-print-log once they stabilize.
|
||||
|
||||
*** The log functions (C-x v l and C-x v L) do not show the full log
|
||||
by default anymore. The number of entries shown can be chosen
|
||||
interactively with a prefix argument, by customizing
|
||||
vc-log-show-limit. The log buffer display buttons that can be used
|
||||
to change the number of entries shown.
|
||||
RCS, SCCS, CVS do not support this feature.
|
||||
|
||||
+++
|
||||
*** New command `vc-root-print-log', bound to `C-x v L'.
|
||||
This displays a `*vc-change-log*' buffer showing the history of the
|
||||
version-controlled directory tree as a whole.
|
||||
+++
|
||||
*** New command `vc-root-diff', bound to `C-x v D'.
|
||||
This is similar to `vc-diff', but compares the entire directory tree
|
||||
of the current VC directory with its working revision.
|
||||
+++
|
||||
*** `C-x v l' and `C-x v L' do not show the full log by default.
|
||||
The number of entries shown can be chosen interactively with a prefix
|
||||
argument, or by customizing vc-log-show-limit. The `*vc-change-log*'
|
||||
buffer now contains buttons at the end of the buffer, which can be
|
||||
used to increase the number of entries shown. RCS, SCCS, and CVS do
|
||||
not support this feature.
|
||||
---
|
||||
*** vc-annotate supports annotations through file copies and renames,
|
||||
it displays the old names for the files and it can show logs/diffs for
|
||||
the corresponding lines. Currently only Git and Mercurial take
|
||||
advantage of this feature.
|
||||
|
||||
---
|
||||
*** The log command in vc-annotate can display a single log entry
|
||||
instead of redisplaying the full log. The RCS, CVS and SCCS VC
|
||||
backends do not support this.
|
||||
|
||||
---
|
||||
*** When a file is not found, VC will not try to check it out of RCS anymore.
|
||||
|
||||
*** Diff and log operations can be used from dired buffers.
|
||||
*** Diff and log operations can be used from Dired buffers.
|
||||
|
||||
*** vc-git changes
|
||||
|
||||
@ -330,7 +342,7 @@ their content displayed.
|
||||
|
||||
*** vc-bzr supports operating with shelves: the shelve list is
|
||||
displayed in the *vc-dir* header, shelves can be created, removed and applied.
|
||||
|
||||
---
|
||||
*** log-edit-strip-single-file-name controls whether or not single filenames
|
||||
are stripped when copying text from the ChangeLog to the *VC-Log* buffer.
|
||||
|
||||
@ -355,11 +367,6 @@ to sacrifice some accuracy for a faster startup.
|
||||
the command asynchronously without the need to manually add ampersand to
|
||||
the end of the command. Its output appears in the buffer `*Async Shell
|
||||
Command*'.
|
||||
|
||||
*** Isearch searches in the comint/shell input history when the new variable
|
||||
`comint-history-isearch' is non-nil. New commands `comint-history-isearch-backward'
|
||||
and `comint-history-isearch-backward-regexp' (bound to M-r) start Isearch
|
||||
in the input history regardless of the value of `comint-history-isearch'.
|
||||
+++
|
||||
*** Interactively `multi-isearch-buffers' and `multi-isearch-buffers-regexp'
|
||||
read buffer names to search, one by one, ended with RET. With a prefix
|
||||
@ -414,6 +421,7 @@ System (CLOS). It is used by the other CEDET packages.
|
||||
|
||||
** htmlfontify.el turns a fontified Emacs buffer into an HTML page.
|
||||
|
||||
+++
|
||||
** js.el is a new major mode for JavaScript files.
|
||||
|
||||
** imap-hash.el is a new library to address IMAP mailboxes as hashtables.
|
||||
@ -523,9 +531,9 @@ file name handlers such as Tramp to optimizations.
|
||||
*** make-network-process can now also create `seqpacket' Unix sockets.
|
||||
|
||||
** Loading changes
|
||||
|
||||
---
|
||||
*** eval-next-after-load is obsolete.
|
||||
|
||||
+++
|
||||
*** New hook `after-load-functions' run after loading an Elisp file.
|
||||
|
||||
** Byte compilation changes
|
||||
|
20
etc/PROBLEMS
20
etc/PROBLEMS
@ -2478,6 +2478,26 @@ these GCC versions. Note that these versions of GCC, 4.0.3, 4.0.4,
|
||||
4.1.1, and 4.1.2, are currently the _only_ versions known to succeed
|
||||
in building Emacs (as of v22.1).
|
||||
|
||||
*** Building the native MS-Windows port fails due to unresolved externals
|
||||
|
||||
The linker error messages look like this:
|
||||
|
||||
oo-spd/i386/ctags.o:ctags.c:(.text+0x156e): undefined reference to `_imp__re_set_syntax'
|
||||
collect2: ld returned 1 exit status
|
||||
|
||||
This happens because GCC finds an incompatible header regex.h
|
||||
somewhere on the include path, before the version of regex.h supplied
|
||||
with Emacs. One such incompatible version of regex.h is part of the
|
||||
GnuWin32 Regex package.
|
||||
|
||||
The solution is to remove the incompatible regex.h from the include
|
||||
path, when compiling Emacs. Alternatively, re-run the configure.bat
|
||||
script with the "-isystem C:/GnuWin32/include" switch (adapt for your
|
||||
system's place where you keep the GnuWin32 include files) -- this will
|
||||
cause the compiler to search headers in the directories specified by
|
||||
the Emacs Makefile _before_ it looks in the GnuWin32 include
|
||||
directories.
|
||||
|
||||
*** Building the native MS-Windows port with Cygwin GCC can fail.
|
||||
|
||||
Emacs may not build using some Cygwin builds of GCC, such as Cygwin
|
||||
|
@ -1,8 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.0"
|
||||
width="48"
|
||||
height="48"
|
||||
viewBox="0.171 0.201 512 512"
|
||||
id="svg4768"
|
||||
xml:space="preserve">
|
||||
<!-- Gnu Emacs Icon
|
||||
|
||||
Copyright (C) 2008, 2009, 2010
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
@ -21,16 +29,6 @@
|
||||
|
||||
-->
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.0"
|
||||
width="48"
|
||||
height="48"
|
||||
viewBox="0.171 0.201 512 512"
|
||||
id="svg4768"
|
||||
xml:space="preserve">
|
||||
<defs
|
||||
id="defs4770"><linearGradient
|
||||
id="linearGradient3294"><stop
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -1,3 +1,63 @@
|
||||
2010-03-31 Tomas Abrahamsson <tab@lysator.liu.se>
|
||||
|
||||
* textmodes/artist.el (artist-mode): Fix typo in docstring.
|
||||
Reported by Alex Schröder <kensanata@gmail.com>. (Bug#5807)
|
||||
|
||||
2010-03-31 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* language/sinhala.el (composition-function-table): Fix regexp for
|
||||
the new Unicode specification.
|
||||
|
||||
* language/indian.el (devanagari-composable-pattern)
|
||||
(tamil-composable-pattern, kannada-composable-pattern)
|
||||
(malayalam-composable-pattern): Adjusted for the new Unicode
|
||||
specification.
|
||||
(bengali-composable-pattern, gurmukhi-composable-pattern)
|
||||
(gujarati-composable-pattern, oriya-composable-pattern)
|
||||
(telugu-composable-pattern): New variables to cope with the new
|
||||
Unicode specification. Use them in composition-function-table.
|
||||
|
||||
2010-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
Make tmm-menubar work for the Buffers menu again.
|
||||
* tmm.el (tmm-prompt): Also handle keymap entries in the form of
|
||||
vectors rather than cons cells, as used in menu-bar-update-buffers.
|
||||
|
||||
2010-03-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* progmodes/js.el (js-auto-indent-flag, js-mode-map)
|
||||
(js-insert-and-indent): Revert 2009-08-15 change, restoring
|
||||
electric punctuation for "{}();,:" (Bug#5586).
|
||||
|
||||
* mail/sendmail.el (mail-default-directory): Doc fix.
|
||||
|
||||
2010-03-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* mail/sendmail.el (mail-default-directory): Doc fix.
|
||||
|
||||
2010-03-31 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* subr.el (version-regexp-alist, version-to-list)
|
||||
(version-list-<, version-list-=, version-list-<=)
|
||||
(version-list-not-zero, version<, version<=, version=): Doc fix.
|
||||
(Bug#5744).
|
||||
|
||||
2010-02-31 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* vc.el (vc-root-diff): Doc fix.
|
||||
|
||||
2010-03-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* vc.el (vc-print-log, vc-print-root-log): Doc fix.
|
||||
|
||||
* simple.el (append-to-buffer): Fix last change.
|
||||
|
||||
2010-03-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* simple.el (append-to-buffer): Ensure that point is preserved if
|
||||
BUFFER is the current buffer. Suggested by YAMAMOTO Mitsuharu.
|
||||
(Bug#5749)
|
||||
|
||||
2010-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (auto-mode-case-fold): Change default to t.
|
||||
|
@ -1,6 +1,12 @@
|
||||
2010-03-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* message.el (message-default-mail-headers):
|
||||
(message-default-headers): Carry the value mail-default-headers over
|
||||
into message-default-mail-headers, rather than message-default-headers.
|
||||
|
||||
2010-03-30 Martin Stjernholm <mast@lysator.liu.se>
|
||||
|
||||
* mm-decode.el (mm-add-meta-html-tag): Added option to override the
|
||||
* mm-decode.el (mm-add-meta-html-tag): Add option to override the
|
||||
charset.
|
||||
|
||||
* gnus-art.el (gnus-article-browse-html-parts): Force the correct
|
||||
@ -8,8 +14,8 @@
|
||||
|
||||
2010-03-30 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-art.el (gnus-article-browse-delete-temp-files): Delete
|
||||
directories as well.
|
||||
* gnus-art.el (gnus-article-browse-delete-temp-files):
|
||||
Delete directories as well.
|
||||
(gnus-article-browse-html-parts): Work for images that do not specify
|
||||
file names; delete temp directory when quitting; insert header at the
|
||||
right place; use file: scheme for image files.
|
||||
@ -30,8 +36,8 @@
|
||||
|
||||
2010-03-27 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* auth-source.el (auth-sources): Change default to be simpler. Explain
|
||||
about Secret Service API sources. Improve Customize options.
|
||||
* auth-source.el (auth-sources): Change default to be simpler.
|
||||
Explain about Secret Service API sources. Improve Customize options.
|
||||
(auth-source-pick): Change to accept any number of search parameters.
|
||||
Implement fallbacks iteratively, not recursively. Add scoring on the
|
||||
second pass and sort by score. Call Secret Service API when needed.
|
||||
|
@ -1167,11 +1167,7 @@ It is a vector of the following headers:
|
||||
:valid-regexp "^\\'"
|
||||
:error "All header lines must be newline terminated")
|
||||
|
||||
(defcustom message-default-headers
|
||||
;; Default to the value of `mail-default-headers' if available.
|
||||
;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable
|
||||
;; unless sendmail.el is loaded.
|
||||
(if (boundp 'mail-default-headers) mail-default-headers "")
|
||||
(defcustom message-default-headers ""
|
||||
"*A string containing header lines to be inserted in outgoing messages.
|
||||
It is inserted before you edit the message, so you can edit or delete
|
||||
these lines."
|
||||
@ -1184,16 +1180,18 @@ these lines."
|
||||
;; Ease the transition from mail-mode to message-mode. See bugs#4431, 5555.
|
||||
(concat (if (and (boundp 'mail-default-reply-to)
|
||||
(stringp mail-default-reply-to))
|
||||
(format "Reply-to: %s\n" mail-default-reply-to)
|
||||
"")
|
||||
(format "Reply-to: %s\n" mail-default-reply-to))
|
||||
(if (and (boundp 'mail-self-blind)
|
||||
mail-self-blind)
|
||||
(format "BCC: %s\n" user-mail-address)
|
||||
"")
|
||||
(format "BCC: %s\n" user-mail-address))
|
||||
(if (and (boundp 'mail-archive-file-name)
|
||||
(stringp mail-archive-file-name))
|
||||
(format "FCC: %s\n" mail-archive-file-name)
|
||||
""))
|
||||
(format "FCC: %s\n" mail-archive-file-name))
|
||||
;; Use the value of `mail-default-headers' if available.
|
||||
;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is
|
||||
;; unavailable unless sendmail.el is loaded.
|
||||
(if (boundp 'mail-default-headers)
|
||||
mail-default-headers))
|
||||
"*A string of header lines to be inserted in outgoing mails."
|
||||
:version "23.2"
|
||||
:group 'message-headers
|
||||
|
@ -140,28 +140,25 @@ South Indian language Malayalam is supported in this language environment."))
|
||||
|
||||
(defconst devanagari-composable-pattern
|
||||
(let ((table
|
||||
'(("V" . "[\u0904-\u0914\u0960-\u0961\u0972]") ; independent vowel
|
||||
("C" . "[\u0915-\u0939\u0958-\u095F\u097B-\u097C\u097E-\u097F]") ; consonant
|
||||
("R" . "\u0930") ; RA
|
||||
("n" . "\u093C") ; NUKTA
|
||||
("H" . "\u094D") ; HALANT
|
||||
("m" . "\u093F") ; vowel sign (pre)
|
||||
("u" . "[\u0945-\u0948\u0955]") ; vowel sign (above)
|
||||
("b" . "[\u0941-\u0944\u0962-\u0963]") ; vowel sign (below)
|
||||
("p" . "[\u093E\u0940\u0949-\u094C]") ; vowel sign (post)
|
||||
("A" . "[\u0900-\u0902\u0953-\u0954]") ; vowel modifier (above)
|
||||
("a" . "\u0903") ; vowel modifier (post)
|
||||
("S" . "\u0951") ; stress sign (above)
|
||||
("s" . "\u0952") ; stress sign (below)
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0900-\u097F]")))) ; all coverage
|
||||
'(("a" . "[\u0900-\u0902]") ; vowel modifier (above)
|
||||
("A" . "\u0903") ; vowel modifier (post)
|
||||
("V" . "[\u0904-\u0914\u0960-\u0961\u0972]") ; independent vowel
|
||||
("C" . "[\u0915-\u0939\u0958-\u095F\u0979-\u097F]") ; consonant
|
||||
("R" . "\u0930") ; RA
|
||||
("n" . "\u093C") ; NUKTA
|
||||
("v" . "[\u093E-\u094C\u094E\u0955\u0962-\u0963]") ; vowel sign
|
||||
("H" . "\u094D") ; HALANT
|
||||
("s" . "[\u0951-\u0952]") ; stress sign
|
||||
("t" . "[\u0953-\u0954]") ; accent
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0900-\u097F]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?Vn?m?b?u?p?n?A?s?S?a?\\|"
|
||||
"\\(?:RH\\)?Vn?\\(?:J?HR\\)?v*n?a?s?t?A?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"\\(?:Cn?J?HJ?\\)*Cn?\\(?:H[NJ]?\\|m?b?u?p?n?A?s?S?a?\\)\\|"
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*n?a?s?t?A?\\)\\|"
|
||||
;; special consonant form, or
|
||||
"JHR\\|"
|
||||
;; any other singleton characters
|
||||
@ -169,43 +166,202 @@ South Indian language Malayalam is supported in this language environment."))
|
||||
table))
|
||||
"Regexp matching a composable sequence of Devanagari characters.")
|
||||
|
||||
(defconst bengali-composable-pattern
|
||||
(let ((table
|
||||
'(("a" . "\u0981") ; SIGN CANDRABINDU
|
||||
("A" . "[\u0982-\u0983]") ; SIGN ANUSVARA .. VISARGA
|
||||
("V" . "[\u0985-\u0994\u09E0-\u09E1]") ; independent vowel
|
||||
("C" . "[\u0995-\u09B9\u09DC-\u09DF\u09F1]") ; consonant
|
||||
("B" . "[\u09AC\u09AF-\u09B0\u09F0]") ; BA, YA, RA
|
||||
("R" . "[\u09B0\u09F0]") ; RA
|
||||
("n" . "\u09BC") ; NUKTA
|
||||
("v" . "[\u09BE-\u09CC\u09D7\u09E2-\u09E3]") ; vowel sign
|
||||
("H" . "\u09CD") ; HALANT
|
||||
("T" . "\u09CE") ; KHANDA TA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0980-\u09FF]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?Vn?\\(?:J?HB\\)?v*n?a?A?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*[NJ]?v?a?A?\\)\\|"
|
||||
;; another syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?T\\|"
|
||||
;; special consonant form, or
|
||||
"JHB\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Bengali characters.")
|
||||
|
||||
(defconst gurmukhi-composable-pattern
|
||||
(let ((table
|
||||
'(("a" . "[\u0A01-\u0A02]") ; SIGN ADAK BINDI .. BINDI
|
||||
("A" . "\u0A03]") ; SIGN VISARGA
|
||||
("V" . "[\u0A05-\u0A14]") ; independent vowel
|
||||
("C" . "[\u0A15-\u0A39\u0A59-\u0A5E]") ; consonant
|
||||
("Y" . "[\u0A2F\u0A30\u0A35\u0A39]") ; YA, RA, VA, HA
|
||||
("n" . "\u0A3C") ; NUKTA
|
||||
("v" . "[\u0A3E-\u0A4C]") ; vowel sign
|
||||
("H" . "\u0A4D") ; VIRAMA
|
||||
("a" . "\u0A70") ; TIPPI
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0A00-\u0A7F]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; consonant-based syllables, or
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?\\|v*n?a?A?\\)\\|"
|
||||
;; syllables with an independent vowel, or
|
||||
"Vn?\\(?:J?HY\\)?v*n?a?A?\\|"
|
||||
;; special consonant form, or
|
||||
"JHY\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Gurmukhi characters.")
|
||||
|
||||
(defconst gujarati-composable-pattern
|
||||
(let ((table
|
||||
'(("a" . "[\u0A81-\u0A82]") ; SIGN CANDRABINDU .. ANUSVARA
|
||||
("A" . "\u0A83]") ; SIGN VISARGA
|
||||
("V" . "[\u0A85-\u0A94\u0AE0-\u0AE1]") ; independent vowel
|
||||
("C" . "[\u0A95-\u0AB9]") ; consonant
|
||||
("R" . "\u0AB0") ; RA
|
||||
("n" . "\u0ABC") ; NUKTA
|
||||
("v" . "[\u0ABE-\u0ACC\u0AE2-\u0AE3]") ; vowel sign
|
||||
("H" . "\u0ACD") ; VIRAMA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0A80-\u0AFF]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?Vn?\\(?:J?HR\\)?v*n?a?A?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?a?A?\\)\\|"
|
||||
;; special consonant form, or
|
||||
"JHR\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Gujarati characters.")
|
||||
|
||||
(defconst oriya-composable-pattern
|
||||
(let ((table
|
||||
'(("a" . "\u0B01") ; SIGN CANDRABINDU
|
||||
("A" . "[\u0B02-\u0B03]") ; SIGN ANUSVARA .. VISARGA
|
||||
("V" . "[\u0B05-\u0B14\u0B60-\u0B61]") ; independent vowel
|
||||
("C" . "[\u0B15-\u0B39\u0B5C-\u0B5D\u0B71]") ; consonant
|
||||
("B" . "[\u0B15-\u0B17\u0B1B-\u0B1D\u0B1F-\u0B21\u0B23-\u0B24\u0B27-\u0B30\u0B32-\u0B35\u0B38-\u0B39]") ; consonant with below form
|
||||
("n" . "\u0B3C") ; NUKTA
|
||||
("v" . "[\u0B3E-\u0B44\u0B56-\u0B57\u0B62-\u0B63]") ; vowel sign
|
||||
("H" . "\u0B4D") ; VIRAMA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0B00-\u0B7F]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?Vn?\\(?:J?HB\\)?v*n?a?A?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?a?A?\\)\\|"
|
||||
;; special consonant form, or
|
||||
"JHB\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Oriya characters.")
|
||||
|
||||
(defconst tamil-composable-pattern
|
||||
(concat
|
||||
"\\([அ-ஔ]\\)\\|"
|
||||
"[ஂஃ]\\|" ;; vowel modifier considered independent
|
||||
"\\(\\(?:\\(?:க்ஷ\\)\\|[க-ஹ]\\)[்ா-ௌ]?\\)\\|"
|
||||
"\\(ஷ்ரீ\\)")
|
||||
(let ((table
|
||||
'(("a" . "\u0B82") ; SIGN ANUSVARA
|
||||
("V" . "[\u0B85-\u0B94]") ; independent vowel
|
||||
("C" . "[\u0B95-\u0BB9]") ; consonant
|
||||
("v" . "[\u0BBE-\u0BC8\u0BD7]") ; vowel sign
|
||||
("H" . "\u0BCD") ; VIRAMA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0B80-\u0BFF]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; consonant-based syllables, or
|
||||
"C\\(?:J?HJ?C\\)*\\(?:H[NJ]?|v*a?\\)\\|"
|
||||
;; syllables with an independent vowel, or
|
||||
"Vv*a?\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Tamil characters.")
|
||||
|
||||
(defconst telugu-composable-pattern
|
||||
(let ((table
|
||||
'(("a" . "[\u0C01-\u0C03]") ; SIGN CANDRABINDU .. VISARGA
|
||||
("V" . "[\u0C05-\u0C14\u0C60-\u0C61]") ; independent vowel
|
||||
("C" . "[\u0C15-\u0C39\u0C58-\u0C59]") ; consonant
|
||||
("v" . "[\u0C3E-\u0C4C\u0C55-\u0C56\u0C62-\u0C63]") ; vowel sign
|
||||
("H" . "\u0BCD") ; VIRAMA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0C00-\u0C7F]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; consonant-based syllables, or
|
||||
"C\\(?:J?HJ?C\\)*\\(?:H[NJ]?|v*a?\\)\\|"
|
||||
;; syllables with an independent vowel, or
|
||||
"V\\(?:J?HC\\)?v*a?\\|"
|
||||
;; special consonant form, or
|
||||
"JHC\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Telugu characters.")
|
||||
|
||||
(defconst kannada-composable-pattern
|
||||
(concat
|
||||
"\\([ಂ-ಔೠಌ]\\)\\|[ಃ]"
|
||||
"\\|\\("
|
||||
"\\(?:\\(?:[ಕ-ಹ]್\\)?\\(?:[ಕ-ಹ]್\\)?\\(?:[ಕ-ಹ]್\\)?[ಕ-ಹ]್\\)?"
|
||||
"[ಕ-ಹ]\\(?:್\\|[ಾ-್ೕೃ]?\\)?"
|
||||
"\\)")
|
||||
(let ((table
|
||||
'(("A" . "[\u0C82-\u0C83]") ; SIGN ANUSVARA .. VISARGA
|
||||
("V" . "[\u0C85-\u0C94\u0CE0-\u0CE1]") ; independent vowel
|
||||
("C" . "[\u0C95-\u0CB9\u0CDE]") ; consonant
|
||||
("B" . "\u0CB0") ; RA
|
||||
("n" . "\u0CBC") ; NUKTA
|
||||
("v" . "[\u0CBE-\u0CCC\u0CD5-\u0CD6\u0CE2-\u0CE3]") ; vowel sign
|
||||
("H" . "\u0CCD") ; VIRAMA
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0C80-\u0CFF]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"\\(?:RH\\)?Vn?\\(?:J?HC\\)?v?A?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"Cn?\\(?:J?HJ?Cn?\\)*\\(?:H[NJ]?|v*n?A?\\)\\|"
|
||||
;; special consonant form, or
|
||||
"JHB\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
"Regexp matching a composable sequence of Kannada characters.")
|
||||
|
||||
(defconst malayalam-composable-pattern
|
||||
(let ((table
|
||||
'(("V" . "[\u0D05-\u0D14\u0D60-\u0D61]") ; independent vowel
|
||||
'(("A" . "[\u0D02-\u0D03]") ; SIGN ANUSVARA .. VISARGA
|
||||
("V" . "[\u0D05-\u0D14\u0D60-\u0D61]") ; independent vowel
|
||||
("C" . "[\u0D15-\u0D39]") ; consonant
|
||||
("m" . "[\u0D46-\u0D48\u0D4A-\u0D4C]") ; prebase matra
|
||||
("p" . "[\u0D3E-\u0D44\u0D57]") ; postbase matra
|
||||
("b" . "[\u0D62-\u0D63]") ; belowbase matra
|
||||
("a" . "[\u0D02-\u0D03]") ; abovebase sign
|
||||
("H" . "\u0D4D") ; virama sign
|
||||
("Y" . "[\u0D2F-\u0D30\u0D32\u0D35]") ; YA, RA, LA, VA
|
||||
("v" . "[\u0D3E-\u0D48\u0D57\u0D62-\u0D63]") ; postbase matra
|
||||
("N" . "\u200C") ; ZWNJ
|
||||
("J" . "\u200D") ; ZWJ
|
||||
("X" . "[\u0D00-\u0D7F]")))) ; all coverage
|
||||
(indian-compose-regexp
|
||||
(concat
|
||||
;; syllables with an independent vowel, or
|
||||
"V\\(?:J?HC\\)?m?b?p?a?\\|"
|
||||
;; consonant-based syllables, or
|
||||
"\\(?:CJ?HJ?\\)\\{0,4\\}C\\(?:H[NJ]?\\|m?b?p?a?\\)\\|"
|
||||
"\\(?:CJ?HJ?C\\)*\\(?:H[NJ]?\\|v?A?\\)\\|"
|
||||
;; syllables with an independent vowel, or
|
||||
"V\\(?:J?HY\\)?v*?A?\\|"
|
||||
;; special consonant form, or
|
||||
"JHC\\|"
|
||||
"JHY\\|"
|
||||
;; any other singleton characters
|
||||
"X")
|
||||
table))
|
||||
@ -213,13 +369,13 @@ South Indian language Malayalam is supported in this language environment."))
|
||||
|
||||
(let ((script-regexp-alist
|
||||
`((devanagari . ,devanagari-composable-pattern)
|
||||
(bengali . "[\x980-\x9FF\x200C\x200D]+")
|
||||
(gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
|
||||
(gujarati . "[\xA80-\xAFF\x200C\x200D]+")
|
||||
(oriya . "[\xB00-\xB7F\x200C\x200D]+")
|
||||
(tamil . "[\xB80-\xBFF\x200C\x200D]+")
|
||||
(telugu . "[\xC00-\xC7F\x200C\x200D]+")
|
||||
(kannada . "[\xC80-\xCFF\x200C\x200D]+")
|
||||
(bengali . ,bengali-composable-pattern)
|
||||
(gurmukhi . ,gurmukhi-composable-pattern)
|
||||
(gujarati . ,gujarati-composable-pattern)
|
||||
(oriya . ,oriya-composable-pattern)
|
||||
(tamil . ,tamil-composable-pattern)
|
||||
(telugu . ,telugu-composable-pattern)
|
||||
(kannada . ,kannada-composable-pattern)
|
||||
(malayalam . ,malayalam-composable-pattern))))
|
||||
(map-char-table
|
||||
#'(lambda (key val)
|
||||
|
@ -33,7 +33,17 @@
|
||||
(set-char-table-range
|
||||
composition-function-table
|
||||
'(#xD80 . #xDFF)
|
||||
(list (vector "[\xD80-\xDFF\x200C\x200D]+" 0 'font-shape-gstring)))
|
||||
(list (vector
|
||||
;; C:consonant, H:HALANT, J:ZWJ, v:vowel sign,
|
||||
;; V:independent vowel, a:ANUSVARA .. VISARGA
|
||||
(concat
|
||||
;; C(HJC)*v*H?a?, or
|
||||
"[\u0D9A-\u0DC6]\\(?:\u0DCA\u200D[\u0D9A-\u0DC6]\\)*[\u0DCF-\u0DDF\u0DF2-\u0DF3]*\u0DCA?[\u0D82-\u0D83]?\\|"
|
||||
;; Va?, or
|
||||
"[\u0D85-\u0D96][\u0D82-\u0D83]?\\|"
|
||||
;; any other singleton characters
|
||||
"[\u0D80-\u0DFF]")
|
||||
0 'font-shape-gstring)))
|
||||
|
||||
;; arch-tag: 87b9ad3b-5090-422f-b942-eb85b9d52e7c
|
||||
;; sinhala.el ends here
|
||||
|
@ -417,9 +417,11 @@ and should insert whatever you want to insert."
|
||||
|
||||
;;;###autoload
|
||||
(defcustom mail-default-directory (purecopy "~/")
|
||||
"Directory for mail buffers.
|
||||
Value of `default-directory' for mail buffers.
|
||||
This directory is used for auto-save files of mail buffers."
|
||||
"Value of `default-directory' for Mail mode buffers.
|
||||
This directory is used for auto-save files of Mail mode buffers.
|
||||
|
||||
Note that Message mode does not use this variable; it auto-saves
|
||||
in `message-auto-save-directory'."
|
||||
:type '(directory :tag "Directory")
|
||||
:group 'sendmail
|
||||
:version "22.1")
|
||||
|
@ -436,6 +436,13 @@ The value must be no less than minus `js-indent-level'."
|
||||
:type 'integer
|
||||
:group 'js)
|
||||
|
||||
(defcustom js-auto-indent-flag t
|
||||
"Whether to automatically indent when typing punctuation characters.
|
||||
If non-nil, the characters {}();,: also indent the current line
|
||||
in Javascript mode."
|
||||
:type 'boolean
|
||||
:group 'js)
|
||||
|
||||
(defcustom js-flat-functions nil
|
||||
"Treat nested functions as top-level functions in `js-mode'.
|
||||
This applies to function movement, marking, and so on."
|
||||
@ -483,6 +490,9 @@ getting timeout messages."
|
||||
|
||||
(defvar js-mode-map
|
||||
(let ((keymap (make-sparse-keymap)))
|
||||
(mapc (lambda (key)
|
||||
(define-key keymap key #'js-insert-and-indent))
|
||||
'("{" "}" "(" ")" ":" ";" ","))
|
||||
(define-key keymap [(control ?c) (meta ?:)] #'js-eval)
|
||||
(define-key keymap [(control ?c) (control ?j)] #'js-set-js-context)
|
||||
(define-key keymap [(control meta ?x)] #'js-eval-defun)
|
||||
@ -498,6 +508,21 @@ getting timeout messages."
|
||||
keymap)
|
||||
"Keymap for `js-mode'.")
|
||||
|
||||
(defun js-insert-and-indent (key)
|
||||
"Run the command bound to KEY, and indent if necessary.
|
||||
Indentation does not take place if point is in a string or
|
||||
comment."
|
||||
(interactive (list (this-command-keys)))
|
||||
(call-interactively (lookup-key (current-global-map) key))
|
||||
(let ((syntax (save-restriction (widen) (syntax-ppss))))
|
||||
(when (or (and (not (nth 8 syntax))
|
||||
js-auto-indent-flag)
|
||||
(and (nth 4 syntax)
|
||||
(eq (current-column)
|
||||
(1+ (current-indentation)))))
|
||||
(indent-according-to-mode))))
|
||||
|
||||
|
||||
;;; Syntax table and parsing
|
||||
|
||||
(defvar js-mode-syntax-table
|
||||
|
@ -3472,13 +3472,14 @@ START and END specify the portion of the current buffer to be copied."
|
||||
(let* ((append-to (get-buffer-create buffer))
|
||||
(windows (get-buffer-window-list append-to t t))
|
||||
point)
|
||||
(with-current-buffer append-to
|
||||
(setq point (point))
|
||||
(barf-if-buffer-read-only)
|
||||
(insert-buffer-substring oldbuf start end)
|
||||
(dolist (window windows)
|
||||
(when (= (window-point window) point)
|
||||
(set-window-point window (point))))))))
|
||||
(save-excursion
|
||||
(with-current-buffer append-to
|
||||
(setq point (point))
|
||||
(barf-if-buffer-read-only)
|
||||
(insert-buffer-substring oldbuf start end)
|
||||
(dolist (window windows)
|
||||
(when (= (window-point window) point)
|
||||
(set-window-point window (point)))))))))
|
||||
|
||||
(defun prepend-to-buffer (buffer start end)
|
||||
"Prepend to specified buffer the text of the region.
|
||||
|
66
lisp/subr.el
66
lisp/subr.el
@ -3595,11 +3595,11 @@ Usually the separator is \".\", but it can be any other string.")
|
||||
("^[-_+ ]cvs$" . -3) ; treat "1.2.3-CVS" as alpha release
|
||||
("^[-_+ ]?b\\(eta\\)?$" . -2)
|
||||
("^[-_+ ]?\\(pre\\|rc\\)$" . -1))
|
||||
"*Specify association between non-numeric version part and a priority.
|
||||
"*Specify association between non-numeric version and its priority.
|
||||
|
||||
This association is used to handle version string like \"1.0pre2\",
|
||||
\"0.9alpha1\", etc. It's used by `version-to-list' (which see) to convert the
|
||||
non-numeric part to an integer. For example:
|
||||
non-numeric part of a version string to an integer. For example:
|
||||
|
||||
String Version Integer List Version
|
||||
\"1.0pre2\" (1 0 -1 2)
|
||||
@ -3617,15 +3617,15 @@ Each element has the following form:
|
||||
Where:
|
||||
|
||||
REGEXP regexp used to match non-numeric part of a version string.
|
||||
It should begin with a `^' anchor and end with a `$' to
|
||||
It should begin with the `^' anchor and end with a `$' to
|
||||
prevent false hits. Letter-case is ignored while matching
|
||||
REGEXP.
|
||||
|
||||
PRIORITY negative integer which indicate the non-numeric priority.")
|
||||
PRIORITY a negative integer specifying non-numeric priority of REGEXP.")
|
||||
|
||||
|
||||
(defun version-to-list (ver)
|
||||
"Convert version string VER into an integer list.
|
||||
"Convert version string VER into a list of integers.
|
||||
|
||||
The version syntax is given by the following EBNF:
|
||||
|
||||
@ -3639,17 +3639,17 @@ The version syntax is given by the following EBNF:
|
||||
The NUMBER part is optional if SEPARATOR is a match for an element
|
||||
in `version-regexp-alist'.
|
||||
|
||||
As an example of valid version syntax:
|
||||
Examples of valid version syntax:
|
||||
|
||||
1.0pre2 1.0.7.5 22.8beta3 0.9alpha1 6.9.30Beta
|
||||
|
||||
As an example of invalid version syntax:
|
||||
Examples of invalid version syntax:
|
||||
|
||||
1.0prepre2 1.0..7.5 22.8X3 alpha3.2 .5
|
||||
|
||||
As an example of version convertion:
|
||||
Examples of version conversion:
|
||||
|
||||
String Version Integer List Version
|
||||
Version String Version as a List of Integers
|
||||
\"1.0.7.5\" (1 0 7 5)
|
||||
\"1.0pre2\" (1 0 -1 2)
|
||||
\"1.0PRE2\" (1 0 -1 2)
|
||||
@ -3695,12 +3695,12 @@ See documentation for `version-separator' and `version-regexp-alist'."
|
||||
|
||||
|
||||
(defun version-list-< (l1 l2)
|
||||
"Return t if integer list L1 is lesser than L2.
|
||||
"Return t if L1, a list specification of a version, is lower than L2.
|
||||
|
||||
Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
|
||||
etc. That is, the trailing zeroes are irrelevant. Also, integer
|
||||
list (1) is greater than (1 -1) which is greater than (1 -2)
|
||||
which is greater than (1 -3)."
|
||||
Note that a version specified by the list (1) is equal to (1 0),
|
||||
\(1 0 0), (1 0 0 0), etc. That is, the trailing zeros are insignificant.
|
||||
Also, a version given by the list (1) is higher than (1 -1), which in
|
||||
turn is higher than (1 -2), which is higher than (1 -3)."
|
||||
(while (and l1 l2 (= (car l1) (car l2)))
|
||||
(setq l1 (cdr l1)
|
||||
l2 (cdr l2)))
|
||||
@ -3716,12 +3716,12 @@ which is greater than (1 -3)."
|
||||
|
||||
|
||||
(defun version-list-= (l1 l2)
|
||||
"Return t if integer list L1 is equal to L2.
|
||||
"Return t if L1, a list specification of a version, is equal to L2.
|
||||
|
||||
Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
|
||||
etc. That is, the trailing zeroes are irrelevant. Also, integer
|
||||
list (1) is greater than (1 -1) which is greater than (1 -2)
|
||||
which is greater than (1 -3)."
|
||||
Note that a version specified by the list (1) is equal to (1 0),
|
||||
\(1 0 0), (1 0 0 0), etc. That is, the trailing zeros are insignificant.
|
||||
Also, a version given by the list (1) is higher than (1 -1), which in
|
||||
turn is higher than (1 -2), which is higher than (1 -3)."
|
||||
(while (and l1 l2 (= (car l1) (car l2)))
|
||||
(setq l1 (cdr l1)
|
||||
l2 (cdr l2)))
|
||||
@ -3737,7 +3737,7 @@ which is greater than (1 -3)."
|
||||
|
||||
|
||||
(defun version-list-<= (l1 l2)
|
||||
"Return t if integer list L1 is lesser than or equal to L2.
|
||||
"Return t if L1, a list specification of a version, is lower or equal to L2.
|
||||
|
||||
Note that integer list (1) is equal to (1 0), (1 0 0), (1 0 0 0),
|
||||
etc. That is, the trailing zeroes are irrelevant. Also, integer
|
||||
@ -3757,9 +3757,9 @@ which is greater than (1 -3)."
|
||||
(t (<= 0 (version-list-not-zero l2)))))
|
||||
|
||||
(defun version-list-not-zero (lst)
|
||||
"Return the first non-zero element of integer list LST.
|
||||
"Return the first non-zero element of LST, which is a list of integers.
|
||||
|
||||
If all LST elements are zeroes or LST is nil, return zero."
|
||||
If all LST elements are zeros or LST is nil, return zero."
|
||||
(while (and lst (zerop (car lst)))
|
||||
(setq lst (cdr lst)))
|
||||
(if lst
|
||||
@ -3769,31 +3769,31 @@ If all LST elements are zeroes or LST is nil, return zero."
|
||||
|
||||
|
||||
(defun version< (v1 v2)
|
||||
"Return t if version V1 is lesser than V2.
|
||||
"Return t if version V1 is lower (older) than V2.
|
||||
|
||||
Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
|
||||
etc. That is, the trailing \".0\"s are irrelevant. Also, version string \"1\"
|
||||
is greater than \"1pre\" which is greater than \"1beta\" which is greater than
|
||||
\"1alpha\"."
|
||||
etc. That is, the trailing \".0\"s are insignificant. Also, version
|
||||
string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
|
||||
which is higher than \"1alpha\"."
|
||||
(version-list-< (version-to-list v1) (version-to-list v2)))
|
||||
|
||||
|
||||
(defun version<= (v1 v2)
|
||||
"Return t if version V1 is lesser than or equal to V2.
|
||||
"Return t if version V1 is lower (older) than or equal to V2.
|
||||
|
||||
Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
|
||||
etc. That is, the trailing \".0\"s are irrelevant. Also, version string \"1\"
|
||||
is greater than \"1pre\" which is greater than \"1beta\" which is greater than
|
||||
\"1alpha\"."
|
||||
etc. That is, the trailing \".0\"s are insignificant.. Also, version
|
||||
string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
|
||||
which is higher than \"1alpha\"."
|
||||
(version-list-<= (version-to-list v1) (version-to-list v2)))
|
||||
|
||||
(defun version= (v1 v2)
|
||||
"Return t if version V1 is equal to V2.
|
||||
|
||||
Note that version string \"1\" is equal to \"1.0\", \"1.0.0\", \"1.0.0.0\",
|
||||
etc. That is, the trailing \".0\"s are irrelevant. Also, version string \"1\"
|
||||
is greater than \"1pre\" which is greater than \"1beta\" which is greater than
|
||||
\"1alpha\"."
|
||||
etc. That is, the trailing \".0\"s are insignificant.. Also, version
|
||||
string \"1\" is higher (newer) than \"1pre\", which is higher than \"1beta\",
|
||||
which is higher than \"1alpha\"."
|
||||
(version-list-= (version-to-list v1) (version-to-list v2)))
|
||||
|
||||
|
||||
|
@ -1319,7 +1319,7 @@ Selecting operation
|
||||
|
||||
Variables
|
||||
|
||||
This is a brief overview of the different varaibles. For more info,
|
||||
This is a brief overview of the different variables. For more info,
|
||||
see the documentation for the variables (type \\[describe-variable] <variable> RET).
|
||||
|
||||
artist-rubber-banding Interactively do rubber-banding or not
|
||||
|
@ -170,7 +170,11 @@ Its value should be an event that has a binding in MENU."
|
||||
(mapc (lambda (elt)
|
||||
(if (stringp elt)
|
||||
(setq gl-str elt)
|
||||
(and (listp elt) (tmm-get-keymap elt not-menu))))
|
||||
(cond
|
||||
((listp elt) (tmm-get-keymap elt not-menu))
|
||||
((vectorp elt)
|
||||
(dotimes (i (length elt))
|
||||
(tmm-get-keymap (cons i (aref elt i)) not-menu))))))
|
||||
menu)
|
||||
;; Choose an element of tmm-km-list; put it in choice.
|
||||
(if (and not-menu (= 1 (length tmm-km-list)))
|
||||
|
19
lisp/vc.el
19
lisp/vc.el
@ -1618,9 +1618,10 @@ saving the buffer."
|
||||
|
||||
;;;###autoload
|
||||
(defun vc-root-diff (historic &optional not-urgent)
|
||||
"Display diffs between file revisions.
|
||||
Normally this compares the currently selected fileset with their
|
||||
working revisions. With a prefix argument HISTORIC, it reads two revision
|
||||
"Display diffs between VC-controlled whole tree revisions.
|
||||
Normally, this compares the tree corresponding to the current
|
||||
fileset with the working revision.
|
||||
With a prefix argument HISTORIC, prompt for two revision
|
||||
designators specifying which revisions to compare.
|
||||
|
||||
The optional argument NOT-URGENT non-nil means it is ok to say no to
|
||||
@ -1941,7 +1942,12 @@ Not all VC backends support short logs!")
|
||||
;;;###autoload
|
||||
(defun vc-print-log (&optional working-revision limit)
|
||||
"List the change log of the current fileset in a window.
|
||||
If WORKING-REVISION is non-nil, leave the point at that revision."
|
||||
If WORKING-REVISION is non-nil, leave point at that revision.
|
||||
If LIMIT is non-nil, it should be a number specifying the maximum
|
||||
number of revisions to show; the default is `vc-log-show-limit'.
|
||||
|
||||
When called interactively with a prefix argument, prompt for
|
||||
WORKING-REVISION and LIMIT."
|
||||
(interactive
|
||||
(cond
|
||||
(current-prefix-arg
|
||||
@ -1965,7 +1971,10 @@ If WORKING-REVISION is non-nil, leave the point at that revision."
|
||||
|
||||
;;;###autoload
|
||||
(defun vc-print-root-log (&optional limit)
|
||||
"List the change log of for the current VC controlled tree in a window."
|
||||
"List the change log for the current VC controlled tree in a window.
|
||||
If LIMIT is non-nil, it should be a number specifying the maximum
|
||||
number of revisions to show; the default is `vc-log-show-limit'.
|
||||
When called interactively with a prefix argument, prompt for LIMIT."
|
||||
(interactive
|
||||
(cond
|
||||
(current-prefix-arg
|
||||
|
@ -1,3 +1,37 @@
|
||||
2010-03-31 Bernhard Herzog <bh@intevation.de> (tiny change)
|
||||
|
||||
* menu.c (Fx_popup_menu): Use last_event_timestamp (Bug#4930).
|
||||
|
||||
2010-03-31 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* xdisp.c (note_mouse_highlight): Don't do highlight if pointer is
|
||||
invisible (Bug#5766).
|
||||
|
||||
2010-03-31 Adrian Robert <adrian.b.robert@gmail.com>
|
||||
|
||||
* xdisp.c (x_consider_frame_title, update_window_cursor): Remove
|
||||
HAVE_NS conditionals.
|
||||
(prepare_menu_bars)[HAVE_NS]: Call ns_set_doc_edited.
|
||||
|
||||
* nsfns.m (x_implicitly_set_name): If frame-title-format is t, use
|
||||
filename for the title.
|
||||
(ns_set_doc_edited): Do nothing if the selected window is a
|
||||
minibuffer window.
|
||||
|
||||
* nsterm.h: Add prototypes for ns_set_name_as_filename and
|
||||
ns_set_doc_edited.
|
||||
|
||||
* nsterm.m: Remove unneeded prototype.
|
||||
|
||||
2010-03-31 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (SOME_MACHINE_OBJECTS): Ensure dbus stuff is always
|
||||
in the DOC file. (Bug#5336)
|
||||
|
||||
2010-03-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* xdisp.c (pos_visible_p): Revert 2008-01-25 change (Bug#5730).
|
||||
|
||||
2010-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* window.c (keys_of_window): Remove redundant/overridden bindings.
|
||||
|
@ -515,7 +515,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
|
||||
in case they are needed there. */
|
||||
SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
|
||||
xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
|
||||
fontset.o \
|
||||
fontset.o dbusbind.o \
|
||||
nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
|
||||
w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
|
||||
w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
|
||||
|
18
src/menu.c
18
src/menu.c
@ -61,6 +61,10 @@ extern HMENU current_popup_menu;
|
||||
#define HAVE_BOXES 1
|
||||
#endif
|
||||
|
||||
/* The timestamp of the last input event Emacs received from the X server. */
|
||||
/* Defined in keyboard.c. */
|
||||
extern unsigned long last_event_timestamp;
|
||||
|
||||
extern Lisp_Object QCtoggle, QCradio;
|
||||
|
||||
Lisp_Object menu_items;
|
||||
@ -1073,7 +1077,6 @@ no quit occurs and `x-popup-menu' returns nil. */)
|
||||
int keymaps = 0;
|
||||
int for_click = 0;
|
||||
int specpdl_count = SPECPDL_INDEX ();
|
||||
Lisp_Object timestamp = Qnil;
|
||||
struct gcpro gcpro1;
|
||||
|
||||
if (NILP (position))
|
||||
@ -1107,10 +1110,9 @@ no quit occurs and `x-popup-menu' returns nil. */)
|
||||
for_click = 1;
|
||||
tem = Fcar (Fcdr (position)); /* EVENT_START (position) */
|
||||
window = Fcar (tem); /* POSN_WINDOW (tem) */
|
||||
tem = Fcdr (Fcdr (tem));
|
||||
x = Fcar (Fcar (tem));
|
||||
y = Fcdr (Fcar (tem));
|
||||
timestamp = Fcar (Fcdr (tem));
|
||||
tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */
|
||||
x = Fcar (tem);
|
||||
y = Fcdr (tem);
|
||||
}
|
||||
|
||||
/* If a click happens in an external tool bar or a detached
|
||||
@ -1318,9 +1320,13 @@ no quit occurs and `x-popup-menu' returns nil. */)
|
||||
selection = ns_menu_show (f, xpos, ypos, for_click,
|
||||
keymaps, title, &error_name);
|
||||
#else /* MSDOS and X11 */
|
||||
/* Assume last_event_timestamp is the timestamp of the button event.
|
||||
Is this assumption ever violated? We can't use the timestamp
|
||||
stored within POSITION because there the top bits from the actual
|
||||
timestamp may be truncated away (Bug#4930). */
|
||||
selection = xmenu_show (f, xpos, ypos, for_click,
|
||||
keymaps, title, &error_name,
|
||||
INTEGERP (timestamp) ? XUINT (timestamp) : 0);
|
||||
last_event_timestamp);
|
||||
#endif
|
||||
|
||||
UNBLOCK_INPUT;
|
||||
|
20
src/nsfns.m
20
src/nsfns.m
@ -81,6 +81,7 @@ Updated by Christian Limpach (chris@nice.ch)
|
||||
extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
|
||||
extern Lisp_Object Qunsplittable, Qmenu_bar_lines, Qbuffer_predicate, Qtitle;
|
||||
extern Lisp_Object Qnone;
|
||||
extern Lisp_Object Vframe_title_format;
|
||||
|
||||
Lisp_Object Qbuffered;
|
||||
Lisp_Object Qfontsize;
|
||||
@ -583,6 +584,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
NSTRACE (x_implicitly_set_name);
|
||||
if (FRAME_ICONIFIED_P (f))
|
||||
ns_set_name_iconic (f, arg, 0);
|
||||
else if (FRAME_NS_P (f) && EQ (Vframe_title_format, Qt))
|
||||
ns_set_name_as_filename (f);
|
||||
else
|
||||
ns_set_name (f, arg, 0);
|
||||
}
|
||||
@ -627,14 +630,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
|
||||
BLOCK_INPUT;
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
name =XBUFFER (buf)->filename;
|
||||
name = XBUFFER (buf)->filename;
|
||||
if (NILP (name) || FRAME_ICONIFIED_P (f)) name =XBUFFER (buf)->name;
|
||||
|
||||
if (FRAME_ICONIFIED_P (f) && !NILP (f->icon_name))
|
||||
name = f->icon_name;
|
||||
|
||||
if (NILP (name))
|
||||
name = build_string([ns_app_name UTF8String]);
|
||||
name = build_string ([ns_app_name UTF8String]);
|
||||
else
|
||||
CHECK_STRING (name);
|
||||
|
||||
@ -687,11 +690,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
||||
{
|
||||
NSView *view = FRAME_NS_VIEW (f);
|
||||
NSAutoreleasePool *pool;
|
||||
BLOCK_INPUT;
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
[[view window] setDocumentEdited: !NILP (arg)];
|
||||
[pool release];
|
||||
UNBLOCK_INPUT;
|
||||
if (!MINI_WINDOW_P (XWINDOW (f->selected_window)))
|
||||
{
|
||||
BLOCK_INPUT;
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
[[view window] setDocumentEdited: !NILP (arg)];
|
||||
[pool release];
|
||||
UNBLOCK_INPUT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -708,6 +708,8 @@ extern void nxatoms_of_nsselect ();
|
||||
extern int ns_lisp_to_cursor_type ();
|
||||
extern Lisp_Object ns_cursor_type_to_lisp (int arg);
|
||||
extern Lisp_Object Qnone;
|
||||
extern void ns_set_name_as_filename (struct frame *f);
|
||||
extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg);
|
||||
|
||||
extern int
|
||||
ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc,
|
||||
|
@ -4173,8 +4173,6 @@ - (void)timeout_handler: (NSTimer *)timedEntry
|
||||
ns_send_appdefined (-2);
|
||||
}
|
||||
|
||||
extern void update_window_cursor (struct window *w, int on);
|
||||
|
||||
- (void)fd_handler: (NSTimer *) fdEntry
|
||||
/* --------------------------------------------------------------------------
|
||||
Check data waiting on file descriptors and terminate if so
|
||||
|
66
src/xdisp.c
66
src/xdisp.c
@ -1377,33 +1377,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
|
||||
visible_p = 1;
|
||||
if (visible_p)
|
||||
{
|
||||
if (it_method == GET_FROM_BUFFER)
|
||||
{
|
||||
Lisp_Object window, prop;
|
||||
|
||||
XSETWINDOW (window, w);
|
||||
prop = Fget_char_property (make_number (charpos),
|
||||
Qinvisible, window);
|
||||
|
||||
/* If charpos coincides with invisible text covered with an
|
||||
ellipsis, use the first glyph of the ellipsis to compute
|
||||
the pixel positions. */
|
||||
if (TEXT_PROP_MEANS_INVISIBLE (prop) == 2)
|
||||
{
|
||||
struct glyph_row *row = it.glyph_row;
|
||||
struct glyph *glyph = row->glyphs[TEXT_AREA];
|
||||
struct glyph *end = glyph + row->used[TEXT_AREA];
|
||||
int x = row->x;
|
||||
|
||||
for (; glyph < end
|
||||
&& (!BUFFERP (glyph->object)
|
||||
|| glyph->charpos < charpos);
|
||||
glyph++)
|
||||
x += glyph->pixel_width;
|
||||
top_x = x;
|
||||
}
|
||||
}
|
||||
else if (it_method == GET_FROM_DISPLAY_VECTOR)
|
||||
if (it_method == GET_FROM_DISPLAY_VECTOR)
|
||||
{
|
||||
/* We stopped on the last glyph of a display vector.
|
||||
Try and recompute. Hack alert! */
|
||||
@ -9787,32 +9761,7 @@ x_consider_frame_title (frame)
|
||||
if (! STRINGP (f->name)
|
||||
|| SBYTES (f->name) != len
|
||||
|| bcmp (title, SDATA (f->name), len) != 0)
|
||||
{
|
||||
#ifdef HAVE_NS
|
||||
if (FRAME_NS_P (f))
|
||||
{
|
||||
if (!MINI_WINDOW_P(XWINDOW(f->selected_window)))
|
||||
{
|
||||
if (EQ (fmt, Qt))
|
||||
ns_set_name_as_filename (f);
|
||||
else
|
||||
x_implicitly_set_name (f, make_string(title, len),
|
||||
Qnil);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
x_implicitly_set_name (f, make_string (title, len), Qnil);
|
||||
}
|
||||
#ifdef HAVE_NS
|
||||
if (FRAME_NS_P (f))
|
||||
{
|
||||
/* do this also for frames with explicit names */
|
||||
ns_implicitly_set_icon_type(f);
|
||||
ns_set_doc_edited(f, Fbuffer_modified_p
|
||||
(XWINDOW (f->selected_window)->buffer), Qnil);
|
||||
}
|
||||
#endif
|
||||
x_implicitly_set_name (f, make_string (title, len), Qnil);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9908,6 +9857,11 @@ prepare_menu_bars ()
|
||||
menu_bar_hooks_run = update_menu_bar (f, 0, menu_bar_hooks_run);
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
update_tool_bar (f, 0);
|
||||
#endif
|
||||
#ifdef HAVE_NS
|
||||
if (windows_or_buffers_changed)
|
||||
ns_set_doc_edited (f, Fbuffer_modified_p
|
||||
(XWINDOW (f->selected_window)->buffer));
|
||||
#endif
|
||||
UNGCPRO;
|
||||
}
|
||||
@ -23519,9 +23473,6 @@ display_and_set_cursor (w, on, hpos, vpos, x, y)
|
||||
/* Switch the display of W's cursor on or off, according to the value
|
||||
of ON. */
|
||||
|
||||
#ifndef HAVE_NS
|
||||
static
|
||||
#endif
|
||||
void
|
||||
update_window_cursor (w, on)
|
||||
struct window *w;
|
||||
@ -24440,7 +24391,8 @@ note_mouse_highlight (f, x, y)
|
||||
#endif
|
||||
|
||||
if (NILP (Vmouse_highlight)
|
||||
|| !f->glyphs_initialized_p)
|
||||
|| !f->glyphs_initialized_p
|
||||
|| f->pointer_invisible)
|
||||
return;
|
||||
|
||||
dpyinfo->mouse_face_mouse_x = x;
|
||||
|
@ -1,3 +1,34 @@
|
||||
2010-03-29 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* cedet/semantic-ia-utest.el
|
||||
(semantic-symref-test-count-hits-in-tag): Add function, from
|
||||
semantic-test.el.
|
||||
|
||||
* cedet/tests/test.cpp:
|
||||
* cedet/tests/test.py:
|
||||
* cedet/tests/teststruct.cpp:
|
||||
* cedet/tests/testtemplates.cpp:
|
||||
* cedet/tests/testusing.cpp:
|
||||
* cedet/tests/scopetest.cpp:
|
||||
* cedet/tests/scopetest.java: Files deleted.
|
||||
|
||||
* cedet/tests/test.make:
|
||||
* cedet/tests/test.c:
|
||||
* cedet/tests/testjavacomp.java:
|
||||
* cedet/tests/testspp.c:
|
||||
* cedet/tests/testsppreplace.c:
|
||||
* cedet/tests/testsppreplaced.c:
|
||||
* cedet/tests/testsubclass.cpp:
|
||||
* cedet/tests/testsubclass.hh:
|
||||
* cedet/tests/testtypedefs.cpp:
|
||||
* cedet/tests/testvarnames.c:
|
||||
* cedet/tests/test.el:
|
||||
* cedet/tests/testdoublens.cpp:
|
||||
* cedet/tests/testdoublens.hpp: Add copyright header.
|
||||
|
||||
* cedet/semantic-tests.el (semanticdb-test-gnu-global):
|
||||
Remove reference to deleted files.
|
||||
|
||||
2010-03-30 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* occur-testsuite.el (occur-tests): Add tests for context lines.
|
||||
|
@ -42,10 +42,7 @@
|
||||
"tests/testdoublens.cpp"
|
||||
"tests/testsubclass.cpp"
|
||||
"tests/testtypedefs.cpp"
|
||||
"tests/teststruct.cpp"
|
||||
"tests/testtemplates.cpp"
|
||||
"tests/testfriends.cpp"
|
||||
"tests/testusing.cpp"
|
||||
"tests/testnsp.cpp"
|
||||
"tests/testsppcomplete.c"
|
||||
"tests/testvarnames.c"
|
||||
@ -419,6 +416,27 @@ Argument ARG specifies which set of tests to run.
|
||||
|
||||
))
|
||||
|
||||
(defun semantic-symref-test-count-hits-in-tag ()
|
||||
"Lookup in the current tag the symbol under point.
|
||||
Then count all the other references to the same symbol within the
|
||||
tag that contains point, and return that."
|
||||
(interactive)
|
||||
(let* ((ctxt (semantic-analyze-current-context))
|
||||
(target (car (reverse (oref ctxt prefix))))
|
||||
(tag (semantic-current-tag))
|
||||
(start (current-time))
|
||||
(Lcount 0))
|
||||
(when (semantic-tag-p target)
|
||||
(semantic-symref-hits-in-region
|
||||
target (lambda (start end prefix) (setq Lcount (1+ Lcount)))
|
||||
(semantic-tag-start tag)
|
||||
(semantic-tag-end tag))
|
||||
(when (interactive-p)
|
||||
(message "Found %d occurrences of %s in %.2f seconds"
|
||||
Lcount (semantic-tag-name target)
|
||||
(semantic-elapsed-time start (current-time))))
|
||||
Lcount)))
|
||||
|
||||
(defun semantic-src-utest-buffer-refs ()
|
||||
"Run a sym-ref counting unit-test pass in the current buffer."
|
||||
|
||||
|
@ -107,53 +107,6 @@ If optional arg STANDARDFILE is non-nil, use a standard file w/ global enabled."
|
||||
(data-debug-new-buffer "*SemanticDB Gnu Global Result*")
|
||||
(data-debug-insert-thing result "?" ""))))
|
||||
|
||||
;;; From semantic-find
|
||||
|
||||
(require 'semantic/find)
|
||||
|
||||
(defun semantic-find-benchmark ()
|
||||
"Run some simple benchmarks to see how we are doing.
|
||||
Optional argument ARG is the number of iterations to run."
|
||||
(interactive)
|
||||
(require 'benchmark)
|
||||
(let ((f-name nil)
|
||||
(b-name nil)
|
||||
(f-comp)
|
||||
(b-comp)
|
||||
(f-regex)
|
||||
)
|
||||
(garbage-collect)
|
||||
(setq f-name
|
||||
(benchmark-run-compiled
|
||||
1000 (semantic-find-first-tag-by-name "class3"
|
||||
"test/test.cpp")))
|
||||
(garbage-collect)
|
||||
(setq b-name
|
||||
(benchmark-run-compiled
|
||||
1000 (semantic-brute-find-first-tag-by-name "class3"
|
||||
"test/test.cpp")))
|
||||
(garbage-collect)
|
||||
(setq f-comp
|
||||
(benchmark-run-compiled
|
||||
1000 (semantic-find-tags-for-completion "method"
|
||||
"test/test.cpp")))
|
||||
(garbage-collect)
|
||||
(setq b-comp
|
||||
(benchmark-run-compiled
|
||||
1000 (semantic-brute-find-tag-by-name-regexp "^method"
|
||||
"test/test.cpp")))
|
||||
(garbage-collect)
|
||||
(setq f-regex
|
||||
(benchmark-run-compiled
|
||||
1000 (semantic-find-tags-by-name-regexp "^method"
|
||||
"test/test.cpp")))
|
||||
|
||||
(message "Name [new old] [ %.3f %.3f ] Complete [newc/new old] [ %.3f/%.3f %.3f ]"
|
||||
(car f-name) (car b-name)
|
||||
(car f-comp) (car f-regex)
|
||||
(car b-comp))
|
||||
))
|
||||
|
||||
;;; From semantic-format
|
||||
|
||||
(require 'semantic/format)
|
||||
|
@ -1,48 +0,0 @@
|
||||
/* Test scoping rules for c++ in the analyzer. */
|
||||
|
||||
namespace {
|
||||
|
||||
class aclass2; // Forward reference.
|
||||
|
||||
class aclass1 {
|
||||
private:
|
||||
int attrp1;
|
||||
int amethodp1(int argp1);
|
||||
aclass2 areference;
|
||||
protected:
|
||||
int attrpr1;
|
||||
public:
|
||||
int attr1;
|
||||
int amethod1(int arg1);
|
||||
};
|
||||
}
|
||||
|
||||
namespace {
|
||||
class aclass2 : public aclass1
|
||||
{
|
||||
private:
|
||||
int attrp2;
|
||||
int amethodp2(int argp1);
|
||||
public:
|
||||
aclass2(int aninitvalue);
|
||||
~aclass2();
|
||||
int attr2;
|
||||
int amethod2(int arg2);
|
||||
};
|
||||
}
|
||||
|
||||
aclass2::aclass2(init aninitvalue)
|
||||
{
|
||||
/* This is a comment that talks about aclass1 */
|
||||
aclass1;
|
||||
}
|
||||
|
||||
int aclass2::amethod2(int arg2)
|
||||
{
|
||||
int alocalvar;
|
||||
float q;
|
||||
|
||||
ac;
|
||||
}
|
||||
|
||||
// arch-tag: 9336063c-6b2e-4677-a390-d2dd091a2474
|
@ -1,25 +0,0 @@
|
||||
class Foo {
|
||||
|
||||
public void a1() {}
|
||||
|
||||
class Bar {
|
||||
|
||||
public int a2() {}
|
||||
|
||||
public void b() {
|
||||
a // -1-
|
||||
}
|
||||
|
||||
class Baz {
|
||||
|
||||
public int a3() {}
|
||||
|
||||
public Baz(int a4) {
|
||||
a // -2-
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
// C++ examples and requests from Klaus Berndl
|
||||
|
||||
// template in a unnamed namespace
|
||||
namespace
|
||||
{
|
||||
template<typename Target, typename Source>
|
||||
Target lexical_cast(Source arg)
|
||||
{
|
||||
std::stringstream interpreter;
|
||||
Target result;
|
||||
|
||||
if(!(interpreter << arg) || !(interpreter >> result) ||
|
||||
!(interpreter >> std::ws).eof())
|
||||
throw bad_lexical_cast();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <class T, FOO> class Vector
|
||||
{
|
||||
private:
|
||||
static T* v;
|
||||
int sz;
|
||||
|
||||
public:
|
||||
T& elem(int i) {return v[i];}
|
||||
virtual ~Vector ();
|
||||
|
||||
protected:
|
||||
Vector ();
|
||||
};
|
||||
|
||||
template <> class Vector <void*>
|
||||
{
|
||||
private:
|
||||
void** v;
|
||||
int sz;
|
||||
|
||||
public:
|
||||
Vector ();
|
||||
virtual int func1(int i);
|
||||
virtual int func2(int i) = 0;
|
||||
static virtual int func3(int i) = 0;
|
||||
void*& elem(int i) {return v[i];}
|
||||
//...
|
||||
};
|
||||
|
||||
// template contains namespace
|
||||
typedef vector<CzkUtilities::Action*> ActionList;
|
||||
|
||||
// declaration of some template-types
|
||||
map<XXX, Test::YYY>** map_var;
|
||||
|
||||
map_with_size<XXX, Test::YYY, size> map_size_var;
|
||||
typedef map_with_size<XXX, Test::YYY, size> SizedMap;
|
||||
|
||||
map_with_10_size<XXX, Test::YYY, 10>* pMap_size10_var;
|
||||
typedef map_with_10_size<XXX, Test::YYY, 10> Size10Map;
|
||||
|
||||
// a function which such a template-argument
|
||||
void* test_function(map<ClassX, Test::ClassY, 10>* pMap);
|
||||
|
||||
|
||||
template <class T> class Vector <T*> : private Vector <void*>
|
||||
{
|
||||
public:
|
||||
typedef Vector <void*> Base;
|
||||
|
||||
Vector () : Base() {}
|
||||
|
||||
T*& elem(int i) {return static_cast<T*&>(Base::elem(i));}
|
||||
//...
|
||||
};
|
||||
|
||||
// outside method implementation of a template-class
|
||||
template<class T> T& Vector<T*>::elem(int i)
|
||||
{
|
||||
return C;
|
||||
}
|
||||
|
||||
// same but qualified with a namespace Testnamespace
|
||||
template<class T> T& Testnamespace::Vector<T*>::elem(int i)
|
||||
{
|
||||
return C;
|
||||
}
|
||||
|
||||
// function templates with keyword typename
|
||||
template<typename Target, typename Source>
|
||||
Target lexical_cast(Source arg)
|
||||
{
|
||||
std::stringstream interpreter;
|
||||
Target result;
|
||||
|
||||
if(!(interpreter << arg) || !(interpreter >> result) ||
|
||||
!(interpreter >> std::ws).eof())
|
||||
throw bad_lexical_cast();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static
|
||||
typename T::_ptr_type
|
||||
getService(const std::string& pServiceName, const int pRetries=20)
|
||||
{
|
||||
return T::_narrow(getServiceObject(pServiceName, pRetries));
|
||||
}
|
||||
|
||||
// function template declaration
|
||||
template<class T> void sort(vector<T>&);
|
||||
// complex function template definition
|
||||
template<class T, class S, const NamespaceY::ClassX<TestClass, &s> volatile ***&i>
|
||||
map<ClassY, ClassX, 10>
|
||||
sort(const vector<T>& v)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// variable declarations of template-types
|
||||
foo<TClass, Testnamespace::XClass, i> *bar1;
|
||||
foo<TClass, Testnamespace::XClass, **&i> *bar2;
|
||||
foo<TClass, Testnamespace::XClass, *Namespace::ClassX::i> bar3;
|
||||
foo<0> bar0;
|
||||
|
||||
class SomeName;
|
||||
class OtherName;
|
||||
|
||||
// arch-tag: 55ff74de-74dc-44ad-8252-50dc5f3492c3
|
@ -1,6 +1,29 @@
|
||||
/* Test file for C language.
|
||||
* Attempt to include as many aspects of the C language as possible.
|
||||
/* test.c --- Semantic unit test for C.
|
||||
|
||||
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
2010 Free Software Foundation, Inc.
|
||||
|
||||
Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Attempt to include as many aspects of the C language as possible.
|
||||
*/
|
||||
|
||||
/* types of include files */
|
||||
#include "includeme1.h"
|
||||
#include <includeme2.h>
|
||||
|
@ -1,592 +0,0 @@
|
||||
/* Test file for C++ language.
|
||||
* Attempt to include as many aspects of the C++ language as possible.
|
||||
* Do not include things tested in test.c since that shares the
|
||||
* same language.
|
||||
*/
|
||||
|
||||
/* An include test */
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "c++-test.hh"
|
||||
|
||||
#include <c++-test.hh>
|
||||
|
||||
double var1 = 1.2;
|
||||
|
||||
int simple1(int a) {
|
||||
|
||||
}
|
||||
|
||||
struct foo1 {
|
||||
int test;
|
||||
};
|
||||
|
||||
struct foo2 : public foo1 {
|
||||
const int foo21(int a, int b);
|
||||
const int foo22(int a, int b) { return 1 }
|
||||
};
|
||||
|
||||
/* Classes */
|
||||
class class1 {
|
||||
private:
|
||||
int var11;
|
||||
struct foo1 var12;
|
||||
public:
|
||||
int p_var11;
|
||||
struct foo p_var12;
|
||||
};
|
||||
|
||||
class i_class1 : public class1 {
|
||||
private:
|
||||
int var11;
|
||||
struct foo var12;
|
||||
public:
|
||||
int p_var11;
|
||||
struct foo p_var12;
|
||||
};
|
||||
|
||||
class class2 {
|
||||
private:
|
||||
int var21;
|
||||
struct foo var22;
|
||||
public:
|
||||
int p_var21;
|
||||
struct foo p_var22;
|
||||
};
|
||||
|
||||
class i_class2 : public class1, public class2 {
|
||||
private:
|
||||
int var21;
|
||||
struct foo var22;
|
||||
protected:
|
||||
int pt_var21;
|
||||
public:
|
||||
int p_var21;
|
||||
struct foo p_var22;
|
||||
};
|
||||
|
||||
class class3 {
|
||||
/* A class with strange things in it */
|
||||
public:
|
||||
class3(); /* A constructor */
|
||||
enum embedded_foo_enum {
|
||||
a, b, c
|
||||
} embed1;
|
||||
struct embedded_bar_struct {
|
||||
int a;
|
||||
int b;
|
||||
} embed2;
|
||||
class embedded_baz_class {
|
||||
embedded_baz_class();
|
||||
~embedded_baz_class();
|
||||
} embed3;
|
||||
~class3(); /* destructor */
|
||||
|
||||
/* Methods */
|
||||
int method_for_class3(int a, char b);
|
||||
|
||||
int inline_method(int c) { return c; }
|
||||
|
||||
/* Operators */
|
||||
class3& operator^= (const class3& something);
|
||||
|
||||
/* Funny declmods */
|
||||
const class3 * const method_const_ptr_ptr(const int * const argconst) const = 0;
|
||||
};
|
||||
|
||||
class3::class3()
|
||||
{
|
||||
/* Constructor outside the definition. */
|
||||
}
|
||||
|
||||
int class3::method_for_class3(int a, char b)
|
||||
{
|
||||
}
|
||||
|
||||
int class3::method1_for_class3( int a, int &b)
|
||||
{
|
||||
int cvariablename;
|
||||
class3 fooy[];
|
||||
class3 moose = new class3;
|
||||
|
||||
// Complktion testing line should find external members.
|
||||
a = fooy[1].me ;
|
||||
b = cv ;
|
||||
|
||||
if (fooy.emb) {
|
||||
simple1(c);
|
||||
}
|
||||
|
||||
cos(10);
|
||||
abs(10);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
char class3::method2_for_class3( int a, int b) throw ( exception1 )
|
||||
{
|
||||
return 'a';
|
||||
}
|
||||
|
||||
void *class3::method3_for_class3( int a, int b) throw ( exception1, exception2 )
|
||||
{
|
||||
int q = a;
|
||||
return "Moose";
|
||||
}
|
||||
|
||||
void *class3::method31_for_class3( int a, int b) throw ( )
|
||||
{
|
||||
int q = a;
|
||||
return "Moose";
|
||||
}
|
||||
|
||||
void *class3::method4_for_class3( int a, int b) reentrant
|
||||
{
|
||||
class3 ct;
|
||||
|
||||
ct.method5_for_class3(1,a);
|
||||
|
||||
pritf();
|
||||
}
|
||||
|
||||
/*
|
||||
* A method on class3.
|
||||
*/
|
||||
void *class3::method5_for_class3( int a, int b) const
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Namespace parsing tests
|
||||
*/
|
||||
namespace NS {
|
||||
class class_in_namespace {
|
||||
int equiv(const NS::class_in_namespace *) const;
|
||||
};
|
||||
}
|
||||
|
||||
int NS::class_in_namespace::equiv(const NS::class_in_namespace *cin) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Stuff Klaus found.
|
||||
// Inheritance w/out a specifying for public.
|
||||
class class4 : class1 {
|
||||
// Pure virtual methods.
|
||||
void virtual print () const = 0;
|
||||
|
||||
public:
|
||||
// The whacky constructor type
|
||||
class4()
|
||||
try : class1(args)
|
||||
{
|
||||
// constructor body
|
||||
}
|
||||
catch ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class class5 : public virtual class4 {
|
||||
// Virtual inheritance
|
||||
};
|
||||
|
||||
class class6 : class1 {
|
||||
// Mutable
|
||||
mutable int i;
|
||||
};
|
||||
|
||||
/* Namespaces */
|
||||
namespace namespace1 {
|
||||
void ns_method1() { }
|
||||
|
||||
class n_class1 {
|
||||
public:
|
||||
void method11(int a) { }
|
||||
};
|
||||
|
||||
/* This shouldn't parse due to missing semicolon. */
|
||||
class _n_class2 : public n_class1 {
|
||||
void n_c2_method1(int a, int b) { }
|
||||
};
|
||||
|
||||
// Macros in the namespace
|
||||
#define NSMACRO 1
|
||||
|
||||
// Template in the namespace
|
||||
template<class T> T nsti1(const Foo& foo);
|
||||
template<> int nsti1<int>(const Foo& foo);
|
||||
|
||||
}
|
||||
|
||||
namespace namespace2 {
|
||||
|
||||
using namespace1::n_class1;
|
||||
|
||||
}
|
||||
|
||||
/* Initializers */
|
||||
void tinitializers1(): inita1(False),
|
||||
inita2(False)
|
||||
{
|
||||
inita1= 1;
|
||||
}
|
||||
|
||||
/* How about Extern C type things. */
|
||||
int funny_prototype(int ,int b,float c)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
extern "C"
|
||||
int extern_c_1(int a, int b)
|
||||
{
|
||||
|
||||
funny_prototype(1,2,3.4);
|
||||
|
||||
printf("Moose", );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
int extern_c_2(int a, int b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Some operator stuff
|
||||
class Action
|
||||
{
|
||||
// Problems!! operator() and operator[] can not be parsed with semantic
|
||||
// 1.4.2 but with latest c.by
|
||||
virtual void operator()(int i, char *p ) = 0;
|
||||
virtual String& operator[]() = 0;
|
||||
virtual void operator!() = 0;
|
||||
virtual void operator->() = 0;
|
||||
virtual T& operator+=();
|
||||
virtual T& operator*();
|
||||
virtual T& operator*=();
|
||||
};
|
||||
|
||||
// class with namespace qualified parents
|
||||
class Multiinherit : public virtual POA::Parent,
|
||||
public virtual POA::Parent1,
|
||||
Parent
|
||||
{
|
||||
private:
|
||||
int i;
|
||||
|
||||
public:
|
||||
Multiinherit();
|
||||
~Multiinherit();
|
||||
|
||||
// method with a list of qualified exceptions
|
||||
void* throwtest()
|
||||
throw(Exception0,
|
||||
Testnamespace::Exception1,
|
||||
Testnamespace::Excpetion2,
|
||||
Testnamespace::testnamespace1::Exception3);
|
||||
|
||||
};
|
||||
|
||||
void*
|
||||
Multiinherit::throwtest()
|
||||
throw (Exception0,
|
||||
Testnamespace::Exception1,
|
||||
Testnamespace::Excpetion2,
|
||||
Testnamespace::testnamespace1::Exception3)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Jens Rock <jens.rock@asamnet.de>: Nested classes or structs defined
|
||||
// outside of the containing class/struct.
|
||||
class container
|
||||
{
|
||||
public:
|
||||
struct contained;
|
||||
container();
|
||||
~container();
|
||||
};
|
||||
|
||||
struct container::contained
|
||||
{
|
||||
public:
|
||||
contained();
|
||||
~contained();
|
||||
};
|
||||
|
||||
/*
|
||||
* Ok, how about some template stuff.
|
||||
*/
|
||||
template <class CT, class container = vector<CT> >
|
||||
const CT& max (const CT& a, const CT& b)
|
||||
{
|
||||
return a < b ? b : a;
|
||||
}
|
||||
|
||||
// Arne Schmitz found this one
|
||||
std::vector<int> &a, &b, &c;
|
||||
|
||||
class TemplateUsingClass
|
||||
{
|
||||
typedef TestClassMap::iterator iterator;
|
||||
typedef map<long, long> TestClassMap;
|
||||
|
||||
// typedefs with const and volatile
|
||||
typedef const map<long, long> const_TestClassMap;
|
||||
typedef TestClassMap<string>::iterator volatile volatile_iterator;
|
||||
|
||||
map<int, int> mapclassvarthingy;
|
||||
};
|
||||
|
||||
template<class T> T ti1(const Foo& foo);
|
||||
template<> int ti1<int>(const Foo& foo);
|
||||
|
||||
|
||||
// -----------------------------------
|
||||
// Now some namespace and related stuff
|
||||
// -----------------------------------
|
||||
|
||||
using CORBA::LEX::get_token;
|
||||
using Namespace1;
|
||||
|
||||
using namespace POA::std;
|
||||
using namespace Test;
|
||||
|
||||
|
||||
|
||||
namespace Parser
|
||||
{
|
||||
namespace
|
||||
{
|
||||
using Lexer::get_test;
|
||||
string str = "";
|
||||
}
|
||||
|
||||
namespace XXX
|
||||
{
|
||||
|
||||
class Foobar : public virtual POA::Parent,
|
||||
public virtual POA::Parent1,
|
||||
private POA::list<fact>,
|
||||
private map<string>
|
||||
{
|
||||
ini i;
|
||||
list <shared_ptr<item> >::const_iterator l;
|
||||
public:
|
||||
|
||||
Foobar();
|
||||
~Foobar();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void test_function(int i);
|
||||
|
||||
};
|
||||
|
||||
// unnamed namespaces - even nested
|
||||
namespace
|
||||
{
|
||||
namespace
|
||||
{
|
||||
using Lexer::get_test;
|
||||
string str = "";
|
||||
}
|
||||
|
||||
// some builtin types
|
||||
long long ll = 0;
|
||||
long double d = 0.0;
|
||||
unsigned test;
|
||||
unsigned long int **uli = 0;
|
||||
signed si = 0;
|
||||
signed short ss = 0;
|
||||
short int i = 0;
|
||||
long int li = 0;
|
||||
|
||||
// expressions with namespace/class-qualifyiers
|
||||
ORB_var cGlobalOrb = ORB::_nil();
|
||||
ORB_var1 cGlobalOrb1 = ORB::_test;
|
||||
|
||||
class Testclass
|
||||
{
|
||||
#define TEST 0
|
||||
ini i;
|
||||
|
||||
public:
|
||||
|
||||
Testclass();
|
||||
~Testclass();
|
||||
};
|
||||
|
||||
static void test_function(unsigned int i);
|
||||
|
||||
};
|
||||
|
||||
|
||||
// outside method implementations which should be grouped to type Test
|
||||
XXX&
|
||||
Test::waiting()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
Test::print()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// outside method implementations with namespaces which should be grouped to
|
||||
// their complete (incl. namespace) types
|
||||
void*
|
||||
Parser::XXX::Foobar::wait(int i, const char const * const * p)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void*
|
||||
Namespace1::Test::wait1(int i)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
Namespace1::Test::waiting(int i)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// a class with some outside implementations which should all be grouped to
|
||||
// this class declaration
|
||||
class ClassWithExternals
|
||||
{
|
||||
private:
|
||||
int i;
|
||||
|
||||
public:
|
||||
ClassWithExternals();
|
||||
~ClassWithExternals();
|
||||
void non_nil();
|
||||
};
|
||||
|
||||
|
||||
// Foobar is not displayed; seems that semantic tries to add this to the class
|
||||
// Foobar but can not find/display it, because contained in the namespace above.
|
||||
void
|
||||
Foobar::non_nil()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// are correctly grouped to the ClassWithExternals class
|
||||
void
|
||||
ClassWithExternals::non_nil()
|
||||
{
|
||||
String s = "lödfjg dlfgkdlfkgjdl";
|
||||
return;
|
||||
}
|
||||
|
||||
ClassWithExternals::ClassWithExternals()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
ClassWithExternals::~ClassWithExternals()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------
|
||||
// Now some macro and define stuff
|
||||
// -------------------------------
|
||||
|
||||
#define TEST 0
|
||||
#define TEST1 "String"
|
||||
|
||||
// The first backslash makes this macro unmatched syntax with semantic 1.4.2!
|
||||
// With flexing \+newline as nothing all is working fine!
|
||||
#define MZK_ENTER(METHOD) \
|
||||
{ \
|
||||
CzkMethodLog lMethodLog(METHOD,"Framework");\
|
||||
}
|
||||
|
||||
#define ZK_ASSERTM(METHOD,ASSERTION,MESSAGE) \
|
||||
{ if(!(ASSERTION))\
|
||||
{\
|
||||
std::ostringstream lMesgStream; \
|
||||
lMesgStream << "Assertion failed: " \
|
||||
<< MESSAGE; \
|
||||
CzkLogManager::doLog(CzkLogManager::FATAL,"",METHOD, \
|
||||
"Assert",lMesgStream); \
|
||||
assert(ASSERTION);\
|
||||
}\
|
||||
}
|
||||
|
||||
// Test if not newline-backslashes are handled correctly
|
||||
string s = "My \"quoted\" string";
|
||||
|
||||
// parsed fine as macro
|
||||
#define FOO (arg) method(arg, "foo");
|
||||
|
||||
// With semantic 1.4.2 this parsed as macro BAR *and* function method.
|
||||
// With latest c.bnf at least one-liner macros can be parsed correctly.
|
||||
#define BAR (arg) CzkMessageLog method(arg, "bar");
|
||||
|
||||
// some const and volatile stuff
|
||||
char * p1 = "Hello"; // 1. variable Pointer, variable Data
|
||||
const char * p2 = "Hello"; // 2. variable pointer, constant data
|
||||
char * const p3 = "Hello"; // 3. constant pointer, variable data
|
||||
const char * const p4 = "Hello"; // 4. constant pointer, constant data
|
||||
|
||||
// Case 2 and 4 can exchange first "const" and "char"
|
||||
char const * p21 = "Hello"; // variable pointer, constant data
|
||||
char const * const p41 = "Hello"; // constant pointer, constant data
|
||||
|
||||
char volatile a = 0; // a volatile char
|
||||
void foo(bar const &arg); // a reference to a const bar
|
||||
int foobar(bar const * const p); // a const pointer to a const bar
|
||||
int foobar(bar const volatile * const p); // a const pointer to a const bar
|
||||
int foobar3(char* p); // a const pointer to a const bar
|
||||
|
||||
// Should not be parsed because this is invalid code
|
||||
int const & const r3 = i;
|
||||
|
||||
boolean i = 0;
|
||||
boolean & r1 = i;
|
||||
boolean const & r2 = i;
|
||||
|
||||
// const * sequences can be very long in C++ ;-)
|
||||
char const * const * const * const * ppp;
|
||||
|
||||
// complex function declarationen with named pointer-arguments
|
||||
const char** foobar1(volatile char const * const **p);
|
||||
const char** foobar11(volatile Test::Namespace::Char<char*> const * const **p);
|
||||
|
||||
// complex function declarationen with unnamed pointer-arguments
|
||||
const char* foobar2(const char***);
|
||||
const char* foobar21(const Test::Namespace::Char<char>***);
|
||||
|
||||
// string literal parsing even with wchar_t
|
||||
char const *p = "string1";
|
||||
char const *q = "string1" "str\"ing2" "string3";
|
||||
wchar_t testc = L'a';
|
||||
|
||||
wchar_t const *wp = L"string with a \" in it";
|
||||
wchar_t const *wq = L"string \n\t\"test" L"string2";
|
||||
wchar_t const *wr = L"string L";
|
||||
|
||||
// arch-tag: 59828880-d72f-4059-922f-89579edf9e58
|
@ -1,6 +1,24 @@
|
||||
;; Test file for Emacs Lisp.
|
||||
;; Attempt to include as many aspects of Emacs Lisp as possible.
|
||||
;;
|
||||
;;; test.el --- Unit test file for Semantic Emacs Lisp support.
|
||||
|
||||
;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Require
|
||||
;;
|
||||
@ -88,7 +106,7 @@
|
||||
(autoload (quote a-autoload) "somefile"
|
||||
"Non-interactive autoload." nil nil)
|
||||
|
||||
(autoload (quote a-autoload-interactive) "somefile"
|
||||
(autoload (quote a-autoload-interactive) "somefile"
|
||||
"Interactive autoload." t nil)
|
||||
|
||||
|
||||
@ -116,7 +134,7 @@
|
||||
(slot-1 :equal 'eq)
|
||||
slot-2)
|
||||
|
||||
(defstruct test-struct-2
|
||||
(defstruct test-struct-2
|
||||
slot-1
|
||||
slot-2)
|
||||
|
||||
|
@ -1,4 +1,23 @@
|
||||
# Test makefile -*- makefile -*-
|
||||
# test.make --- Semantic unit test for Make -*- makefile -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
|
||||
|
||||
# Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
# This file is part of GNU Emacs.
|
||||
|
||||
# GNU Emacs is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# GNU Emacs is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
top=
|
||||
ede_FILES=Project.ede Makefile
|
||||
|
@ -1,580 +0,0 @@
|
||||
# Test file for Python language.
|
||||
#
|
||||
|
||||
# Simle class compount statement with blank lines sprinkled.
|
||||
class Foo(Bar):
|
||||
|
||||
x = 1
|
||||
|
||||
y = 2
|
||||
|
||||
# Simple def statement with no argument
|
||||
def sss():
|
||||
i = 1
|
||||
|
||||
# Simple def statement with arguments
|
||||
def ttt(x,y,z):
|
||||
i = 1
|
||||
|
||||
import foo
|
||||
|
||||
for x in y:
|
||||
print x
|
||||
|
||||
while y > 0:
|
||||
y = y - 1
|
||||
|
||||
a=b=c=d=e=f=i=j=k=l=m=n=o=p=q=r=s=t=x=y=1
|
||||
|
||||
if x:
|
||||
x = 2
|
||||
y = 3
|
||||
|
||||
x = 2
|
||||
y = 3
|
||||
s and t
|
||||
q | r
|
||||
o ^ p
|
||||
m & n
|
||||
k << l
|
||||
z = 4
|
||||
i >> j
|
||||
e / f
|
||||
c * d
|
||||
a + b
|
||||
2 ** 5
|
||||
x
|
||||
s = "a" "b" "c"
|
||||
1
|
||||
|
||||
# implicit continuation lines, see
|
||||
# http://docs.python.org/ref/implicit-joining.html
|
||||
|
||||
a_list = [ 1, 2, 3,
|
||||
4, 5,
|
||||
6 ]
|
||||
|
||||
a_tuple = (1, 2, 3,
|
||||
|
||||
4, 5, 6)
|
||||
|
||||
a_hash = { 'a':1, "b":2,
|
||||
'c' : 3,
|
||||
"d" : 4 }
|
||||
|
||||
|
||||
def longarglist(a,
|
||||
b,
|
||||
c,
|
||||
d):
|
||||
a=1;
|
||||
b=1;
|
||||
c=1;
|
||||
d=1;
|
||||
|
||||
class longclasslist(xx.yyy,
|
||||
zz.aa):
|
||||
foo=1
|
||||
|
||||
|
||||
# wisent-python.wy chokes on this! -ryk 6/17/02
|
||||
|
||||
class HTTPServer(xxx.yyy):
|
||||
allow_reuse_address = 1 # Seems to make sense in testing environment
|
||||
def server_bind(self):
|
||||
SocketServer.TCPServer.server_bind(self)
|
||||
host, port = self.socket.getsockname()
|
||||
self.server_name = socket.getfqdn(host)
|
||||
self.server_port = port
|
||||
|
||||
|
||||
#########################################################################
|
||||
### /usr/lib/python2.2/BaseHTTPServer.py
|
||||
#########################################################################
|
||||
|
||||
"""HTTP server base class.
|
||||
|
||||
Note: the class in this module doesn't implement any HTTP request; see
|
||||
SimpleHTTPServer for simple implementations of GET, HEAD and POST
|
||||
(including CGI scripts).
|
||||
|
||||
Contents:
|
||||
|
||||
- BaseHTTPRequestHandler: HTTP request handler base class
|
||||
- test: test function
|
||||
|
||||
XXX To do:
|
||||
|
||||
- send server version
|
||||
- log requests even later (to capture byte count)
|
||||
- log user-agent header and other interesting goodies
|
||||
- send error log to separate file
|
||||
- are request names really case sensitive?
|
||||
|
||||
"""
|
||||
|
||||
|
||||
# See also:
|
||||
#
|
||||
# HTTP Working Group T. Berners-Lee
|
||||
# INTERNET-DRAFT R. T. Fielding
|
||||
# <draft-ietf-http-v10-spec-00.txt> H. Frystyk Nielsen
|
||||
# Expires September 8, 1995 March 8, 1995
|
||||
#
|
||||
# URL: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt
|
||||
|
||||
|
||||
# Log files
|
||||
# ---------
|
||||
#
|
||||
# Here's a quote from the NCSA httpd docs about log file format.
|
||||
#
|
||||
# | The logfile format is as follows. Each line consists of:
|
||||
# |
|
||||
# | host rfc931 authuser [DD/Mon/YYYY:hh:mm:ss] "request" ddd bbbb
|
||||
# |
|
||||
# | host: Either the DNS name or the IP number of the remote client
|
||||
# | rfc931: Any information returned by identd for this person,
|
||||
# | - otherwise.
|
||||
# | authuser: If user sent a userid for authentication, the user name,
|
||||
# | - otherwise.
|
||||
# | DD: Day
|
||||
# | Mon: Month (calendar name)
|
||||
# | YYYY: Year
|
||||
# | hh: hour (24-hour format, the machine's timezone)
|
||||
# | mm: minutes
|
||||
# | ss: seconds
|
||||
# | request: The first line of the HTTP request as sent by the client.
|
||||
# | ddd: the status code returned by the server, - if not available.
|
||||
# | bbbb: the total number of bytes sent,
|
||||
# | *not including the HTTP/1.0 header*, - if not available
|
||||
# |
|
||||
# | You can determine the name of the file accessed through request.
|
||||
#
|
||||
# (Actually, the latter is only true if you know the server configuration
|
||||
# at the time the request was made!)
|
||||
|
||||
|
||||
__version__ = "0.2"
|
||||
|
||||
__all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
|
||||
|
||||
import sys
|
||||
import time
|
||||
import socket # For gethostbyaddr()
|
||||
import mimetools
|
||||
import SocketServer
|
||||
|
||||
# Default error message
|
||||
DEFAULT_ERROR_MESSAGE = """\
|
||||
<head>
|
||||
<title>Error response</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error response</h1>
|
||||
<p>Error code %(code)d.
|
||||
<p>Message: %(message)s.
|
||||
<p>Error code explanation: %(code)s = %(explain)s.
|
||||
</body>
|
||||
"""
|
||||
|
||||
|
||||
class HTTPServer(SocketServer.TCPServer):
|
||||
|
||||
allow_reuse_address = 1 # Seems to make sense in testing environment
|
||||
|
||||
def server_bind(self):
|
||||
"""Override server_bind to store the server name."""
|
||||
SocketServer.TCPServer.server_bind(self)
|
||||
host, port = self.socket.getsockname()
|
||||
self.server_name = socket.getfqdn(host)
|
||||
self.server_port = port
|
||||
|
||||
|
||||
class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
|
||||
|
||||
"""HTTP request handler base class.
|
||||
|
||||
The following explanation of HTTP serves to guide you through the
|
||||
code as well as to expose any misunderstandings I may have about
|
||||
HTTP (so you don't need to read the code to figure out I'm wrong
|
||||
:-).
|
||||
|
||||
HTTP (HyperText Transfer Protocol) is an extensible protocol on
|
||||
top of a reliable stream transport (e.g. TCP/IP). The protocol
|
||||
recognizes three parts to a request:
|
||||
|
||||
1. One line identifying the request type and path
|
||||
2. An optional set of RFC-822-style headers
|
||||
3. An optional data part
|
||||
|
||||
The headers and data are separated by a blank line.
|
||||
|
||||
The first line of the request has the form
|
||||
|
||||
<command> <path> <version>
|
||||
|
||||
where <command> is a (case-sensitive) keyword such as GET or POST,
|
||||
<path> is a string containing path information for the request,
|
||||
and <version> should be the string "HTTP/1.0". <path> is encoded
|
||||
using the URL encoding scheme (using %xx to signify the ASCII
|
||||
character with hex code xx).
|
||||
|
||||
The protocol is vague about whether lines are separated by LF
|
||||
characters or by CRLF pairs -- for compatibility with the widest
|
||||
range of clients, both should be accepted. Similarly, whitespace
|
||||
in the request line should be treated sensibly (allowing multiple
|
||||
spaces between components and allowing trailing whitespace).
|
||||
|
||||
Similarly, for output, lines ought to be separated by CRLF pairs
|
||||
but most clients grok LF characters just fine.
|
||||
|
||||
If the first line of the request has the form
|
||||
|
||||
<command> <path>
|
||||
|
||||
(i.e. <version> is left out) then this is assumed to be an HTTP
|
||||
0.9 request; this form has no optional headers and data part and
|
||||
the reply consists of just the data.
|
||||
|
||||
The reply form of the HTTP 1.0 protocol again has three parts:
|
||||
|
||||
1. One line giving the response code
|
||||
2. An optional set of RFC-822-style headers
|
||||
3. The data
|
||||
|
||||
Again, the headers and data are separated by a blank line.
|
||||
|
||||
The response code line has the form
|
||||
|
||||
<version> <responsecode> <responsestring>
|
||||
|
||||
where <version> is the protocol version (always "HTTP/1.0"),
|
||||
<responsecode> is a 3-digit response code indicating success or
|
||||
failure of the request, and <responsestring> is an optional
|
||||
human-readable string explaining what the response code means.
|
||||
|
||||
This server parses the request and the headers, and then calls a
|
||||
function specific to the request type (<command>). Specifically,
|
||||
a request SPAM will be handled by a method do_SPAM(). If no
|
||||
such method exists the server sends an error response to the
|
||||
client. If it exists, it is called with no arguments:
|
||||
|
||||
do_SPAM()
|
||||
|
||||
Note that the request name is case sensitive (i.e. SPAM and spam
|
||||
are different requests).
|
||||
|
||||
The various request details are stored in instance variables:
|
||||
|
||||
- client_address is the client IP address in the form (host,
|
||||
port);
|
||||
|
||||
- command, path and version are the broken-down request line;
|
||||
|
||||
- headers is an instance of mimetools.Message (or a derived
|
||||
class) containing the header information;
|
||||
|
||||
- rfile is a file object open for reading positioned at the
|
||||
start of the optional input data part;
|
||||
|
||||
- wfile is a file object open for writing.
|
||||
|
||||
IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING!
|
||||
|
||||
The first thing to be written must be the response line. Then
|
||||
follow 0 or more header lines, then a blank line, and then the
|
||||
actual data (if any). The meaning of the header lines depends on
|
||||
the command executed by the server; in most cases, when data is
|
||||
returned, there should be at least one header line of the form
|
||||
|
||||
Content-type: <type>/<subtype>
|
||||
|
||||
where <type> and <subtype> should be registered MIME types,
|
||||
e.g. "text/html" or "text/plain".
|
||||
|
||||
"""
|
||||
|
||||
# The Python system version, truncated to its first component.
|
||||
sys_version = "Python/" + sys.version.split()[0]
|
||||
|
||||
# The server software version. You may want to override this.
|
||||
# The format is multiple whitespace-separated strings,
|
||||
# where each string is of the form name[/version].
|
||||
server_version = "BaseHTTP/" + __version__
|
||||
|
||||
def parse_request(self):
|
||||
"""Parse a request (internal).
|
||||
|
||||
The request should be stored in self.raw_request; the results
|
||||
are in self.command, self.path, self.request_version and
|
||||
self.headers.
|
||||
|
||||
Return value is 1 for success, 0 for failure; on failure, an
|
||||
error is sent back.
|
||||
|
||||
"""
|
||||
self.request_version = version = "HTTP/0.9" # Default
|
||||
requestline = self.raw_requestline
|
||||
if requestline[-2:] == '\r\n':
|
||||
requestline = requestline[:-2]
|
||||
elif requestline[-1:] == '\n':
|
||||
requestline = requestline[:-1]
|
||||
self.requestline = requestline
|
||||
words = requestline.split()
|
||||
if len(words) == 3:
|
||||
[command, path, version] = words
|
||||
if version[:5] != 'HTTP/':
|
||||
self.send_error(400, "Bad request version (%s)" % `version`)
|
||||
return 0
|
||||
elif len(words) == 2:
|
||||
[command, path] = words
|
||||
if command != 'GET':
|
||||
self.send_error(400,
|
||||
"Bad HTTP/0.9 request type (%s)" % `command`)
|
||||
return 0
|
||||
else:
|
||||
self.send_error(400, "Bad request syntax (%s)" % `requestline`)
|
||||
return 0
|
||||
self.command, self.path, self.request_version = command, path, version
|
||||
self.headers = self.MessageClass(self.rfile, 0)
|
||||
return 1
|
||||
|
||||
def handle(self):
|
||||
"""Handle a single HTTP request.
|
||||
|
||||
You normally don't need to override this method; see the class
|
||||
__doc__ string for information on how to handle specific HTTP
|
||||
commands such as GET and POST.
|
||||
|
||||
"""
|
||||
|
||||
self.raw_requestline = self.rfile.readline()
|
||||
if not self.parse_request(): # An error code has been sent, just exit
|
||||
return
|
||||
mname = 'do_' + self.command
|
||||
if not hasattr(self, mname):
|
||||
self.send_error(501, "Unsupported method (%s)" % `self.command`)
|
||||
return
|
||||
method = getattr(self, mname)
|
||||
method()
|
||||
|
||||
def send_error(self, code, message=None):
|
||||
"""Send and log an error reply.
|
||||
|
||||
Arguments are the error code, and a detailed message.
|
||||
The detailed message defaults to the short entry matching the
|
||||
response code.
|
||||
|
||||
This sends an error response (so it must be called before any
|
||||
output has been generated), logs the error, and finally sends
|
||||
a piece of HTML explaining the error to the user.
|
||||
|
||||
"""
|
||||
|
||||
try:
|
||||
short, long = self.responses[code]
|
||||
except KeyError:
|
||||
short, long = '???', '???'
|
||||
if not message:
|
||||
message = short
|
||||
explain = long
|
||||
self.log_error("code %d, message %s", code, message)
|
||||
self.send_response(code, message)
|
||||
self.send_header("Content-Type", "text/html")
|
||||
self.end_headers()
|
||||
self.wfile.write(self.error_message_format %
|
||||
{'code': code,
|
||||
'message': message,
|
||||
'explain': explain})
|
||||
|
||||
error_message_format = DEFAULT_ERROR_MESSAGE
|
||||
|
||||
def send_response(self, code, message=None):
|
||||
"""Send the response header and log the response code.
|
||||
|
||||
Also send two standard headers with the server software
|
||||
version and the current date.
|
||||
|
||||
"""
|
||||
self.log_request(code)
|
||||
if message is None:
|
||||
if self.responses.has_key(code):
|
||||
message = self.responses[code][0]
|
||||
else:
|
||||
message = ''
|
||||
if self.request_version != 'HTTP/0.9':
|
||||
self.wfile.write("%s %s %s\r\n" %
|
||||
(self.protocol_version, str(code), message))
|
||||
self.send_header('Server', self.version_string())
|
||||
self.send_header('Date', self.date_time_string())
|
||||
|
||||
def send_header(self, keyword, value):
|
||||
"""Send a MIME header."""
|
||||
if self.request_version != 'HTTP/0.9':
|
||||
self.wfile.write("%s: %s\r\n" % (keyword, value))
|
||||
|
||||
def end_headers(self):
|
||||
"""Send the blank line ending the MIME headers."""
|
||||
if self.request_version != 'HTTP/0.9':
|
||||
self.wfile.write("\r\n")
|
||||
|
||||
def log_request(self, code='-', size='-'):
|
||||
"""Log an accepted request.
|
||||
|
||||
This is called by send_reponse().
|
||||
|
||||
"""
|
||||
|
||||
self.log_message('"%s" %s %s',
|
||||
self.requestline, str(code), str(size))
|
||||
|
||||
def log_error(self, *args):
|
||||
"""Log an error.
|
||||
|
||||
This is called when a request cannot be fulfilled. By
|
||||
default it passes the message on to log_message().
|
||||
|
||||
Arguments are the same as for log_message().
|
||||
|
||||
XXX This should go to the separate error log.
|
||||
|
||||
"""
|
||||
|
||||
apply(self.log_message, args)
|
||||
|
||||
def log_message(self, format, *args):
|
||||
"""Log an arbitrary message.
|
||||
|
||||
This is used by all other logging functions. Override
|
||||
it if you have specific logging wishes.
|
||||
|
||||
The first argument, FORMAT, is a format string for the
|
||||
message to be logged. If the format string contains
|
||||
any % escapes requiring parameters, they should be
|
||||
specified as subsequent arguments (it's just like
|
||||
printf!).
|
||||
|
||||
The client host and current date/time are prefixed to
|
||||
every message.
|
||||
|
||||
"""
|
||||
|
||||
sys.stderr.write("%s - - [%s] %s\n" %
|
||||
(self.address_string(),
|
||||
self.log_date_time_string(),
|
||||
format%args))
|
||||
|
||||
def version_string(self):
|
||||
"""Return the server software version string."""
|
||||
return self.server_version + ' ' + self.sys_version
|
||||
|
||||
def date_time_string(self):
|
||||
"""Return the current date and time formatted for a message header."""
|
||||
now = time.time()
|
||||
year, month, day, hh, mm, ss, wd, y, z = time.gmtime(now)
|
||||
s = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
|
||||
self.weekdayname[wd],
|
||||
day, self.monthname[month], year,
|
||||
hh, mm, ss)
|
||||
return s
|
||||
|
||||
def log_date_time_string(self):
|
||||
"""Return the current time formatted for logging."""
|
||||
now = time.time()
|
||||
year, month, day, hh, mm, ss, x, y, z = time.localtime(now)
|
||||
s = "%02d/%3s/%04d %02d:%02d:%02d" % (
|
||||
day, self.monthname[month], year, hh, mm, ss)
|
||||
return s
|
||||
|
||||
weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||
|
||||
monthname = [None,
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
|
||||
def address_string(self):
|
||||
"""Return the client address formatted for logging.
|
||||
|
||||
This version looks up the full hostname using gethostbyaddr(),
|
||||
and tries to find a name that contains at least one dot.
|
||||
|
||||
"""
|
||||
|
||||
host, port = self.client_address
|
||||
return socket.getfqdn(host)
|
||||
|
||||
# Essentially static class variables
|
||||
|
||||
# The version of the HTTP protocol we support.
|
||||
# Don't override unless you know what you're doing (hint: incoming
|
||||
# requests are required to have exactly this version string).
|
||||
protocol_version = "HTTP/1.0"
|
||||
|
||||
# The Message-like class used to parse headers
|
||||
MessageClass = mimetools.Message
|
||||
|
||||
# Table mapping response codes to messages; entries have the
|
||||
# form {code: (shortmessage, longmessage)}.
|
||||
# See http://www.w3.org/hypertext/WWW/Protocols/HTTP/HTRESP.html
|
||||
responses = {
|
||||
200: ('OK', 'Request fulfilled, document follows'),
|
||||
201: ('Created', 'Document created, URL follows'),
|
||||
202: ('Accepted',
|
||||
'Request accepted, processing continues off-line'),
|
||||
203: ('Partial information', 'Request fulfilled from cache'),
|
||||
204: ('No response', 'Request fulfilled, nothing follows'),
|
||||
|
||||
301: ('Moved', 'Object moved permanently -- see URI list'),
|
||||
302: ('Found', 'Object moved temporarily -- see URI list'),
|
||||
303: ('Method', 'Object moved -- see Method and URL list'),
|
||||
304: ('Not modified',
|
||||
'Document has not changed singe given time'),
|
||||
|
||||
400: ('Bad request',
|
||||
'Bad request syntax or unsupported method'),
|
||||
401: ('Unauthorized',
|
||||
'No permission -- see authorization schemes'),
|
||||
402: ('Payment required',
|
||||
'No payment -- see charging schemes'),
|
||||
403: ('Forbidden',
|
||||
'Request forbidden -- authorization will not help'),
|
||||
404: ('Not found', 'Nothing matches the given URI'),
|
||||
|
||||
500: ('Internal error', 'Server got itself in trouble'),
|
||||
501: ('Not implemented',
|
||||
'Server does not support this operation'),
|
||||
502: ('Service temporarily overloaded',
|
||||
'The server cannot process the request due to a high load'),
|
||||
503: ('Gateway timeout',
|
||||
'The gateway server did not receive a timely response'),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def test(HandlerClass = BaseHTTPRequestHandler,
|
||||
ServerClass = HTTPServer):
|
||||
"""Test the HTTP request handler class.
|
||||
|
||||
This runs an HTTP server on port 8000 (or the first command line
|
||||
argument).
|
||||
|
||||
"""
|
||||
|
||||
if sys.argv[1:]:
|
||||
port = int(sys.argv[1])
|
||||
else:
|
||||
port = 8000
|
||||
server_address = ('', port)
|
||||
|
||||
httpd = ServerClass(server_address, HandlerClass)
|
||||
|
||||
sa = httpd.socket.getsockname()
|
||||
print "Serving HTTP on", sa[0], "port", sa[1], "..."
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test()
|
||||
|
||||
# arch-tag: 567449b3-cc90-45b6-bbe3-1e113995bdae
|
@ -1,7 +1,24 @@
|
||||
//
|
||||
// CPP file for semantic-ia-utest
|
||||
// completion engine unit tests.
|
||||
//
|
||||
// testdoublens.cpp --- semantic-ia-utest completion engine unit tests
|
||||
|
||||
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "testdoublens.hpp"
|
||||
|
||||
namespace Name1 {
|
||||
@ -29,7 +46,7 @@ namespace Name1 {
|
||||
void Foo::sendStuff(int /* a */, int /* b */) // ^3^
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace Name2
|
||||
} // namespace Name1
|
||||
|
||||
@ -44,7 +61,7 @@ int test_fcn () {
|
||||
Name1::Name2::F//-4-
|
||||
// #4# ( "Foo" )
|
||||
;
|
||||
|
||||
|
||||
// @TODO - get this working...
|
||||
Name1::stage2_Foo::M//-5-
|
||||
/// #5# ( "Mumble" )
|
||||
@ -58,15 +75,15 @@ stage3_Foo foo_fcn() {
|
||||
|
||||
// Second test from Ravikiran Rajagopal
|
||||
|
||||
namespace A {
|
||||
namespace A {
|
||||
class foo {
|
||||
public:
|
||||
void aa();
|
||||
void bb();
|
||||
};
|
||||
}
|
||||
namespace A {
|
||||
class bar {
|
||||
namespace A {
|
||||
class bar {
|
||||
public:
|
||||
void xx();
|
||||
public:
|
||||
@ -96,7 +113,7 @@ namespace a {
|
||||
|
||||
int Bar::baz()
|
||||
{
|
||||
return dum// -7-
|
||||
return dum// -7-
|
||||
// #7# ( "dumdum" )
|
||||
;
|
||||
}
|
||||
|
@ -1,6 +1,24 @@
|
||||
//
|
||||
// Header file used in one of the ia-utest tests.
|
||||
//
|
||||
// testdoublens.hpp --- Header file used in one of the Semantic tests
|
||||
|
||||
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
namespace Name1 {
|
||||
namespace Name2 {
|
||||
|
||||
|
@ -1,24 +1,23 @@
|
||||
/** testjavacomp.java ---
|
||||
*
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
*
|
||||
* This file is part of GNU Emacs.
|
||||
*
|
||||
* GNU Emacs is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNU Emacs is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// testjavacomp.java --- Semantic unit test for Java
|
||||
|
||||
// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package tests.testjavacomp;
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
/* Attempt to test the C preprocessor
|
||||
*
|
||||
*/
|
||||
/* testspp.cpp --- Semantic unit test for the C preprocessor
|
||||
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
int some_fcn (){}
|
||||
|
||||
|
@ -1,5 +1,23 @@
|
||||
/* Test CPP/SPP Replacement
|
||||
*/
|
||||
/* testsppreplace.c --- unit test for CPP/SPP Replacement
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* TEST: The EMU keyword doesn't screw up the function defn. */
|
||||
#define EMU
|
||||
|
@ -1,5 +1,25 @@
|
||||
/* What the SPP replace file would looklike with MACROS replaced.
|
||||
*/
|
||||
/* testsppreplaced.c --- unit test for CPP/SPP Replacement
|
||||
Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* What the SPP replace file would looklike with MACROS replaced: */
|
||||
|
||||
/* TEST: The EMU keyword doesn't screw up the function defn. */
|
||||
char parse_around_emu ()
|
||||
|
@ -1,68 +0,0 @@
|
||||
// Combinations of templates and structure inheritance.
|
||||
//
|
||||
// Created by Alex Ott.
|
||||
|
||||
template <typename DerivedT>
|
||||
struct grammar {
|
||||
public:
|
||||
typedef grammar<DerivedT> self_t;
|
||||
typedef DerivedT const& embed_t;
|
||||
grammar() {}
|
||||
~grammar() { }
|
||||
void use_parser() const { }
|
||||
void test1() { }
|
||||
};
|
||||
|
||||
struct PDFbool_parser : public grammar<PDFbool_parser> {
|
||||
PDFbool_parser() {}
|
||||
template <typename scannerT> struct definition {
|
||||
typedef typename scannerT::iterator_t iterator_t;
|
||||
int top;
|
||||
definition(const PDFbool_parser& /*self*/) {
|
||||
return ;
|
||||
}
|
||||
const int start() const {
|
||||
return top;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
int main(void) {
|
||||
PDFbool_parser PDFbool_p = PDFbool_parser();
|
||||
PDFbool_p.//-1-
|
||||
;
|
||||
// #1# ("definition" "embed_t" "self_t" "test1" "use_parser")
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
template <class Derived> struct Base {
|
||||
public:
|
||||
void interface()
|
||||
{
|
||||
// ...
|
||||
static_cast<Derived*>(this)->implementation();
|
||||
// ...
|
||||
}
|
||||
|
||||
static void static_func()
|
||||
{
|
||||
// ...
|
||||
Derived::static_sub_func();
|
||||
// ...
|
||||
}
|
||||
};
|
||||
|
||||
struct Derived : Base<Derived> {
|
||||
void implementation() { }
|
||||
static void static_sub_func() { }
|
||||
};
|
||||
|
||||
int foo () {
|
||||
Derived d;
|
||||
d.//-2-
|
||||
;
|
||||
// #2# ("implementation" "interface" "static_func" "static_sub_func")
|
||||
}
|
||||
|
||||
// arch-tag: d6e39f96-525e-44af-8cd1-d03e1829acd3
|
@ -1,5 +1,23 @@
|
||||
/* Special test file for Semantic Analyzer and complex C++ inheritance.
|
||||
*/
|
||||
// testsubclass.cpp --- unit test for analyzer and complex C++ inheritance
|
||||
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//#include <iostream>
|
||||
#include "testsubclass.hh"
|
||||
@ -94,7 +112,7 @@ moose deer::alces::createMoose()
|
||||
MooseVariableName = createMoose();
|
||||
|
||||
doLatinStuff(MooseVariableName);
|
||||
|
||||
|
||||
tmp = this.f// -1-
|
||||
// #1# ( "fAlcesBool" "fIsValid" "fLatin" )
|
||||
;
|
||||
@ -125,7 +143,7 @@ moose deer::alces::createMoose()
|
||||
int someFunction(int mPickle)
|
||||
{
|
||||
moose mMoose = deer::alces::createMoose();
|
||||
|
||||
|
||||
if (mPickle == 1) {
|
||||
|
||||
int mOption1 = 2;
|
||||
@ -152,7 +170,7 @@ namespace pub_priv {
|
||||
class A{
|
||||
private:
|
||||
void private_a(){}
|
||||
public:
|
||||
public:
|
||||
void public_a();
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,23 @@
|
||||
/* Special test file for Semantic Analyzer and complex C++ inheritance.
|
||||
*
|
||||
* Header file for testsubclass.cpp with class defns but no
|
||||
* implementations.
|
||||
*/
|
||||
// testsubclass.hh --- unit test for analyzer and complex C++ inheritance
|
||||
|
||||
// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//#include <cmath>
|
||||
// #include <stdio.h>
|
||||
|
@ -1,92 +0,0 @@
|
||||
// Templates Test file:
|
||||
// Written by 'Raf'
|
||||
|
||||
template <class T, int U, class V>
|
||||
class read_ref {
|
||||
public:
|
||||
const T* read_ref_member_one( T);
|
||||
const V* read_ref_member_two();
|
||||
};
|
||||
|
||||
namespace NS {
|
||||
template <class T, int U, class V>
|
||||
class ref {
|
||||
public:
|
||||
read_ref<T,10,V> operator->() {
|
||||
m_// -1-
|
||||
;
|
||||
// #1# ( "m_datas" )
|
||||
}
|
||||
|
||||
private:
|
||||
T m_datas[U];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
class FooOne {
|
||||
public:
|
||||
int fooOneMember();
|
||||
};
|
||||
|
||||
class FooTwo {
|
||||
public:
|
||||
int fooTwoMember();
|
||||
};
|
||||
|
||||
class FooThree {
|
||||
public:
|
||||
int fooThreeMember();
|
||||
|
||||
FooOne * operator->();
|
||||
};
|
||||
|
||||
typedef ref<FooOne, 10,FooTwo> Test;
|
||||
|
||||
using NS;
|
||||
|
||||
void
|
||||
main(void) {
|
||||
ref<FooOne, 10, FooTwo> v;
|
||||
|
||||
v->read_ref_member_one()-> // -2-
|
||||
;
|
||||
// #2# ( "fooOneMember" )
|
||||
|
||||
v->read_ref_member_two()-> // -3-
|
||||
;
|
||||
// #3# ( "fooTwoMember" )
|
||||
|
||||
v-> // -4-
|
||||
;
|
||||
// #4# ( "read_ref_member_one" "read_ref_member_two" )
|
||||
|
||||
Test t;
|
||||
|
||||
t->read_ref_member_two()-> // -5-
|
||||
;
|
||||
// #5# ( "fooTwoMember" )
|
||||
|
||||
ref<FooOne, 10, FooThree> v2;
|
||||
|
||||
v2->read_ref_member_two()-> // -6-
|
||||
;
|
||||
// #6# ( "fooOneMember" )
|
||||
|
||||
/* Try all these things by also specifying the namespace in the name. */
|
||||
NS::ref<FooOne, 10, FooTwo> v3;
|
||||
|
||||
v3->read_ref_member_one()-> // -7-
|
||||
;
|
||||
// #7# ( "fooOneMember" )
|
||||
|
||||
v3->read_ref_member_two()-> // -8-
|
||||
;
|
||||
// #8# ( "fooTwoMember" )
|
||||
|
||||
v3->read_ref_member_two// @1@ 5
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
// arch-tag: 03cbb8c3-3d01-42ab-b416-42a08ea7b896
|
@ -1,16 +1,31 @@
|
||||
// Sample with some fake bits out of std::string
|
||||
//
|
||||
// testtypedefs.cpp --- Sample with some fake bits out of std::string
|
||||
|
||||
// Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
// Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
// This file is part of GNU Emacs.
|
||||
|
||||
// GNU Emacs is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// GNU Emacs is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Thanks Ming-Wei Chang for these examples.
|
||||
|
||||
namespace std {
|
||||
|
||||
template <T>class basic_string {
|
||||
|
||||
public:
|
||||
void resize(int);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
typedef std::basic_string<char> mstring;
|
||||
@ -18,41 +33,34 @@ typedef std::basic_string<char> mstring;
|
||||
using namespace std;
|
||||
typedef basic_string<char> bstring;
|
||||
|
||||
|
||||
int main(){
|
||||
mstring a;
|
||||
|
||||
a.// -1-
|
||||
;
|
||||
// #1# ( "resize" )
|
||||
|
||||
bstring b;
|
||||
// It doesn't work here.
|
||||
b.// -2-
|
||||
;
|
||||
// #2# ( "resize" )
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ------------------
|
||||
|
||||
class Bar
|
||||
class Bar
|
||||
{
|
||||
public:
|
||||
void someFunc() {}
|
||||
|
||||
};
|
||||
|
||||
typedef Bar new_Bar;
|
||||
|
||||
template <class mytype>
|
||||
class TBar
|
||||
class TBar
|
||||
{
|
||||
public:
|
||||
void otherFunc() {}
|
||||
|
||||
};
|
||||
|
||||
typedef TBar<char> new_TBar;
|
||||
@ -65,11 +73,9 @@ int main()
|
||||
nb.// -3-
|
||||
;
|
||||
// #3# ("someFunc")
|
||||
|
||||
ntb.// -4-
|
||||
;
|
||||
// #4# ("otherFunc")
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,134 +0,0 @@
|
||||
// Test using statements in C++
|
||||
|
||||
#include <adstdio.h>
|
||||
|
||||
#include <testusing.hh>
|
||||
|
||||
namespace moose {
|
||||
|
||||
class MyClass;
|
||||
class Point;
|
||||
|
||||
typedef MyClass snerk;
|
||||
}
|
||||
|
||||
namespace moose {
|
||||
|
||||
class Point;
|
||||
class MyClass;
|
||||
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
int global_variable = 0;
|
||||
|
||||
};
|
||||
|
||||
using moose::MyClass;
|
||||
|
||||
void someFcn() {
|
||||
|
||||
MyClass f;
|
||||
|
||||
f.//-1-
|
||||
; //#1# ( "getVal" "setVal" )
|
||||
|
||||
}
|
||||
|
||||
// Code from Zhiqiu Kong
|
||||
|
||||
namespace panda {
|
||||
|
||||
using namespace bread_name;
|
||||
|
||||
int func()
|
||||
{
|
||||
bread test;
|
||||
test.//-2-
|
||||
;// #2# ( "geta" )
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Local using statements and aliased types
|
||||
// Code from David Engster
|
||||
|
||||
void func2()
|
||||
{
|
||||
using namespace somestuff;
|
||||
OneClass f;
|
||||
f.//-3-
|
||||
; //#3# ( "aFunc" "anInt" )
|
||||
}
|
||||
|
||||
void func3()
|
||||
{
|
||||
using somestuff::OneClass;
|
||||
OneClass f;
|
||||
f.//-4-
|
||||
; //#4# ( "aFunc" "anInt" )
|
||||
}
|
||||
|
||||
// Dereferencing alias types created through 'using' statements
|
||||
|
||||
// Alias with fully qualified name
|
||||
void func4()
|
||||
{
|
||||
otherstuff::OneClass f;
|
||||
f. //-5-
|
||||
; //#5# ( "aFunc" "anInt" )
|
||||
}
|
||||
|
||||
// Alias through namespace directive
|
||||
void func5()
|
||||
{
|
||||
using namespace otherstuff;
|
||||
OneClass f;
|
||||
f. //-6-
|
||||
; //#6# ( "aFunc" "anInt" )
|
||||
}
|
||||
|
||||
// Check name hiding
|
||||
void func6()
|
||||
{
|
||||
using namespace morestuff;
|
||||
OneClass f; // Alias for somestuff::OneClass
|
||||
f. //-7-
|
||||
; //#7# ( "aFunc" "anInt" )
|
||||
aStruct g; // This however is morestuff::aStruct !
|
||||
g. //-8-
|
||||
; //#8# ( "anotherBar" "anotherFoo" )
|
||||
}
|
||||
|
||||
// Alias of an alias
|
||||
// Currently doesn't work interactively for some reason.
|
||||
void func6()
|
||||
{
|
||||
using namespace evenmorestuff;
|
||||
OneClass f;
|
||||
f. //-7-
|
||||
; //#7# ( "aFunc" "anInt" )
|
||||
}
|
||||
|
||||
// Alias for struct in nested namespace, fully qualified
|
||||
void func7()
|
||||
{
|
||||
outer::StructNested f;
|
||||
f.//-8-
|
||||
; //#8# ( "one" "two" )
|
||||
}
|
||||
|
||||
// Alias for nested namespace
|
||||
void func8()
|
||||
{
|
||||
using namespace outerinner;
|
||||
StructNested f;
|
||||
AnotherStruct g;
|
||||
f.//-9-
|
||||
; //#9# ( "one" "two" )
|
||||
g.//-10-
|
||||
; //#10# ( "four" "three" )
|
||||
}
|
||||
|
||||
// arch-tag: 8e68d5d1-4d48-47c6-a910-d8d6b66b2768
|
@ -1,127 +0,0 @@
|
||||
// test usings header file.
|
||||
|
||||
namespace moose {
|
||||
|
||||
class Point;
|
||||
|
||||
class MyClass;
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace moose {
|
||||
|
||||
class Point;
|
||||
|
||||
class MyClass {
|
||||
public:
|
||||
MyClass() : fVal(0) {
|
||||
}
|
||||
|
||||
~MyClass() {};
|
||||
|
||||
/**
|
||||
* fVal Accessors
|
||||
* @{
|
||||
*/
|
||||
int getVal() const {
|
||||
return fVal;
|
||||
}
|
||||
void setVal(int Val) const {
|
||||
fVal = Val;
|
||||
}
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
private:
|
||||
int fVal;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace deer {
|
||||
|
||||
class Pickle;
|
||||
|
||||
};
|
||||
|
||||
// Code from Zhiqiu Kong
|
||||
|
||||
#ifndef BREAD_H
|
||||
#define BREAD_H
|
||||
|
||||
namespace bread_name {
|
||||
class bread
|
||||
{
|
||||
public:
|
||||
void geta();
|
||||
private:
|
||||
int m_a;
|
||||
int m_b;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Code from David Engster
|
||||
// Creating alias types through 'using' trickery
|
||||
|
||||
namespace somestuff {
|
||||
class OneClass {
|
||||
public:
|
||||
void aFunc();
|
||||
int anInt;
|
||||
};
|
||||
struct aStruct {
|
||||
int foo;
|
||||
int bar;
|
||||
};
|
||||
}
|
||||
|
||||
namespace otherstuff {
|
||||
// make otherstuff::OneClass an alias for somestuff::OneClass
|
||||
using somestuff::OneClass;
|
||||
}
|
||||
|
||||
namespace morestuff {
|
||||
// make morestuff an alias namespace for somestuff
|
||||
using namespace somestuff;
|
||||
// but hide aStruct with own type
|
||||
struct aStruct {
|
||||
int anotherFoo;
|
||||
int anotherBar;
|
||||
};
|
||||
}
|
||||
|
||||
// We can also create an alias for an alias
|
||||
namespace evenmorestuff {
|
||||
using otherstuff::OneClass;
|
||||
}
|
||||
|
||||
// Now with nested namespaces
|
||||
namespace outer {
|
||||
namespace inner {
|
||||
struct StructNested {
|
||||
int one;
|
||||
int two;
|
||||
};
|
||||
struct AnotherStruct {
|
||||
int three;
|
||||
int four;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Elevate the first struct into 'outer'
|
||||
// so that we can access it via 'outer::StructNested'
|
||||
namespace outer {
|
||||
using outer::inner::StructNested;
|
||||
}
|
||||
|
||||
// Create an alias for a nested namespace
|
||||
namespace outerinner {
|
||||
// equivalent to 'namespace outerinner = outer::inner;'
|
||||
using namespace outer::inner;
|
||||
}
|
||||
|
||||
// arch-tag: f7e59fad-100b-47d3-ae8b-a8390a026ade
|
@ -1,6 +1,25 @@
|
||||
/*
|
||||
* Test variable and function names, lists of variables on one line, etc.
|
||||
*/
|
||||
/* testvarnames.cpp
|
||||
Test variable and function names, lists of variables on one line, etc.
|
||||
|
||||
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
||||
Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
GNU Emacs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
GNU Emacs is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
struct independent {
|
||||
int indep_1;
|
||||
|
Loading…
Reference in New Issue
Block a user