Merged from miles@gnu.org--gnu-2005 (patch 45-55, 214-231)

Patches applied:

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-214
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-215
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-216
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-217
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-218
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-219
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-220
   Merge from gnus--rel--5.10

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-221
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-222
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-223
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-224
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-225
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-226
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-227
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-228
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-229
   Update from CVS

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-230
   Merge from gnus--rel--5.10

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-231
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-45
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-46
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-47
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-48
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-49
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-50
   Update from CVS: texi Makefile.in CVS keyw cruft

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-51
   Update from CVS: ChangeLog tweaks

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-52
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-53
   Merge from emacs--cvs-trunk--0

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-54
   Update from CVS

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-55
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-324
This commit is contained in:
Karoly Lorentey 2005-04-04 16:43:15 +00:00
commit ee00ea6e18
173 changed files with 9452 additions and 3944 deletions

View file

@ -1,3 +1,16 @@
2005-03-30 Marcelo Toledo <marcelo@marcelotoledo.org>
* FOR-RELEASE (Documentation): Added check the Emacs Tutorial. The
first line of every tutorial must begin with a sentence saying
"Emacs Tutorial" in the respective language. This should be
followed by "See end for copying conditions", likewise in the
respective language.
2005-03-29 Luc Teirlinck <teirllm@auburn.edu>
* FOR-RELEASE (TO BE DONE SHORTLY BEFORE RELEASE): New section.
Add `undo-ask-before-discard' to it.
2005-03-02 Miles Bader <miles@gnu.org>
* quick-install-emacs: Only use the mkdir --verbose option if the

View file

@ -1,5 +1,10 @@
Tasks needed before the next release.
* TO BE DONE SHORTLY BEFORE RELEASE
** `undo-ask-before-discard', currently set to t for debugging purposes
has to be set to nil: when t, it can leak memory and cause other problems.
* NEW FEATURES
** Face remapping.
@ -18,6 +23,8 @@ See msg from rms to emacs-devel on 21 Dec.
* FATAL ERRORS
** Make unexec handle memory mapping policy of the latest versions of Linux.
** Investigate reported crashes in compact_small_strings.
** Investigate reported crashes related to using an
@ -145,7 +152,7 @@ man/basic.texi "Luc Teirlinck" Chong Yidong
man/buffers.texi "Luc Teirlinck" Chong Yidong
man/building.texi "Ted Zlatanov" <tzz@lifelogs.com>
man/calendar.texi joakim@verona.se Chong Yidong
man/cmdargs.texi Chong Yidong
man/cmdargs.texi Chong Yidong "Luc Teirlinck"
man/commands.texi "Luc Teirlinck" Chong Yidong
man/custom.texi Chong Yidong
man/dired.texi Chong Yidong joakim@verona.se
@ -211,7 +218,7 @@ lispref/frames.texi "Luc Teirlinck" Chong Yidong
lispref/functions.texi "Luc Teirlinck" Chong Yidong
lispref/hash.texi "Luc Teirlinck" Chong Yidong
lispref/help.texi "Luc Teirlinck" Chong Yidong
lispref/hooks.texi
lispref/hooks.texi Lute Kamstra
lispref/internals.texi "Luc Teirlinck" Chong Yidong
lispref/intro.texi "Luc Teirlinck"
lispref/keymaps.texi "Luc Teirlinck" Chong Yidong
@ -240,6 +247,42 @@ lispref/tips.texi "Luc Teirlinck" Chong Yidong
lispref/variables.texi "Luc Teirlinck" Chong Yidong
lispref/windows.texi "Luc Teirlinck" Chong Yidong
** Check the Emacs Tutorial.
The first line of every tutorial must begin with a sentence saying
"Emacs Tutorial" in the respective language. This should be followed
by "See end for copying conditions", likewise in the respective
language.
After each file name, on the same line or the following line, come the
names of the people who have checked it.
SECTION READERS
----------------------------------
etc/TUTORIAL rms
etc/TUTORIAL.bg Ognyan Kulev <ogi@fmi.uni-sofia.bg>
etc/TUTORIAL.cn
etc/TUTORIAL.cs
etc/TUTORIAL.de
etc/TUTORIAL.es Marcelo Toledo
etc/TUTORIAL.fr
etc/TUTORIAL.it
etc/TUTORIAL.ja
etc/TUTORIAL.ko
etc/TUTORIAL.nl Lute Kamstra
etc/TUTORIAL.pl
etc/TUTORIAL.pt_BR Marcelo Toledo
etc/TUTORIAL.ro
etc/TUTORIAL.ru
etc/TUTORIAL.sk
etc/TUTORIAL.sl
etc/TUTORIAL.sv Mats Lidell <matsl@contactor.se>
etc/TUTORIAL.th
etc/TUTORIAL.zh
Local variables:
mode: outline

View file

@ -1,3 +1,48 @@
2005-04-04 Thien-Thi Nguyen <ttn@gnu.org>
* TUTORIAL.ja: Update text before first period.
Reported by Kenichi Handa.
2005-04-02 Richard M. Stallman <rms@gnu.org>
* TUTORIAL.ja, TUTORIAL.cn, TUTORIAL.ru, TUTORIAL.zh: Remove the
old intro line that apparently was a longer version of "Emacs
tutorial".
* TUTORIAL.es: Clean up line breaks.
2005-04-01 Marcelo Toledo <marcelo@marcelotoledo.org>
* TUTORIAL.pt_BR, TUTORIAL.cn, TUTORIAL.cs, TUTORIAL.de,
* TUTORIAL.es, TUTORIAL.fr, TUTORIAL.it, TUTORIAL.ja, TUTORIAL.ko,
* TUTORIAL.pl, TUTORIAL.pt_BR, TUTORIAL.ro, TUTORIAL.ru,
* TUTORIAL.sk, TUTORIAL.sl, TUTORIAL.th, TUTORIAL.zh: Fix title
line.
* TUTORIAL.bg: Fix title line; Applied TUTORIAL changes in
2005-02-08T14:20:54Z!lute@gnu.org, "Emacs" is not transliterated to cyrillic anymore;
Minor fixes; by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
* TUTORIAL.sv: Sync some other changes with the TUTORIAL version
2005-04-01T00:31:25Z!rms@gnu.org by Mats Lidell <matsl@contactor.se>.
2005-04-01 Lute Kamstra <lute@gnu.org>
* TUTORIAL.nl: Fix title line.
2005-03-30 Thien-Thi Nguyen <ttn@gnu.org>
* TUTORIAL: Add title line.
* TUTORIAL.bg, TUTORIAL.cn, TUTORIAL.cs, TUTORIAL.de,
* TUTORIAL.es, TUTORIAL.fr, TUTORIAL.it, TUTORIAL.ja,
* TUTORIAL.ko, TUTORIAL.nl, TUTORIAL.pl, TUTORIAL.pt_BR,
* TUTORIAL.ro, TUTORIAL.ru, TUTORIAL.sk, TUTORIAL.sl
* TUTORIAL.sv, TUTORIAL.th, TUTORIAL.zh: Likewise.
2005-03-29 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-refcard.tex, gnus-logo.eps: New files.
2005-03-23 David Ponce <david@dponce.com>
* NEWS: Mention recentf-keep.

View file

@ -107,6 +107,20 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
* Changes in Emacs 22.1
** Improved Thai support. A new minor mode `thai-word-mode' (which is
automatically activated if you select Thai as a language
environment) changes key bindings of most word-oriented commands to
versions which recognize Thai words. Affected commands are
M-f (forward-word)
M-b (backward-word)
M-d (kill-word)
M-DEL (backward-kill-word)
M-t (transpose-words)
M-q (fill-paragraph)
** iso-acc.el is now obsolete. Use one of the latin input methods instead.
---
** Languange environment and various default coding systems are setup
more correctly according to the current locale name. If the locale
name doesn't specify a charset, the default is what glibc defines.
@ -254,7 +268,10 @@ in the region, rather than on all complete lines in the region.
for matching the beginning and end of a symbol. A symbol is a
non-empty sequence of either word or symbol constituent characters, as
specified by the syntax table.
---
*** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
+++
** Passing resources on the command line now works on MS Windows.
You can use --xrm to pass resource settings to Emacs, overriding any
existing values. For example:
@ -837,6 +854,7 @@ possible matches.
the current Info node name into the kill ring. With a zero prefix
arg, puts the node name inside the `info' function call.
---
*** New face `info-xref-visited' distinguishes visited nodes from unvisited
and a new option `Info-fontify-visited-nodes' to control this.
@ -848,6 +866,7 @@ references and following them calls `browse-url'.
If you prefer the old behavior, you can set the new user option
`Info-hide-note-references' to nil.
---
*** Images in Info pages are supported.
Info pages show embedded images, in Emacs frames with image support.
Info documentation that includes images, processed with makeinfo
@ -934,6 +953,7 @@ horizontal scroll bars in a frame or window.
+++
** Under X, mouse-wheel-mode is turned on by default.
+++
** The X resource useXIM can be used to turn off use of XIM, which may
speed up Emacs with slow networking to the X server.
@ -999,6 +1019,7 @@ You can now put the init files .emacs and .emacs_SHELL under
instead. The updated skeleton-insert docstring explains these new
features along with other details of skeleton construction.
---
** MH-E changes.
Upgraded to MH-E version 7.82. There have been major changes since
@ -1232,6 +1253,7 @@ when Emacs visits them.
default, all trivial operations involving whole lines are performed
automatically. The game uses faces for better visual feedback.
---
** The new variable `x-select-request-type' controls how Emacs
requests X selection. The default value is nil, which means that
Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING,
@ -2237,17 +2259,23 @@ from the file name or buffer contents.
---
** Perl mode has a new variable `perl-indent-continued-arguments'.
---
** Fortran mode does more font-locking by default. Use level 3
highlighting for the old default.
+++
** Fortran mode has a new variable `fortran-directive-re'.
Adapt this to match the format of any compiler directives you use.
Lines that match are never indented, and are given distinctive font-locking.
+++
** F90 mode has new navigation commands `f90-end-of-block',
`f90-beginning-of-block', `f90-next-block', `f90-previous-block'.
** F90 mode and Fortran mode have new navigation commands
`f90-end-of-block', `f90-beginning-of-block', `f90-next-block',
`f90-previous-block', `fortran-end-of-block',
`fortran-beginning-of-block'.
---
** F90 mode now has support for hs-minor-mode (hideshow).
** F90 mode and Fortran mode have support for hs-minor-mode (hideshow).
It cannot deal with every code format, but ought to handle a sizeable
majority.
@ -2407,12 +2435,24 @@ used to effect hiding for hideshow minor mode. Integration with isearch
handles the overlay property `display' specially, preserving it during
temporary overlay showing in the course of an isearch operation.
+++
** New command `recode-region' decodes the region again by a specified
coding system.
* New modes and packages in Emacs 22.1
+++
** The new package longlines.el provides a minor mode for editing text
files composed of long lines, based on the `use-hard-newlines'
mechanism. The long lines are broken up by inserting soft newlines,
which are automatically removed when saving the file to disk or
copying into the kill ring, clipboard, etc. By default, Longlines
mode inserts soft newlines automatically during editing, a behavior
referred to as "soft word wrap" in other text editors. This is
similar to Refill mode, but more reliable. To turn the word wrap
feature off, set `longlines-auto-wrap' to nil.
+++
** The new package conf-mode.el handles thousands of configuration files, with
varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
@ -2421,10 +2461,12 @@ section { }). Many files under /etc/, or with suffixes like .cf through
.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
recognized.
+++
** The new package dns-mode.el add syntax highlight of DNS master files.
The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used
to increment the SOA serial.
+++
** The new package flymake.el does on-the-fly syntax checking of program
source files. See the Flymake's Info manual for more details.
@ -2432,9 +2474,11 @@ source files. See the Flymake's Info manual for more details.
of hierarchical data as an outline. For example, the tree-widget is
well suited to display a hierarchy of directories and files.
+++
** The wdired.el package allows you to use normal editing commands on Dired
buffers to change filenames, permissions, etc...
+++
** The thumbs.el package allows you to preview image files as thumbnails
and can be invoked from a Dired buffer.
@ -2447,6 +2491,7 @@ and can be invoked from a Dired buffer.
** The new global minor mode `size-indication-mode' (off by default)
shows the size of accessible part of the buffer on the mode line.
---
** GDB-Script-mode is used for files like .gdbinit.
---
@ -2502,6 +2547,7 @@ versions of cua.el and cua-mode.el. To ensure proper operation, you
must remove older versions of cua.el or cua-mode.el as well as the
loading and customization of those packages from the .emacs file.
+++
** The new keypad setup package provides several common bindings for
the numeric keypad which is available on most keyboards. The numeric
keypad typically has the digits 0 to 9, a decimal point, keys marked
@ -2629,6 +2675,7 @@ There is also Global Reveal mode which affects all buffers.
** The new package ibuffer provides a powerful, completely
customizable replacement for buff-menu.el.
+++
** The new package table.el implements editable, WYSIWYG, embedded
`text tables' in Emacs buffers. It simulates the effect of putting
these tables in a special major mode. The package emulates WYSIWYG
@ -2651,17 +2698,20 @@ mode-lines in inverse-video.
---
** cplus-md.el has been removed to avoid problems with Custom.
+++
** New package benchmark.el contains simple support for convenient
timing measurements of code (including the garbage collection component).
---
** The new Lisp library fringe.el controls the appearance of fringes.
---
** `cfengine-mode' is a major mode for editing GNU Cfengine
configuration files.
* Incompatible Lisp Changes in Emacs 22.1
+++
** The new interactive-specification `G' reads a file name
much like `F', but if the input is a directory name (even defaulted),
it returns just the directory name.
@ -2679,6 +2729,21 @@ the command `undefined'. (In earlier Emacs versions, it used
* Lisp Changes in Emacs 22.1
---
** easy-mmode-define-global-mode has been renamed to
define-global-minor-mode. The old name remains as an alias.
+++
** The new function `filter-buffer-substring' extracts a buffer
substring, passes it through a set of filter functions, and returns
the filtered substring. It is used instead of `buffer-substring' or
`delete-and-extract-region' when copying text into a user-accessible
data structure, like the kill-ring, X clipboard, or a register. The
list of filter function is specified by the new variable
`buffer-substring-filters'. For example, Longlines mode uses
`buffer-substring-filters' to remove soft newlines from the copied
text.
+++
** An element of buffer-undo-list can now have the form (apply FUNNAME
. ARGS), where FUNNAME is a symbol other than t or nil. That stands
@ -3201,6 +3266,7 @@ contents are detected automatically. However, certain implicit
changes to mode lines, header lines, or display properties may require
forcing an explicit window update.
---
** New function `redirect-debugging-output' can be used to redirect
debugging output on the stderr file handle to a file.
@ -4401,6 +4467,7 @@ formerly used for that purpose is now an alias for locale-coding-system.
display a prompt but don't use the minibuffer, now display the prompt
using the text properties (esp. the face) of the prompt string.
---
** New function x-send-client-message sends a client message when
running under X.
@ -4410,6 +4477,7 @@ all overlays in the buffer by just calling (remove-overlay).
** New packages:
+++
*** The new package gdb-ui.el provides an enhanced graphical interface to
GDB. You can interact with GDB through the GUD buffer in the usual way, but
there are also further buffers which control the execution and describe the
@ -4426,6 +4494,7 @@ current syntactic context (as returned by parse-partial-sexp).
binary data structures, such as network packets, to and from Lisp
data structures.
---
*** The TCL package tcl-mode.el was replaced by tcl.el.
This was actually done in Emacs-21.1, and was not documented.

View file

@ -1,4 +1,4 @@
You are looking at the Emacs tutorial. See end for copying conditions.
Emacs tutorial. See end for copying conditions.
Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation.
Emacs commands generally involve the CONTROL key (sometimes labeled

View file

@ -1,7 +1,7 @@
Вие гледате въведението на Емакс. Условията за копиране са в края на текста.
Copyright (c) 1985, 1996, 1998, 2001, 2002, 2003 Free Software Foundation.
Въведение в Emacs. Условията за копиране са в края на текста.
Copyright (c) 1985,1996,1998,2001,2002,2003,2005 Free Software Foundation.
Командите на Емакс най-често включват клавишите CONTROL (понякога
Командите на Emacs най-често включват клавишите CONTROL (понякога
отбелязван с CTRL или CTL) и META (понякога отбелязван с EDIT или
ALT). Вместо да се изписват с пълно име всеки път, ние ще използваме
следните съкращения:
@ -15,7 +15,7 @@ ALT).
клавиша ESC и след това въведете <знак>. Ние
записваме <ESC>, за да отбележим клавиша ESC.
Важна бележка: в края на Емакс сесията въведете двата знака C-x C-c.
Важна бележка: в края на Emacs сесията въведете двата знака C-x C-c.
Знаците ">>" отляво ви дават указание да изпълните команда. Например:
<<Blank lines inserted here by startup of help-with-tutorial>>
>> Сега въведете C-v (Покажи следващия екран), за да се придвижите към
@ -93,7 +93,7 @@ Next (
Всеки ред от текст завършва със знак за нов ред, който служи за
отделянето на реда от следващия ред. Последният ред във вашия файл
трябва да има знак за нов ред в края (но Емакс не изисква такъв,
трябва да има знак за нов ред в края (но Emacs не изисква такъв,
когато прочита файла).
>> Опитайте C-b в началото на ред. Това трябва да ви придвижи в края
@ -109,7 +109,7 @@ C-f
Когато се придвижвате след горния или долния край на екрана, текстът
отвъд края се измества към екрана. Това се нарича "скролиране". То
позволява на Емакс да придвижва курсора към зададеното място в текста,
позволява на Emacs да придвижва курсора към зададеното място в текста,
без да го изкарва извън екрана.
>> Опитайте се да придвижите курсора след долния край на екрана с C-n
@ -192,7 +192,7 @@ Shift
Вие можете също да се придвижвате с клавишите-стрелки, ако вашият
терминал има такива. Ние препоръчваме да научите C-b, C-f, C-n и C-p
по три причини. Първо, те работят на всички видове терминали. Второ,
веднъж след като добиете практика в използването на Емакс, ще
веднъж след като добиете практика в използването на Emacs, ще
откриете, че въвеждането на тези Control-знаци е по-бързо от
въвеждането на клавишите стрелки, защото не трябва да премествате
ръката си далеч от областта на клавишите с букви. Трето, веднъж след
@ -200,7 +200,7 @@ Shift
можете също така лесно да научите по-напредналите команди за движение
на курсора.
Повечето Емакс команди приемат числов аргумент; за повечето от тях той
Повечето Emacs команди приемат числов аргумент; за повечето от тях той
служи като брояч на повторения. Начинът, по който давате числов
брояч, е с въвеждане на C-u, последвано от въвеждане на цифрите, и
всичко това преди въвеждане на самата команда. Ако имате клавиш META
@ -232,7 +232,7 @@ C-v
Ако използвате графичен интерфейс, като X11 или MS-Windows, би
трябвало да има тънка правоъгълна област, наречена плъзгач (scroll
bar), в лявата страна на прозореца на Емакс. Вие можете да скролирате
bar), в лявата страна на прозореца на Emacs. Вие можете да скролирате
текста, щракайки с мишката в плъзгача.
>> Опитайте да натиснете средния бутон на върха на осветената област
@ -244,10 +244,10 @@ bar),
нагоре и надолу, като движите мишката.
* КОГАТО ЕМАКС Е БЛОКИРАЛ
* КОГАТО EMACS Е БЛОКИРАЛ
-------------------------
Ако Емакс спре да отговаря на вашите команди, вие можете да го спрете
Ако Emacs спре да отговаря на вашите команди, вие можете да го спрете
безопасно, като въведете C-g. Може да използвате C-g, за да спрете
команда, която се изпълнява твърде дълго.
@ -264,15 +264,15 @@ bar),
* ЗАБРАНЕНИ КОМАНДИ
-------------------
Някои команди на Емакс са "забранени", така че начинаещите потребители
Някои команди на Emacs са "забранени", така че начинаещите потребители
да не могат да ги употребят по погрешка.
Ако въведете някоя от забранените команди, Емакс извежда съобщение,
Ако въведете някоя от забранените команди, Emacs извежда съобщение,
казвайки каква е била командата и питайки ви дали искате да продължите
напред и да изпълните командата.
Ако наистина искате да изпробвате командата, въведете клавиша интервал
в отговор на въпроса. Обикновено ако не искате да изпълните
Ако наистина искате да изпробвате командата, въведете <SPC> (клавиша
интервал) в отговор на въпроса. Обикновено ако не искате да изпълните
забранената команда, отговаряте на въпроса с "n".
>> Въведете C-x C-l (която е забранена команда), и след това въведете
@ -282,7 +282,7 @@ bar),
* ПРОЗОРЦИ
----------
Емакс може да управлява няколко прозореца, всеки извеждайки свой
Emacs може да управлява няколко прозореца, всеки извеждайки свой
собствен текст. Ние ще обясним по-късно как да използвате няколко
прозореца. Точно сега ние искаме да обясним как да се отървете от
допълнителни прозорци и да се върнете към основното редактиране с един
@ -312,13 +312,13 @@ bar),
----------------------
Ако искате да вмъкнете текст, просто го въведете. Знаците, които
могат да се виждат, като А, 7, * и т.н., се възприемат от Емакс като
могат да се виждат, като А, 7, * и т.н., се възприемат от Emacs като
текст и се вмъкват веднага. Въведете <Return> (клавишът за връщане в
началото на реда), за да вмъкнете знак за нов ред.
Може да изтриете последния знак, който сте въвели, с въвеждане на
<Delback>. <Delback> е клавиш от клавиатурата -- същият, който
обикновено използвате извън Емакс, за да изтриете последния въведен от
обикновено използвате извън Emacs, за да изтриете последния въведен от
вас знак. Обикновено е голям клавиш, на няколко реда разстояние от
клавиша <Return>, и обикновено е отбелязан с "Delete", "Del" или
"Backspace".
@ -358,24 +358,24 @@ bar),
>> Въведете <Return>, за да вмъкнете наново знака за нов ред, който
изтрихте.
Запомнете, че на повечето команди на Емакс може да бъде зададен брояч
Запомнете, че на повечето команди на Emacs може да бъде зададен брояч
на повторенията; това включва вмъкването на текстови знаци.
Повтарянето на текстов знак го вмъква няколко пъти.
>> Опитайте това сега -- въведете C-u 8 *, за да вмъкнете ********.
Сега вие сте научили най-основните начини за въвеждане на нещо в Емакс
Сега вие сте научили най-основните начини за въвеждане на нещо в Emacs
и поправяне на грешки. Можете също така да изтривате думи или редове.
Ето обобщение на изтриващите действия:
<Delback> изтриване на знака точно преди курсора
C-d изтриване на знака точно след курсора
<Delback> Изтриване на знака точно преди курсора
C-d Изтриване на знака точно след курсора
M-<Delback> изтриване на думата непосредствено преди курсора
M-d изтриване на думата след курсора
M-<Delback> Изтриване на думата непосредствено преди курсора
M-d Изтриване на думата след курсора
C-k изтриване от мястото на курсора до края на реда
M-k изтриване до края на текущото изречение
C-k Изтриване от мястото на курсора до края на реда
M-k Изтриване до края на текущото изречение
Забележете, че <Delback> и C-d, сравнени с M-<Delback> и M-d,
разширяват подобието, започнато от C-f и M-f (добре, <Delback> не е
@ -385,12 +385,12 @@ M-k
Можете също да премахнете всяка част от буфера с един универсален
начин. Придвижете се до единия край на частта и въведете C-@ или
C-интервал (което и да е от двете). Придвижете се до другия край на
частта и въведете C-w. Това ще изреже целия текст между тези два
края.
C-<SPC> (което и да е от двете). (<SPC> е клавишът интервал.)
Придвижете се до другия край на частта и въведете C-w. Това ще изреже
целия текст между тези два края.
>> Придвижете курсора до знака "М" в началото на предишния абзац.
>> Въведете C-интервал. Емакс трябва да изведе съобщение "Mark set" в
>> Въведете C-<SPC>. Emacs трябва да изведе съобщение "Mark set" в
долния край на екрана.
>> Придвижете курсора до буквата "р" в "край" на втория ред от абзаца.
>> Въведете C-w. Това ще изреже текста, започващ от "М" и завършващ
@ -420,9 +420,9 @@ C-k
Връщането обратно на текст се нарича "вмъкване". (Мислете за него
като за изваждане обратно, или дръпване обратно, на текст, който е бил
изрязан.) Можете да вмъквате изрязания текст или на същото място,
откъдето е бил премахнат, или на друго място в буфера, даже и в
различен файл. Можете да вмъквате един и същ текст няколко пъти; това
прави няколко копия от него.
откъдето е бил премахнат, или на друго място в редактирания текст,
даже и в различен файл. Можете да вмъквате един и същ текст няколко
пъти; това прави няколко копия от него.
Командата за вмъкване е C-y. Тя вмъква наново последния изрязан текст
в текущото място на курсора.
@ -501,25 +501,25 @@ C_-
---------
За да направите текста, който редактирате, постоянен, трябва да го
сложите във файл. В противен случай той ще изчезне, когато Емакс
сложите във файл. В противен случай той ще изчезне, когато Emacs
приключи. За да сложите вашия текст във файл, трябва да "намерите"
файла преди да въвеждате текст. (Това също се нарича "посещаване" на
файла.)
Намиране на файл означава, че виждате съдържанието му в Емакс. В
Намиране на файл означава, че виждате съдържанието му в Emacs. В
много случаи това е като да редактирате самия файл. Обаче промените,
които правите, използвайки Емакс, не остават постоянни, докато не
които правите, използвайки Emacs, не остават постоянни, докато не
"запишете" файла. Това е така, за да се предотврати оставянето на
полупроменен файл в системата, когато не искате това. Дори когато
записвате, Емакс оставя началния файл под променено име, в случай, че
записвате, Emacs оставя началния файл под променено име, в случай, че
по-късно решите, че вашите промени са били грешка.
Ако погледнете в дъното на екрана, ще видите ред, който започва и
завършва с тирета и започва с "-R:-- TUTORIAL.bg" или нещо подобно.
Тази част от екрана показва името на файла, който сте посетили. Точно
сега вие сте посетили файл, наречен "TUTORIAL.bg", който е вашето
лично копие-чернова на Емакс въведението. Когато намерите файл в
Емакс, името на този файл ще се появи на същото място.
лично копие-чернова на Emacs въведението. Когато намерите файл в
Emacs, името на този файл ще се появи на същото място.
Особеност на командата за намиране на файл е, че трябва да кажете
името на файла, който искате. Ние го наричаме "четене на аргумент от
@ -528,10 +528,10 @@ C_-
C-x C-f Намиране на файл
Емакс ви подканя да въведете името на файла. Името на файла, което
Emacs ви подканя да въведете името на файла. Името на файла, което
напишете, се появява в дъното на екрана. Редът в дъното на екрана се
нарича минибуфер, когато се използва за този вид вход. Можете да
използвате обикновените команди за редактиране на Емакс, за да
използвате обикновените команди за редактиране на Emacs, за да
редактирате името на файла.
Когато въвеждате името на файла (или какъвто и да е вход в
@ -552,12 +552,12 @@ C_-
C-x C-s Запазване на файла
Това копира текста от Емакс във файла. Първия път, когато това се
направи, Емакс преименува началния файл с ново име, така че той да не
Това копира текста от Emacs във файла. Първия път, когато това се
направи, Emacs преименува началния файл с ново име, така че той да не
се изгуби. Новото име се построява с добавяне на "~" в края на името
на началния файл.
Когато запазването е свършило, Емакс извежда името на файла, който е
Когато запазването е свършило, Emacs извежда името на файла, който е
бил записан. Трябва да записвате достатъчно често, така че да не
изгубите много работа, ако системата се срине по някаква причина.
@ -565,19 +565,19 @@ C_-
Това трябва да изведе "Wrote ...TUTORIAL.bg" в дъното на екрана.
ЗАБЕЛЕЖКА: На някои системи въвеждането на C-x C-s ще замръзи екрана и
вие няма да виждате повече изход от Емакс. Това показва, че една
вие няма да виждате повече изход от Emacs. Това показва, че една
"способност" на операционната система, наричана "управление на потока"
(flow control), е прихванала C-s и не го пропуска към Емакс. За да
(flow control), е прихванала C-s и не го пропуска към Emacs. За да
размразите екрана, въведете C-q. Тогава вижте секцията "Спонтанно
включване на постъпково търсене" (Spontaneous Entry to Incremental
Search) в ръководството на Емакс за съвет как да се справите с тази
Search) в ръководството на Emacs за съвет как да се справите с тази
"способност".
Може да намерите съществуващ файл, да го разгледате и да го
редактирате. Можете също да намерите файл, който не съществува. Това
е начинът за създаване на нови файлове в Емакс: намирате файла, който
е начинът за създаване на нови файлове в Emacs: намирате файла, който
ще бъде в началото празен, и тогава започвате вмъкването на текста за
файла. Когато говорите за "записване" на файл, Емакс всъщност ще
файла. Когато говорите за "записване" на файл, Emacs всъщност ще
създаде файла с текста, който сте въвели. Оттам нататък може да
считате, че редактирате вече съществуващ файл.
@ -585,9 +585,9 @@ Search)
* БУФЕРИ
--------
Ако намерите втори файл с C-x C-f, първият файл остава в Емакс.
Ако намерите втори файл с C-x C-f, първият файл остава в Emacs.
Можете да превключите обратно към него, като го намерите пак с C-x
C-f. По този начин може да получите доста на брой файлове в Емакс.
C-f. По този начин може да получите доста на брой файлове в Emacs.
>> Създайте файл с име "foo", въвеждайки C-x C-f foo <Return>.
Вмъкнете малко текст, редактирайте го и запазете "foo" с въвеждане
@ -595,16 +595,16 @@ C-f.
Накрая въведете C-x C-f TUTORIAL.bg <Return>, за да се върнете
обратно във въведението.
Емакс запазва текста на всеки файл в обект, наричан "буфер".
Намирането на файл прави нов буфер в Емакс. За да видите списък на
буферите, които в момента съществуват във вашия Емакс, въведете
Emacs запазва текста на всеки файл в обект, наричан "буфер".
Намирането на файл прави нов буфер в Emacs. За да видите списък на
буферите, които в момента съществуват във вашия Emacs, въведете
C-x C-b Показване на буферите
>> Опитайте C-x C-b сега.
Вижте как всеки буфер има име, а понякога и име на файл за файла,
чието съдържание държи. ВСЕКИ текст, който виждате в Емакс прозорец,
чието съдържание държи. ВСЕКИ текст, който виждате в Emacs прозорец,
е винаги част от някакъв буфер.
>> Въведете C-x 1, за да махнете списъка с буферите.
@ -626,13 +626,13 @@ C-f.
Списъкът с буферите, който правите с C-x C-b, винаги ви показва името
на всеки буфер.
ВСЕКИ текст, който виждате в Емакс прозорец, е винаги част от някакъв
ВСЕКИ текст, който виждате в Emacs прозорец, е винаги част от някакъв
буфер. Някои буфери не съответстват на файлове. Например буферът,
именуван "*Buffer List*", не съответства на файл. Това е буферът,
който съдържа списъка с буферите, които сте направили с C-x C-b.
Буферът, именуван "*Messages*", също не съответства на файл; той
съдържа съобщенията, които се появяват в дъното на екрана по време на
Емакс сесията.
Emacs сесията.
>> Въведете C-x b *Messages* <Return>, за да видите буфера със
съобщенията. След това въведете C-x C-b TUTORIAL <Return>, за да
@ -640,7 +640,7 @@ C-f.
Ако направите промени в текста на един файл и тогава намерите друг
файл, това няма да запише първия файл. Неговите промени остават вътре
в Емакс, в буфера на файла. Създаването или редактирането на буфера
в Emacs, в буфера на файла. Създаването или редактирането на буфера
на втория файл няма ефект върху буфера на първия файл. Това е много
полезно, но също означава, че се нуждаете от удобен начин да запазите
буфера на първия файл. Ще е неудобно да превключите обратно с C-x
@ -659,8 +659,8 @@ C-x s
* РАЗШИРЯВАНЕ НА НАБОРА КОМАНДИ
-------------------------------
Има много, много повече команди на Емакс, отколкото могат да се сложат
на всички контролни и мета знаци. Емакс заобикаля това с X (eXtended)
Има много, много повече команди на Emacs, отколкото могат да се сложат
на всички контролни и мета знаци. Emacs заобикаля това с X (eXtended)
командата. Това става по два начина:
C-x Знаково разширяване. Последвано от един знак.
@ -668,49 +668,49 @@ C-x s
име.
Тези команди са общо взето полезни, но по-малко, отколкото командите,
които досега сте научили. Вече видяхте две от тях: командите върху
файлове C-x C-f за намиране (Find) и C-x C-s за запазване (Save).
Друг пример е командата за край на Емакс сесията -- това е командата
C-x C-c. (Не се безпокойте, че може да изгубите всички промени, които
сте направили; C-x C-c предлага да запази всеки променен файл, преди
да премахне Емакс.)
които досега сте научили. Вече видяхте няколко от тях: например
командите върху файлове C-x C-f за намиране (Find) и C-x C-s за
запазване (Save). Друг пример е командата за край на Emacs сесията --
това е командата C-x C-c. (Не се безпокойте, че може да изгубите
всички промени, които сте направили; C-x C-c предлага да запази всеки
променен файл, преди да премахне Emacs.)
C-z е командата за излизане от Емакс *временно* -- така че да можете
да се върнете към същата Емакс сесия по-късно.
C-z е командата за излизане от Emacs *временно* -- така че да можете
да се върнете към същата Emacs сесия по-късно.
На системи, които позволяват това, C-z "изоставя" (suspend) Емакс,
т.е. връща към обвивката, но не разрушава Емакс. В повечето обвивки
можете да продължите Емакс сесията с командата "fg" или с "%emacs".
На системи, които позволяват това, C-z "изоставя" (suspend) Emacs,
т.е. връща към обвивката, но не разрушава Emacs. В повечето обвивки
можете да продължите Emacs сесията с командата "fg" или с "%emacs".
На системи, които не позволяват изоставяне, C-z създава нова
подобвивка, която върви под Емакс, за да ви даде шанс да стартирате
други програми и да се върнете към Емакс след това; това не е истинско
"излизане" от Емакс. В този случай командата на обвивката "exit" е
обикновеният начин да се върнете обратно към Емакс от подобвивката.
подобвивка, която върви под Emacs, за да ви даде шанс да стартирате
други програми и да се върнете към Emacs след това; това не е истинско
"излизане" от Emacs. В този случай командата на обвивката "exit" е
обикновеният начин да се върнете обратно към Emacs от подобвивката.
Моментът да използвате C-x C-c е, когато искате да излезете от
системата. Това е и правилната команда за излизане, когато Емакс е
системата. Това е и правилната команда за излизане, когато Emacs е
извикан от пощенска програма или други странични програми, тъй като те
може и да не знаят как да се справят с изоставянето на Емакс. При
може и да не знаят как да се справят с изоставянето на Emacs. При
обикновени обстоятелства, обаче, ако не сте тръгнали да излизате от
системата, по-добре е да изоставите Емакс с C-z, вместо да излизате от
Емакс.
системата, по-добре е да изоставите Emacs с C-z, вместо да излизате от
Emacs.
Има много команди C-x. Ето списък на тези, които сте научили:
C-x C-f Намиране на файл.
C-x C-s Запазване на файл.
C-x C-b Списък на буферите.
C-x C-c Излизане от Емакс.
C-x 1 Изтриване на всички прозорци освен един.
C-x u Отмяна.
C-x C-f Намиране на файл
C-x C-s Запазване на файл
C-x C-b Списък на буферите
C-x C-c Излизане от Emacs
C-x 1 Изтриване на всички прозорци, освен един
C-x u Отмяна
Именуваните разширени команди са команди, които се използват даже още
по-рядко, или команди, които се използват само в определени режими.
Пример е командата replace-string, която заменя глобално един низ с
друг. Когато въведете M-x, Емакс ви подсказва в дъното на екрана с
друг. Когато въведете M-x, Emacs ви подсказва в дъното на екрана с
M-x и вие трябва да въведете името на командата, в този случай
"replace-string". Просто въведете "repl s<TAB>" и Емакс ще завърши
"replace-string". Просто въведете "repl s<TAB>" и Emacs ще завърши
името. (<TAB> е клавишът Tab, обикновено намиращ се над клавиша
CapsLock или клавиша Shift близо до левия край на клавиатурата.)
Завършете името на командата с <Return>.
@ -734,11 +734,11 @@ CapsLock
Когато сте направили промени във файл, но още не сте го запазили, те
могат да бъдат загубени, ако компютърът внезапно се изключи. За да ви
предпази от такива ситуации, Емакс периодично запазва "автоматично
предпази от такива ситуации, Emacs периодично запазва "автоматично
запазван" файл за всеки файл, който редактирате. Името на автоматично
запазвания файл има # в началото и в края; например, ако вашият файл е
с име "hello.c", името на неговия автоматично запазван файл ще бъде
"#hello.c#". Когато запазвате файл по обикновения начин, Емакс
"#hello.c#". Когато запазвате файл по обикновения начин, Emacs
изтрива неговия автоматично записван файл.
Ако компютърът зависне, може да възстановите вашата автоматично
@ -752,7 +752,7 @@ M-x recover file<Return>.
* ЕХО ОБЛАСТТА
--------------
Ако Емакс види, че въвеждате многознакови команди бавно, ще ви ги
Ако Emacs види, че въвеждате многознакови команди бавно, ще ви ги
покаже в дъното на екрана, в област, наричана "ехо област". Ехо
областта обхваща последния ред от екрана.
@ -763,18 +763,18 @@ M-x recover file<Return>.
Редът точно над ехо областта се нарича "ред на режима" (mode line).
Той показва нещо като:
-R:** TUTORIAL.bg (Fundamental)--L670--58%----------------
-D:** TUTORIAL.bg 63% L749 (Fundamental)---------------------
Този ред дава полезна информация за състоянието на Емакс и текста,
Този ред дава полезна информация за състоянието на Emacs и текста,
който редактирате.
Вече знаете какво означава името на файла -- това е файлът, който сте
намерили. -NN%-- показва вашата текуща позиция в текста; това
означава, че NN процента от текста е над върха на екрана. Ако
началото на файла е на екрана, ще се показва --Top-- (връх) вместо
--00%--. Ако края на файла е на екрана, ще се показва --Bot-- (дъно).
Ако гледате текст, който е толкова малък, че се показва изцяло на
екрана, редът на режима ще изведе --All--.
намерили. NN% показва вашата текуща позиция в текста; това означава,
че NN процента от текста е над върха на екрана. Ако началото на файла
е на екрана, ще се показва --Top-- (връх) вместо --00%--. Ако краят
на файла е на екрана, ще се показва --Bot-- (дъно). Ако гледате
текст, който е толкова малък, че се показва изцяло на екрана, редът на
режима ще изведе --All--.
Знакът L и цифрите показват мястото по друг начин: това е номерът на
текущия ред на точката.
@ -788,7 +788,7 @@ M-x recover file<Return>.
Fundamental (Основен), който използвате в момента. Това е пример за
"главен режим" (major mode).
Емакс има много главни режими. Някои от тях са предвидени за
Emacs има много главни режими. Някои от тях са предвидени за
редактиране на различни езици и/или видове текст, като например режим
Лисп, режим Текст и други. Във всеки един момент от време точно един
главен режим е активен и неговото име може винаги да бъде намерено в
@ -807,7 +807,7 @@ Fundamental (
>> Въведете M-x text mode<Return>.
Не се безпокойте, никоя от Емакс командите, които сте научили, няма да
Не се безпокойте, никоя от Emacs командите, които сте научили, няма да
се промени по някакъв съществен начин. Но може да забележите, че M-f
и M-b сега възприемат апострофите (') като част от думите. Преди
това, в основния режим (Fundamental), M-f и M-b се възприемаха като
@ -836,7 +836,7 @@ m.
Един главен режим, който е много полезен, особено за редактиране на
текст на естествен език, е режимът на автоматично запълване (Auto Fill
mode). Когато този режим е включен, Емакс автоматично разделя реда
mode). Когато този режим е включен, Emacs автоматично разделя реда
при мястото между думите, когато вмъквате текст и направите ред, който
е твърде дълъг.
@ -856,7 +856,7 @@ auto fill mode<Return>.
аргумент на командата.
>> Въведете C-x f с аргумент 20. (C-u 2 0 C-x f).
Сега въведете някакъв текст и вижте как Емакс запълва редовете с по
Сега въведете някакъв текст и вижте как Emacs запълва редовете с по
не повече от 20 знака. После върнете обратно границата на 70,
използвайки C-x f отново.
@ -871,12 +871,12 @@ auto fill mode<Return>.
* ТЪРСЕНЕ
---------
Емакс може да извършва търсения на низове (това са последователности
Emacs може да извършва търсения на низове (това са последователности
от знаци или думи) или напред в текста, или назад в него. Търсенето
на низ е придвижваща курсора команда; тя премества курсора на
следващото място, където се среща низът.
Командата за търсене на Емакс се различава от командата за търсене на
Командата за търсене на Emacs се различава от командата за търсене на
повечето редактори по това, че тя е "постъпкова". Това означава, че
търсенето се извършва още докато въвеждате текста, който търсите.
@ -884,7 +884,7 @@ auto fill mode<Return>.
търсене назад. НО ПОЧАКАЙТЕ! Не ги пробвайте сега.
Когато въведете C-s, ще забележите, че низът "I-search" се появява
като подсказка в ехо областта. Това ви казва, че Емакс е в това,
като подсказка в ехо областта. Това ви казва, че Emacs е в това,
което се нарича постъпково търсене, чакайки ви да въвеждате текста,
който искате да търсите. <Return> приключва търсенето.
@ -896,19 +896,19 @@ auto fill mode<Return>.
>> Сега въведете <Delback> три пъти и вижте как се придвижва курсора.
>> Въведете <Return>, за да прекратите търсенето.
Забелязахте ли какво стана? Емакс, когато търси постъпково, се опитва
Забелязахте ли какво стана? Emacs, когато търси постъпково, се опитва
да намери следващото съвпадение на низа, който се въвежда. За да
отидете на следващото съвпадение на "търсне", просто отново въведете
C-s. Ако няма такова съвпадение, Емакс бибипва и ви казва, че
C-s. Ако няма такова съвпадение, Emacs бибипва и ви казва, че
търсенето е "провалено" (failing). C-g също прекратява търсенето.
ЗАБЕЛЕЖКА: На някои системи въвеждането на C-s ще замрази екрана и вие
няма да може да видите повече реакция от Емакс. Това показва, че
няма да може да видите повече реакция от Emacs. Това показва, че
"способност" на операционната система, наречена "управление на потока"
(flow control), е прихванала C-s и не го пропуска до Емакс. За да
(flow control), е прихванала C-s и не го пропуска до Emacs. За да
размразите екрана, въведете C-q. Тогава вижте секцията "Спонтанно
включване на постъпковото търсене" (Spontaneous Entry to Incremental
Search) в ръководството на Емакс за съвет как да се справите с тази
Search) в ръководството на Emacs за съвет как да се справите с тази
"способност".
Ако сте в средата на постъпково търсене и въведете <Delback>, ще
@ -930,9 +930,9 @@ C-s
* МНОЖЕСТВО ПРОЗОРЦИ
----------------
--------------------
Една от привлекателните способности на Емакс е тази, че може да
Една от привлекателните способности на Emacs е тази, че може да
гледате повече от един прозорец на екрана в даден момент от време.
>> Придвижете курсора до този ред и въведете C-u 0 C-l (това е
@ -943,7 +943,7 @@ C-s
остава на по-горния прозорец.
>> Въведете C-M-v, за да скролирате долния прозорец. (Ако нямате
истински клавиш META, въведете ESC C-v.)
истински клавиш META, въведете <ESC> C-v.)
>> Въведете C-x o ("o" от "other" -- "друг"), за да придвижите
курсора в долния прозорец.
@ -972,10 +972,10 @@ C-M-v
първи", защото и двата клавиша действат, модифицирайки знака, който
сте въвели.
Ако нямате истински клавиш META и използвате ESC вместо това, редът
има значение: трябва да въвеждате ESC, последван от CONTROL-v, защото
CONTROL-ESC v няма да работи. Това е така, защото ESC е собствен
знак, а не модификатор.
Ако нямате истински клавиш META и използвате <ESC> вместо това, редът
има значение: трябва да въвеждате <ESC>, последван от CONTROL-v,
защото CONTROL-<ESC> v няма да работи. Това е така, защото <ESC> е
собствен знак, а не модификатор.
>> Въведете C-x 1 (в горния прозорец), за да махнете долния прозорец.
@ -1008,13 +1008,13 @@ CONTROL-ESC v
на главния режим. Например, може да видите [(Fundamental)] вместо
(Fundamental).
За да се махнете от вложеното ниво на редактиране, въведете ESC ESC
ESC. Това е обща команда за "излизане". Може и да я използвате за
махане (скриване) на допълнителни прозорци, както и за да се махнете
от минибуфера.
За да се махнете от вложеното ниво на редактиране, въведете <ESC>
<ESC> <ESC>. Това е обща команда за "излизане". Може и да я
използвате за махане (скриване) на допълнителни прозорци, както и за
да се махнете от минибуфера.
>> Въведете M-x, за да влезете в минибуфер; тогава въведете ESC ESC
ESC, за да излезете.
>> Въведете M-x, за да влезете в минибуфер; тогава въведете <ESC> <ESC>
<ESC>, за да излезете.
Не можете да използвате C-g, за да излезете от вложено ниво на
редактиране. Това е така, защото C-g се използва за прекратяване на
@ -1025,16 +1025,16 @@ ESC.
----------------------------------
В това въведение се опитахме да осигурим достатъчно информация, за да
започнете да използвате Емакс. Има толкова много още в Емакс, че не е
започнете да използвате Emacs. Има толкова много още в Emacs, че не е
възможно то да бъде обяснено всичкото тук. Обаче може да поискате да
научите повече за Емакс, тъй като той притежава още много полезни
способности. Емакс има команди за четене на документацията на Емакс
научите повече за Emacs, тъй като той притежава още много полезни
способности. Emacs има команди за четене на документацията на Emacs
командите. Тези "помощни" команди всички започват със знака
CONTROL-h, който се нарича "знакът за помощ".
За да използвате възможностите на тази помощ, въведете знака C-h и
след това знака, казващ какъв вид помощ искате. Ако НАИСТИНА сте се
изгубили, въведете C-h ? и Емакс ще ви каже с какво може да ви
изгубили, въведете C-h ? и Emacs ще ви каже с какво може да ви
помогне. Ако сте въвели C-h и решите, че не се нуждаете от помощ,
просто въведете C-g, за да я прекратите.
@ -1046,7 +1046,7 @@ CONTROL-h,
Най-основното помощно средство е C-h c. Въведете C-h, знака c и
команден знак или последователност от знаци, образуващи команда;
тогава Емакс ще изведе много кратко описание на командата.
тогава Emacs ще изведе много кратко описание на командата.
>> Type C-h c C-p.
@ -1056,7 +1056,7 @@ CONTROL-h,
(C-p изпълнява командата предишен-ред)
Това ви казва "името на функцията". Имената на функциите се използват
най-вече за настройване и разширяване на Емакс. Но тъй като имената
най-вече за настройване и разширяване на Emacs. Но тъй като имената
на функциите са избрани така, че да показват какво прави командата, те
могат да служат и за много кратка документация -- достатъчна, за да ви
припомни команди, които вече сте учили.
@ -1070,7 +1070,7 @@ c.
>> Въведете C-h k C-p.
Това извежда документацията на функцията, както и нейното име, в
отделен Емакс прозорец. Когато я прочетете, въведете C-x 1, за да
отделен Emacs прозорец. Когато я прочетете, въведете C-x 1, за да
махнете помощния текст. Не е нужно да правите това точно сега. Може
да редактирате, докато се обръщате към помощния текст за справка, и
след това да въведете C-x 1.
@ -1081,14 +1081,14 @@ c.
функцията.
>> Опитайте с въвеждане на C-h f previous-line<Return>.
Това извежда цялата информация, която Емакс знае за функцията,
Това извежда цялата информация, която Emacs знае за функцията,
която осъществява командата C-p.
Подобна команда, C-h v, извежда документацията на променливите, които
може да променяте, за да настройвате поведението на Емакс. Трябва да
въведете името на променливата, когато Емакс ви подскаже това.
може да променяте, за да настройвате поведението на Emacs. Трябва да
въведете името на променливата, когато Emacs ви подскаже това.
C-h a Команда Апропос. Въведете ключова дума и Емакс ще
C-h a Команда Апропос. Въведете ключова дума и Emacs ще
покаже списък на всички команди, чието име съдържа
тази ключова дума. Тези команди могат всички да бъдат
извикани чрез META-x. За някои команди командата
@ -1111,18 +1111,18 @@ C-f,
специален буфер, наричан "*info*", където може да
четете ръководствата на инсталираните във вашата
система пакети. Въведете m emacs <Return>, за да
четете ръководството на Емакс. Ако никога преди това
не сте използвали Info, въведете ? и Емакс ще включи
четете ръководството на Emacs. Ако никога преди това
не сте използвали Info, въведете ? и Emacs ще включи
въведение във възможностите на режима Инфо. Веднъж
след като сте преминали това въведение, трябва да се
консултирате с Емакс Инфо ръководството като ваша
консултирате с Emacs Инфо ръководството като ваша
основна документация.
* ОЩЕ ВЪЗМОЖНОСТИ
-----------------
Може да научите повече за Емакс с четене на неговото ръководство, или
Може да научите повече за Emacs с четене на неговото ръководство, или
като книга, или в Инфо (използвайте менюто помощ (Help) или въведете
F10 h r). Две възможности, които може да желаете в началото, са
довършване (completion), което спестява писане, и dired, който
@ -1130,26 +1130,26 @@ F10 h r).
Довършването е начин да избягвате ненужно писане. Например, ако
искате да превключите към буфера *Messages*, може да въведете C-x b
*M<Tab> и Емакс ще запълни останалата част от името на буфера,
*M<Tab> и Emacs ще запълни останалата част от името на буфера,
доколкото може да се определи от това, което сте въвели. Довършването
е описано в Инфо-ръководството на Емакс в страницата "Довършване"
е описано в Инфо-ръководството на Emacs в страницата "Довършване"
("Completion").
Dired ви позволява да гледате списъка от файлове в директория (и като
възможност: нейните поддиректории), да се придвижвате в този списък,
да посещавате, преименувате, изтривате и изобщо действате върху
файловете. Dired е описан в Инфо-ръководството на Емакс в страницата
файловете. Dired е описан в Инфо-ръководството на Emacs в страницата
"Dired".
Ръководството на Емакс описва още много други възможности на
Ръководството на Emacs описва още много други възможности на
редактора.
* ЗАКЛЮЧЕНИЕ
------------
Запомнете: за да излезете безвъзвратно от Емакс, използвайте C-x C-c.
За да излезете временно в обвивка, така че да се върнете в Емакс
Запомнете: за да излезете безвъзвратно от Emacs, използвайте C-x C-c.
За да излезете временно в обвивка, така че да се върнете в Emacs
по-късно, използвайте C-z.
Това въведение е предвидено да бъде разбираемо за всички нови
@ -1160,17 +1160,17 @@ Dired
* КОПИРАНЕ
----------
Това въведение произлиза от дълга поредица въведения в Емакс,
започвайки от едно, написано от Стюърт Кракрафт за началния Емакс.
Това въведение произлиза от дълга поредица въведения в Emacs,
започвайки от едно, написано от Стюърт Кракрафт за началния Emacs.
Тази версия на въведението, както и ГНУ Емакс, е защитена с авторски
Тази версия на въведението, както и GNU Emacs, е защитена с авторски
права и идва с разрешение да разпространявате копия при следните
условия:
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation
Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
@ -1183,8 +1183,8 @@ Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation
under the above conditions, provided also that they
carry prominent notices stating who last altered them.
Условията за копиране на самия Емакс са по-сложни, но в същия дух.
Моля, прочетете файла COPYING и тогава давайте копия на ГНУ Емакс на
Условията за копиране на самия Emacs са по-сложни, но в същия дух.
Моля, прочетете файла COPYING и тогава давайте копия на GNU Emacs на
свои приятели. Помогнете да спрем затвореността на програмите
("притежанието"), като използваме, пишем и споделяме свободен софтуер!

View file

@ -1,4 +1,4 @@
您正在阅读 Emacs 快速指南( Emacs tutorial )。请见页尾有关复制条件。
Emacs 우醵寧켓.
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Emacs 指令通常包含有 CONTROL 键(有时候以 CTRL 或 CTL 来标示)或是

View file

@ -1,3 +1,4 @@
tutori疝 k Emacsu.
Copyright (c) 1985 Free Software Foundation, Inc; podmínky viz na konci.
Do èe¹tiny pøelo¾il Milan Zamazal <pdm@zamazal.org>.

View file

@ -1,6 +1,5 @@
Usted esta viendo el tutorial de Emacs. Vea al final las condiciones
de copiado. Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software
Foundation.
Tutorial de Emacs. Vea al final las condiciones de copiado.
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Generalmente los comandos de Emacs involucran la tecla CONTROL
(algunas veces llamada CTRL O CTL) o la tecla meta (algunas veces

View file

@ -1,4 +1,4 @@
$B$"$J$?$,8=:_8+$F$$$k$N$O(B Emacs $BF~Lg%,%$%I$G$9!#%U%!%$%k:G8e$r;2>H$N$3$H!#(B
Emacs $BF~Lg%,%$%I(B.
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Emacs $B$N%3%^%s%I$rF~NO$9$k$K$O!"0lHL$K%3%s%H%m!<%k%-!<!J%-!<%H%C%W$K(B

View file

@ -1,3 +1,4 @@
$(C@L8F=:(B(Emacs) $(CAvD'<-@T4O4Y(B.
$(C@z@[1G(B (c) 1985, 2001 Free Software Foundation, Inc; $(C3!?!4B(B $(C:9;g(B $(CA60G@L(B
$(C@V=@4O4Y(B. $(CAv1](B $(C@P0m(B $(C@V4B(B $(C@L(B $(C1[@:(B $(C@L8F=:(B(Emacs) $(CAvD'<-@T4O4Y(B.

View file

@ -1,4 +1,4 @@
Je leest nu de Emacs-inleiding. De kopieervoorwaarden staan onderaan.
Emacs-inleiding. De kopieervoorwaarden staan onderaan.
Copyright (c) 1985, 1996, 1997, 2003, 2004, 2005 Free Software Foundation
De meeste Emacs-commando's gebruiken de CONTROL-toets (soms CTRL of CTL

View file

@ -1,4 +1,4 @@
Czytasz właśnie krótki samouczek Emacsa. Copyright (c) 1985, 2001
krótki samouczek Emacsa. Copyright (c) 1985, 2001
Free Software Foundation, Inc. Szczegóły na końcu pliku.
Polecenia Emacsa wymagają na ogół wciśnięcia klawisza CONTROL (oznaczanego

View file

@ -1,5 +1,5 @@
Copyright (c) 2004 Free Software Foundation, Inc; Veja no fim as
condições.
Tutorial do Emacs. Veja no fim as condições para cópia.
Copyright (c) 2004, 2005 Free Software Foundation.
Os comandos do Emacs geralmente envolvem a tecla CONTROL (algumas vezes
nomeada CTRL ou CTL) ou a tecla META (algumas vezes nomeada EDIT ou
@ -130,8 +130,8 @@ jeito na dire
você pode observar a ação do M-f e M-b de varias lugares dentro e no
meio de palavras.
Observe o paralelismo entre C-f e C-b em uma mão, e M-f e M-b na
outra. Muito freqüentemente os caracteres Meta são usados para operações
Observe o paralelismo entre C-f e C-b por um lado, e M-f e M-b por outro
lado. Muito freqüentemente os caracteres Meta são usados para operações
relacionadas com as unidades definidas pela linguagem (palavras,
sentenças, parágrafos), enquanto caracteres Control operam nas unidades
básicas que são independente do que você está editando (caracteres,
@ -859,7 +859,7 @@ manual do Emacs para uma dica de como lhe dar com esse "recurso".
Se você estiver no meio de uma pesquisa incremental e digitar <Delete>,
você percebera que o ultimo caractere da pesquisa será apagado e a
pesquisa voltara para o ultimo lugar da pesquisa. Por instancia, imagine
pesquisa voltara para o ultimo lugar da pesquisa. Por exemplo, imagine
que você tenha digitado "c", para pesquisar a primeira ocorrência de
"c". Agora se você digitar "u", o cursor ira mover para a primeira
ocorrência de "cu". Agora digite <Delete>. Isso ira apagar o "u" da

View file

@ -1,3 +1,4 @@
tutorialului de Emacs.
Copyright (c) 1998 Free Software Foundation -*-coding: latin-2;-*-
Traducere din engleză de Tudor Hulubei <tudor@gnu.org>.
Mulţumiri Aidei Hulubei <aida@chang.pub.ro> pentru corecturi şi sugestii.

View file

@ -1,4 +1,4 @@
Вы читаете учебник Emacs. Условия копирования в конце файла.
ユ゙ナツホノヒ Emacs.
Copyright (c) 1985, 1996, 2004 Free Software Foundation, Inc.
Для управления Emacs обычно используется ключ (сочетание клавиш клавиатуры

View file

@ -1,3 +1,4 @@
tútorial k Emacsu.
Copyright (c) 1985 Free Software Foundation, Inc; podmienky pozri na konci.
Do češtiny preložil Milan Zamazal <pdm@zamazal.org>, do slovenčiny Miroslav
Vaško <zemiak@zoznam.sk>.

View file

@ -1,6 +1,6 @@
Detta är den Svenska användarhandledningen till Emacs. I slutet finns
kopieringsvillkoren. Copyright (c) 1985, 1996, 1998, 2001, 2002 Free
Software Foundation, Inc.
Emacs användarhandledning. I slutet finns kopieringsvillkoren.
Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software
Foundation, Inc.
Emacs-kommandon innebär ofta användning av kontrolltangenten (vanligen
märkt CTRL eller CTL) eller META-tangenten ( vissa tangentbord märkt
@ -49,6 +49,10 @@ F
Hitta markören igen och notera att det är samma text som står kring
markören nu.
Du kan också använda PageUp och PageDn tangenterna, om din terminal
har dem, för att flytta en hel skärmbild åt gången, men du redigerar
effektivare om du använder C-v och M-v.
* GRUNDLÄGGANDE MARKÖRRÖRELSER
------------------------------
@ -56,12 +60,10 @@ F
Att flytta sig från skärmbild till skärmbild kan vara bra, men hur
förflyttar man sig till en speciell plats skärmen?
Det finns flera sätt att göra detta . Det vanligaste är att använda
kommandona C-p, C-b, C-f och C-n. Vart och ett av dessa kommandon
flyttar markören en rad eller en kolumn i en bestämd riktning
skärmen. Här visas dessa fyra kommandon och i vilken riktning de
flyttar markören:
Det finns flera sätt att göra detta. Du kan använda piltangenterna,
men det är mer effektivt att ha händerna i standardläget och använda
kommandona C-p, C-b, C-f och C-n. Dessa tecken är likvärdiga med de
fyra piltangenterna. här:
Föregående rad, C-p
:
@ -75,11 +77,10 @@ flyttar mark
och C-p. Använd sedan C-l för att centrera diagrammet
skärmbilden.
Detta är säkert lite enklare att förstå om du tänker dessa
förkortningar: P för föregående (previous), N för nästa (next), B för
bakåt (backward) och F för framåt (forward). Detta är de grundläggande
kommandona för att flytta markören och du kommer säkert att använda
dem hela tiden, det är en stor fördel om du lär dig dem nu.
Detta är enklare att komma ihåg om du tänker dessa förkortningar: P
för föregående (previous), N för nästa (next), B för bakåt (backward)
och F för framåt (forward). Dessa är de grundläggande kommandona för
att flytta markören och du kommer att använda dem hela tiden.
>> Gör några C-n att du kommer ned till den här raden.
@ -309,17 +310,23 @@ texten. Tecken som du kan se, s
sätts in direkt. Skriv <Return> (retur-tangenten) för att sätta in en
radbrytning.
Du kan radera det sista tecknet du skrev genom att trycka <Delete>.
<Delete> är en tangent tangentbordet, som kan vara märkt "Del". I
några fall fungerar också "backsteg" som <Delete> men inte alltid!
Du kan radera det sista tecknet du skrev genom att trycka <Delback>.
<Delback> är en tangent tangentbordet -- samma som du normalt
använder utanför Emacs för att ta bort det senaste tecknet du skrivit.
Det är vanligen en stor tangent några rader ovanför retur-tangenten,
och den är vanligtvis märkt "Delete, "Del" eller "Backspace".
Generellt raderar <Delete> tecknet precis före den aktuella
Om den stora tangenten är märkt med "Backspace" är det den du
använder för <Delback>. Det kan finnas en annan tangent som är märkt
med "Delete" men det är inte <Delback>.
Generellt raderar <Delback> tecknet precis före den aktuella
markörspositionen.
>> Gör detta nu: Skriv in några tecken och ta bort dem genom att
använda <Delete>. Var inte rädd för att skriva i den här filen, du
kommer inte att kunna förändra originalet till vägledningen. Detta
är bara en lokal kopia.
använda <Delback>. Var inte rädd för att skriva i den här filen,
du kommer inte att kunna förändra originalet till vägledningen.
Detta är bara en lokal kopia.
När en rad blir för lång för att rymmas en skärmbredd fortsätter
den raden under. Ett bakstreck ("\") (eller om du kör under ett
@ -330,7 +337,7 @@ indikerar att raden forts
fortsätt att skriva lite till. Du kommer att se hur
fortsättningstecknet ser ut.
>> Använd <Delete> för att radera texten tills raden ryms en
>> Använd <Delback> för att radera texten tills raden ryms en
skärmbredd igen. Fortsättningstecknet kommer att försvinna.
Du kan radera radbrytning precis som andra tecken. Genom att radera
@ -338,7 +345,7 @@ radbrytningen mellan tv
resultatet av denna sammanslagning blir för stor för att passa inom en
skärmbredd, kommer den att visas med ett fortsättningstecken.
>> Flytta markören till början av en rad och tryck <Delete>.
>> Flytta markören till början av en rad och tryck <Delback>.
Detta kommer att klistra ihop raden med raden över.
>> Tryck <Return> för att sätta in radbrytningen du tog bort.
@ -353,21 +360,21 @@ Du har nu l
Emacs och att rätta fel. Du kan radera ord och rader också. Här är en
översikt över kommandon för radering:
<Delete> raderar tecknet som står precis före markören
C-d raderar tecknet som står precis under markören
<Delback> Raderar tecknet som står precis före markören
C-d Raderar tecknet som står precis under markören
M-<Delete> raderar ordet precis före markören
M-d raderar ordet precis efter markören
M-<Delback> Raderar ordet precis före markören
M-d Raderar ordet precis efter markören
C-k raderar från markören till slutet av raden
M-k raderar till slutet av stycket
C-k Raderar från markören till slutet av raden
M-k Raderar till slutet av stycket
Lägg märke till att <Delete> och C-d kontra M-<Delete> och M-d följer
mönstret som började med C-f och M-f. (<Delete> är inte precis
Lägg märke till att <Delback> och C-d kontra M-<Delback> och M-d
följer mönstret som började med C-f och M-f. (<Delback> är inte precis
ett kontrolltecken men låt oss inte bry oss om det.) C-k och M-k
fungerar samma sätt som C-e och M-e (nästan).
Du kan också ta bort vilken del som helst av bufferten med hjälp av
Du kan också ta bort vilken del som helst av texten med hjälp av
följande allmänna metod. Flytta till ena änden av det område du vill
ta bort och tryck C-@ eller C-mellanslag. Flytta till andra änden av
området och tryck C-w. Detta tar bort all text mellan de två
@ -401,13 +408,13 @@ raderar s
en repetition av kommandot. C-u 2 C-k raderar två rader samt de tomma
raderna, medan C-k två gånger inte kommer att göra det.
Att sätta in borttagen text kallas att "återhämta" den (yanking).
Att sätta in borttagen text kallas att "återhämta" den (yanking).
(Tänk det som att du rycker, eller drar, tillbaka någon text som
tagits bort.) Du kan antingen hämta tillbaka borttagen text till samma
plats som där den blev borttagen, eller kan du sätta in den en
annan plats i bufferten eller till och med i en helt annan fil. Du kan
också hämta tillbaka den flera gånger att du får flera lika
förekomster av den.
annan plats i texten du redigerar eller till och med i en helt annan
fil. Du kan också hämta tillbaka samma text flera gånger att du får
flera lika förekomster av den.
Kommandot för att hämta tillbaka text är C-y. Kommandot hämtar
tillbaka den sist borttagna texten och placerar den där markören är.
@ -496,8 +503,8 @@ nytt namn, som backup, ifall du senare
Om du tittar nästan längst ner skärmbilden kommer du se en rad
som börjar och slutar med minustecken, och som innehåller texten
"--:-- TUTORIAL.se". Denna del av skärmbilden visar alltid namnet
filen du besöker. Just nu är du inne i en fil som heter "TUTORIAL.se"
"--:-- TUTORIAL.sv". Denna del av skärmbilden visar alltid namnet
filen du besöker. Just nu är du inne i en fil som heter "TUTORIAL.sv"
och som är en personlig kopia av vägledningen till Emacs. Vilken fil
du än är inne i kommer filnamnet stå där.
@ -540,7 +547,7 @@ blev sparad. Du b
systemet kraschar.
>> Skriv C-x C-s för att spara en kopia av denna vägledning.
Detta skall leda till att "Wrote ...TUTORIAL.se" skrivs ut nederst
Detta skall leda till att "Wrote ...TUTORIAL.sv" skrivs ut nederst
skärmbilden.
Observera: vissa system leder C-x C-s till att skärmen låser
@ -569,7 +576,7 @@ den p
>> Skapa en fil med namnet "foo" genom att trycka C-x C-f foo <Return>.
Skriv in lite text, redigera den och spara "foo" genom att använda
C-x C-s. Skriv till slut C-x C-f TUTORIAL.se<Return> för att komma
C-x C-s. Skriv till slut C-x C-f TUTORIAL.sv <Return> för att komma
tillbaka till den här vägledningen.
Emacs sparar texten för varje fil i ett objekt kallat "buffert". När
@ -581,13 +588,37 @@ du finner en ny fil skapas en ny buffert i Emacs. F
>> Prova C-x C-b nu.
Se hur varje buffert har ett namn och att de också kan ha namnet
den fil som innehållet kommer från. En del buffertar är inte knutna
till någon fil, till exempel bufferten "*Buffer List*". Det är den
buffert som innehåller buffertlistan som skapades med C-x C-b. Vilken
text du än ser i ett Emacs-fönster tillhör den alltid en buffert.
den fil som innehållet kommer från. Vilken text du än ser i ett
Emacs-fönster tillhör den alltid en buffert.
>> Skriv C-x 1 för att bli kvitt buffertlistan.
När du har flera buffertar är bara en av dem "gällande" åt gången.
Det är den buffert du redigerar. Om du vill redigera en annan buffert
måste du byta till den. Om du vill byta till en buffert som
motsvarar en fil kan du göra det genom att besöka den igen med C-x
C-f. Det finns dock ett enklare sätt: använd C-x b kommandot. I det
kommandot anger du buffertens namn.
>> Skriv C-x b foo <Return> för att tillbaka till bufferten "foo"
som innehåller texten i filen "foo". Skriv sedan C-x b TUTORIAL.sv
<Return> för att komma tillbaka till den här handledningen.
Mestadels är buffertens namn densamma som filens namn (utan
katalogdel.) Det är dock inte alltid . Bufferlistan du skapar med
C-x C-b visar alltid namnen varje buffert.
All text du ser i ett Emacsfönster är alltid del av någon buffert. En
del buffertar är inte knutna till någon fil, till exempel bufferten
"*Buffer List*". Det är den buffert som innehåller buffertlistan som
skapades med C-x C-b. Bufferten "*Messages*" motsvarar inte heller
någon fil. Den innehåller de meddelanden som visas den nedersta
raden i Emacs sessionen.
>> Skriv C-x b *Messages* <Return> för att se meddelandebufferten.
Skriv sedan C-x b TUTORIAL.sv <Return> för att återgå till den här
handledningen.
Om du ändrar texten till en fil och sedan öppnar en ny fil, kommer
inte den första filen sparas. Förändringen ligger kvar i
bufferten. Skapande och redigering av den nya filen påverkar inte den
@ -603,7 +634,7 @@ vill spara eller ej.
>> Sätt in en rad med text och spara med C-x s
Du skall nu frågan om du önskar spara bufferten
TUTORIAL.se. Svara ja frågan genom att trycka "y" (yes).
TUTORIAL.sv. Svara ja frågan genom att trycka "y" (yes).
* UTVIDGNING AV KOMMANDOMÄNGDEN
@ -618,9 +649,9 @@ META-tangenter. F
kommandonamn.
Detta är kommandon som är bra att ha men används mer sällan än de
kommandon du redan har lärt dig. Du har redan sett två av dem, C-x C-f
för finn, och C-x C-s för spara. Ett annat exempel är kommandot för
att avsluta Emacs som är C-x C-c. Var inte rädd för att förlora
kommandon du redan har lärt dig. Du har redan sett några av dem, C-x
C-f för finn, och C-x C-s för spara. Ett annat exempel är kommandot
för att avsluta Emacs som är C-x C-c. Var inte rädd för att förlora
förändringar du har gjort. C-x C-c erbjuder dig att spara förändringar
innan Emacs avslutas.
@ -646,12 +677,14 @@ ist
Det finns många C-x kommandon. Här är en lista över de du har lärt dig
hittills:
C-x C-f Finn fil.
C-x C-s Spara fil.
C-x C-b Lista buffertar.
C-x C-c Avsluta Emacs.
C-x 1 Ta bort alla utom ett fönster.
C-x u Ångra.
C-x C-f Finn fil
C-x C-s Spara fil
C-x s Spara några buffertar
C-x C-b Lista buffertar
C-x b Byt buffert
C-x C-c Avsluta Emacs
C-x 1 Ta bort alla utom ett fönster
C-x u Ångra
Namngivna utvidgade kommandon är kommandon som används mycket sällan
eller bara i vissa lägen. Ett exempel ett sådant kommando är
@ -708,16 +741,16 @@ sk
Raden precis över ekoområdet kallas "lägesrad" (mode line). Den ser
ungefär ut här:
--:** TUTORIAL (Fundamental)--L670--58%----------------
--:** TUTORIAL 63% L749 (Fundamental)-----------------------
Raden innehåller information om Emacs och texten du redigerar.
Du vet redan vad filnamnet betyder, det är den fil du har funnit.
-NN%-- visar den aktuella positionen i texten, dvs. NN procent av
texten befinner sig över toppen av skärmbilden. Om toppen av filen är
i skärmbilden kommer det stå --Top-- istället för --00%-- och om
slutet av filen är i skärmbilden kommer det stå --Bot--. Om du ser
en fil där hela texten passar in en sida kommer det stå --All--.
Du vet redan vad filnamnet betyder, det är den fil du har funnit. NN%
visar den aktuella positionen i texten, dvs. NN procent av texten
befinner sig över toppen av skärmbilden. Om toppen av filen är i
skärmbilden kommer det stå "Top" istället för " 0%" och om slutet av
filen är i skärmbilden kommer det stå "Bot". Om du ser en fil där
hela texten passar in en sida kommer det stå "All".
Bokstaven L följd av siffror anger positionen ett annat
sätt. Siffrorna visar vilken rad som markören befinner sig .
@ -831,7 +864,7 @@ efter. <Return> avslutar s
har du sökt efter ordet "markör" en gång.
>> Skriv C-s en gång till för att söka efter nästa förekomst av ordet
"markör".
>> Tryck nu <Delete> fyra gånger och se hur markören flyttar sig
>> Tryck nu <Delback> fyra gånger och se hur markören flyttar sig
>> Tryck <Return> för att avsluta sökandet.
Såg du vad som hände? Under inkrementell sökning försöker Emacs att
@ -847,12 +880,12 @@ den vidare till Emacs. F
fall avsnittet "Spontaneous Entry to Incremental Search" i
Emacs-manualen för råd om hur detta kan undvikas.
Om du är inne i en inkrementell sökning och trycker <Delete> kommer du
lägga märke till att den sista bokstaven i söksträngen blir raderad
Om du är inne i en inkrementell sökning och trycker <Delback> kommer
du lägga märke till att den sista bokstaven i söksträngen blir raderad
och sökandet hoppar tillbaka till en tidigare förekomst. Om du till
exempel skriver "m" för att söka efter den första förekomsten av "m",
och sedan trycker "a" kommer markören flytta sig till första
förekomsten av "ma". Tryck nu <Delete>. Detta avlägsnar "a" från
förekomsten av "ma". Tryck nu <Delback>. Detta avlägsnar "a" från
söksträngen, och markören flyttar sig tillbaka till den första
förekomsten av "m".
@ -880,7 +913,7 @@ sk
det övre fönstret.
>> Skriv C-M-v för att rulla det nedre fönstret.
(Om du inte har META-tangenten trycker du ESC C-v.)
(Om du inte har META-tangenten trycker du <ESC> C-v.)
>> Skriv C-x o (o för other) för att flytta markören till det
nedre fönstret.
@ -910,10 +943,10 @@ som du trycker v. Det har ingen betydelse vilken av tangenterna
KONTROLL och META som trycks först, för bägge fungerar att de
"modifierar" de andra tangenterna du trycker.
Om du inte har META-tangenten och använder ESC istället är
ordningsföljden viktig. Du måste trycka ESC följt av KONTROLL-v,
KONTROLL-ESC v fungerar inte. Det är för att ESC är ett tecken i sig
och inte en äkta "modifierare".
Om du inte har META-tangenten och använder <ESC> istället är
ordningsföljden viktig. Du måste trycka <ESC> följt av KONTROLL-v,
KONTROLL-<ESC> v fungerar inte. Det är för att <ESC> är ett tecken i
sig och inte en äkta "modifierare".
>> Skriv C-x 1 i det övre fönstret för att bli kvitt det nedre
fönstret.
@ -946,12 +979,12 @@ Ibland kan du hamna i n
huvudläget i lägesraden. Till exempel kan det stå [(Fundamental)]
istället för (Fundamental).
För att komma ur rekursiv redigering trycker du ESC ESC ESC. Detta är
ett generellt brytkommando. Du kan också använda det för att bli kvitt
extra fönster och för att komma ut ur minibufferten.
För att komma ur rekursiv redigering trycker du <ESC> <ESC> <ESC>.
Detta är ett generellt brytkommando. Du kan också använda det för att
bli kvitt extra fönster och för att komma ut ur minibufferten.
>> Skriv M-x för att komma in i minibufferten. Skriv ESC ESC ESC
för att komma ut.
>> Skriv M-x för att komma in i minibufferten. Skriv <ESC> <ESC>
<ESC> för att komma ut.
Du kan inte använda C-g för att komma ut ur rekursiv redigering.
Detta är för att C-g används för att avbryta kommandon och argument
@ -985,7 +1018,8 @@ Den mest grundl
och en knappsekvens. Emacs ger en beskrivning av kommandot.
>> Skriv C-h c C-p.
Meddelandet skall bli något i stil med
Meddelandet skall bli något i stil med:
C-p runs the command previous-line
@ -1061,6 +1095,29 @@ oklart duger det inte att sitta och tycka synd om sig sj
ett mail och klaga!
* MER FUNKTIONER
----------------
Du kan lära dig mer om Emacs genom att läsa dess manual, antingen i
bokform eller on-line i Info (använd Hjälp-menyn eller skriv F10 h r).
Två finesser som du kan komma att gilla speciellt är komplettering
(completion), som spar tangenttryckningar, och dired, som förenklar
filhantering.
Komplettering är ett sätt att undvika onödiga tangenttryckningar. Till
exempel, om du vill byta till *Messages* bufferten, kan du du skriva
C-x b *M<Tab> och Emacs kommer fylla i resten av buffertnamnet
långt den kan räkna ut det från det du redan skrivit. Komplettering
finns beskrivet i Emacs-manualen i noden "Completion".
Dired gör det möjligt att lista filer i en katalog (och även dess
subkataloger), flytta runt i listan, besöka, byta namn, ta bort och
operera olika sätt filerna. Dired finns beskrivet i Info i
Emacs-manualen i noden "Dired".
Manualen beskriver även många andra Emacs funktioner.
* KOPIERING
-----------
@ -1071,7 +1128,7 @@ Lidell
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
Copyright (c) 1985, 1996 Free Software Foundation
Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the

View file

@ -1,3 +1,4 @@
0,T7h1R9!S0EQ1'0HV1!IR0$Yh10AW1M!RCc0*i10MU1aA!0Jl1(B.
,TJ'G90ET1"0JT1708Tl1(B ,T>(B.,TH(B. 2528 ,Tb4B:0CT10IQ17?0CU1+M?05l1aG0Cl1?RG09l1`40*Q19(B (Free Software
Foundation, Inc); ,T!0CX13R0HV1!IR`0'Wh1M9d"5M907i1RB:7(B.
0,T7h1R9!S0EQ1'0HV1!IR0$Yh10AW1M!RCc0*i10MU1aA!0Jl1(B (Emacs tutorial) ,TM0BYh1c9"3P09Ui1(B.

View file

@ -1,4 +1,4 @@
您正在閱讀 Emacs 快速指南( Emacs tutorial )。請見頁尾有關複製條件。
Emacs §Ö³t«ü«n¡].
Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
Emacs 指令通常包含有 CONTROL 鍵(有時候以 CTRL 或 CTL 來標示)或是

1055
etc/gnus-logo.eps Normal file

File diff suppressed because it is too large Load diff

1427
etc/gnus-refcard.tex Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,482 @@
2005-04-04 Lute Kamstra <lute@gnu.org>
* autorevert.el (auto-revert-mode): Specify :group.
* battery.el (display-battery-mode): Specify :group.
* diff-mode.el (diff-minor-mode): Specify :group.
* font-core.el (font-lock-mode): Specify :group.
* hl-line.el (hl-line-mode): Specify :group.
* iimage.el (iimage): New customization group.
(iimage-mode): Specify :group.
* longlines.el (longlines-mode): Specify :group.
* master.el: Don't require easy-mmode.
(master): New customization group.
(master-mode): Specify :group.
* msb.el (msb-mode): Specify :group.
* reveal.el (reveal-mode): Specify :group.
* simple.el (next-error-follow-minor-mode): Specify :group.
* smerge-mode.el (smerge-mode): Specify :group.
* emacs-lisp/eldoc.el (eldoc-mode): Specify :group.
* emulation/cua-base.el (cua-mode): Specify :group.
* international/encoded-kb.el (encoded-kbd-mode): Specify :group.
* language/thai-util.el (thai-auto-composition-mode)
(thai-word-mode): Specify :group.
* mail/supercite.el (sc-minor-mode): Specify :group.
* progmodes/cwarn.el (cwarn-mode): Specify :group.
* progmodes/flymake.el (flymake-mode): Specify :group.
* progmodes/glasses.el (glasses-mode): Specify :group.
* progmodes/hideif.el (hide-ifdef-mode): Specify :group.
* textmodes/enriched.el (enriched-mode): Specify :group.
* textmodes/refill.el (refill-mode): Specify :group.
* add-log.el (change-log-font-lock-keywords): Names in
parenthesized lists can contain spaces.
2005-04-04 Thien-Thi Nguyen <ttn@gnu.org>
* startup.el (fancy-splash-text): Shorten default text of
"Emacs Tutorial" line. Also, if the current language env
indicates an available tutorial file other than TUTORIAL,
extract its title and append it to the line in parentheses.
(fancy-splash-insert): If arg is a thunk, funcall it.
2005-04-04 Jay Belanger <belanger@truman.edu>
* calc.el (calc-language-alist): Add tags to customization type.
2005-04-03 Luc Teirlinck <teirllm@auburn.edu>
* xt-mouse.el (xterm-mouse-mode): Add explicit Custom group, mouse.
Doc fix.
2005-04-03 Marcelo Toledo <marcelo@marcelotoledo.org>
* add-log.el (change-log-font-lock-keywords): The manual
describing a Change Log entry, says: (...) "Aside from these
header lines, every line in the change log starts with a space or
a tab.". The font-lock was not highlighting lines started with
spaces, added support for it.
2005-04-03 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
* textmodes/bibtex.el (bibtex-url): Use format to generate the url.
(bibtex-generate-url-list): Update docstring accordingly. Put the
complex example in the docstring.
(bibtex-font-lock-url): Use pop.
2005-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/tcl.el (tcl-set-font-lock-keywords): Use new \_< ops.
* pcvs.el (cvs-checkout): Prompt for cvsroot as well.
2005-04-03 Glenn Morris <gmorris@ast.cam.ac.uk>
* filesets.el (filesets-set-default): Doc fix.
2005-04-03 Lute Kamstra <lute@gnu.org>
* generic.el (define-generic-mode): Add argument to specify
keywords for defcustom.
(default-generic-mode): Specify :group.
* generic-x.el: Specify :group for all generic modes.
* desktop.el (desktop-no-desktop-file-hook)
(desktop-after-read-hook): Fix docstring.
2005-04-02 Luc Teirlinck <teirllm@auburn.edu>
* simple.el (visible-mode): Use explicit :group keyword.
This changes the group of `visible-mode-hook' from paren-blinking
to editing-basics.
2005-04-02 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change)
* mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional
mailbox specifications as well as URLs.
(rmail-insert-inbox-text): Remove unused conditional branches.
2005-04-01 Jay Belanger <belanger@truman.edu>
* calc/calc-graph.el (calc-gnuplot-name, calc-gnuplot-plot-command)
(calc-gnuplot-print-command): Move definitions to calc.el.
* calc/calc-embed.el (calc-embedded-announce-formula)
(calc-embedded-open-formula, calc-embedded-close-formula)
(calc-embedded-open-word, calc-embedded-close-word)
(calc-embedded-open-plain, calc-embedded-close-plain)
(calc-embedded-open-new-formula, calc-embedded-close-new-formula)
(calc-embedded-open-mode, calc-embedded-close-mode):
Move definitions to calc.el.
* calc/calc.el (calc-settings-file, calc-language-alist):
Make customizable.
(calc-embedded-announce-formula, calc-embedded-open-formula)
(calc-embedded-close-formula, calc-embedded-open-word)
(calc-embedded-close-word, calc-embedded-open-plain)
(calc-embedded-close-plain, calc-embedded-open-new-formula)
(calc-embedded-close-new-formula, calc-embedded-open-mode)
(calc-embedded-close-mode, calc-gnuplot-name)
(calc-gnuplot-plot-command, calc-gnuplot-print-command): Move here
from other files and make customizable.
2005-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
* pcvs.el (cvs-temp-buffer, cvs-mode-kill-process, cvs-buffer-check):
Use buffer-live-p.
(cvs-mode-run): Don't call cvs-update-header here.
(cvs-run-process): Call cvs-update-header.
Use process properties for cvs-postprocess and cvs-buffer so that
the sentinel can behave better if the temp buffer is killed.
Use a pipe rather than a tty, to better handle unexpected prompts.
(cvs-sentinel): Rewrite. Call cvs-update-header.
2005-04-01 Andre Spiegel <spiegel@gnu.org>
* vc-hooks.el (vc-workfile-unchanged-p): Disable mtime check when
we go via Tramp or Ange-FTP. Suggested by Kai Grossjohann.
2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
* generic.el (define-generic-mode): Add indentation rule.
2005-03-31 Luc Teirlinck <teirllm@auburn.edu>
* files.el (mode-require-final-newline): Make Custom correctly
report a nil value and allow to set it to nil via Custom.
Doc fix.
2005-04-01 Kenichi Handa <handa@m17n.org>
* international/characters.el: Enable the correct case setting for
dotless-i and dotted-I.
2005-04-01 Kim F. Storm <storm@cua.dk>
* ido.el (ido-file-internal): Fall back to non-ido command if
initial directory is on slow ftp (or tramp) host.
2005-03-31 Richard M. Stallman <rms@gnu.org>
* emacs-lisp/autoload.el (make-autoload):
Handle define-global-minor-mode.
* emacs-lisp/easy-mmode.el (define-global-minor-mode):
Rename from easy-mmode-define-global-mode.
(easy-mmode-define-global-mode): Alias for define-global-minor-mode.
* progmodes/scheme.el (scheme-mode-syntax-table):
Update syntax of | and # for two-character comment syntax.
2005-03-31 Lute Kamstra <lute@gnu.org>
* emacs-lisp/easy-mmode.el (easy-mmode-define-global-mode)
(define-minor-mode): Call custom-current-group at load-time.
* generic.el (define-generic-mode): Add debug declaration.
Add defcustom for the mode hook.
(generic-mode-internal): Use run-mode-hooks.
2005-03-31 Kim F. Storm <storm@cua.dk>
* mouse.el (mouse-1-click-follows-link): Increase to 450 ms.
(mouse-fixup-help-message): New defun called by show_help_echo
to fixup mouse-2 prefix in help messages when applicable.
* tooltip.el (tooltip-show-help-function): Don't fixup message here.
2005-03-31 Kenichi Handa <handa@m17n.org>
* language/thai-word.el (thai-find-word-ends): Pay attention to
the case that we reach the end of buffer.
* textmodes/fill.el (fill-text-properties-at): New function.
(fill-newline): Use fill-text-properties-at instead of
text-properties-at.
2005-03-31 Karl Berry <karl@freefriends.org>
* textmodes/tex-mode.el (tex-compile): shell-quote-argument,
not comint-quote-filename.
2005-03-31 Olive Lin <olive.lin@versateladsl.be> (tiny change)
* textmodes/tex-mode.el (tex-start-tex) shell-quote-argument,
not comint-quote-filename.
2005-03-31 Thien-Thi Nguyen <ttn@gnu.org>
* help-fns.el (help-with-tutorial): Revert last change.
2005-03-31 Kim F. Storm <storm@cua.dk>
* emulation/cua-base.el (cua-scroll-down): Add CUA property.
2005-03-30 Paul Eggert <eggert@cs.ucla.edu>
* calendar/cal-china.el: Update reference to "Calendrical
Calculations" book; there's a new edition.
* calendar/cal-coptic.el: Likewise.
* calendar/cal-french.el: Likewise.
* calendar/cal-hebrew.el: Likewise.
* calendar/cal-islam.el: Likewise.
* calendar/cal-iso.el: Likewise.
* calendar/cal-julian.el: Likewise.
* calendar/cal-mayan.el: Likewise.
* calendar/cal-persia.el: Likewise.
* calendar/calendar.el: Likewise.
* calendar/holidays.el: Likewise.
* calendar/lunar.el: Likewise.
* calendar/solar.el: Likewise.
* calendar/calendar.el (calendar-day-abbrev-array): Remove trailing
white space from doc string.
2005-03-30 Jay Belanger <belanger@truman.edu>
* calc/calc-help.el (calc-full-help): Remove email address.
2005-03-30 Thien-Thi Nguyen <ttn@gnu.org>
* help-fns.el (help-with-tutorial): Delete title line.
2005-03-30 Glenn Morris <gmorris@ast.cam.ac.uk>
* calendar/cal-x.el (calendar-one-frame-setup)
(calendar-only-one-frame-setup, calendar-two-frame-setup): Use t
rather than 'symbol for set-window-dedicated-p.
* calendar/appt.el (appt-buffer-name): Make it a constant.
(appt-add): Doc fix.
* filesets.el (filesets-menu-path, filesets-menu-before)
(filesets-menu-in-menu): Doc fix. Now valid in GNU Emacs.
(filesets-menu-cache-file): Use directory ~/.emacs.d.
(filesets-add-submenu): Delete and use add-submenu instead.
2005-03-30 Carsten Dominik <dominik@science.uva.nl>
* org.el (org-agenda-phases-of-moon, org-agenda-sunrise-sunset)
(org-agenda-convert-date, org-agenda-goto-calendar): New commands.
(org-diary-default-entry): New function.
(org-get-entries-from-diary): Better parsing of diary entries.
(org-agenda-check-no-diary): New function.
("diary-lib"): Advice to function `add-to-diary-list', to allow
linking to diary entries.
(org-agenda-execute-calendar-command): New function.
(org-agenda): Improve visible section in window.
Use `org-fit-agenda-window'.
(org-fit-agenda-window): New option.
(org-move-subtree-down): Better handling of empty lines
at end of subtree.
(org-cycle): Numeric prefix is interpreted now as show-subtree N
levels up.
(org-fontify-done-headline): New option.
(org-headline-done-face): New face.
(org-set-font-lock-defaults): Use `org-headline-done-face'.
(org-table-copy-down): Rename from `org-table-copy-from-above'.
When current field is non-empty, it is copied to next row.
(org-table-copy-from-above): Fix bug which made it
impossible to copy fields containing only a single non-white character.
2005-03-30 Kim F. Storm <storm@cua.dk>
* kmacro.el (kmacro-end-macro): Isearch may store this command
into the macro -- so ignore it when executing keyboard macro.
2005-03-30 Nick Roberts <nickrob@snap.net.nz>
* tooltip.el (tooltip-gud-display): Use gud-overlay-arrow-position.
2005-03-29 Kenichi Handa <handa@m17n.org>
* language/thai.el ("Thai"): Set setup-function and exit-function
for Thai language environment.
* language/thai-util.el: Require thai-word.
(thai-word-mode-map): New variable.
(thai-word-mode): New minor mode.
(setup-thai-language-environment-internal): New function.
(exit-thai-language-environment-internal): New function.
* language/thai-word.el (thai-word-table): Declare it by defvar,
use dolist to initialize it.
(thai-kill-word, thai-backward-kill-word, thai-transpose-words)
(thai-fill-find-break-point): New functions.
2005-03-29 Richard M. Stallman <rms@gnu.org>
* simple.el (idle-update-delay): Move definition up.
(set-mark): Doc fix.
2005-03-29 Chong Yidong <cyd@stupidchicken.com>
* longlines.el: New file.
* simple.el (buffer-substring-filters): New variable.
(filter-buffer-substring): New function.
(kill-region, copy-region-as-kill): Use it.
* register.el (copy-to-register, append-to-register)
(prepend-to-register): Use filter-buffer-substring.
2005-03-30 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gud.el (gdb): (Re)-initialise gud-filter-pending-text.
(gud-filter-pending-text): Move in front of gdb.
(gud-overlay-arrow-position): New variable.
(gud-sentinel, gud-display-line): Use it in place of
overlay-arrow-position.
2005-03-29 Glenn Morris <gmorris@ast.cam.ac.uk>
* progmodes/fortran.el (fortran-if-indent): Doc fix.
(fortran-font-lock-keywords-2): Add "where", "elsewhere".
(fortran-font-lock-keywords-4): New variable.
(fortran-blocks-re, fortran-end-block-re)
(fortran-start-block-re): New constants, for hideshow.
(hs-special-modes-alist): Add a Fortran entry.
(fortran-mode-map): Bind fortran-end-of-block,
fortran-beginning-of-block to \M-\C-n, \M-\C-p.
(fortran-mode): Doc fix. Add fortran-font-lock-keywords-4.
(fortran-looking-at-if-then, fortran-end-of-block)
(fortran-beginning-of-block): New functions, for hideshow.
* progmodes/f90.el (f90-end-block-re, f90-start-block-re): Doc
fix. Tweak regexp.
(f90-beginning-of-block): Push mark first.
2005-03-29 Jay Belanger <belanger@truman.edu>
* calc/calc.el: Update copyright date.
(calc-version): Increase to 2.1.
(calc-version-date): Remove.
* calc/calc-help.el: Update copyright date.
(calc-full-help): Remove reference to calc-version-date.
Update copyright date.
2005-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
* vc.el (vc-do-command): Use a pipe for async processes, so password
prompts don't show up at places where the user can't reply.
2005-03-29 Olive Lin <olive.lin@versateladsl.be> (tiny change)
* textmodes/tex-mode.el (tex-send-command): shell-quote-argument
on the file name we pass to the inferior shell.
2005-03-29 Stephan Stahl <stahl@eos.franken.de> (tiny change)
* progmodes/which-func.el (which-function): Be robust in the face of an
imenu--make-index-alist failure.
2005-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
* reveal.el (reveal-mode-map): Don't override C-a and C-e.
* progmodes/python.el (python-preoutput-filter): Fix last change.
2005-03-29 Lute Kamstra <lute@gnu.org>
* emacs-lisp/debug.el (debug-on-entry): Handle autoloaded
functions and compiled macros.
(debug-convert-byte-code): Handle macros too.
(debug-on-entry-1): Don't signal an error when trying to clear a
function that is not set to debug on entry.
2005-03-29 Jay Belanger <belanger@truman.edu>
* calc/calc-lang.el: Add functions to math-function-table
properties of tex and math.
2005-03-29 Kenichi Handa <handa@m17n.org>
* ps-mule.el (ps-mule-plot-string): Translate characters by
ps-print-translation-table.
(ps-mule-begin-job): Call find-charset-region/string with
ps-print-translation-table.
(ps-mule-printable-p): Return t if CHARSET is ascii or latin-iso8859-1.
* ps-print.el (ps-print-translation-table): New variable.
(ps-plot-region): Translate characters by ps-print-translation-table.
2005-03-29 Juri Linkov <juri@jurta.org>
* simple.el (next-error-highlight-timer): New variable.
* progmodes/compile.el (compilation-goto-locus):
Use `next-error-highlight-timer' instead of `sit-for'.
2005-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
* mail/supercite.el (sc-mail-field): Use assoc-string.
(sc-get-address): Simplify regexps.
* files.el (minibuffer-with-setup-hook): New macro.
(find-file-read-args): Use it to avoid let-binding
minibuffer-with-setup-hook (which breaks turning on/off
file-name-shadow-mode while in the prompt).
* complete.el (PC-read-include-file-name-internal): Use test-completion.
2005-03-28 Luc Teirlinck <teirllm@auburn.edu>
* font-lock.el: Bind `font-lock-fontify-block' to M-o M-o.
2005-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
* window.el (window-buffer-height): Use count-screen-lines.
* progmodes/python.el (python-preoutput-leftover): New var.
(python-preoutput-filter): Use it.
(python-send-receive): Loop until all the result has been received.
2005-03-28 Juri Linkov <juri@jurta.org>
* dired.el (dired-mode-map): Add ellipsis to "Compare directories".
* menu-bar.el (menu-bar-file-menu): Remove ellipsis from
"Recover Crashed Session".
(menu-bar-search-menu): Add ellipsis to "Search tagged files".
(menu-bar-replace-menu): Add ellipsis to "Replace in tagged files".
(menu-bar-goto-menu): Add ellipsis to "Set Tags File Name".
(menu-bar-goto-menu): Add ellipsis to "Tags Apropos".
(menu-bar-options-menu): Add ellipsis to "Set Font/Fontset".
(menu-bar-manuals-menu): Add ellipsis to "Find Command in Manual".
(menu-bar-manuals-menu): Add ellipsis to "Find Key in Manual".
(menu-bar-help-menu): Remove ellipsis from "Find Emacs Packages".
* ediff-hook.el (menu-bar-ediff-misc-menu, ediff-misc-menu):
Remove ellipsis from "Ediff Manual", "Customize Ediff", "List
Ediff Sessions", "Toggle use of separate control buffer frame",
"Use separate frame for Ediff control buffer".
* bookmark.el (menu-bar-bookmark-map): Add ellipsis to "Jump to
Bookmark", "Set Bookmark", "Insert Contents", "Insert Location",
"Rename Bookmark", "Delete Bookmark".
* info.el (Info-mode-menu): Remove ellipsis from "Index".
Add ellipsis to "Lookup a String", "Lookup a string in all indices".
Add `:active Info-index-alternatives' to "Next Matching Item".
* wdired.el (wdired-change-to-wdired-mode):
Mention `wdired-abort-changes' key in the initial message.
* international/mule.el (auto-coding-alist): Associate non-ascii
image filename extensions with `no-conversion'.
2005-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
* international/iso-acc.el:
* obsolete/iso-acc.el: Move iso-acc to the obsolete subdir.
2005-03-26 Luc Teirlinck <teirllm@auburn.edu>
* textmodes/sgml-mode.el (html-mode): Doc update.
* autorevert.el (auto-revert-check-vc-info): Minor doc fix.
2005-03-26 Dan Nicolaescu <dann@ics.uci.edu>
* term.el (term-move-columns): Fix face after extending a line.
@ -345,8 +824,7 @@
2005-03-21 Lute Kamstra <lute@gnu.org>
* generic.el: Fix commentary section. Don't require cl for
compilation.
* generic.el: Fix commentary section. Don't require cl for compilation.
(generic-mode-list): Add autoload cookie.
(generic-use-find-file-hook, generic-lines-to-scan)
(generic-find-file-regexp, generic-ignore-files-regexp)
@ -396,20 +874,27 @@
* tramp-smb.el (all): Remove debug construct for
`with-parsed-tramp-file-name'.
(tramp-smb-prompt): Prompt can contain spaces inside directory
names.
(tramp-smb-prompt): Prompt can contain spaces inside directory names.
(tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file):
No error message if DIRECTORY or FILENAME doesn't exist.
(tramp-smb-open-connection): Check existence of
`tramp-smb-program'.
2005-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/perl-mode.el (perl-font-lock-syntactic-face-function):
Properly handle the case where the `m' or `s' command's argument is not
yet terminated.
(perl-indent-new-calculate): New function.
(perl-indent-line): Use it.
2005-03-20 Miles Bader <miles@gnu.org>
* progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Use breakpoint faces
in text-mode too. Change to new face names.
(breakpoint-enabled): Renamed from `breakpoint-enabled-bitmap-face'.
(breakpoint-enabled): Rename from `breakpoint-enabled-bitmap-face'.
Add `:weight bold' attribute.
(breakpoint-disabled): Renamed from `breakpoint-disabled-bitmap-face'.
(breakpoint-disabled): Rename from `breakpoint-disabled-bitmap-face'.
2005-03-19 Juri Linkov <juri@jurta.org>
@ -426,8 +911,7 @@
2005-03-19 Yoichi NAKAYAMA <yoichi@geiin.org> (tiny changes)
* finder.el (finder-current-item): Throw an error on an empty
line.
* finder.el (finder-current-item): Throw an error on an empty line.
* man.el (Man-follow-manual-reference): If current-word returns
nil, use "".
@ -466,8 +950,8 @@
2005-03-19 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-print.el (ps-generate-string-list, ps-generate-header-line): Use
functionp instead of symbolp and fboundp. Reported by Drkm
* ps-print.el (ps-generate-string-list, ps-generate-header-line):
Use functionp instead of symbolp and fboundp. Reported by Drkm
<darkman_spam@yahoo.fr>.
(ps-print-version): New version 6.6.6.
@ -2290,7 +2774,7 @@
* simple.el (eval-expression-print-format): Avoid warning
about edebug-active.
2005-01-15 "James R. Van Zandt" <jrvz@comcast.net> (Tiny change)
2005-01-15 James R. Van Zandt <jrvz@comcast.net> (Tiny change)
* progmodes/sh-script.el: Code copied from make-mode.el
with small changes,
@ -7012,8 +7496,7 @@
2004-09-21 Kenichi Handa <handa@m17n.org>
* descr-text.el (describe-char): Checking of quail activation
fixed.
* descr-text.el (describe-char): Checking of quail activation fixed.
2004-09-21 Jay Belanger <belanger@truman.edu>

View file

@ -1,7 +1,7 @@
;;; add-log.el --- change log maintenance commands for Emacs
;; Copyright (C) 1985, 86, 88, 93, 94, 97, 98, 2000, 03, 2004
;; Free Software Foundation, Inc.
;; Copyright (C) 1985, 1986, 1988, 1993, 1994, 1997, 1998, 2000, 2003,
;; 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: tools
@ -225,20 +225,20 @@ Note: The search is conducted only within 10%, at the beginning of the file."
(2 'change-log-email-face)))
;;
;; File names.
("^\t\\* \\([^ ,:([\n]+\\)"
("^\\(?: +\\|\t\\)\\* \\([^ ,:([\n]+\\)"
(1 'change-log-file-face)
;; Possibly further names in a list:
("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))
;; Possibly a parenthesized list of names:
("\\= (\\([^() ,\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
("\\= (\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
nil nil (1 'change-log-list-face))
("\\=, *\\([^() ,\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
nil nil (1 'change-log-list-face)))
;;
;; Function or variable names.
("^\t(\\([^() ,\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
("^\t(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)"
(1 'change-log-list-face)
("\\=, *\\([^() ,\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil
("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil
(1 'change-log-list-face)))
;;
;; Conditionals.

View file

@ -1,6 +1,6 @@
;;; autorevert.el --- revert buffers when files on disk change
;; Copyright (C) 1997, 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2001, 2004, 2005 Free Software Foundation, Inc.
;; Author: Anders Lindgren <andersl@andersl.com>
;; Keywords: convenience
@ -246,7 +246,7 @@ This currently works by automatically updating the version
control info every `auto-revert-interval' seconds. Nevertheless,
it should not cause excessive CPU usage on a reasonably fast
machine, if it does not apply to too many version controlled
buffers. CPU usage depends on the version control system"
buffers. CPU usage depends on the version control system."
:group 'auto-revert
:type 'boolean
:version "22.1")
@ -290,7 +290,7 @@ This is a minor mode that affects only the current buffer.
Use `global-auto-revert-mode' to automatically revert all buffers.
Use `auto-revert-tail-mode' if you know that the file will only grow
without being changed in the part that is already in the buffer."
nil auto-revert-mode-text nil
:group 'auto-revert :lighter auto-revert-mode-text
(if auto-revert-mode
(if (not (memq (current-buffer) auto-revert-buffer-list))
(push (current-buffer) auto-revert-buffer-list))

View file

@ -114,7 +114,7 @@ The text being displayed in the mode line is controlled by the variables
`battery-mode-line-format' and `battery-status-function'.
The mode line will be updated automatically every `battery-update-interval'
seconds."
:global t
:global t :group 'battery
(setq battery-mode-line-string "")
(or global-mode-string (setq global-mode-string '("")))
(and battery-update-timer (cancel-timer battery-update-timer))

View file

@ -2111,12 +2111,12 @@ strings returned are not."
(define-key map [write] '("Save Bookmarks As..." . bookmark-write))
(define-key map [save] '("Save Bookmarks" . bookmark-save))
(define-key map [edit] '("Edit Bookmark List" . bookmark-bmenu-list))
(define-key map [delete] '("Delete Bookmark" . bookmark-delete))
(define-key map [rename] '("Rename Bookmark" . bookmark-rename))
(define-key map [locate] '("Insert Location" . bookmark-locate))
(define-key map [insert] '("Insert Contents" . bookmark-insert))
(define-key map [set] '("Set Bookmark" . bookmark-set))
(define-key map [jump] '("Jump to Bookmark" . bookmark-jump))
(define-key map [delete] '("Delete Bookmark..." . bookmark-delete))
(define-key map [rename] '("Rename Bookmark..." . bookmark-rename))
(define-key map [locate] '("Insert Location..." . bookmark-locate))
(define-key map [insert] '("Insert Contents..." . bookmark-insert))
(define-key map [set] '("Set Bookmark..." . bookmark-set))
(define-key map [jump] '("Jump to Bookmark..." . bookmark-jump))
map))
;;;###autoload

View file

@ -1,6 +1,6 @@
;;; calc-embed.el --- embed Calc in a buffer
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <belanger@truman.edu>
@ -48,48 +48,18 @@
(defvar calc-embedded-some-active nil)
(make-variable-buffer-local 'calc-embedded-some-active)
(defvar calc-embedded-open-formula "\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin[^{].*\n\\|^\\\\begin{.*[^x]}.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n"
"*A regular expression for the opening delimiter of a formula used by
calc-embedded.")
(defvar calc-embedded-close-formula "\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n"
"*A regular expression for the closing delimiter of a formula used by
calc-embedded.")
(defvar calc-embedded-open-word "^\\|[^-+0-9.eE]"
"*A regular expression for the opening delimiter of a formula used by
calc-embedded-word.")
(defvar calc-embedded-close-word "$\\|[^-+0-9.eE]"
"*A regular expression for the closing delimiter of a formula used by
calc-embedded-word.")
(defvar calc-embedded-open-plain "%%% "
"*A string which is the opening delimiter for a \"plain\" formula.
If calc-show-plain mode is enabled, this is inserted at the front of
each formula.")
(defvar calc-embedded-close-plain " %%%\n"
"*A string which is the closing delimiter for a \"plain\" formula.
See calc-embedded-open-plain.")
(defvar calc-embedded-open-new-formula "\n\n"
"*A string which is inserted at front of formula by calc-embedded-new-formula.")
(defvar calc-embedded-close-new-formula "\n\n"
"*A string which is inserted at end of formula by calc-embedded-new-formula.")
(defvar calc-embedded-announce-formula "%Embed\n\\(% .*\n\\)*"
"*A regular expression which is sure to be followed by a calc-embedded formula." )
(defvar calc-embedded-open-mode "% "
"*A string which should precede calc-embedded mode annotations.
This is not required to be present for user-written mode annotations.")
(defvar calc-embedded-close-mode "\n"
"*A string which should follow calc-embedded mode annotations.
This is not required to be present for user-written mode annotations.")
;; The following variables are customizable and defined in calc.el.
(defvar calc-embedded-announce-formula)
(defvar calc-embedded-open-formula)
(defvar calc-embedded-close-formula)
(defvar calc-embedded-open-word)
(defvar calc-embedded-close-word)
(defvar calc-embedded-open-plain)
(defvar calc-embedded-close-plain)
(defvar calc-embedded-open-new-formula)
(defvar calc-embedded-close-new-formula)
(defvar calc-embedded-open-mode)
(defvar calc-embedded-close-mode)
(defconst calc-embedded-mode-vars '(("precision" . calc-internal-prec)
("word-size" . calc-word-size)

View file

@ -1,6 +1,6 @@
;;; calc-graph.el --- graph output functions for Calc
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <belanger@truman.edu>
@ -33,14 +33,10 @@
;;; Graphics
(defvar calc-gnuplot-name "gnuplot"
"*Name of GNUPLOT program, for calc-graph features.")
(defvar calc-gnuplot-plot-command nil
"*Name of command for displaying GNUPLOT output; %s = file name to print.")
(defvar calc-gnuplot-print-command "lp %s"
"*Name of command for printing GNUPLOT output; %s = file name to print.")
;; The following three variables are customizable and defined in calc.el.
(defvar calc-gnuplot-name)
(defvar calc-gnuplot-plot-command)
(defvar calc-gnuplot-print-command)
(defvar calc-gnuplot-tempfile "calc")

View file

@ -1,6 +1,6 @@
;;; calc-help.el --- help display functions for Calc,
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
@ -409,10 +409,10 @@ C-w Describe how there is no warranty for Calc."
(defun calc-full-help ()
(interactive)
(with-output-to-temp-buffer "*Help*"
(princ (format "GNU Emacs Calculator version %s of %s.\n"
calc-version calc-version-date))
(princ " By Dave Gillespie, daveg@synaptics.com.\n")
(princ " Copyright (C) 1990, 1993 Free Software Foundation, Inc.\n\n")
(princ (format "GNU Emacs Calculator version %s.\n"
calc-version))
(princ " By Dave Gillespie.\n")
(princ " Copyright (C) 2005 Free Software Foundation, Inc.\n\n")
(princ "Type `h s' for a more detailed summary.\n")
(princ "Or type `h i' to read the full Calc manual on-line.\n\n")
(princ "Basic keys:\n")

View file

@ -388,6 +388,9 @@
( \\arg . calcFunc-arg )
( \\cos . calcFunc-cos )
( \\cosh . calcFunc-cosh )
( \\cot . calcFunc-cot )
( \\coth . calcFunc-coth )
( \\csc . calcFunc-csc )
( \\det . calcFunc-det )
( \\exp . calcFunc-exp )
( \\gcd . calcFunc-gcd )
@ -395,10 +398,11 @@
( \\log . calcFunc-log10 )
( \\max . calcFunc-max )
( \\min . calcFunc-min )
( \\tan . calcFunc-tan )
( \\sec . calcFunc-sec )
( \\sin . calcFunc-sin )
( \\sinh . calcFunc-sinh )
( \\sqrt . calcFunc-sqrt )
( \\tan . calcFunc-tan )
( \\tanh . calcFunc-tanh )
( \\phi . calcFunc-totient )
( \\mu . calcFunc-moebius )))
@ -686,6 +690,10 @@
( Conjugate . calcFunc-conj )
( Cos . calcFunc-cos )
( Cosh . calcFunc-cosh )
( Cot . calcFunc-cot )
( Coth . calcFunc-coth )
( Csc . calcFunc-csc )
( Csch . calcFunc-csch )
( D . calcFunc-deriv )
( Dt . calcFunc-tderiv )
( Det . calcFunc-det )
@ -708,6 +716,8 @@
( Random . calcFunc-random )
( Round . calcFunc-round )
( Re . calcFunc-re )
( Sec . calcFunc-sec )
( Sech . calcFunc-sech )
( Sign . calcFunc-sign )
( Sin . calcFunc-sin )
( Sinh . calcFunc-sinh )

View file

@ -1,6 +1,7 @@
;;; calc.el --- the GNU Emacs calculator
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <belanger@truman.edu>
@ -205,9 +206,122 @@
(require 'calc-macs)
(defgroup calc nil
"GNU Calc"
:prefix "calc-"
:tag "Calc")
;;;###autoload
(defvar calc-settings-file (convert-standard-filename "~/.calc.el")
"*File in which to record permanent settings.")
(defcustom calc-settings-file
(convert-standard-filename "~/.calc.el")
"*File in which to record permanent settings."
:group 'calc
:type '(file))
(defcustom calc-language-alist
'((latex-mode . latex)
(tex-mode . tex)
(plain-tex-mode . tex)
(context-mode . tex)
(nroff-mode . eqn)
(pascal-mode . pascal)
(c-mode . c)
(c++-mode . c)
(fortran-mode . fortran)
(f90-mode . fortran))
"*Alist of major modes with appropriate Calc languages."
:group 'calc
:type '(alist :key-type (symbol :tag "Major mode")
:value-type (symbol :tag "Calc language")))
(defcustom calc-embedded-announce-formula
"%Embed\n\\(% .*\n\\)*"
"*A regular expression which is sure to be followed by a calc-embedded formula."
:group 'calc
:type '(regexp))
(defcustom calc-embedded-open-formula
"\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin[^{].*\n\\|^\\\\begin{.*[^x]}.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n"
"*A regular expression for the opening delimiter of a formula used by calc-embedded."
:group 'calc
:type '(regexp))
(defcustom calc-embedded-close-formula
"\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n"
"*A regular expression for the closing delimiter of a formula used by calc-embedded."
:group 'calc
:type '(regexp))
(defcustom calc-embedded-open-word
"^\\|[^-+0-9.eE]"
"*A regular expression for the opening delimiter of a formula used by calc-embedded-word."
:group 'calc
:type '(regexp))
(defcustom calc-embedded-close-word
"$\\|[^-+0-9.eE]"
"*A regular expression for the closing delimiter of a formula used by calc-embedded-word."
:group 'calc
:type '(regexp))
(defcustom calc-embedded-open-plain
"%%% "
"*A string which is the opening delimiter for a \"plain\" formula.
If calc-show-plain mode is enabled, this is inserted at the front of
each formula."
:group 'calc
:type '(string))
(defcustom calc-embedded-close-plain
" %%%\n"
"*A string which is the closing delimiter for a \"plain\" formula.
See calc-embedded-open-plain."
:group 'calc
:type '(string))
(defcustom calc-embedded-open-new-formula
"\n\n"
"*A string which is inserted at front of formula by calc-embedded-new-formula."
:group 'calc
:type '(string))
(defcustom calc-embedded-close-new-formula
"\n\n"
"*A string which is inserted at end of formula by calc-embedded-new-formula."
:group 'calc
:type '(string))
(defcustom calc-embedded-open-mode
"% "
"*A string which should precede calc-embedded mode annotations.
This is not required to be present for user-written mode annotations."
:group 'calc
:type '(string))
(defcustom calc-embedded-close-mode
"\n"
"*A string which should follow calc-embedded mode annotations.
This is not required to be present for user-written mode annotations."
:group 'calc
:type '(string))
(defcustom calc-gnuplot-name
"gnuplot"
"*Name of GNUPLOT program, for calc-graph features."
:group 'calc
:type '(string))
(defcustom calc-gnuplot-plot-command
nil
"*Name of command for displaying GNUPLOT output; %s = file name to print."
:group 'calc
:type '(choice (string) (sexp)))
(defcustom calc-gnuplot-print-command
"lp %s"
"*Name of command for printing GNUPLOT output; %s = file name to print."
:group 'calc
:type '(choice (string) (sexp)))
(defvar calc-bug-address "belanger@truman.edu"
"Address of the author of Calc, for use by `report-calc-bug'.")
@ -656,8 +770,7 @@ If nil, selections displayed but ignored.")
(put 'math-underflow 'error-conditions '(error math-underflow calc-error))
(put 'math-underflow 'error-message "Floating-point underflow occurred")
(defconst calc-version "2.02g")
(defconst calc-version-date "Mon Nov 19 2001")
(defconst calc-version "2.1")
(defvar calc-trail-pointer nil) ; "Current" entry in trail buffer.
(defvar calc-trail-overlay nil) ; Value of overlay-arrow-string.
(defvar calc-undo-list nil) ; List of previous operations for undo.

View file

@ -1,9 +1,9 @@
;;; appt.el --- appointment notification functions
;; Copyright (C) 1989, 1990, 1994, 1998, 2004 Free Software Foundation, Inc.
;; Copyright (C) 1989, 1990, 1994, 1998, 2004 Free Software Foundation, Inc.
;; Author: Neil Mager <neilm@juliet.ll.mit.edu>
;; Maintainer: FSF
;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
;; Keywords: calendar
;; This file is part of GNU Emacs.
@ -181,7 +181,7 @@ Only relevant if reminders are being displayed in a window."
;;; Internal variables below this point.
(defvar appt-buffer-name " *appt-buf*"
(defconst appt-buffer-name " *appt-buf*"
"Name of the appointments buffer.")
(defvar appt-time-msg-list nil
@ -486,9 +486,8 @@ Usually just deletes the appointment buffer."
;;;###autoload
(defun appt-add (new-appt-time new-appt-msg)
"Add an appointment for the day at NEW-APPT-TIME and issue message NEW-APPT-MSG.
"Add an appointment for today at NEW-APPT-TIME with message NEW-APPT-MSG.
The time should be in either 24 hour format or am/pm format."
(interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
(unless (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?"
new-appt-time)

View file

@ -38,8 +38,8 @@
;; The date of Chinese New Year is correct from 1644-2051.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -29,8 +29,8 @@
;; diary.el that deal with the Coptic and Ethiopic calendars.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -29,8 +29,8 @@
;; diary.el that deal with the French Revolutionary calendar.
;; Technical details of the French Revolutionary calendar can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997), and in
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001), and in
;; ``Calendrical Calculations, Part II: Three Historical Calendars'' by
;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and
;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404.

View file

@ -30,8 +30,8 @@
;; diary.el that deal with the Hebrew calendar.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -29,8 +29,8 @@
;; diary.el that deal with the Islamic calendar.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -30,8 +30,8 @@
;; diary.el that deal with the ISO calendar.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -29,8 +29,8 @@
;; diary.el that deal with the Julian calendar.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -44,8 +44,8 @@
;; Comments, improvements, and bug reports should be sent to Reingold.
;; Technical details of the Mayan calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997), and in
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001), and in
;; ``Calendrical Calculations, Part II: Three Historical Calendars''
;; by E. M. Reingold, N. Dershowitz, and S. M. Clamen,
;; Software--Practice and Experience, Volume 23, Number 4 (April, 1993),

View file

@ -29,8 +29,8 @@
;; diary.el that deal with the Persian calendar.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -1,9 +1,10 @@
;;; cal-x.el --- calendar windows in dedicated frames in X
;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1994, 1995, 2005 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
;; Keywords: calendar
;; Human-Keywords: calendar, dedicated frames, X Window System
@ -88,7 +89,7 @@ This function requires a display capable of multiple frames, else
(frame-parameters calendar-frame))))
(iconify-or-deiconify-frame))
(calendar-basic-setup arg)
(set-window-dedicated-p (selected-window) 'calendar)
(set-window-dedicated-p (selected-window) t)
(set-window-dedicated-p
(display-buffer
(if (not (memq 'fancy-diary-display diary-display-hook))
@ -96,7 +97,7 @@ This function requires a display capable of multiple frames, else
(if (not (bufferp (get-buffer fancy-diary-buffer)))
(make-fancy-diary-buffer))
fancy-diary-buffer))
'diary))))))
t))))))
(defun calendar-only-one-frame-setup (&optional arg)
"Start calendar and display it in a dedicated frame.
@ -117,7 +118,7 @@ This function requires a display capable of multiple frames, else
(frame-parameters calendar-frame))))
(iconify-or-deiconify-frame))
(calendar-basic-setup arg)
(set-window-dedicated-p (selected-window) 'calendar))))))
(set-window-dedicated-p (selected-window) t))))))
(defun calendar-two-frame-setup (&optional arg)
"Start calendar and diary in separate, dedicated frames.
@ -139,7 +140,7 @@ This function requires a display capable of multiple frames, else
(frame-parameters calendar-frame))))
(iconify-or-deiconify-frame))
(display-buffer calendar-buffer)
(set-window-dedicated-p (selected-window) 'calendar)
(set-window-dedicated-p (selected-window) t)
(setq diary-frame (make-frame diary-frame-parameters))
(run-hooks 'calendar-after-frame-setup-hooks)
(select-frame diary-frame)
@ -154,7 +155,7 @@ This function requires a display capable of multiple frames, else
(if (not (bufferp (get-buffer fancy-diary-buffer)))
(make-fancy-diary-buffer))
fancy-diary-buffer))
'diary)))))
t)))))
;; Formerly (get-file-buffer diary-file) was added to the list here,
;; but that isn't clean, and the value could even be nil.

View file

@ -75,13 +75,13 @@
;; solar.el Sunrise/sunset, equinoxes/solstices
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; An earlier version of the technical details appeared in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Software--Practice and Experience, Volume 20, Number 9 (September, 1990),
;; pages 899-928. ``Calendrical Calculations, Part II: Three Historical
;; pages 899-928, and in ``Calendrical Calculations, Part II: Three Historical
;; Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. Clamen,
;; Software--Practice and Experience, Volume 23, Number 4 (April, 1993),
;; pages 383-404.
@ -2763,7 +2763,7 @@ in `calendar-day-name-array'. These abbreviations may be used
instead of the full names in the diary file. Do not include a
trailing `.' in the strings specified in this variable, though
you may use such in the diary file. If any element of this array
is nil, then the abbreviation will be constructed as the first
is nil, then the abbreviation will be constructed as the first
`calendar-abbrev-length' characters of the corresponding full name.")
(defvar calendar-month-name-array

View file

@ -30,8 +30,8 @@
;; in calendar.el.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; An earlier version of the technical details appeared in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,

View file

@ -38,8 +38,8 @@
;; person rewrite the code for the lunar calculations in this file!
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -48,8 +48,8 @@
;; 1951--2050. For other years the times will be within +/- 1 minute.
;; Technical details of all the calendrical calculations can be found in
;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
;; Cambridge University Press (1997).
;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
;; and Nachum Dershowitz, Cambridge University Press (2001).
;; Comments, corrections, and improvements should be sent to
;; Edward M. Reingold Department of Computer Science

View file

@ -1,5 +1,5 @@
;;; time-date.el --- date and time handling functions
;; Copyright (C) 1998, 1999, 2000, 2004, 2005 Free Software Foundation, Inc.
;;; time-date.el --- Date and time handling functions
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu Umeda <umerin@mse.kyutech.ac.jp>

View file

@ -937,12 +937,11 @@ absolute rather than relative to some directory on the SEARCH-PATH."
((not completion-table) nil)
((eq action nil) (try-completion str2 completion-table nil))
((eq action t) (all-completions str2 completion-table nil))
((eq action 'lambda)
(eq (try-completion str2 completion-table nil) t))))
((eq action 'lambda) (test-completion str2 completion-table nil))))
(funcall PC-old-read-file-name-internal string dir action)))
(provide 'complete)
;;; arch-tag: fc7e2768-ff44-4e22-b579-4d825b968458
;; arch-tag: fc7e2768-ff44-4e22-b579-4d825b968458
;;; complete.el ends here

View file

@ -1,6 +1,6 @@
;;; desktop.el --- save partial status of Emacs when killed
;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001
;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2005
;; Free Software Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
@ -158,14 +158,14 @@ If nil, just print error messages in the message buffer."
(defcustom desktop-no-desktop-file-hook nil
"Normal hook run when `desktop-read' can't find a desktop file.
May e.g. be used to show a dired buffer."
May be used to show a dired buffer."
:type 'hook
:group 'desktop
:version "22.1")
(defcustom desktop-after-read-hook nil
"Normal hook run after a successful `desktop-read'.
May e.g. be used to show a buffer list."
May be used to show a buffer list."
:type 'hook
:group 'desktop
:version "22.1")

View file

@ -1,7 +1,7 @@
;;; diff-mode.el --- a mode for viewing/editing context diffs
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: convenience patch diff
@ -263,7 +263,7 @@ when editing big diffs)."
(save-excursion
(while (re-search-backward re start t)
(replace-match "" t t)))))))
(defvar diff-font-lock-keywords
`(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified
@ -484,7 +484,7 @@ If the OLD prefix arg is passed, tell the file NAME of the old file."
(let ((fs (diff-hunk-file-names old)))
(unless fs (error "No file name to look for"))
(push (cons fs name) diff-remembered-files-alist)))
(defun diff-hunk-file-names (&optional old)
"Give the list of file names textually mentioned for the current hunk."
(save-excursion
@ -952,7 +952,7 @@ a diff with \\[diff-reverse-direction]."
(define-minor-mode diff-minor-mode
"Minor mode for viewing/editing context diffs.
\\{diff-minor-mode-map}"
nil " Diff" nil
:group 'diff-mode :lighter " Diff"
;; FIXME: setup font-lock
;; setup change hooks
(if (not diff-update-on-the-fly)

View file

@ -1252,7 +1252,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
'("--"))
(define-key map [menu-bar immediate compare-directories]
'(menu-item "Compare directories" dired-compare-directories
'(menu-item "Compare directories..." dired-compare-directories
:help "Mark files with different attributes in two dired buffers"))
(define-key map [menu-bar immediate backup-diff]
'(menu-item "Compare with Backup" dired-backup-diff

View file

@ -131,10 +131,10 @@
))
(defvar ediff-misc-menu
'("Ediff Miscellanea"
["Ediff Manual..." ediff-documentation t]
["Customize Ediff..." ediff-customize t]
["List Ediff Sessions..." ediff-show-registry t]
["Use separate frame for Ediff control buffer..."
["Ediff Manual" ediff-documentation t]
["Customize Ediff" ediff-customize t]
["List Ediff Sessions" ediff-show-registry t]
["Use separate frame for Ediff control buffer"
ediff-toggle-multiframe
:style toggle
:selected (if (and (featurep 'ediff-util)
@ -242,14 +242,14 @@
;; define ediff miscellanea
(define-key menu-bar-ediff-misc-menu [emultiframe]
'("Toggle use of separate control buffer frame..."
'("Toggle use of separate control buffer frame"
. ediff-toggle-multiframe))
(define-key menu-bar-ediff-misc-menu [eregistry]
'("List Ediff Sessions..." . ediff-show-registry))
'("List Ediff Sessions" . ediff-show-registry))
(define-key menu-bar-ediff-misc-menu [ediff-cust]
'("Customize Ediff..." . ediff-customize))
'("Customize Ediff" . ediff-customize))
(define-key menu-bar-ediff-misc-menu [ediff-doc]
'("Ediff Manual..." . ediff-documentation))
'("Ediff Manual" . ediff-documentation))
)
) ; emacs case

View file

@ -72,7 +72,7 @@ or macro definition or a defcustom)."
(let ((car (car-safe form)) expand)
(cond
;; For complex cases, try again on the macro-expansion.
((and (memq car '(easy-mmode-define-global-mode
((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode
easy-mmode-define-minor-mode define-minor-mode))
(setq expand (let ((load-file-name file)) (macroexpand form)))
(eq (car expand) 'progn)

View file

@ -632,24 +632,31 @@ which must be written in Lisp, not predefined.
Use \\[cancel-debug-on-entry] to cancel the effect of this command.
Redefining FUNCTION also cancels it."
(interactive "aDebug on entry (to function): ")
;; Handle a function that has been aliased to some other function.
(if (and (subrp (symbol-function function))
(eq (cdr (subr-arity (symbol-function function))) 'unevalled))
(error "Function %s is a special form" function))
(if (or (symbolp (symbol-function function))
(when (and (subrp (symbol-function function))
(eq (cdr (subr-arity (symbol-function function))) 'unevalled))
(error "Function %s is a special form" function))
(if (or (symbolp (symbol-function function))
(subrp (symbol-function function)))
;; Create a wrapper in which we can then add the necessary debug call.
;; The function is built-in or aliased to another function.
;; Create a wrapper in which we can add the debug call.
(fset function `(lambda (&rest debug-on-entry-args)
,(interactive-form (symbol-function function))
(apply ',(symbol-function function)
debug-on-entry-args))))
(or (consp (symbol-function function))
(debug-convert-byte-code function))
(or (consp (symbol-function function))
(error "Definition of %s is not a list" function))
(apply ',(symbol-function function)
debug-on-entry-args)))
(when (eq (car-safe (symbol-function function)) 'autoload)
;; The function is autoloaded. Load its real definition.
(load (cadr (symbol-function function)) nil noninteractive nil t))
(when (or (not (consp (symbol-function function)))
(and (eq (car (symbol-function function)) 'macro)
(not (consp (cdr (symbol-function function))))))
;; The function is byte-compiled. Create a wrapper in which
;; we can add the debug call.
(debug-convert-byte-code function)))
(unless (consp (symbol-function function))
(error "Definition of %s is not a list" function))
(fset function (debug-on-entry-1 function t))
(or (memq function debug-function-list)
(push function debug-function-list))
(unless (memq function debug-function-list)
(push function debug-function-list))
function)
;;;###autoload
@ -664,45 +671,52 @@ If argument is nil or an empty string, cancel for all functions."
(if name (intern name)))))
(if (and function (not (string= function "")))
(progn
(let ((f (debug-on-entry-1 function nil)))
(let ((defn (debug-on-entry-1 function nil)))
(condition-case nil
(if (and (equal (nth 1 f) '(&rest debug-on-entry-args))
(eq (car (nth 3 f)) 'apply))
;; `f' is a wrapper introduced in debug-on-entry.
;; Get rid of it since we don't need it any more.
(setq f (nth 1 (nth 1 (nth 3 f)))))
(when (and (equal (nth 1 defn) '(&rest debug-on-entry-args))
(eq (car (nth 3 defn)) 'apply))
;; `defn' is a wrapper introduced in debug-on-entry.
;; Get rid of it since we don't need it any more.
(setq defn (nth 1 (nth 1 (nth 3 defn)))))
(error nil))
(fset function f))
(fset function defn))
(setq debug-function-list (delq function debug-function-list))
function)
(message "Cancelling debug-on-entry for all functions")
(mapcar 'cancel-debug-on-entry debug-function-list)))
(defun debug-convert-byte-code (function)
(let ((defn (symbol-function function)))
(if (not (consp defn))
;; Assume a compiled code object.
(let* ((contents (append defn nil))
(body
(list (list 'byte-code (nth 1 contents)
(nth 2 contents) (nth 3 contents)))))
(if (nthcdr 5 contents)
(setq body (cons (list 'interactive (nth 5 contents)) body)))
(if (nth 4 contents)
;; Use `documentation' here, to get the actual string,
;; in case the compiled function has a reference
;; to the .elc file.
(setq body (cons (documentation function) body)))
(fset function (cons 'lambda (cons (car contents) body)))))))
(let* ((defn (symbol-function function))
(macro (eq (car-safe defn) 'macro)))
(when macro (setq defn (cdr defn)))
(unless (consp defn)
;; Assume a compiled code object.
(let* ((contents (append defn nil))
(body
(list (list 'byte-code (nth 1 contents)
(nth 2 contents) (nth 3 contents)))))
(if (nthcdr 5 contents)
(setq body (cons (list 'interactive (nth 5 contents)) body)))
(if (nth 4 contents)
;; Use `documentation' here, to get the actual string,
;; in case the compiled function has a reference
;; to the .elc file.
(setq body (cons (documentation function) body)))
(setq defn (cons 'lambda (cons (car contents) body))))
(when macro (setq defn (cons 'macro defn)))
(fset function defn))))
(defun debug-on-entry-1 (function flag)
(let* ((defn (symbol-function function))
(tail defn))
(if (subrp tail)
(error "%s is a built-in function" function)
(if (eq (car tail) 'macro) (setq tail (cdr tail)))
(if (eq (car tail) 'lambda) (setq tail (cdr tail))
(error "%s not user-defined Lisp function" function))
(when (eq (car-safe tail) 'macro)
(setq tail (cdr tail)))
(if (not (eq (car-safe tail) 'lambda))
;; Only signal an error when we try to set debug-on-entry.
;; When we try to clear debug-on-entry, we are now done.
(when flag
(error "%s is not a user-defined Lisp function" function))
(setq tail (cdr tail))
;; Skip the docstring.
(when (and (stringp (cadr tail)) (cddr tail))
(setq tail (cdr tail)))
@ -713,8 +727,8 @@ If argument is nil or an empty string, cancel for all functions."
;; Add/remove debug statement as needed.
(if flag
(setcdr tail (cons '(implement-debug-on-entry) (cdr tail)))
(setcdr tail (cddr tail))))
defn)))
(setcdr tail (cddr tail)))))
defn))
(defun debugger-list-functions ()
"Display a list of all the functions now set to debug on entry."

View file

@ -1,6 +1,7 @@
;;; easy-mmode.el --- easy definition for major and minor modes
;; Copyright (C) 1997,2000,01,02,03,2004 Free Software Foundation, Inc.
;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr>
;; Maintainer: Stefan Monnier <monnier@gnu.org>
@ -152,8 +153,8 @@ For example, you could write
(unless group
;; We might as well provide a best-guess default group.
(setq group
`(:group ',(or (custom-current-group)
(intern (replace-regexp-in-string
`(:group (or (custom-current-group)
',(intern (replace-regexp-in-string
"-mode\\'" "" mode-name))))))
`(progn
@ -253,8 +254,9 @@ With zero or negative ARG turn mode off.
;;;
;;;###autoload
(defmacro easy-mmode-define-global-mode (global-mode mode turn-on
&rest keys)
(defalias 'easy-mmode-define-global-mode 'define-global-minor-mode)
;;;###autoload
(defmacro define-global-minor-mode (global-mode mode turn-on &rest keys)
"Make GLOBAL-MODE out of the buffer-local minor MODE.
TURN-ON is a function that will be called with no args in every buffer
and that should try to turn MODE on if applicable for that buffer.
@ -278,8 +280,8 @@ KEYS is a list of CL-style keyword arguments:
(unless group
;; We might as well provide a best-guess default group.
(setq group
`(:group ',(or (custom-current-group)
(intern (replace-regexp-in-string
`(:group (or (custom-current-group)
',(intern (replace-regexp-in-string
"-mode\\'" "" (symbol-name mode)))))))
`(progn

View file

@ -1,6 +1,7 @@
;;; eldoc.el --- show function arglist or variable docstring in echo area
;; Copyright (C) 1996, 97, 98, 99, 2000, 2003 Free Software Foundation, Inc.
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2005
;; Free Software Foundation, Inc.
;; Author: Noah Friedman <friedman@splode.com>
;; Maintainer: friedman@splode.com
@ -150,7 +151,7 @@ If point is over a documented variable, print that variable's docstring
instead.
With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
nil eldoc-minor-mode-string nil
:group 'eldoc :lighter eldoc-minor-mode-string
(setq eldoc-last-message nil)
(if eldoc-mode
(progn

View file

@ -1016,7 +1016,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
(scroll-down arg)
(beginning-of-buffer (goto-char (point-min)))))))
(put 'cua-scroll-up 'CUA 'move)
(put 'cua-scroll-down 'CUA 'move)
;;; Cursor indications
@ -1307,6 +1307,7 @@ highlight the region using `transient-mark-mode'), and typed text replaces
the active selection. C-z, C-x, C-c, and C-v will undo, cut, copy, and
paste (in addition to the normal emacs bindings)."
:global t
:group 'cua
:set-after '(cua-enable-modeline-indications cua-use-hyper-key)
:require 'cua-base
:link '(emacs-commentary-link "cua-base.el")

View file

@ -291,7 +291,7 @@ from `mode-require-final-newline'."
:group 'editing-basics)
(defcustom mode-require-final-newline t
"*Whether to add a newline at the end of the file, in certain major modes.
"*Whether to add a newline at end of file, in certain major modes.
Those modes set `require-final-newline' to this value when you enable them.
They do so because they are used for files that are supposed
to end in newlines, and the question is how to arrange that.
@ -299,10 +299,16 @@ to end in newlines, and the question is how to arrange that.
A value of t means do this only when the file is about to be saved.
A value of `visit' means do this right after the file is visited.
A value of `visit-save' means do it at both of those times.
Any other non-nil value means ask user whether to add a newline, when saving."
Any other non-nil value means ask user whether to add a newline, when saving.
nil means don't add newlines.
You will have to be careful if you set this to nil: you will have
to remember to manually add a final newline whenever you finish a
file that really needs one."
:type '(choice (const :tag "When visiting" visit)
(const :tag "When saving" t)
(const :tag "When visiting or saving" visit-save)
(const :tag "Never" nil)
(other :tag "Ask" ask))
:group 'editing-basics
:version "22.1")
@ -928,20 +934,31 @@ documentation for additional customization information."
(defvar find-file-default nil
"Used within `find-file-read-args'.")
(defmacro minibuffer-with-setup-hook (fun &rest body)
"Add FUN to `minibuffer-setup-hook' while executing BODY.
BODY should use the minibuffer at most once.
Recursive uses of the minibuffer will not be affected."
(declare (indent 1) (debug t))
(let ((hook (make-symbol "setup-hook")))
`(let ((,hook
(lambda ()
;; Clear out this hook so it does not interfere
;; with any recursive minibuffer usage.
(remove-hook 'minibuffer-setup-hook ,hook)
(,fun))))
(unwind-protect
(progn
(add-hook 'minibuffer-setup-hook ,hook)
,@body)
(remove-hook 'minibuffer-setup-hook ,hook)))))
(defun find-file-read-args (prompt mustmatch)
(list (let ((find-file-default
(and buffer-file-name
(abbreviate-file-name buffer-file-name)))
(munge-default-fun
(lambda ()
(setq minibuffer-default find-file-default)
;; Clear out this hook so it does not interfere
;; with any recursive minibuffer usage.
(pop minibuffer-setup-hook)))
(minibuffer-setup-hook
minibuffer-setup-hook))
(add-hook 'minibuffer-setup-hook munge-default-fun)
(read-file-name prompt nil default-directory mustmatch))
(abbreviate-file-name buffer-file-name))))
(minibuffer-with-setup-hook
(lambda () (setq minibuffer-default find-file-default))
(read-file-name prompt nil default-directory mustmatch)))
t))
(defun find-file (filename &optional wildcards)

View file

@ -1,6 +1,6 @@
;;; filesets.el --- handle group of files
;; Copyright (C) 2002 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2005 Free Software Foundation, Inc.
;; Author: Thomas Link <t.link@gmx.at>
;; Maintainer: FSF
@ -250,8 +250,15 @@ key is supported."
; (customize-set-variable var val))
; (filesets-build-menu))
;; It seems this is a workaround for the XEmacs issue described in the
;; doc-string of filesets-menu-ensure-use-cached. Under Emacs this is
;; essentially just `set-default'.
(defun filesets-set-default (sym val &optional init-flag)
"Set-default wrapper function used in conjunction with `defcustom'."
"Set-default wrapper function used in conjunction with `defcustom'.
If SYM is in the list `filesets-ignore-next-set-default', delete
it from that list, and return nil. Otherwise, set the value of
SYM to VAL and return t. If INIT-FLAG is non-nil, set with
`custom-initialize-set', otherwise with `set-default'."
(let ((ignore-flag (member sym filesets-ignore-next-set-default)))
(if ignore-flag
(setq filesets-ignore-next-set-default
@ -304,31 +311,26 @@ key is supported."
:type 'sexp
:group 'filesets)
(if filesets-running-xemacs
(progn
(defcustom filesets-menu-path nil
"*The menu under which the filesets menu should be inserted.
XEmacs specific; see `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets)
(defcustom filesets-menu-path nil
"*The menu under which the filesets menu should be inserted.
See `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets)
(defcustom filesets-menu-before "File"
"*The name of a menu before which this menu should be added.
XEmacs specific; see `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets)
(defcustom filesets-menu-before "File"
"*The name of a menu before which this menu should be added.
See `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets)
(defcustom filesets-menu-in-menu nil
"*Use that instead of `current-menubar' as the menu to change.
XEmacs specific; see `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets))
(defvar filesets-menu-path nil)
(defvar filesets-menu-before nil)
(defvar filesets-menu-in-menu nil))
(defcustom filesets-menu-in-menu nil
"*Use that instead of `current-menubar' as the menu to change.
See `add-submenu' for documentation."
:set (function filesets-set-default)
:type 'sexp
:group 'filesets)
(defcustom filesets-menu-shortcuts-flag t
"*Non-nil means to prepend menus with hopefully unique shortcuts."
@ -351,7 +353,7 @@ XEmacs specific; see `add-submenu' for documentation."
(defcustom filesets-menu-cache-file
(if filesets-running-xemacs
"~/.xemacs/filesets-cache.el"
"~/.filesets-cache.el")
"~/.emacs.d/filesets-cache.el")
"*File to be used for saving the filesets menu between sessions.
Set this to \"\", to disable caching of menus.
Don't forget to check out `filesets-menu-ensure-use-cached'."
@ -1070,9 +1072,7 @@ defined in `filesets-ingroup-patterns'."
;;; Emacs compatibility
(eval-and-compile
(if filesets-running-xemacs
(progn
(fset 'filesets-error 'error)
(fset 'filesets-add-submenu 'add-submenu))
(fset 'filesets-error 'error)
(require 'easymenu)
@ -1080,12 +1080,6 @@ defined in `filesets-ingroup-patterns'."
"`error' wrapper."
(error (mapconcat 'identity args " ")))
;; This should work for 21.1 Emacs
(defun filesets-add-submenu (menu-path submenu &optional
before in-menu)
"`easy-menu-define' wrapper."
(easy-menu-define
filesets-submenu global-map "Filesets menu" submenu))
))
(defun filesets-filter-dir-names (lst &optional negative)
@ -2339,7 +2333,7 @@ bottom up, set `filesets-submenus' to nil, first.)"
(filesets-menu-cache-file-save-maybe)))
(let ((cb (current-buffer)))
(when (not (member cb filesets-updated-buffers))
(filesets-add-submenu
(add-submenu
filesets-menu-path
`(,filesets-menu-name
("# Filesets"

View file

@ -148,7 +148,7 @@ buffer local value for `font-lock-defaults', via its mode hook.
The above is the default behavior of `font-lock-mode'; you may specify
your own function which is called when `font-lock-mode' is toggled via
`font-lock-function'. "
nil nil nil
:group 'font-lock
;; Don't turn on Font Lock mode if we don't have a display (we're running a
;; batch job) or if the buffer is invisible (the name starts with a space).
(when (or noninteractive (eq (aref (buffer-name) 0) ?\ ))

View file

@ -1097,7 +1097,7 @@ delimit the region to fontify."
((error quit) (message "Fontifying block...%s" error-data)))))))
(if (boundp 'facemenu-keymap)
(define-key facemenu-keymap "\M-g" 'font-lock-fontify-block))
(define-key facemenu-keymap "\M-o" 'font-lock-fontify-block))
;;; End of Fontification functions.

View file

@ -170,7 +170,8 @@ generic-x to enable the specified modes."
'((nil "^\\([-A-Za-z0-9_]+\\)" 1)
("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1)
("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1))))))
"Generic mode for Apache or HTTPD configuration files."))
"Generic mode for Apache or HTTPD configuration files."
:group 'generic-x))
(when (memq 'apache-log-generic-mode generic-extras-enable-list)
@ -183,7 +184,8 @@ generic-x to enable the specified modes."
(2 font-lock-variable-name-face)))
'("access_log\\'")
nil
"Mode for Apache log files"))
"Mode for Apache log files"
:group 'generic-x))
;;; Samba
(when (memq 'samba-generic-mode generic-extras-enable-list)
@ -197,7 +199,8 @@ generic-x to enable the specified modes."
(2 font-lock-type-face)))
'("smb\\.conf\\'")
'(generic-bracket-support)
"Generic mode for Samba configuration files."))
"Generic mode for Samba configuration files."
:group 'generic-x))
;;; Fvwm
;; This is pretty basic. Also, modes for other window managers could
@ -222,7 +225,8 @@ generic-x to enable the specified modes."
nil
'("\\.fvwmrc\\'" "\\.fvwm2rc\\'")
nil
"Generic mode for FVWM configuration files."))
"Generic mode for FVWM configuration files."
:group 'generic-x))
;;; X Resource
;; I'm pretty sure I've seen an actual mode to do this, but I don't
@ -235,7 +239,8 @@ generic-x to enable the specified modes."
'(("^\\([^:\n]+:\\)" 1 font-lock-variable-name-face))
'("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'")
nil
"Generic mode for X Resource configuration files."))
"Generic mode for X Resource configuration files."
:group 'generic-x))
;;; Hosts
(when (memq 'hosts-generic-mode generic-extras-enable-list)
@ -246,7 +251,8 @@ generic-x to enable the specified modes."
'(("\\([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\\)" 1 font-lock-constant-face))
'("[hH][oO][sS][tT][sS]\\'")
nil
"Generic mode for HOSTS files."))
"Generic mode for HOSTS files."
:group 'generic-x))
;;; Windows INF files
(when (memq 'inf-generic-mode generic-extras-enable-list)
@ -257,7 +263,8 @@ generic-x to enable the specified modes."
'(("^\\(\\[.*\\]\\)" 1 font-lock-constant-face))
'("\\.[iI][nN][fF]\\'")
'(generic-bracket-support)
"Generic mode for MS-Windows INF files."))
"Generic mode for MS-Windows INF files."
:group 'generic-x))
;;; Windows INI files
;; Should define escape character as well!
@ -277,7 +284,8 @@ generic-x to enable the specified modes."
(setq imenu-generic-expression
'((nil "^\\[\\(.*\\)\\]" 1)
("*Variables*" "^\\s-*\\([^=]+\\)\\s-*=" 1))))))
"Generic mode for MS-Windows INI files."))
"Generic mode for MS-Windows INI files."
:group 'generic-x))
;;; Windows REG files
;;; Unfortunately, Windows 95 and Windows NT have different REG file syntax!
@ -294,7 +302,8 @@ generic-x to enable the specified modes."
(lambda ()
(setq imenu-generic-expression
'((nil "^\\s-*\\(.*\\)\\s-*=" 1))))))
"Generic mode for MS-Windows Registry files."))
"Generic mode for MS-Windows Registry files."
:group 'generic-x))
;;; DOS/Windows BAT files
(when (memq 'bat-generic-mode generic-extras-enable-list)
@ -368,7 +377,8 @@ generic-x to enable the specified modes."
"\\`[cC][oO][nN][fF][iI][gG]\\."
"\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.")
'(generic-bat-mode-setup-function)
"Generic mode for MS-Windows BAT files.")
"Generic mode for MS-Windows BAT files."
:group 'generic-x)
(defvar bat-generic-mode-syntax-table nil
"Syntax table in use in bat-generic-mode buffers.")
@ -446,7 +456,8 @@ generic-x to enable the specified modes."
(lambda ()
(setq imenu-generic-expression
'((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1))))))
"Mode for Mailagent rules files."))
"Mode for Mailagent rules files."
:group 'generic-x))
;; Solaris/Sys V prototype files
(when (memq 'prototype-generic-mode generic-extras-enable-list)
@ -469,7 +480,8 @@ generic-x to enable the specified modes."
(2 font-lock-variable-name-face)))
'("prototype\\'")
nil
"Mode for Sys V prototype files."))
"Mode for Sys V prototype files."
:group 'generic-x))
;; Solaris/Sys V pkginfo files
(when (memq 'pkginfo-generic-mode generic-extras-enable-list)
@ -482,7 +494,8 @@ generic-x to enable the specified modes."
(2 font-lock-variable-name-face)))
'("pkginfo\\'")
nil
"Mode for Sys V pkginfo files."))
"Mode for Sys V pkginfo files."
:group 'generic-x))
;; Javascript mode
;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU]
@ -559,7 +572,8 @@ generic-x to enable the specified modes."
(setq imenu-generic-expression
'((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1))))))
"Mode for JavaScript files.")
"Mode for JavaScript files."
:group 'generic-x)
;; VRML files
(define-generic-mode vrml-generic-mode
@ -610,7 +624,8 @@ generic-x to enable the specified modes."
("*Definitions*"
"DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{"
1))))))
"Generic Mode for VRML files.")
"Generic Mode for VRML files."
:group 'generic-x)
;; Java Manifests
(define-generic-mode java-manifest-generic-mode
@ -629,7 +644,8 @@ generic-x to enable the specified modes."
(2 font-lock-constant-face)))
'("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
nil
"Mode for Java Manifest files")
"Mode for Java Manifest files"
:group 'generic-x)
;; Java properties files
(define-generic-mode java-properties-generic-mode
@ -659,7 +675,8 @@ generic-x to enable the specified modes."
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([^#! \t\n\r=:]+\\)" 1))))))
"Mode for Java properties files.")
"Mode for Java properties files."
:group 'generic-x)
;; C shell alias definitions
(when (memq 'alias-generic-mode generic-extras-enable-list)
@ -677,7 +694,8 @@ generic-x to enable the specified modes."
(lambda ()
(setq imenu-generic-expression
'((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2))))))
"Mode for C Shell alias files."))
"Mode for C Shell alias files."
:group 'generic-x))
;;; Windows RC files
;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira)
@ -769,7 +787,8 @@ generic-x to enable the specified modes."
(2 font-lock-variable-name-face nil t))))
'("\\.[rR][cC]$")
nil
"Generic mode for MS-Windows Resource files."))
"Generic mode for MS-Windows Resource files."
:group 'generic-x))
;; InstallShield RUL files
;; Contributed by Alfred.Correira@Pervasive.Com
@ -1389,7 +1408,8 @@ generic-x to enable the specified modes."
font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice?
'("\\.[rR][uU][lL]$")
'(generic-rul-mode-setup-function)
"Generic mode for InstallShield RUL files.")
"Generic mode for InstallShield RUL files."
:group 'generic-x)
(define-skeleton rul-if
"Insert an if statement."
@ -1437,7 +1457,8 @@ generic-x to enable the specified modes."
(2 font-lock-variable-name-face)))
'("\\.mailrc\\'")
nil
"Mode for mailrc files.")
"Mode for mailrc files."
:group 'generic-x)
;; Inetd.conf
(when (memq 'inetd-conf-generic-mode generic-extras-enable-list)
@ -1457,7 +1478,8 @@ generic-x to enable the specified modes."
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))
:group 'generic-x))
;; Services
(when (memq 'etc-services-generic-mode generic-extras-enable-list)
@ -1475,7 +1497,8 @@ generic-x to enable the specified modes."
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))))
'((nil "^\\([-A-Za-z0-9_]+\\)" 1))))))
:group 'generic-x))
;; Password and Group files
(when (memq 'etc-passwd-generic-mode generic-extras-enable-list)
@ -1517,7 +1540,8 @@ generic-x to enable the specified modes."
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))))
'((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))
:group 'generic-x))
;; Fstab
(when (memq 'etc-fstab-generic-mode generic-extras-enable-list)
@ -1567,7 +1591,8 @@ generic-x to enable the specified modes."
(function
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1))))))))
'((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1))))))
:group 'generic-x))
;; From Jacques Duthen <jacques.duthen@sncf.fr>
(eval-when-compile
@ -1609,7 +1634,8 @@ generic-x to enable the specified modes."
nil ;; no auto-mode-alist
;; '(show-tabs-generic-mode-hook-fun)
nil
"Generic mode to show tabs and trailing spaces")
"Generic mode to show tabs and trailing spaces"
:group 'generic-x)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; DNS modes
@ -1630,7 +1656,8 @@ generic-x to enable the specified modes."
;; List of additional automode-alist expressions
'("/etc/named.boot\\'")
;; List of set up functions to call
nil)
nil
:group 'generic-x)
(define-generic-mode named-database-generic-mode
;; List of comment characters
@ -1643,7 +1670,8 @@ generic-x to enable the specified modes."
;; List of additional automode-alist expressions
nil
;; List of set up functions to call
nil)
nil
:group 'generic-x)
(defvar named-database-time-string "%Y%m%d%H"
"Timestring for named serial numbers.")
@ -1663,7 +1691,8 @@ generic-x to enable the specified modes."
;; List of additional automode-alist expressions
'("/etc/resolv[e]?.conf\\'")
;; List of set up functions to call
nil)
nil
:group 'generic-x)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Modes for spice and common electrical engineering circuit netlist formats
@ -1705,7 +1734,8 @@ generic-x to enable the specified modes."
(function
(lambda()
(setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
"Generic mode for SPICE circuit netlist files.")
"Generic mode for SPICE circuit netlist files."
:group 'generic-x)
(define-generic-mode ibis-generic-mode
'(?|)
@ -1714,7 +1744,8 @@ generic-x to enable the specified modes."
("\\(\\(_\\|\\w\\)+\\)\\s-*=" 1 font-lock-variable-name-face))
'("\\.[iI][bB][sS]\\'")
'(generic-bracket-support)
"Generic mode for IBIS circuit netlist files.")
"Generic mode for IBIS circuit netlist files."
:group 'generic-x)
(define-generic-mode astap-generic-mode
nil
@ -1749,7 +1780,8 @@ generic-x to enable the specified modes."
(function
(lambda()
(setq font-lock-defaults '(generic-font-lock-keywords nil t)))))
"Generic mode for ASTAP circuit netlist files.")
"Generic mode for ASTAP circuit netlist files."
:group 'generic-x)
(define-generic-mode etc-modules-conf-generic-mode
;; List of comment characters
@ -1791,7 +1823,8 @@ generic-x to enable the specified modes."
;; List of additional automode-alist expressions
'("/etc/modules.conf" "/etc/conf.modules")
;; List of set up functions to call
nil)
nil
:group 'generic-x)
(provide 'generic-x)

View file

@ -185,7 +185,8 @@ the regexp in `generic-find-file-regexp'. If the value is nil,
;;;###autoload
(defmacro define-generic-mode (mode comment-list keyword-list
font-lock-list auto-mode-list
function-list &optional docstring)
function-list &optional docstring
&rest custom-keyword-args)
"Create a new generic mode MODE.
MODE is the name of the command for the generic mode; it need not
@ -216,59 +217,90 @@ as soon as `define-generic-mode' is called.
FUNCTION-LIST is a list of functions to call to do some
additional setup.
The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and
values. They will be passed to the generated `defcustom' form of
the mode hook variable MODE-hook. You can specify keyword
arguments without specifying a docstring.
See the file generic-x.el for some examples of `define-generic-mode'."
(let* ((name-unquoted (if (eq (car-safe mode) 'quote) ; Backward compatibility.
(eval mode)
mode))
(name-string (symbol-name name-unquoted))
(declare (debug (sexp def-form def-form def-form form def-form
&optional stringp))
(indent 1))
;; Backward compatibility.
(when (eq (car-safe mode) 'quote)
(setq mode (eval mode)))
(when (and docstring (not (stringp docstring)))
;; DOCSTRING is not a string so we assume that it's actually the
;; first keyword of CUSTOM-KEYWORD-ARGS.
(push docstring custom-keyword-args)
(setq docstring nil))
(let* ((mode-name (symbol-name mode))
(pretty-name (capitalize (replace-regexp-in-string
"-mode\\'" "" name-string))))
"-mode\\'" "" mode-name)))
(mode-hook (intern (concat mode-name "-hook"))))
(unless (plist-get custom-keyword-args :group)
(setq custom-keyword-args
(plist-put custom-keyword-args
:group `(or (custom-current-group)
',(intern (replace-regexp-in-string
"-mode\\'" "" mode-name))))))
`(progn
;; Add a new entry.
(add-to-list 'generic-mode-list ,name-string)
(add-to-list 'generic-mode-list ,mode-name)
;; Add it to auto-mode-alist
(dolist (re ,auto-mode-list)
(add-to-list 'auto-mode-alist (cons re ',name-unquoted)))
(add-to-list 'auto-mode-alist (cons re ',mode)))
(defun ,name-unquoted ()
(defcustom ,mode-hook nil
,(concat "Hook run when entering " pretty-name " mode.")
:type 'hook
,@custom-keyword-args)
(defun ,mode ()
,(or docstring
(concat pretty-name " mode.\n"
"This a generic mode defined with `define-generic-mode'."))
(interactive)
(generic-mode-internal ',name-unquoted ,comment-list ,keyword-list
(generic-mode-internal ',mode ,comment-list ,keyword-list
,font-lock-list ,function-list)))))
;;;###autoload
(defun generic-mode-internal (mode comments keywords font-lock-list funs)
(defun generic-mode-internal (mode comment-list keyword-list
font-lock-list function-list)
"Go into the generic mode MODE."
(let* ((modename (symbol-name mode))
(generic-mode-hooks (intern (concat modename "-hook")))
(let* ((mode-name (symbol-name mode))
(pretty-name (capitalize (replace-regexp-in-string
"-mode\\'" "" modename))))
"-mode\\'" "" mode-name)))
(mode-hook (intern (concat mode-name "-hook"))))
(kill-all-local-variables)
(setq major-mode mode
mode-name pretty-name)
(generic-mode-set-comments comments)
(generic-mode-set-comments comment-list)
;; Font-lock functionality.
;; Font-lock-defaults is always set even if there are no keywords
;; or font-lock expressions, so comments can be highlighted.
(setq generic-font-lock-keywords
(append
(when keywords
(list (generic-make-keywords-list keywords font-lock-keyword-face)))
(when keyword-list
(list (generic-make-keywords-list keyword-list
font-lock-keyword-face)))
font-lock-list))
(setq font-lock-defaults '(generic-font-lock-keywords nil))
;; Call a list of functions
(mapcar 'funcall funs)
(mapcar 'funcall function-list)
(run-hooks generic-mode-hooks)))
(run-mode-hooks mode-hook)))
;;;###autoload
(defun generic-mode (mode)
@ -359,7 +391,7 @@ Some generic modes are defined in `generic-x.el'."
imenu-case-fold-search t))
;; This generic mode is always defined
(define-generic-mode default-generic-mode (list ?#) nil nil nil nil)
(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic)
;; A more general solution would allow us to enter generic-mode for
;; *any* comment character, but would require us to synthesize a new
@ -392,7 +424,7 @@ This hook will be installed if the variable
(defun generic-mode-ini-file-find-file-hook ()
"Hook function to enter Default-Generic mode automatically for INI files.
Done if the first few lines of a file in Fundamental mode look like an
Done if the first few lines of a file in Fundamental mode look like an
INI file. This hook is NOT installed by default."
(and (eq major-mode 'fundamental-mode)
(save-excursion

View file

@ -1,3 +1,99 @@
2005-04-03 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-make-menu-bar): Fix an
"unrecognised menu descriptor" error.
2005-03-25 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-resend): Bind rfc2047-encode-encoded-words.
* mm-util.el (mm-replace-in-string): New function.
(mm-xemacs-find-mime-charset-1): Ignore errors while loading
latin-unity, which cannot be used with XEmacs 21.1.
* rfc2047.el (rfc2047-encode-function-alist): Rename from
rfc2047-encoding-function-alist in order to avoid conflicting with
the old version.
(rfc2047-encode-message-header): Remove useless goto-char.
(rfc2047-encodable-p): Don't move point.
(rfc2047-syntax-table): Treat `(' and `)' as is.
(rfc2047-encode-region): Concatenate words containing non-ASCII
characters in structured fields; don't encode space-delimited
ASCII words even in unstructured fields; don't break words at
char-category boundaries; encode encoded words in structured
fields; treat text within parentheses as special; show the
original text when error has occurred; move point to the end of
the region after encoding, suggested by IRIE Tetsuya
<irie@t.email.ne.jp>; treat backslash-quoted characters as
non-special; check carefully whether to encode special characters;
fix some kind of misconfigured headers; signal a real error if
debug-on-quit or debug-on-error is non-nil; don't infloop,
suggested by Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>; assume
the close parenthesis may be included in the encoded word; encode
bogus delimiters.
(rfc2047-encode-string): Use mm-with-multibyte-buffer.
(rfc2047-encode-max-chars): New variable.
(rfc2047-encode-1): New function.
(rfc2047-encode): Use it; encode text so that it occupies the
maximum width within 76-column; work correctly on Q encoding for
iso-2022-* charsets; fold the line before encoding; don't append a
space if the encoded word includes close parenthesis.
(rfc2047-fold-region): Use existing whitespace for LWSP; make it
sure not to break a line just after the header name.
(rfc2047-b-encode-region): Remove.
(rfc2047-b-encode-string): New function.
(rfc2047-q-encode-region): Remove.
(rfc2047-q-encode-string): New function.
(rfc2047-encode-parameter): New function.
(rfc2047-encoded-word-regexp): Don't use shy group.
(rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change.
(rfc2047-parse-and-decode): Ditto.
(rfc2047-decode): Treat the ascii coding-system as raw-text by
default.
2005-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
* rfc2047.el (rfc2047-encode-encoded-words): New variable.
(rfc2047-field-value): Strip props.
(rfc2047-encode-message-header): Disabled header folding -- not
all headers can be folded, and this should be done by the message
composition mode. Probably. I think.
(rfc2047-encodable-p): Say that =? needs encoding.
(rfc2047-encode-region): Encode =? strings.
2005-03-25 Jesper Harder <harder@ifa.au.dk>
* rfc2047.el (rfc2047-encoded-word-regexp): Support RFC 2231
language tags; remove unnecessary '+'. Reported by Stefan Wiens
<s.wi@gmx.net>.
(rfc2047-decode-string): Don't cons a string unnecessarily.
(rfc2047-parse-and-decode, rfc2047-decode): Use a character for
the encoding to avoid consing a string.
(rfc2047-decode): Use mm-subst-char-in-string instead of
mm-replace-chars-in-string.
2005-03-25 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
* rfc2047.el (rfc2047-encode): Use uppercase letters to specify
encodings of MIME-encoded words, in order to improve
interoperability with several broken MUAs.
2005-03-21 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-srvr.el (gnus-browse-select-group): Add NUMBER argument and
pass it to `gnus-browse-read-group'.
(gnus-browse-read-group): Add NUMBER argument and pass it to
`gnus-group-read-ephemeral-group'.
* gnus-group.el (gnus-group-read-ephemeral-group): Add NUMBER
argument and pass it to `gnus-group-read-group'.
2005-03-19 Aidan Kehoe <kehoea@parhasard.net>
* mm-util.el (mm-xemacs-find-mime-charset): Only call
mm-xemacs-find-mime-charset-1 if we have the mule feature
available at runtime.
2005-03-25 Werner Lemberg <wl@gnu.org>
* nnmaildir.el: Replace `illegal' with `invalid'.
@ -618,7 +714,7 @@
unless plugged. Disable the agent so that an open failure causes
an error.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Reiner Steib <Reiner.Steib@gmx.de>
2004-10-18 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-agent.el (gnus-agent-fetched-hook): Add :version.
(gnus-agent-go-online): Change :version.
@ -660,21 +756,21 @@
(gnus-convert-mark-converter-prompt)
(gnus-convert-converter-needs-prompt): Fix use of property list.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org>
2004-10-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-agent.el (gnus-agent-restore-gcc): Use ^ and regexp-quote.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org>
2004-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-get-unread-articles-in-group): Don't do
stuff for non-living groups.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org>
2004-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-synchronize-flags): Default to nil.
(gnus-agent-regenerate-group): Using nil messages aren't valid.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org>
2004-10-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-read-agentview):
Inline gnus-uncompress-range.
@ -691,7 +787,7 @@
message-send-mail-function. The change makes the agent real-time
responsive to user changes to message-send-mail-function.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Reiner Steib <Reiner.Steib@gmx.de>
2004-10-18 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-start.el (gnus-get-unread-articles): Fix last commit.
@ -732,12 +828,12 @@
* gnus-util.el (gnus-rename-file): New function.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org>
2004-10-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-agent.el (gnus-agent-regenerate-group): Activate the group
when the group's active is not available.
2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org>
2004-10-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-agent.el (gnus-agent-read-agentview): Add a missing arg to
error.

View file

@ -1984,7 +1984,8 @@ confirmation is required."
(defun gnus-group-read-ephemeral-group (group method &optional activate
quit-config request-only
select-articles
parameters)
parameters
number)
"Read GROUP from METHOD as an ephemeral group.
If ACTIVATE, request the group first.
If QUIT-CONFIG, use that window configuration when exiting from the
@ -1992,6 +1993,7 @@ ephemeral group.
If REQUEST-ONLY, don't actually read the group; just request it.
If SELECT-ARTICLES, only select those articles.
If PARAMETERS, use those as the group parameters.
If NUMBER, fetch this number of articles.
Return the name of the group if selection was successful."
(interactive
@ -2039,7 +2041,7 @@ Return the name of the group if selection was successful."
(when (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup)
(gnus-fetch-old-headers
gnus-fetch-old-ephemeral-headers))
(gnus-group-read-group t t group select-articles))
(gnus-group-read-group (or number t) t group select-articles))
group)
;;(error nil)
(quit

View file

@ -851,23 +851,26 @@ buffer.
(setq buffer-read-only t)
(gnus-run-hooks 'gnus-browse-mode-hook))
(defun gnus-browse-read-group (&optional no-article)
"Enter the group at the current line."
(interactive)
(defun gnus-browse-read-group (&optional no-article number)
"Enter the group at the current line.
If NUMBER, fetch this number of articles."
(interactive "P")
(let ((group (gnus-browse-group-name)))
(if (or (not (gnus-get-info group))
(gnus-ephemeral-group-p group))
(unless (gnus-group-read-ephemeral-group
group gnus-browse-current-method nil
(cons (current-buffer) 'browse))
(cons (current-buffer) 'browse)
nil nil nil number)
(error "Couldn't enter %s" group))
(unless (gnus-group-read-group nil no-article group)
(error "Couldn't enter %s" group)))))
(defun gnus-browse-select-group ()
"Select the current group."
(interactive)
(gnus-browse-read-group 'no))
(defun gnus-browse-select-group (&optional number)
"Select the current group.
If NUMBER, fetch this number of articles."
(interactive "P")
(gnus-browse-read-group 'no number))
(defun gnus-browse-next-group (n)
"Go to the next group."

View file

@ -2250,7 +2250,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
,@(if (featurep 'xemacs) '(t)
'(:help "Generate and print a PostScript image"))])
("Copy, move,... (Backend)"
,@(if (featurep 'xemacs) '(t)
,@(if (featurep 'xemacs) nil
'(:help "Copying, moving, expiring articles..."))
["Respool article..." gnus-summary-respool-article t]
["Move article..." gnus-summary-move-article

View file

@ -6364,7 +6364,8 @@ Optional DIGEST will use digest to forward."
(replace-match "X-From-Line: "))
;; Send it.
(let ((message-inhibit-body-encoding t)
message-required-mail-headers)
message-required-mail-headers
rfc2047-encode-encoded-words)
(message-send-mail))
(kill-buffer (current-buffer)))
(message "Resending message to %s...done" address)))

View file

@ -85,6 +85,32 @@
(insert-byte . insert-char)
(multibyte-char-to-unibyte . identity))))
(eval-and-compile
(cond
((fboundp 'replace-in-string)
(defalias 'mm-replace-in-string 'replace-in-string))
((fboundp 'replace-regexp-in-string)
(defun mm-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
If LITERAL is non-nil, insert NEWTEXT literally. Return a new
string containing the replacements.
This is a compatibility function for different Emacsen."
(replace-regexp-in-string regexp newtext string nil literal)))
(t
(defun mm-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
If LITERAL is non-nil, insert NEWTEXT literally. Return a new
string containing the replacements.
This is a compatibility function for different Emacsen."
(let ((start 0) tail)
(while (string-match regexp string start)
(setq tail (- (length string) (match-end 0)))
(setq string (replace-match newtext nil literal string))
(setq start (- (length string) tail))))
string))))
(eval-and-compile
(defalias 'mm-char-or-char-int-p
(cond
@ -606,7 +632,7 @@ But this is very much a corner case, so don't worry about it."
;; Load the Latin Unity library, if available.
(when (and (not (featurep 'latin-unity)) (locate-library "latin-unity"))
(require 'latin-unity))
(ignore-errors (require 'latin-unity)))
;; Now, can we use it?
(if (featurep 'latin-unity)
@ -651,7 +677,7 @@ But this is very much a corner case, so don't worry about it."
(defmacro mm-xemacs-find-mime-charset (begin end)
(when (featurep 'xemacs)
`(mm-xemacs-find-mime-charset-1 ,begin ,end)))
`(and (featurep 'mule) (mm-xemacs-find-mime-charset-1 ,begin ,end))))
(defun mm-find-mime-charset-region (b e &optional hack-charsets)
"Return the MIME charsets needed to encode the region between B and E.

View file

@ -119,12 +119,15 @@ The values can be:
Valid encodings are nil, `Q' and `B'. These indicate binary (no) encoding,
quoted-printable and base64 respectively.")
(defvar rfc2047-encoding-function-alist
'((Q . rfc2047-q-encode-region)
(B . rfc2047-b-encode-region)
(nil . ignore))
(defvar rfc2047-encode-function-alist
'((Q . rfc2047-q-encode-string)
(B . rfc2047-b-encode-string)
(nil . identity))
"Alist of RFC2047 encodings to encoding functions.")
(defvar rfc2047-encode-encoded-words t
"Whether encoded words should be encoded again.")
;;;
;;; Functions for encoding RFC2047 messages
;;;
@ -166,7 +169,7 @@ This is either `base64' or `quoted-printable'."
(save-restriction
(rfc2047-narrow-to-field)
(re-search-forward ":[ \t\n]*" nil t)
(buffer-substring (point) (point-max)))))
(buffer-substring-no-properties (point) (point-max)))))
(defvar rfc2047-encoding-type 'address-mime
"The type of encoding done by `rfc2047-encode-region'.
@ -186,24 +189,25 @@ Should be called narrowed to the head of the message."
(rfc2047-narrow-to-field)
(if (not (rfc2047-encodable-p))
(prog1
(if (and (eq (mm-body-7-or-8) '8bit)
(mm-multibyte-p)
(mm-coding-system-p
(car message-posting-charset)))
;; 8 bit must be decoded.
(mm-encode-coding-region
(point-min) (point-max)
(mm-charset-to-coding-system
(car message-posting-charset))))
(if (and (eq (mm-body-7-or-8) '8bit)
(mm-multibyte-p)
(mm-coding-system-p
(car message-posting-charset)))
;; 8 bit must be decoded.
(mm-encode-coding-region
(point-min) (point-max)
(mm-charset-to-coding-system
(car message-posting-charset))))
;; No encoding necessary, but folding is nice
(rfc2047-fold-region
(save-excursion
(goto-char (point-min))
(skip-chars-forward "^:")
(when (looking-at ": ")
(forward-char 2))
(point))
(point-max)))
(when nil
(rfc2047-fold-region
(save-excursion
(goto-char (point-min))
(skip-chars-forward "^:")
(when (looking-at ": ")
(forward-char 2))
(point))
(point-max))))
;; We found something that may perhaps be encoded.
(setq method nil
alist rfc2047-header-encoding-alist)
@ -213,7 +217,6 @@ Should be called narrowed to the head of the message."
(eq (car elem) t))
(setq alist nil
method (cdr elem))))
(goto-char (point-min))
(re-search-forward "^[^:]+: *" nil t)
(cond
((eq method 'address-mime)
@ -267,8 +270,13 @@ The buffer may be narrowed."
(require 'message) ; for message-posting-charset
(let ((charsets
(mm-find-mime-charset-region (point-min) (point-max))))
(and charsets
(not (equal charsets (list (car message-posting-charset)))))))
(goto-char (point-min))
(or (and rfc2047-encode-encoded-words
(prog1
(search-forward "=?" nil t)
(goto-char (point-min))))
(and charsets
(not (equal charsets (list (car message-posting-charset))))))))
;; Use this syntax table when parsing into regions that may need
;; encoding. Double quotes are string delimiters, backslash is
@ -292,8 +300,8 @@ The buffer may be narrowed."
table))))
(modify-syntax-entry ?\\ "\\" table)
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\( "." table)
(modify-syntax-entry ?\) "." table)
(modify-syntax-entry ?\( "(" table)
(modify-syntax-entry ?\) ")" table)
(modify-syntax-entry ?\< "." table)
(modify-syntax-entry ?\> "." table)
(modify-syntax-entry ?\[ "." table)
@ -310,183 +318,341 @@ By default, the region is treated as containing RFC2822 addresses.
Dynamically bind `rfc2047-encoding-type' to change that."
(save-restriction
(narrow-to-region b e)
(if (eq 'mime rfc2047-encoding-type)
;; Simple case. Treat as single word after any initial ASCII
;; part and before any tailing ASCII part. The leading ASCII
;; is relevant for instance in Subject headers with `Re:' for
;; interoperability with non-MIME clients, and we might as
;; well avoid the tail too.
(progn
(let ((encodable-regexp (if rfc2047-encode-encoded-words
"[^\000-\177]+\\|=\\?"
"[^\000-\177]+"))
start ; start of current token
end begin csyntax
;; Whether there's an encoded word before the current token,
;; either immediately or separated by space.
last-encoded
(orig-text (buffer-substring-no-properties b e)))
(if (eq 'mime rfc2047-encoding-type)
;; Simple case. Continuous words in which all those contain
;; non-ASCII characters are encoded collectively. Encoding
;; ASCII words, including `Re:' used in Subject headers, is
;; avoided for interoperability with non-MIME clients and
;; for making it easy to find keywords.
(progn
(goto-char (point-min))
(while (progn (skip-chars-forward " \t\n")
(not (eobp)))
(setq start (point))
(while (and (looking-at "[ \t\n]*\\([^ \t\n]+\\)")
(progn
(setq end (match-end 0))
(re-search-forward encodable-regexp end t)))
(goto-char end))
(if (> (point) start)
(rfc2047-encode start (point))
(goto-char end))))
;; `address-mime' case -- take care of quoted words, comments.
(with-syntax-table rfc2047-syntax-table
(goto-char (point-min))
;; Does it need encoding?
(skip-chars-forward "\000-\177")
(unless (eobp)
(skip-chars-backward "^ \n") ; beginning of space-delimited word
(rfc2047-encode (point) (progn
(goto-char e)
(skip-chars-backward "\000-\177")
(skip-chars-forward "^ \n")
;; end of space-delimited word
(point)))))
;; `address-mime' case -- take care of quoted words, comments.
(with-syntax-table rfc2047-syntax-table
(let ((start) ; start of current token
end ; end of current token
;; Whether there's an encoded word before the current
;; token, either immediately or separated by space.
last-encoded)
(goto-char (point-min))
(condition-case nil ; in case of unbalanced quotes
(condition-case err ; in case of unbalanced quotes
;; Look for rfc2822-style: sequences of atoms, quoted
;; strings, specials, whitespace. (Specials mustn't be
;; encoded.)
(while (not (eobp))
(setq start (point))
;; Skip whitespace.
(unless (= 0 (skip-chars-forward " \t\n"))
(setq start (point)))
(skip-chars-forward " \t\n")
(setq start (point))
(cond
((not (char-after))) ; eob
;; else token start
((eq ?\" (char-syntax (char-after)))
((eq ?\" (setq csyntax (char-syntax (char-after))))
;; Quoted word.
(forward-sexp)
(setq end (point))
;; Does it need encoding?
(goto-char start)
(skip-chars-forward "\000-\177" end)
(if (= end (point))
(setq last-encoded nil)
;; It needs encoding. Strip the quotes first,
;; since encoded words can't occur in quotes.
(goto-char end)
(delete-backward-char 1)
(goto-char start)
(delete-char 1)
(when last-encoded
;; There was a preceding quoted word. We need
;; to include any separating whitespace in this
;; word to avoid it getting lost.
(skip-chars-backward " \t")
;; A space is needed between the encoded words.
(insert ? )
(setq start (point)
end (1+ end)))
;; Adjust the end position for the deleted quotes.
(rfc2047-encode start (- end 2))
(setq last-encoded t))) ; record that it was encoded
((eq ?. (char-syntax (char-after)))
(if (re-search-forward encodable-regexp end 'move)
;; It needs encoding. Strip the quotes first,
;; since encoded words can't occur in quotes.
(progn
(goto-char end)
(delete-backward-char 1)
(goto-char start)
(delete-char 1)
(when last-encoded
;; There was a preceding quoted word. We need
;; to include any separating whitespace in this
;; word to avoid it getting lost.
(skip-chars-backward " \t")
;; A space is needed between the encoded words.
(insert ? )
(setq start (point)
end (1+ end)))
;; Adjust the end position for the deleted quotes.
(rfc2047-encode start (- end 2))
(setq last-encoded t)) ; record that it was encoded
(setq last-encoded nil)))
((eq ?. csyntax)
;; Skip other delimiters, but record that they've
;; potentially separated quoted words.
(forward-char)
(setq last-encoded nil))
((eq ?\) csyntax)
(error "Unbalanced parentheses"))
((eq ?\( csyntax)
;; Look for the end of parentheses.
(forward-list)
;; Encode text as an unstructured field.
(let ((rfc2047-encoding-type 'mime))
(rfc2047-encode-region (1+ start) (1- (point))))
(skip-chars-forward ")"))
(t ; normal token/whitespace sequence
;; Find the end.
(forward-word 1)
(skip-chars-backward " \t")
;; Skip one ASCII word, or encode continuous words
;; in which all those contain non-ASCII characters.
(setq end nil)
(while (not (or end (eobp)))
(when (looking-at "[\000-\177]+")
(setq begin (point)
end (match-end 0))
(when (progn
(while (and (or (re-search-forward
"[ \t\n]\\|\\Sw" end 'move)
(setq end nil))
(eq ?\\ (char-syntax (char-before))))
;; Skip backslash-quoted characters.
(forward-char))
end)
(setq end (match-beginning 0))
(if rfc2047-encode-encoded-words
(progn
(goto-char begin)
(when (search-forward "=?" end 'move)
(goto-char (match-beginning 0))
(setq end nil)))
(goto-char end))))
;; Where the value nil of `end' means there may be
;; text to have to be encoded following the point.
;; Otherwise, the point reached to the end of ASCII
;; words separated by whitespace or a special char.
(unless end
(when (looking-at encodable-regexp)
(goto-char (setq begin (match-end 0)))
(while (and (looking-at "[ \t\n]+\\([^ \t\n]+\\)")
(setq end (match-end 0))
(progn
(while (re-search-forward
encodable-regexp end t))
(< begin (point)))
(goto-char begin)
(or (not (re-search-forward "\\Sw" end t))
(progn
(goto-char (match-beginning 0))
nil)))
(goto-char end))
(when (looking-at "[^ \t\n]+")
(setq end (match-end 0))
(if (re-search-forward "\\Sw+" end t)
;; There are special characters better
;; to be encoded so that MTAs may parse
;; them safely.
(cond ((= end (point)))
((looking-at (concat "\\sw*\\("
encodable-regexp
"\\)"))
(setq end nil))
(t
(goto-char (1- (match-end 0)))
(unless (= (point) (match-beginning 0))
;; Separate encodable text and
;; delimiter.
(insert " "))))
(goto-char end)
(skip-chars-forward " \t\n")
(if (and (looking-at "[^ \t\n]+")
(string-match encodable-regexp
(match-string 0)))
(setq end nil)
(goto-char end)))))))
(skip-chars-backward " \t\n")
(setq end (point))
;; Deal with encoding and leading space as for
;; quoted words.
(goto-char start)
(skip-chars-forward "\000-\177" end)
(if (= end (point))
(setq last-encoded nil)
(when last-encoded
(goto-char start)
(skip-chars-backward " \t")
(insert ? )
(setq start (point)
end (1+ end)))
(rfc2047-encode start end)
(setq last-encoded t)))))
(if (re-search-forward encodable-regexp end 'move)
(progn
(unless (memq (char-before start) '(nil ?\t ? ))
(if (progn
(goto-char start)
(skip-chars-backward "^ \t\n")
(and (looking-at "\\Sw+")
(= (match-end 0) start)))
;; Also encode bogus delimiters.
(setq start (point))
;; Separate encodable text and delimiter.
(goto-char start)
(insert " ")
(setq start (1+ start)
end (1+ end))))
(rfc2047-encode start end)
(setq last-encoded t))
(setq last-encoded nil)))))
(error
(error "Invalid data for rfc2047 encoding: %s"
(buffer-substring b e)))))))
(rfc2047-fold-region b (point))))
(if (or debug-on-quit debug-on-error)
(signal (car err) (cdr err))
(error "Invalid data for rfc2047 encoding: %s"
(mm-replace-in-string orig-text "[ \t\n]+" " "))))))))
(rfc2047-fold-region b (point))
(goto-char (point-max))))
(defun rfc2047-encode-string (string)
"Encode words in STRING.
By default, the string is treated as containing addresses (see
`rfc2047-encoding-type')."
(with-temp-buffer
(mm-with-multibyte-buffer
(insert string)
(rfc2047-encode-region (point-min) (point-max))
(buffer-string)))
(defvar rfc2047-encode-max-chars 76
"Maximum characters of each header line that contain encoded-words.
If it is nil, encoded-words will not be folded. Too small value may
cause an error. Don't change this for no particular reason.")
(defun rfc2047-encode-1 (column string cs encoder start crest tail
&optional eword)
"Subroutine used by `rfc2047-encode'."
(cond ((string-equal string "")
(or eword ""))
((not rfc2047-encode-max-chars)
(concat start
(funcall encoder (if cs
(mm-encode-coding-string string cs)
string))
"?="))
((>= column rfc2047-encode-max-chars)
(when eword
(cond ((string-match "\n[ \t]+\\'" eword)
;; Reomove a superfluous empty line.
(setq eword (substring eword 0 (match-beginning 0))))
((string-match "(+\\'" eword)
;; Break the line before the open parenthesis.
(setq crest (concat crest (match-string 0 eword))
eword (substring eword 0 (match-beginning 0))))))
(rfc2047-encode-1 (length crest) string cs encoder start " " tail
(concat eword "\n" crest)))
(t
(let ((index 0)
(limit (1- (length string)))
(prev "")
next len)
(while (and prev
(<= index limit))
(setq next (concat start
(funcall encoder
(if cs
(mm-encode-coding-string
(substring string 0 (1+ index))
cs)
(substring string 0 (1+ index))))
"?=")
len (+ column (length next)))
(if (> len rfc2047-encode-max-chars)
(setq next prev
prev nil)
(if (or (< index limit)
(<= (+ len (or (string-match "\n" tail)
(length tail)))
rfc2047-encode-max-chars))
(setq prev next
index (1+ index))
(if (string-match "\\`)+" tail)
;; Break the line after the close parenthesis.
(setq tail (concat (substring tail 0 (match-end 0))
"\n "
(substring tail (match-end 0)))
prev next
index (1+ index))
(setq next prev
prev nil)))))
(if (> index limit)
(concat eword next tail)
(if (= 0 index)
(if (and eword
(string-match "(+\\'" eword))
(setq crest (concat crest (match-string 0 eword))
eword (substring eword 0 (match-beginning 0)))
(setq eword (concat eword next)))
(setq crest " "
eword (concat eword next)))
(when (string-match "\n[ \t]+\\'" eword)
;; Reomove a superfluous empty line.
(setq eword (substring eword 0 (match-beginning 0))))
(rfc2047-encode-1 (length crest) (substring string index)
cs encoder start " " tail
(concat eword "\n" crest)))))))
(defun rfc2047-encode (b e)
"Encode the word(s) in the region B to E.
By default, the region is treated as containing addresses (see
`rfc2047-encoding-type')."
(let* ((mime-charset (mm-find-mime-charset-region b e))
(cs (if (> (length mime-charset) 1)
;; Fixme: Instead of this, try to break region into
;; parts that can be encoded separately.
(error "Can't rfc2047-encode `%s'"
(buffer-substring b e))
(setq mime-charset (car mime-charset))
(mm-charset-to-coding-system mime-charset)))
;; Fixme: Better, calculate the number of non-ASCII
;; characters, at least for 8-bit charsets.
(encoding (or (cdr (assq mime-charset
Point moves to the end of the region."
(let ((mime-charset (or (mm-find-mime-charset-region b e) (list 'us-ascii)))
cs encoding tail crest eword)
(cond ((> (length mime-charset) 1)
(error "Can't rfc2047-encode `%s'"
(buffer-substring-no-properties b e)))
((= (length mime-charset) 1)
(setq mime-charset (car mime-charset)
cs (mm-charset-to-coding-system mime-charset))
(unless (and (mm-multibyte-p)
(mm-coding-system-p cs))
(setq cs nil))
(save-restriction
(narrow-to-region b e)
(setq encoding
(or (cdr (assq mime-charset
rfc2047-charset-encoding-alist))
;; For the charsets that don't have a preferred
;; encoding, choose the one that's shorter.
(save-restriction
(narrow-to-region b e)
(if (eq (rfc2047-qp-or-base64) 'base64)
'B
'Q))))
(start (concat
"=?" (downcase (symbol-name mime-charset)) "?"
(downcase (symbol-name encoding)) "?"))
(factor (case mime-charset
((iso-8859-5 iso-8859-7 iso-8859-8 koi8-r) 1)
((big5 gb2312 euc-kr) 2)
(utf-8 4)
(t 8)))
(pre (- b (save-restriction
(widen)
(rfc2047-point-at-bol))))
;; encoded-words must not be longer than 75 characters,
;; including charset, encoding etc. This leaves us with
;; 75 - (length start) - 2 - 2 characters. The last 2 is for
;; possible base64 padding. In the worst case (iso-2022-*)
;; each character expands to 8 bytes which is expanded by a
;; factor of 4/3 by base64 encoding.
(length (floor (- 75 (length start) 4) (* factor (/ 4.0 3.0))))
;; Limit line length to 76 characters.
(length1 (max 1 (floor (- 76 (length start) 4 pre)
(* factor (/ 4.0 3.0)))))
(first t))
(if mime-charset
(save-restriction
(narrow-to-region b e)
(when (eq encoding 'B)
;; break into lines before encoding
(goto-char (point-min))
(while (not (eobp))
(if first
(progn
(goto-char (min (point-max) (+ length1 (point))))
(setq first nil))
(goto-char (min (point-max) (+ length (point)))))
(unless (eobp)
(insert ?\n)))
(setq first t))
(if (and (mm-multibyte-p)
(mm-coding-system-p cs))
(mm-encode-coding-region (point-min) (point-max) cs))
(funcall (cdr (assq encoding rfc2047-encoding-function-alist))
(point-min) (point-max))
(goto-char (point-min))
(while (not (eobp))
(unless first
(insert ? ))
(setq first nil)
(insert start)
(end-of-line)
(insert "?=")
(forward-line 1))))))
(if (eq (rfc2047-qp-or-base64) 'base64)
'B
'Q)))
(widen)
(goto-char e)
(skip-chars-forward "^ \t\n")
;; `tail' may contain a close parenthesis.
(setq tail (buffer-substring-no-properties e (point)))
(goto-char b)
(setq b (point-marker)
e (set-marker (make-marker) e))
(rfc2047-fold-region (rfc2047-point-at-bol) b)
(goto-char b)
(skip-chars-backward "^ \t\n")
(unless (= 0 (skip-chars-backward " \t"))
;; `crest' may contain whitespace and an open parenthesis.
(setq crest (buffer-substring-no-properties (point) b)))
(setq eword (rfc2047-encode-1
(- b (rfc2047-point-at-bol))
(mm-replace-in-string
(buffer-substring-no-properties b e)
"\n\\([ \t]?\\)" "\\1")
cs
(or (cdr (assq encoding
rfc2047-encode-function-alist))
'identity)
(concat "=?" (downcase (symbol-name mime-charset))
"?" (upcase (symbol-name encoding)) "?")
(or crest " ")
tail))
(delete-region (if (eq (aref eword 0) ?\n)
(if (bolp)
;; The line was folded before encoding.
(1- (point))
(point))
(goto-char b))
(+ e (length tail)))
;; `eword' contains `crest' and `tail'.
(insert eword)
(set-marker b nil)
(set-marker e nil)
(unless (or (/= 0 (length tail))
(eobp)
(looking-at "[ \t\n)]"))
(insert " "))))
(t
(goto-char e)))))
(defun rfc2047-fold-field ()
"Fold the current header field."
@ -512,6 +678,7 @@ By default, the region is treated as containing addresses (see
(goto-char (or break qword-break))
(setq break nil
qword-break nil)
(skip-chars-backward " \t")
(if (looking-at "[ \t]")
(insert ?\n)
(insert "\n "))
@ -533,10 +700,8 @@ By default, the region is treated as containing addresses (see
(forward-char 1))
((memq (char-after) '(? ?\t))
(skip-chars-forward " \t")
(if first
;; Don't break just after the header name.
(setq first nil)
(setq break (1- (point)))))
(unless first ;; Don't break just after the header name.
(setq break (point))))
((not break)
(if (not (looking-at "=\\?[^=]"))
(if (eq (char-after) ?=)
@ -547,15 +712,17 @@ By default, the region is treated as containing addresses (see
(setq qword-break (point)))
(skip-chars-forward "^ \t\n\r")))
(t
(skip-chars-forward "^ \t\n\r"))))
(skip-chars-forward "^ \t\n\r")))
(setq first nil))
(when (and (or break qword-break)
(> (- (point) bol) 76))
(goto-char (or break qword-break))
(setq break nil
qword-break nil)
(if (looking-at "[ \t]")
(insert ?\n)
(insert "\n "))
(if (or (> 0 (skip-chars-backward " \t"))
(looking-at "[ \t]"))
(insert ?\n)
(insert "\n "))
(setq bol (1- (point)))
;; Don't break before the first non-LWSP characters.
(skip-chars-forward " \t")
@ -590,48 +757,48 @@ By default, the region is treated as containing addresses (see
(setq eol (rfc2047-point-at-eol))
(forward-line 1)))))
(defun rfc2047-b-encode-region (b e)
"Base64-encode the header contained in region B to E."
(save-restriction
(narrow-to-region (goto-char b) e)
(while (not (eobp))
(base64-encode-region (point) (progn (end-of-line) (point)) t)
(if (and (bolp) (eolp))
(delete-backward-char 1))
(forward-line))))
(defun rfc2047-b-encode-string (string)
"Base64-encode the header contained in STRING."
(base64-encode-string string t))
(defun rfc2047-q-encode-region (b e)
"Quoted-printable-encode the header in region B to E."
(save-excursion
(save-restriction
(narrow-to-region (goto-char b) e)
(let ((bol (save-restriction
(widen)
(rfc2047-point-at-bol))))
(quoted-printable-encode-region
b e nil
;; = (\075), _ (\137), ? (\077) are used in the encoded word.
;; Avoid using 8bit characters.
;; This list excludes `especials' (see the RFC2047 syntax),
;; meaning that some characters in non-structured fields will
;; get encoded when they con't need to be. The following is
;; what it used to be.
;;; ;; Equivalent to "^\000-\007\011\013\015-\037\200-\377=_?"
;;; "\010\012\014\040-\074\076\100-\136\140-\177")
"-\b\n\f !#-'*+0-9A-Z\\^`-~\d")
(subst-char-in-region (point-min) (point-max) ? ?_)
;; The size of QP encapsulation is about 20, so set limit to
;; 56=76-20.
(unless (< (- (point-max) (point-min)) 56)
;; Don't break if it could fit in one line.
;; Let rfc2047-encode-region break it later.
(goto-char (1+ (point-min)))
(while (and (not (bobp)) (not (eobp)))
(goto-char (min (point-max) (+ 56 bol)))
(search-backward "=" (- (point) 2) t)
(unless (or (bobp) (eobp))
(insert ?\n)
(setq bol (point)))))))))
(defun rfc2047-q-encode-string (string)
"Quoted-printable-encode the header in STRING."
(mm-with-unibyte-buffer
(insert string)
(quoted-printable-encode-region
(point-min) (point-max) nil
;; = (\075), _ (\137), ? (\077) are used in the encoded word.
;; Avoid using 8bit characters.
;; This list excludes `especials' (see the RFC2047 syntax),
;; meaning that some characters in non-structured fields will
;; get encoded when they con't need to be. The following is
;; what it used to be.
;;; ;; Equivalent to "^\000-\007\011\013\015-\037\200-\377=_?"
;;; "\010\012\014\040-\074\076\100-\136\140-\177")
"-\b\n\f !#-'*+0-9A-Z\\^`-~\d")
(subst-char-in-region (point-min) (point-max) ? ?_)
(buffer-string)))
(defun rfc2047-encode-parameter (param value)
"Return and PARAM=VALUE string encoded in the RFC2047-like style.
This is a replacement for the `rfc2231-encode-string' function.
When attaching files as MIME parts, we should use the RFC2231 encoding
to specify the file names containing non-ASCII characters. However,
many mail softwares don't support it in practice and recipients won't
be able to extract files with correct names. Instead, the RFC2047-like
encoding is acceptable generally. This function provides the very
RFC2047-like encoding, resigning to such a regrettable trend. To use
it, put the following line in your ~/.gnus.el file:
\(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter)
"
(let* ((rfc2047-encoding-type 'mime)
(rfc2047-encode-max-chars nil)
(string (rfc2047-encode-string value)))
(if (string-match (concat "[" ietf-drums-tspecials "]") string)
(format "%s=%S" param string)
(concat param "=" string))))
;;;
;;; Functions for decoding RFC2047 messages
@ -639,8 +806,8 @@ By default, the region is treated as containing addresses (see
(eval-and-compile
(defconst rfc2047-encoded-word-regexp
"=\\?\\([^][\000-\040()<>@,\;:\\\"/?.=]+\\)\\?\\(B\\|Q\\)\
\\?\\([!->@-~ +]*\\)\\?="))
"=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(\\*[^?]+\\)?\
\\?\\(B\\|Q\\)\\?\\([!->@-~ ]*\\)\\?="))
(defvar rfc2047-quote-decoded-words-containing-tspecials nil
"If non-nil, quote decoded words containing special characters.")
@ -671,7 +838,7 @@ By default, the region is treated as containing addresses (see
"\\(\n?[ \t]\\)+"
"\\(" rfc2047-encoded-word-regexp "\\)"))
nil t)
(delete-region (goto-char (match-end 1)) (match-beginning 6)))
(delete-region (goto-char (match-end 1)) (match-beginning 7)))
;; Decode the encoded words.
(setq b (goto-char (point-min)))
(while (re-search-forward rfc2047-encoded-word-regexp nil t)
@ -774,7 +941,20 @@ By default, the region is treated as containing addresses (see
mail-parse-charset
(not (eq mail-parse-charset 'us-ascii))
(not (eq mail-parse-charset 'gnus-decoded)))
(mm-decode-coding-string string mail-parse-charset)
;; `decode-coding-string' in Emacs offers a third optional
;; arg NOCOPY to avoid consing a new string if the decoding
;; is "trivial". Unfortunately it currently doesn't
;; consider anything else than a `nil' coding system
;; trivial.
;; `rfc2047-decode-string' is called multiple times for each
;; article during summary buffer generation, and we really
;; want to avoid unnecessary consing. So we bypass
;; `decode-coding-string' if the string is purely ASCII.
(if (and (fboundp 'detect-coding-string)
;; string is purely ASCII
(eq (detect-coding-string string t) 'undecided))
string
(mm-decode-coding-string string mail-parse-charset))
(mm-string-as-multibyte string)))))
(defun rfc2047-parse-and-decode (word)
@ -787,8 +967,8 @@ decodable."
(condition-case nil
(rfc2047-decode
(match-string 1 word)
(upcase (match-string 2 word))
(match-string 3 word))
(string-to-char (match-string 3 word))
(match-string 4 word))
(error word))
word))) ; un-decodable
@ -809,7 +989,7 @@ decodable."
(defun rfc2047-decode (charset encoding string)
"Decode STRING from the given MIME CHARSET in the given ENCODING.
Valid ENCODINGs are \"B\" and \"Q\".
Valid ENCODINGs are the characters \"B\" and \"Q\".
If your Emacs implementation can't decode CHARSET, return nil."
(if (stringp charset)
(setq charset (intern (downcase charset))))
@ -824,18 +1004,17 @@ If your Emacs implementation can't decode CHARSET, return nil."
(memq 'gnus-unknown mail-parse-ignored-charsets))
(setq cs (mm-charset-to-coding-system mail-parse-charset)))
(when cs
(when (and (eq cs 'ascii)
mail-parse-charset)
(setq cs mail-parse-charset))
(when (eq cs 'ascii)
(setq cs (or mail-parse-charset 'raw-text)))
(mm-decode-coding-string
(cond
((equal "B" encoding)
((char-equal ?B encoding)
(base64-decode-string
(rfc2047-pad-base64 string)))
((equal "Q" encoding)
((char-equal ?Q encoding)
(quoted-printable-decode-string
(mm-replace-chars-in-string string ?_ ? )))
(t (error "Invalid encoding: %s" encoding)))
(mm-subst-char-in-string ?_ ? string t)))
(t (error "Invalid encoding: %c" encoding)))
cs))))
(provide 'rfc2047)

View file

@ -1,6 +1,6 @@
;;; hl-line.el --- highlight the current line
;; Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
;; Copyright (C) 1998, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: FSF
@ -113,7 +113,7 @@ When `hl-line-sticky-flag' is nil, Hl-Line mode highlights the
line about point in the selected window only. In this case, it
uses the function `hl-line-unhighlight' on `pre-command-hook' in
addition to `hl-line-highlight' on `post-command-hook'."
nil nil nil
:group 'hl-line
(if hl-line-mode
(progn
;; In case `kill-all-local-variables' is called.

View file

@ -1935,19 +1935,21 @@ If INITIAL is non-nil, it specifies the initial input string."
;; Internal function for ido-find-file and friends
(unless item
(setq item 'file))
(let* ((ido-current-directory (ido-expand-directory default))
(ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory))
(ido-directory-too-big (and (not ido-directory-nonreadable)
(ido-directory-too-big-p ido-current-directory)))
(ido-context-switch-command switch-cmd)
filename)
(let ((ido-current-directory (ido-expand-directory default))
(ido-context-switch-command switch-cmd)
ido-directory-nonreadable ido-directory-too-big
filename)
(cond
((or (not ido-mode) (ido-is-slow-ftp-host))
(setq filename t
ido-exit 'fallback))
(if (or (not ido-mode) (ido-is-slow-ftp-host))
(setq filename t
ido-exit 'fallback)
(setq ido-directory-nonreadable
(ido-nonreadable-directory-p ido-current-directory)
ido-directory-too-big
(and (not ido-directory-nonreadable)
(ido-directory-too-big-p ido-current-directory))))
((and (eq item 'file)
(when (and (eq item 'file)
(or ido-use-url-at-point ido-use-filename-at-point))
(let (fn d)
(require 'ffap)
@ -1966,7 +1968,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(setq d (file-name-directory fn))
(file-directory-p d))
(setq ido-current-directory d)
(setq initial (file-name-nondirectory fn)))))))
(setq initial (file-name-nondirectory fn))))))
(let (ido-saved-vc-hb
(vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))

View file

@ -1,6 +1,6 @@
;;; iimage.el --- Inline image minor mode.
;; Copyright (C) 2004 Free Software Foundation
;; Copyright (C) 2004, 2005 Free Software Foundation
;; Author: KOSEKI Yoshinori <kose@meadowy.org>
;; Maintainer: KOSEKI Yoshinori <kose@meadowy.org>
@ -51,6 +51,11 @@
(eval-when-compile
(require 'image-file))
(defgroup iimage nil
"Support for inline images."
:version "22.1"
:group 'image)
(defconst iimage-version "1.1")
(defvar iimage-mode nil)
(defvar iimage-mode-map nil)
@ -137,7 +142,7 @@ With numeric ARG, display the images if and only if ARG is positive."
;;;###autoload
(define-minor-mode iimage-mode
"Toggle inline image minor mode."
nil " iImg" iimage-mode-map
:group 'iimage :lighter " iImg" :keymap iimage-mode-map
(run-hooks 'iimage-mode-hook)
(iimage-mode-buffer iimage-mode))

View file

@ -3026,12 +3026,12 @@ if point is in a menu item description, follow that menu item."
:help "Go to menu of visited nodes"]
["Table of Contents" Info-toc
:help "Go to table of contents"]
("Index..."
["Lookup a String" Info-index
("Index"
["Lookup a String..." Info-index
:help "Look for a string in the index items"]
["Next Matching Item" Info-index-next
["Next Matching Item" Info-index-next :active Info-index-alternatives
:help "Look for another occurrence of previous item"]
["Lookup a string in all indices" info-apropos
["Lookup a string in all indices..." info-apropos
:help "Look for a string in the indices of all manuals"])
["Edit" Info-edit :help "Edit contents of this node"
:active Info-enable-edit]

View file

@ -884,8 +884,8 @@
(set-case-syntax-pair
(decode-char 'ucs (1- c)) (decode-char 'ucs c) tbl))
(setq c (1+ c)))
;;(set-downcase-syntax ?$,1 P(B ?i tbl)
;;(set-upcase-syntax ?I ?$,1 Q(B tbl)
(set-downcase-syntax ?$,1 P(B ?i tbl)
(set-upcase-syntax ?I ?$,1 Q(B tbl)
(set-case-syntax-pair ?$,1 R(B ?$,1 S(B tbl)
(set-case-syntax-pair ?$,1 T(B ?$,1 U(B tbl)
(set-case-syntax-pair ?$,1 V(B ?$,1 W(B tbl)

View file

@ -269,7 +269,7 @@ automatically.
In Encoded-kbd mode, a text sent from keyboard is accepted
as a multilingual text encoded in a coding system set by
\\[set-keyboard-coding-system]."
:global t
:global t :group 'keyboard :group 'mule
(if encoded-kbd-mode
;; We are turning on Encoded-kbd mode.

View file

@ -384,6 +384,7 @@ See also `coding-category-list' and `coding-system-category'."
;; CODING-SYSTEM is no-conversion or undecided.
(error "Can't prefer the coding system `%s'" coding-system))
(set coding-category (or base coding-system))
;; Changing the binding of a coding category requires this call.
(update-coding-systems-internal)
(or (eq coding-category (car coding-category-list))
;; We must change the order.
@ -1691,6 +1692,7 @@ The default status is as follows:
coding-category-ccl
coding-category-binary))
;; Changing the binding of a coding category requires this call.
(update-coding-systems-internal)
(set-default-coding-systems nil)
@ -1904,6 +1906,7 @@ of `buffer-file-coding-system' set by this function."
(while priority
(set (car categories) (car priority))
(setq priority (cdr priority) categories (cdr categories)))
;; Changing the binding of a coding category requires this call.
(update-coding-systems-internal)))))
(defsubst princ-list (&rest args)

View file

@ -327,6 +327,7 @@ coding systems ordered by priority."
(mapc (function (lambda (x) (set (car x) (cdr x))))
prio-list)
(set-coding-priority (mapcar #'car prio-list))
;; Changing the binding of a coding category requires this call.
(update-coding-systems-internal)
(detect-coding-region ,from ,to))
;; We must restore the internal database.

View file

@ -1546,6 +1546,7 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place."
("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . no-conversion)
("\\.\\(sx[dmicw]\\|tar\\|tgz\\)\\'" . no-conversion)
("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion)
("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
("/#[^/]+#\\'" . emacs-mule))
"Alist of filename patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).

View file

@ -614,10 +614,13 @@ With numeric arg, repeat macro now that many times,
counting the definition just completed as the first repetition.
An argument of zero means repeat until error."
(interactive "P")
(end-kbd-macro arg #'kmacro-loop-setup-function)
(when (and last-kbd-macro (= (length last-kbd-macro) 0))
(message "Ignore empty macro")
(kmacro-pop-ring)))
;; Isearch may push the kmacro-end-macro key sequence onto the macro.
;; Just ignore it when executing the macro.
(unless executing-kbd-macro
(end-kbd-macro arg #'kmacro-loop-setup-function)
(when (and last-kbd-macro (= (length last-kbd-macro) 0))
(message "Ignore empty macro")
(kmacro-pop-ring))))
;;;###autoload

View file

@ -1,10 +1,9 @@
;;; thai-util.el --- utilities for Thai -*- coding: iso-2022-7bit; -*-
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;; Copyright (C) 2005
;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2005
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
;; Keywords: mule, multilingual, thai
@ -279,7 +278,7 @@ if necessary."
(defun thai-compose-syllable (beg end &optional category-set string)
(or category-set
(setq category-set
(setq category-set
(char-category-set (if string (aref string beg) (char-after beg)))))
(if (aref category-set ?c)
;; Starting with a consonant. We do relative composition.
@ -288,9 +287,9 @@ if necessary."
(compose-region beg end))
;; Vowel tone sequence.
(if string
(compose-string string beg end (list (aref string beg) '(Bc . Bc)
(compose-string string beg end (list (aref string beg) '(Bc . Bc)
(aref string (1+ beg))))
(compose-region beg end (list (char-after beg) '(Bc . Bc)
(compose-region beg end (list (char-after beg) '(Bc . Bc)
(char-after (1+ beg))))))
(- end beg))
@ -348,7 +347,7 @@ The return value is number of composed characters."
(if string
(if (eq (string-match thai-composition-pattern string from) from)
(thai-compose-syllable from (match-end 0) nil string))
(if (save-excursion
(if (save-excursion
(goto-char from)
(and (looking-at thai-composition-pattern)
(setq to (match-end 0))))
@ -376,12 +375,48 @@ The return value is number of composed characters."
;;;###autoload
(define-minor-mode thai-auto-composition-mode
"Minor mode for automatically correct Thai character composition."
nil nil nil
:group 'mule
(cond ((null thai-auto-composition-mode)
(remove-hook 'after-change-functions 'thai-auto-composition))
(t
(add-hook 'after-change-functions 'thai-auto-composition))))
;; Thai-word-mode requires functions in the feature `thai-word'.
(require 'thai-word)
(defvar thai-word-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [remap forward-word] 'thai-forward-word)
(define-key map [remap backward-word] 'thai-backward-word)
(define-key map [remap kill-word] 'thai-kill-word)
(define-key map [remap backward-kill-word] 'thai-backward-kill-word)
(define-key map [remap transpose-words] 'thai-transpose-words)
map)
"Keymap for `thai-word-mode'.")
(define-minor-mode thai-word-mode
"Minor mode to make word-oriented commands aware of Thai words.
The commands affected are \\[forward-word], \\[backward-word], \\[kill-word], \\[backward-kill-word], \\[transpose-words], and \\[fill-paragraph]."
:global t :group 'mule
(cond (thai-word-mode
;; This enables linebreak between Thai characters.
(modify-category-entry (make-char 'thai-tis620) ?|)
;; This enables linebreak at a Thai word boundary.
(put-charset-property 'thai-tis620 'fill-find-break-point-function
'thai-fill-find-break-point))
(t
(modify-category-entry (make-char 'thai-tis620) ?| nil t)
(put-charset-property 'thai-tis620 'fill-find-break-point-function
nil))))
;; Function to call on entering the Thai language environment.
(defun setup-thai-language-environment-internal ()
(thai-word-mode 1))
;; Function to call on exiting the Thai language environment.
(defun exit-thai-language-environment-internal ()
(thai-word-mode -1))
;;
(provide 'thai-util)

View file

@ -1,7 +1,8 @@
;;; thai-word.el -- find Thai word boundaries
;; Copyright (C) 2000, 2001, 2002, 2003, 2004
;; Electrotechnical Laboratory, JAPAN.
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Author: Kenichi HANDA <handa@etl.go.jp>
@ -72,13 +73,10 @@
;; which means that you can easily index the list character by
;; character.
(defconst thai-word-table nil)
;; Set up `thai-word-table'.
(let
((l
(defvar thai-word-table
(let ((table (list 'thai-words)))
(dolist (elt
;;; The following is indented as this to minimize this file size.
'("¡¡"
"¡¡Å"
"¡¡Ø¸Àѳ±ì"
@ -10732,11 +10730,10 @@
"äÎâ¡ÃÁÔàµÍÃì"
"äÎâ´Ã¤ÒÃìºÍ¹"
"äÎâÅ"
)))
(setq thai-word-table (list 'thai-words))
(while l
(set-nested-alist (car l) 1 thai-word-table)
(setq l (cdr l))))
))
(set-nested-alist elt 1 table))
table)
"Nested alist of Thai words.")
(defun thai-update-word-table (file &optional append)
@ -10783,7 +10780,7 @@ the current word list."
;; character by character.
(while this
(setq pos (1+ pos)
char (char-after pos)
char (or (char-after pos) 0)
category-set (char-category-set char))
;; If the current sequence is recorded in `thai-word-table'
;; (i.e. (car THIS) is 1) and the following Thai character is
@ -11042,6 +11039,33 @@ If COUNT is negative, move point forward (- COUNT) words."
(thai-forward-word (- count)))
(defun thai-kill-word (arg)
"Like kill-word but pay attention to Thai word boundaries.
With argument, do this that many times."
(interactive "p")
(kill-region (point) (progn (thai-forward-word arg) (point))))
(defun thai-backward-kill-word (arg)
"Like backward-kill-word but pay attention to Thai word boundaries."
(interactive "p")
(thai-kill-word (- arg)))
(defun thai-transpose-words (arg)
"Like transpose-words but pay attention to Thai word boundaries."
(interactive "*p")
(transpose-subr 'thai-forward-word arg))
(defun thai-fill-find-break-point (linebeg)
"Go to a line breaking position near point considering Thai word boundaries."
(let ((pos (point)))
(thai-forward-word -1)
(when (<= (point) linebeg)
(goto-char pos)
(thai-forward-word 1))
(kinsoku linebeg)))
(provide 'thai-word)

View file

@ -1,10 +1,9 @@
;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*-
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;; Copyright (C) 2005
;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2005
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
;; Keywords: multilingual, Thai
@ -53,6 +52,8 @@
(input-method . "thai-kesmanee")
(unibyte-display . thai-tis620)
(features thai-util)
(setup-function . setup-thai-language-environment-internal)
(exit-function . exit-thai-language-environment-internal)
(sample-text
. (thai-compose-string
(copy-sequence "Thai (,T@RIRd7B(B) ,TJ0GQ1J04U1$0CQ1:(B, ,TJ0GQ1J04U10$h1P(B")))

393
lisp/longlines.el Normal file
View file

@ -0,0 +1,393 @@
;;; longlines.el --- automatically wrap long lines
;; Copyright (C) 2000, 2001, 2004, 2005 by Free Software Foundation, Inc.
;; Authors: Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
;; Alex Schroeder <alex@gnu.org>
;; Chong Yidong <cyd@stupidchicken.com>
;; Maintainer: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: convenience
;; 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 2, 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; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Some text editors save text files with long lines, and they
;; automatically break these lines at whitespace, without actually
;; inserting any newline characters. When doing `M-q' in Emacs, you
;; are inserting newline characters. Longlines mode provides a file
;; format which wraps the long lines when reading a file and unwraps
;; the lines when saving the file. It can also wrap and unwrap
;; automatically as editing takes place.
;; Special thanks to Rod Smith for many useful bug reports.
;;; Code:
(require 'easy-mmode)
(defgroup longlines nil
"Automatic wrapping of long lines when loading files."
:group 'fill)
(defcustom longlines-auto-wrap t
"*Non-nil means long lines are automatically wrapped after each command.
Otherwise, you can perform filling using `fill-paragraph' or
`auto-fill-mode'. In any case, the soft newlines will be removed
when the file is saved to disk."
:group 'longlines
:type 'boolean)
(defcustom longlines-wrap-follows-window-size nil
"*Non-nil means wrapping and filling happen at the edge of the window.
Otherwise, `fill-column' is used, regardless of the window size. This
does not work well when the buffer is displayed in multiple windows
with differing widths."
:group 'longlines
:type 'boolean)
(defcustom longlines-show-hard-newlines nil
"*Non-nil means each hard newline is marked with a symbol.
You can also enable the display temporarily, using the command
`longlines-show-hard-newlines'"
:group 'longlines
:type 'boolean)
(defcustom longlines-show-effect (propertize "|\n" 'face 'escape-glyph)
"*A string to display when showing hard newlines.
This is used when `longlines-show-hard-newlines' is on."
:group 'longlines
:type 'string)
;; Internal variables
(defvar longlines-wrap-beg nil)
(defvar longlines-wrap-end nil)
(defvar longlines-wrap-point nil)
(defvar longlines-showing nil)
(make-variable-buffer-local 'longlines-wrap-beg)
(make-variable-buffer-local 'longlines-wrap-end)
(make-variable-buffer-local 'longlines-wrap-point)
(make-variable-buffer-local 'longlines-showing)
;; Mode
;;;###autoload
(define-minor-mode longlines-mode
"Toggle Long Lines mode.
In Long Lines mode, long lines are wrapped if they extend beyond
`fill-column'. The soft newlines used for line wrapping will not
show up when the text is yanked or saved to disk.
If `longlines-auto-wrap' is non-nil, lines are automatically
wrapped whenever the buffer is changed. You can always call
`fill-paragraph' to fill individual paragraphs.
If `longlines-show-hard-newlines' is non-nil, hard newlines will
be marked by a symbol."
:group 'longlines :lighter " ll"
(if longlines-mode
;; Turn on longlines mode
(progn
(use-hard-newlines 1 'never)
(set (make-local-variable 'require-final-newline) nil)
(add-to-list 'buffer-file-format 'longlines)
(add-hook 'change-major-mode-hook 'longlines-mode-off nil t)
(make-local-variable 'buffer-substring-filters)
(add-to-list 'buffer-substring-filters 'longlines-encode-string)
(when longlines-wrap-follows-window-size
(set (make-local-variable 'fill-column)
(- (window-width) window-min-width))
(add-hook 'window-configuration-change-hook
'longlines-window-change-function nil t))
(let ((buffer-undo-list t)
(mod (buffer-modified-p)))
;; Turning off undo is OK since (spaces + newlines) is
;; conserved, except for a corner case in
;; longlines-wrap-lines that we'll never encounter from here
(longlines-decode-region (point-min) (point-max))
(longlines-wrap-region (point-min) (point-max))
(set-buffer-modified-p mod))
(when (and longlines-show-hard-newlines
(not longlines-showing))
(longlines-show-hard-newlines))
(when longlines-auto-wrap
(auto-fill-mode 0)
(add-hook 'after-change-functions
'longlines-after-change-function nil t)
(add-hook 'post-command-hook
'longlines-post-command-function nil t)))
;; Turn off longlines mode
(setq buffer-file-format (delete 'longlines buffer-file-format))
(if longlines-showing
(longlines-unshow-hard-newlines))
(let ((buffer-undo-list t))
(longlines-encode-region (point-min) (point-max)))
(remove-hook 'change-major-mode-hook 'longlines-mode-off t)
(remove-hook 'before-kill-functions 'longlines-encode-region t)
(remove-hook 'after-change-functions 'longlines-after-change-function t)
(remove-hook 'post-command-hook 'longlines-post-command-function t)
(remove-hook 'window-configuration-change-hook
'longlines-window-change-function t)
(kill-local-variable 'fill-column)))
(defun longlines-mode-off ()
"Turn off longlines mode.
This function exists to be called by `change-major-mode-hook' when the
major mode changes."
(longlines-mode 0))
;; Showing the effect of hard newlines in the buffer
(defface longlines-visible-face
'((t (:background "red")))
"Face used to make hard newlines visible in `longlines-mode'.")
(defun longlines-show-hard-newlines (&optional arg)
"Make hard newlines visible by adding a face.
With optional argument ARG, make the hard newlines invisible again."
(interactive "P")
(let ((buffer-undo-list t)
(mod (buffer-modified-p)))
(if arg
(longlines-unshow-hard-newlines)
(setq longlines-showing t)
(longlines-show-region (point-min) (point-max)))
(set-buffer-modified-p mod)))
(defun longlines-show-region (beg end)
"Make hard newlines between BEG and END visible."
(let* ((pmin (min beg end))
(pmax (max beg end))
(pos (text-property-any pmin pmax 'hard t)))
(while pos
(put-text-property pos (1+ pos) 'display
(copy-sequence longlines-show-effect))
(setq pos (text-property-any (1+ pos) pmax 'hard t)))))
(defun longlines-unshow-hard-newlines ()
"Make hard newlines invisible again."
(interactive)
(setq longlines-showing nil)
(let ((pos (text-property-any (point-min) (point-max) 'hard t)))
(while pos
(remove-text-properties pos (1+ pos) '(display))
(setq pos (text-property-any (1+ pos) (point-max) 'hard t)))))
;; Wrapping the paragraphs.
(defun longlines-wrap-region (beg end)
"Wrap each successive line, starting with the line before BEG.
Stop when we reach lines after END that don't need wrapping, or the
end of the buffer."
(setq longlines-wrap-point (point))
(goto-char beg)
(forward-line -1)
;; Two successful longlines-wrap-line's in a row mean successive
;; lines don't need wrapping.
(while (null (and (longlines-wrap-line)
(or (eobp)
(and (>= (point) end)
(longlines-wrap-line))))))
(goto-char longlines-wrap-point))
(defun longlines-wrap-line ()
"If the current line needs to be wrapped, wrap it and return nil.
If wrapping is performed, point remains on the line. If the line does
not need to be wrapped, move point to the next line and return t."
(if (longlines-set-breakpoint)
(progn (backward-char 1)
(delete-char 1)
(insert-char ?\n 1)
nil)
(if (longlines-merge-lines-p)
(progn (end-of-line)
(delete-char 1)
;; After certain commands (e.g. kill-line), there may be two
;; successive soft newlines in the buffer. In this case, we
;; replace these two newlines by a single space. Unfortunately,
;; this breaks the conservation of (spaces + newlines), so we
;; have to fiddle with longlines-wrap-point.
(if (or (bolp) (eolp))
(if (> longlines-wrap-point (point))
(setq longlines-wrap-point
(1- longlines-wrap-point)))
(insert-char ? 1))
nil)
(forward-line 1)
t)))
(defun longlines-set-breakpoint ()
"Place point where we should break the current line, and return t.
If the line should not be broken, return nil; point remains on the
line."
(move-to-column fill-column)
(if (and (re-search-forward "[^ ]" (line-end-position) 1)
(> (current-column) fill-column))
;; This line is too long. Can we break it?
(or (longlines-find-break-backward)
(progn (move-to-column fill-column)
(longlines-find-break-forward)))))
(defun longlines-find-break-backward ()
"Move point backward to the first available breakpoint and return t.
If no breakpoint is found, return nil."
(and (search-backward " " (line-beginning-position) 1)
(save-excursion
(skip-chars-backward " " (line-beginning-position))
(null (bolp)))
(progn (forward-char 1)
(if (and fill-nobreak-predicate
(run-hook-with-args-until-success
'fill-nobreak-predicate))
(progn (skip-chars-backward " " (line-beginning-position))
(longlines-find-break-backward))
t))))
(defun longlines-find-break-forward ()
"Move point forward to the first available breakpoint and return t.
If no break point is found, return nil."
(and (search-forward " " (line-end-position) 1)
(progn (skip-chars-forward " " (line-end-position))
(null (eolp)))
(if (and fill-nobreak-predicate
(run-hook-with-args-until-success
'fill-nobreak-predicate))
(longlines-find-break-forward)
t)))
(defun longlines-merge-lines-p ()
"Return t if part of the next line can fit onto the current line.
Otherwise, return nil. Text cannot be moved across hard newlines."
(save-excursion
(end-of-line)
(and (null (eobp))
(null (get-text-property (point) 'hard))
(let ((space (- fill-column (current-column))))
(forward-line 1)
(if (eq (char-after) ? )
t ; We can always merge some spaces
(<= (if (search-forward " " (line-end-position) 1)
(current-column)
(1+ (current-column)))
space))))))
(defun longlines-decode-region (beg end)
"Turn all newlines between BEG and END into hard newlines."
(save-excursion
(goto-char (min beg end))
(while (search-forward "\n" (max beg end) t)
(set-hard-newline-properties
(match-beginning 0) (match-end 0)))))
(defun longlines-encode-region (beg end &optional buffer)
"Replace each soft newline between BEG and END with exactly one space.
Hard newlines are left intact. The optional argument BUFFER exists for
compatibility with `format-alist', and is ignored."
(save-excursion
(let ((mod (buffer-modified-p)))
(goto-char (min beg end))
(while (search-forward "\n" (max (max beg end)) t)
(unless (get-text-property (match-beginning 0) 'hard)
(replace-match " ")))
(set-buffer-modified-p mod)
end)))
(defun longlines-encode-string (string)
"Return a copy of STRING with each soft newline replaced by a space.
Hard newlines are left intact."
(let* ((str (copy-sequence string))
(pos (string-match "\n" str)))
(while pos
(if (null (get-text-property pos 'hard str))
(aset str pos ? ))
(setq pos (string-match "\n" str (1+ pos))))
str))
;; Auto wrap
(defun longlines-auto-wrap (&optional arg)
"Turn on automatic line wrapping, and wrap the entire buffer.
With optional argument ARG, turn off line wrapping."
(interactive "P")
(remove-hook 'after-change-functions 'longlines-after-change-function t)
(remove-hook 'post-command-hook 'longlines-post-command-function t)
(if arg
(progn (setq longlines-auto-wrap nil)
(message "Auto wrap disabled."))
(setq longlines-auto-wrap t)
(add-hook 'after-change-functions
'longlines-after-change-function nil t)
(add-hook 'post-command-hook
'longlines-post-command-function nil t)
(let ((mod (buffer-modified-p)))
(longlines-wrap-region (point-min) (point-max))
(set-buffer-modified-p mod))
(message "Auto wrap enabled.")))
(defun longlines-after-change-function (beg end len)
"Update `longlines-wrap-beg' and `longlines-wrap-end'.
This is called by `after-change-functions' to keep track of the region
that has changed."
(unless undo-in-progress
(setq longlines-wrap-beg
(if longlines-wrap-beg (min longlines-wrap-beg beg) beg))
(setq longlines-wrap-end
(if longlines-wrap-end (max longlines-wrap-end end) end))))
(defun longlines-post-command-function ()
"Perform line wrapping on the parts of the buffer that have changed.
This is called by `post-command-hook' after each command."
(when longlines-wrap-beg
(cond ((or (eq this-command 'yank)
(eq this-command 'yank-pop))
(longlines-decode-region (point) (mark t))
(if longlines-showing
(longlines-show-region (point) (mark t))))
((and (eq this-command 'newline) longlines-showing)
(save-excursion
(if (search-backward "\n" nil t)
(longlines-show-region
(match-beginning 0) (match-end 0))))))
(unless (or (eq this-command 'fill-paragraph)
(eq this-command 'fill-region))
(longlines-wrap-region longlines-wrap-beg longlines-wrap-end))
(setq longlines-wrap-beg nil)
(setq longlines-wrap-end nil)))
(defun longlines-window-change-function ()
"Re-wrap the buffer if the window width has changed.
This is called by `window-size-change-functions'."
(when (/= fill-column (- (window-width) window-min-width))
(setq fill-column (- (window-width) window-min-width))
(let ((mod (buffer-modified-p)))
(longlines-wrap-region (point-min) (point-max))
(set-buffer-modified-p mod))))
;; Loading and saving
(add-to-list
'format-alist
(list 'longlines "Automatically wrap long lines." nil
'longlines-decode-region 'longlines-encode-region t nil))
(provide 'longlines)
;; arch-tag: 3489d225-5506-47b9-8659-d8807b77c624
;;; longlines.el ends here

View file

@ -1622,13 +1622,15 @@ a remote mailbox, PASSWORD is the password if it should be
supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD
is non-nil if the user has supplied the password interactively.
"
(if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
(cond
((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
(let (got-password supplied-password
(proto (match-string 1 file))
(user (match-string 3 file))
(pass (match-string 5 file))
(host (substring file (or (match-end 2)
(+ 3 (match-end 1))))))
(if (not pass)
(when rmail-remote-password-required
(setq got-password (not (rmail-have-password)))
@ -1645,8 +1647,22 @@ is non-nil if the user has supplied the password interactively.
(list file
(or (string-equal proto "pop") (string-equal proto "imap"))
supplied-password
got-password)))
(list file nil nil nil)))
got-password))))
((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
(let (got-password supplied-password
(proto "pop")
(user (match-string 1 file))
(host (match-string 3 file)))
(when rmail-remote-password-required
(setq got-password (not (rmail-have-password)))
(setq supplied-password (rmail-get-remote-password nil)))
(list file "pop" supplied-password got-password)))
(t
(list file nil nil nil))))
(defun rmail-insert-inbox-text (files renamep)
;; Detect a locked file now, so that we avoid moving mail
@ -1686,15 +1702,7 @@ is non-nil if the user has supplied the password interactively.
(expand-file-name buffer-file-name))))
;; Always use movemail to rename the file,
;; since there can be mailboxes in various directories.
(setq movemail t)
;;; ;; If getting from mail spool directory,
;;; ;; use movemail to move rather than just renaming,
;;; ;; so as to interlock with the mailer.
;;; (setq movemail (string= file
;;; (file-truename
;;; (concat rmail-spool-directory
;;; (file-name-nondirectory file)))))
(if (and movemail (not popmail))
(if (not popmail)
(progn
;; On some systems, /usr/spool/mail/foo is a directory
;; and the actual inbox is /usr/spool/mail/foo/foo.
@ -1716,23 +1724,6 @@ is non-nil if the user has supplied the password interactively.
((or (file-exists-p tofile) (and (not popmail)
(not (file-exists-p file))))
nil)
((and (not movemail) (not popmail))
;; Try copying. If that fails (perhaps no space) and
;; we're allowed to blow away the inbox, rename instead.
(if rmail-preserve-inbox
(copy-file file tofile nil)
(condition-case nil
(copy-file file tofile nil)
(error
;; Third arg is t so we can replace existing file TOFILE.
(rename-file file tofile t))))
;; Make the real inbox file empty.
;; Leaving it deleted could cause lossage
;; because mailers often won't create the file.
(if (not rmail-preserve-inbox)
(condition-case ()
(write-region (point) (point) file)
(file-error nil))))
(t
(with-temp-buffer
(let ((errors (current-buffer)))

View file

@ -838,7 +838,7 @@ error occurs."
"Return the mail header field value associated with FIELD.
If there was no mail header with FIELD as its key, return the value of
`sc-mumble'. FIELD is case insensitive."
(or (cdr (assoc (downcase field) sc-mail-info)) sc-mumble))
(or (cdr (assoc-string field sc-mail-info 'case-fold)) sc-mumble))
(defun sc-mail-field-query (arg)
"View the value of a mail field.
@ -916,8 +916,8 @@ Match addresses of the style ``<name[stuff]>.''"
"Get the full email address path from FROM.
AUTHOR is the author's name (which is removed from the address)."
(let ((eos (length from)))
(if (string-match (concat "\\(^\\|^\"\\)" author
"\\(\\s +\\|\"\\s +\\)") from 0)
(if (string-match (concat "\\`\"?" (regexp-quote author)
"\"?\\s +") from 0)
(let ((address (substring from (match-end 0) eos)))
(if (and (= (aref address 0) ?<)
(= (aref address (1- (length address))) ?>))
@ -1866,10 +1866,11 @@ Note on function names in this list: all functions of the form
(define-minor-mode sc-minor-mode
"Supercite minor mode."
nil (" SC" (sc-auto-fill-region-p
(":f" (sc-fixup-whitespace-p "w"))
(sc-fixup-whitespace-p ":w")))
`((,sc-mode-map-prefix . ,sc-mode-map)))
:group 'supercite
:lighter (" SC" (sc-auto-fill-region-p
(":f" (sc-fixup-whitespace-p "w"))
(sc-fixup-whitespace-p ":w")))
:keymap `((,sc-mode-map-prefix . ,sc-mode-map)))
;;;###autoload
(defun sc-cite-original ()
@ -2054,5 +2055,5 @@ more information. Info node `(SC)Top'."
(provide 'supercite)
(run-hooks 'sc-load-hook)
;;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3
;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3
;;; supercite.el ends here

View file

@ -1,6 +1,6 @@
;;; master.el --- make a buffer the master over another buffer
;; Copyright (C) 1999, 2000, 2001 Alexander Schroeder
;; Copyright (C) 1999, 2000, 2001, 2005 Alexander Schroeder
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Alex Schroeder <alex@gnu.org>
@ -55,7 +55,10 @@
;;; Code:
(require 'easy-mmode)
(defgroup master nil
"Support for master/slave relationships between buffers."
:version "22.1"
:group 'convenience)
;; Variables that don't need initialization.
@ -83,16 +86,13 @@ following commands:
The slave buffer is stored in the buffer-local variable `master-of'.
You can set this variable using `master-set-slave'. You can show
yourself the value of `master-of' by calling `master-show-slave'."
;; The initial value.
nil
;; The indicator for the mode line.
nil
;; The minor mode bindings.
'(("\C-c\C-n" . master-says-scroll-up)
("\C-c\C-p" . master-says-scroll-down)
("\C-c<" . master-says-beginning-of-buffer)
("\C-c>" . master-says-end-of-buffer)
("\C-c\C-l" . master-says-recenter)))
:group 'master
:keymap
'(("\C-c\C-n" . master-says-scroll-up)
("\C-c\C-p" . master-says-scroll-down)
("\C-c<" . master-says-beginning-of-buffer)
("\C-c>" . master-says-end-of-buffer)
("\C-c\C-l" . master-says-recenter)))
;; Initialize Master mode by setting a slave buffer.

View file

@ -136,7 +136,7 @@ A large number or nil slows down menu responsiveness."
'(menu-item "--"))
(define-key menu-bar-file-menu [recover-session]
'(menu-item "Recover Crashed Session..." recover-session
'(menu-item "Recover Crashed Session" recover-session
:enable (and auto-save-list-file-prefix
(file-directory-p
(file-name-directory auto-save-list-file-prefix))
@ -298,7 +298,7 @@ A large number or nil slows down menu responsiveness."
'(menu-item "Continue Tags Search" tags-loop-continue
:help "Continue last tags search operation"))
(define-key menu-bar-search-menu [tags-srch]
'(menu-item "Search tagged files" tags-search
'(menu-item "Search tagged files..." tags-search
:help "Search for a regexp in all tagged files"))
(define-key menu-bar-search-menu [separator-tag-search]
'(menu-item "--"))
@ -342,7 +342,7 @@ A large number or nil slows down menu responsiveness."
'(menu-item "Continue Replace" tags-loop-continue
:help "Continue last tags replace operation"))
(define-key menu-bar-replace-menu [tags-repl]
'(menu-item "Replace in tagged files" tags-query-replace
'(menu-item "Replace in tagged files..." tags-query-replace
:help "Interactively replace a regexp in all tagged files"))
(define-key menu-bar-replace-menu [separator-replace-tags]
'(menu-item "--"))
@ -377,14 +377,14 @@ A large number or nil slows down menu responsiveness."
(defvar menu-bar-goto-menu (make-sparse-keymap "Go To"))
(define-key menu-bar-goto-menu [set-tags-name]
'(menu-item "Set Tags File Name" visit-tags-table
'(menu-item "Set Tags File Name..." visit-tags-table
:help "Tell Tags commands which tag table file to use"))
(define-key menu-bar-goto-menu [separator-tag-file]
'(menu-item "--"))
(define-key menu-bar-goto-menu [apropos-tags]
'(menu-item "Tags Apropos" tags-apropos
'(menu-item "Tags Apropos..." tags-apropos
:help "Find function/variables whose names match regexp"))
(define-key menu-bar-goto-menu [next-tag-otherw]
'(menu-item "Next Tag in Other Window"
@ -673,7 +673,7 @@ by \"Save Options\" in Custom buffers.")
'("--"))
(define-key menu-bar-options-menu [mouse-set-font]
'(menu-item "Set Font/Fontset" mouse-set-font
'(menu-item "Set Font/Fontset..." mouse-set-font
:visible (display-multi-font-p)
:help "Select a font from list of known fonts/fontsets"))
@ -1332,10 +1332,10 @@ key (or menu-item)"))
(define-key menu-bar-manuals-menu [sep3]
'("--"))
(define-key menu-bar-manuals-menu [command]
'(menu-item "Find Command in Manual" Info-goto-emacs-command-node
'(menu-item "Find Command in Manual..." Info-goto-emacs-command-node
:help "Display manual section that describes a command"))
(define-key menu-bar-manuals-menu [key]
'(menu-item "Find Key in Manual" Info-goto-emacs-key-command-node
'(menu-item "Find Key in Manual..." Info-goto-emacs-key-command-node
:help "Display manual section that describes a key"))
(define-key menu-bar-help-menu [eliza]
@ -1369,7 +1369,7 @@ key (or menu-item)"))
(define-key menu-bar-help-menu [sep2]
'("--"))
(define-key menu-bar-help-menu [finder-by-keyword]
'(menu-item "Find Emacs Packages..." finder-by-keyword
'(menu-item "Find Emacs Packages" finder-by-keyword
:help "Find packages and features by keyword"))
(define-key menu-bar-help-menu [manuals]
(list 'menu-item "More Manuals" menu-bar-manuals-menu

View file

@ -49,7 +49,7 @@
:version "22.1"
:group 'mouse)
(defcustom mouse-1-click-follows-link 350
(defcustom mouse-1-click-follows-link 450
"Non-nil means that clicking Mouse-1 on a link follows the link.
With the default setting, an ordinary Mouse-1 click on a link
@ -837,6 +837,29 @@ at the same position."
(funcall action pos))
(t action)))))))
(defun mouse-fixup-help-message (msg)
"Fix help message MSG for `mouse-1-click-follows-link'."
(let (mp pos)
(if (and mouse-1-click-follows-link
(stringp msg)
(save-match-data
(string-match "^mouse-2" msg))
(setq mp (mouse-pixel-position))
(consp (setq pos (cdr mp)))
(car pos) (>= (car pos) 0)
(cdr pos) (>= (cdr pos) 0)
(setq pos (posn-at-x-y (car pos) (cdr pos) (car mp)))
(windowp (posn-window pos)))
(with-current-buffer (window-buffer (posn-window pos))
(if (mouse-on-link-p pos)
(setq msg (concat
(cond
((eq mouse-1-click-follows-link 'double) "double-")
((and (integerp mouse-1-click-follows-link)
(< mouse-1-click-follows-link 0)) "Long ")
(t ""))
"mouse-1" (substring msg 7)))))))
msg)
(defun mouse-drag-region-1 (start-event)
(mouse-minibuffer-check start-event)
@ -886,6 +909,7 @@ at the same position."
(track-mouse
(while (progn
(setq event (read-event))
(setq mve (cons event (and (boundp 'mve) mve)))
(or (mouse-movement-p event)
(memq (car-safe event) '(switch-frame select-window))))
(if (memq (car-safe event) '(switch-frame select-window))
@ -997,7 +1021,7 @@ at the same position."
(= (window-start start-window)
start-window-start)))
(if (and on-link
(not end-point)
(or (not end-point) (= end-point start-point))
(consp event)
(or remap-double-click
(and

View file

@ -1,7 +1,7 @@
;;; msb.el --- customizable buffer-selection with multiple menus
;; Copyright (C) 1993, 94, 95, 97, 98, 99, 2000, 2001, 2003
;; Free Software Foundation, Inc.
;; Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2003,
;; 2005 Free Software Foundation, Inc.
;; Author: Lars Lindberg <lars.lindberg@home.se>
;; Maintainer: FSF
@ -1141,7 +1141,7 @@ variable `msb-menu-cond'."
With arg, turn Msb mode on if and only if arg is positive.
This mode overrides the binding(s) of `mouse-buffer-menu' to provide a
different buffer menu using the function `msb'."
:global t
:global t :group 'msb
(if msb-mode
(progn
(add-hook 'menu-bar-update-hook 'msb-menu-bar-update-buffers)

View file

@ -1,6 +1,7 @@
;;; iso-acc.el --- minor mode providing electric accent keys
;; Copyright (C) 1993, 1994, 1996, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1993, 1994, 1996, 2001, 2002, 2005
;; Free Software Foundation, Inc.
;; Author: Johan Vromans
;; Maintainer: FSF
@ -487,5 +488,5 @@ Noninteractively, this operates on text from START to END."
(add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup)
;;; arch-tag: 149ff409-7c3e-4574-9b5d-ac038939c0a6
;; arch-tag: 149ff409-7c3e-4574-9b5d-ac038939c0a6
;;; iso-acc.el ends here

View file

@ -358,7 +358,7 @@ from the current buffer."
(dir default-directory)
(buf (cond
(name (cvs-get-buffer-create name))
((and (bufferp cvs-temp-buffer) (buffer-name cvs-temp-buffer))
((and (bufferp cvs-temp-buffer) (buffer-live-p cvs-temp-buffer))
cvs-temp-buffer)
(t
(set (make-local-variable 'cvs-temp-buffer)
@ -528,39 +528,49 @@ If non-nil, NEW means to create a new buffer no matter what."
(files (nth 1 dir+files+rest))
(rest (nth 2 dir+files+rest)))
;; setup the (current) process buffer
(set (make-local-variable 'cvs-postprocess)
(if (null rest)
;; this is the last invocation
postprocess
;; else, we have to register ourselves to be rerun on the rest
`(cvs-run-process ',args ',rest ',postprocess ',single-dir)))
(add-hook 'kill-buffer-hook
(lambda ()
(let ((proc (get-buffer-process (current-buffer))))
(when (processp proc)
(set-process-filter proc nil)
(set-process-sentinel proc nil)
(delete-process proc))))
;; Abort postprocessing but leave the sentinel so it
;; will update the list of running procs.
(process-put proc 'cvs-postprocess nil)
(interrupt-process proc))))
nil t)
;; create the new process and setup the procbuffer correspondingly
(let* ((args (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery)
(let* ((msg (cvs-header-msg args fis))
(args (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery)
(if cvs-cvsroot (list "-d" cvs-cvsroot))
args
files))
;; If process-connection-type is nil and the repository
;; is accessed via SSH, a bad interaction between libc,
;; CVS and SSH can lead to garbled output.
;; It might be a glibc-specific problem (but it also happens
;; It might be a glibc-specific problem (but it can also happens
;; under Mac OS X, it seems).
;; Until the problem is cleared, we'll use a pty rather than
;; a pipe.
;; (process-connection-type nil) ; Use a pipe, not a pty.
;; It seems that using a pty can help circumvent the problem,
;; but at the cost of screwing up when the process thinks it
;; can ask for user input (such as password or host-key
;; confirmation). A better workaround is to set CVS_RSH to
;; an appropriate script, or to use a later version of CVS.
(process-connection-type nil) ; Use a pipe, not a pty.
(process
;; the process will be run in the selected dir
(let ((default-directory (cvs-expand-dir-name dir)))
(apply 'start-process "cvs" procbuf cvs-program args))))
;; setup the process.
(process-put process 'cvs-buffer cvs-buffer)
(with-current-buffer cvs-buffer (cvs-update-header msg 'add))
(process-put process 'cvs-header msg)
(process-put
process 'cvs-postprocess
(if (null rest)
;; this is the last invocation
postprocess
;; else, we have to register ourselves to be rerun on the rest
`(cvs-run-process ',args ',rest ',postprocess ',single-dir)))
(set-process-sentinel process 'cvs-sentinel)
(set-process-filter process 'cvs-update-filter)
(set-marker (process-mark process) (point-max))
@ -636,33 +646,35 @@ If non-nil, NEW means to create a new buffer no matter what."
This is responsible for parsing the output from the cvs update when
it is finished."
(when (memq (process-status proc) '(signal exit))
(if (null (buffer-name (process-buffer proc)))
;;(set-process-buffer proc nil)
(error "cvs' process buffer was killed")
(let* ((obuf (current-buffer))
(procbuffer (process-buffer proc)))
(set-buffer (with-current-buffer procbuffer cvs-buffer))
(setq cvs-mode-line-process (symbol-name (process-status proc)))
(force-mode-line-update)
(set-buffer procbuffer)
(let ((cvs-postproc cvs-postprocess))
;; Since the buffer and mode line will show that the
;; process is dead, we can delete it now. Otherwise it
;; will stay around until M-x list-processes.
(delete-process proc)
(setq cvs-postprocess nil)
;; do the postprocessing like parsing and such
(save-excursion (eval cvs-postproc))
;; check whether something is left
(unless cvs-postprocess
;; IIRC, we enable undo again once the process is finished
;; for cases where the output was inserted in *vc-diff* or
;; in a file-like buffer. -stef
(buffer-enable-undo)
(with-current-buffer cvs-buffer
(message "CVS process has completed in %s" (buffer-name)))))
;; This might not even be necessary
(set-buffer obuf)))))
(let ((cvs-postproc (process-get proc 'cvs-postprocess))
(cvs-buf (process-get proc 'cvs-buffer)))
;; Since the buffer and mode line will show that the
;; process is dead, we can delete it now. Otherwise it
;; will stay around until M-x list-processes.
(process-put proc 'postprocess nil)
(delete-process proc)
;; Don't do anything if the main buffer doesn't exist any more.
(when (buffer-live-p cvs-buf)
(with-current-buffer cvs-buf
(cvs-update-header (process-get proc 'cvs-header) nil)
(setq cvs-mode-line-process (symbol-name (process-status proc)))
(force-mode-line-update)
(when cvs-postproc
(if (null (buffer-live-p (process-buffer proc)))
;;(set-process-buffer proc nil)
(error "cvs' process buffer was killed")
(with-current-buffer (process-buffer proc)
;; do the postprocessing like parsing and such
(save-excursion (eval cvs-postproc))
;; check whether something is left
(unless (get-buffer-process (current-buffer))
;; IIRC, we enable undo again once the process is finished
;; for cases where the output was inserted in *vc-diff* or
;; in a file-like buffer. --Stef
(buffer-enable-undo)
(with-current-buffer cvs-buffer
(message "CVS process has completed in %s"
(buffer-name))))))))))))
(defun cvs-parse-process (dcd &optional subdir old-fis)
"Parse the output of a cvs process.
@ -770,7 +782,7 @@ before calling the real function `" (symbol-name fun-1) "'.\n")
(defun-cvs-mode cvs-mode-kill-process ()
"Kill the temporary buffer and associated process."
(interactive)
(when (and (bufferp cvs-temp-buffer) (buffer-name cvs-temp-buffer))
(when (and (bufferp cvs-temp-buffer) (buffer-live-p cvs-temp-buffer))
(let ((proc (get-buffer-process cvs-temp-buffer)))
(when proc (delete-process proc)))))
@ -906,23 +918,28 @@ This usually doesn't really work but is a handy initval in a prompt."
;;;;
;;;###autoload
(defun cvs-checkout (modules dir flags)
(defun cvs-checkout (modules dir flags &optional root)
"Run a 'cvs checkout MODULES' in DIR.
Feed the output to a *cvs* buffer, display it in the current window,
and run `cvs-mode' on it.
With a prefix argument, prompt for cvs FLAGS to use."
(interactive
(list (cvs-string->strings (read-string "Module(s): " (cvs-get-module)))
(read-directory-name "CVS Checkout Directory: "
nil default-directory nil)
(cvs-add-branch-prefix
(cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))))
(let ((root (cvs-get-cvsroot)))
(if (or (null root) current-prefix-arg)
(setq root (read-string "CVS Root: ")))
(list (cvs-string->strings (read-string "Module(s): " (cvs-get-module)))
(read-directory-name "CVS Checkout Directory: "
nil default-directory nil)
(cvs-add-branch-prefix
(cvs-flags-query 'cvs-checkout-flags "cvs checkout flags"))
root)))
(when (eq flags t)
(setf flags (cvs-flags-query 'cvs-checkout-flags nil 'noquery)))
(cvs-cmd-do "checkout" (or dir default-directory)
(append flags modules) nil 'new
:noexist t))
(let ((cvs-cvsroot root))
(cvs-cmd-do "checkout" (or dir default-directory)
(append flags modules) nil 'new
:noexist t)))
(defun-cvs-mode (cvs-mode-checkout . NOARGS) (dir)
"Run cvs checkout against the current branch.
@ -1133,7 +1150,7 @@ Full documentation is in the Texinfo file."
(eq (ewoc-buffer cvs-cookies) buf)
(setq check 'cvs-temp-buffer)
(or (null cvs-temp-buffer)
(null (buffer-name cvs-temp-buffer))
(null (buffer-live-p cvs-temp-buffer))
(and (eq (with-current-buffer cvs-temp-buffer cvs-buffer) buf)
(equal (with-current-buffer cvs-temp-buffer
default-directory)
@ -1822,11 +1839,6 @@ POSTPROC is a list of expressions to be evaluated at the very end (after
;; absence of `cvs update' output has a specific meaning.
(or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))))
(push `(cvs-parse-process ',dont-change-disc nil ',old-fis) postproc)))
(let ((msg (cvs-header-msg args fis)))
(cvs-update-header msg 'add)
(push `(with-current-buffer cvs-buffer
(cvs-update-header ',msg nil))
postproc))
(setq postproc (if (cdr postproc) (cons 'progn postproc) (car postproc)))
(with-current-buffer buf
(let ((inhibit-read-only t)) (erase-buffer))

View file

@ -1613,6 +1613,8 @@ and overlay is highlighted between MK and END-MK."
(compilation-set-window-height w)
(when highlight-regexp
(if (timerp next-error-highlight-timer)
(cancel-timer next-error-highlight-timer))
(unless compilation-highlight-overlay
(setq compilation-highlight-overlay
(make-overlay (point-min) (point-min)))
@ -1632,8 +1634,11 @@ and overlay is highlighted between MK and END-MK."
(move-overlay compilation-highlight-overlay
(point) end (current-buffer)))
(if (numberp next-error-highlight)
(sit-for next-error-highlight))
(if (not (eq next-error-highlight t))
(setq next-error-highlight-timer
(run-at-time next-error-highlight nil 'delete-overlay
compilation-highlight-overlay)))
(if (not (or (eq next-error-highlight t)
(numberp next-error-highlight)))
(delete-overlay compilation-highlight-overlay))))))
(when (and (eq next-error-highlight 'fringe-arrow))
(set (make-local-variable 'overlay-arrow-position)

View file

@ -1,6 +1,6 @@
;;; cwarn.el --- highlight suspicious C and C++ constructions
;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
;; Author: Anders Lindgren <andersl@andersl.com>
;; Keywords: c, languages, faces
@ -193,7 +193,7 @@ be included in the variable `cwarn-configuration'. By default C and
C++ modes are included.
With ARG, turn CWarn mode on if and only if arg is positive."
nil cwarn-mode-text nil
:group 'cwarn :lighter cwarn-mode-text
(cwarn-font-lock-keywords cwarn-mode)
(if font-lock-mode (font-lock-fontify-buffer)))

View file

@ -597,41 +597,32 @@ characters long.")
;; Hideshow support.
(defconst f90-end-block-re
(concat "^[ \t0-9]*\\<end\\>[ \t]*"
(concat "^[ \t0-9]*\\<end[ \t]*"
(regexp-opt '("do" "if" "forall" "function" "interface"
"module" "program" "select" "subroutine"
"module" "program" "select" "subroutine"
"type" "where" ) t)
"[ \t]*\\sw*")
"Regexp matching the end of a \"block\" of F90 code.
"Regexp matching the end of an F90 \"block\", from the line start.
Used in the F90 entry in `hs-special-modes-alist'.")
;; Ignore the fact that FUNCTION, SUBROUTINE, WHERE, FORALL have a
;; following "(". DO, CASE, IF can have labels; IF must be
;; accompanied by THEN.
;; A big problem is that many of these statements can be broken over
;; lines, even with embedded comments. We only try to handle this for
;; IF ... THEN statements, assuming and hoping it will be less common
;; for other constructs. We match up to one new-line, provided ")
;; THEN" appears on one line. Matching on just ") THEN" is no good,
;; since that includes ELSE branches.
;; For a fully accurate solution, hideshow would probably have to be
;; modified to allow functions as well as regexps to be used to
;; specify block start and end positions.
;; following "(". DO, CASE, IF can have labels.
(defconst f90-start-block-re
(concat
"^[ \t0-9]*" ; statement number
"\\(\\("
"\\(\\sw+[ \t]*:[ \t]*\\)?" ; structure label
"\\(do\\|select[ \t]*case\\|if[ \t]*(.*\n?.*)[ \t]*then\\|"
"\\(do\\|select[ \t]*case\\|"
;; See comments in fortran-start-block-re for the problems of IF.
"if[ \t]*(\\(.*\\|"
".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|"
;; Distinguish WHERE block from isolated WHERE.
"\\(where\\|forall\\)[ \t]*(.*)[ \t]*\\(!\\|$\\)\\)\\)"
"\\|"
"program\\|interface\\|module\\|type\\|function\\|subroutine"
;; ") THEN" at line end. Problem - also does ELSE.
;;; "\\|.*)[ \t]*then[ \t]*\\($\\|!\\)"
"\\)"
"[ \t]*")
"Regexp matching the start of a \"block\" of F90 code.
"Regexp matching the start of an F90 \"block\", from the line start.
A simple regexp cannot do this in fully correct fashion, so this
tries to strike a compromise between complexity and flexibility.
Used in the F90 entry in `hs-special-modes-alist'.")
@ -1305,12 +1296,12 @@ Checks for consistency of block types and labels (if present).
Does not check the outermost block, because it may be incomplete.
Interactively, pushes mark before moving point."
(interactive "p")
(if (interactive-p) (push-mark (point) t))
(and num (< num 0) (f90-end-of-block (- num)))
(let ((case-fold-search t)
(count (or num 1))
end-list end-this end-type end-label
start-this start-type start-label)
(if (interactive-p) (push-mark (point) t))
(beginning-of-line) ; probably want this
(while (and (> count 0) (re-search-backward f90-blocks-re nil 'move))
(beginning-of-line)

View file

@ -964,7 +964,7 @@ Convert it to flymake internal format."
(if (consp file) (setq file (car file)))
(if (consp line) (setq line (car line)))
(if (consp col) (setq col (car col)))
(when (not (functionp line))
(setq converted-list (cons (list regexp file line col) converted-list)))))
converted-list))
@ -1508,7 +1508,7 @@ Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists, or just REL-FILE-NAME if
"Minor mode to do on-the-fly syntax checking.
When called interactively, toggles the minor mode.
With arg, turn Flymake mode on if and only if arg is positive."
:lighter flymake-mode-line
:group 'flymake :lighter flymake-mode-line
(if flymake-mode
(if (flymake-can-syntax-check-file (buffer-file-name))
(flymake-mode-on)

View file

@ -1,7 +1,7 @@
;;; fortran.el --- Fortran mode for GNU Emacs
;; Copyright (c) 1986, 93, 94, 95, 97, 98, 99, 2000, 01, 03, 04
;; Free Software Foundation, Inc.
;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
;; 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Michael D. Prange <prange@erl.mit.edu>
;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
@ -95,7 +95,7 @@ with a character in column 6."
:group 'fortran-indent)
(defcustom fortran-if-indent 3
"*Extra indentation applied to IF blocks."
"*Extra indentation applied to IF, SELECT CASE and WHERE blocks."
:type 'integer
:group 'fortran-indent)
@ -321,7 +321,8 @@ program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?"
"while" "inquire" "stop" "return"
"include" "open" "close" "read"
"write" "format" "print" "select" "case"
"cycle" "exit" "rewind" "backspace")
"cycle" "exit" "rewind" "backspace"
"where" "elsewhere")
'paren) "\\>")
;; Builtin operators.
(concat "\\." (regexp-opt
@ -370,6 +371,29 @@ program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?"
fortran-font-lock-keywords-2)))
"Gaudy level highlighting for Fortran mode.")
(defvar fortran-font-lock-keywords-4
(append fortran-font-lock-keywords-3
(list (list
(concat "\\<"
(regexp-opt
'("int" "ifix" "idint" "real" "float" "sngl"
"dble" "cmplx" "ichar" "char" "aint" "dint"
"anint" "dnint" "nint" "idnint" "iabs" "abs"
"dabs" "cabs" "mod" "amod" "dmod" "isign"
"sign" "dsign" "idim" "dim" "ddim" "dprod"
"max" "max0" "amax1" "dmax1" "amax0" "max1"
"min0" "amin1" "dmin1" "amin0" "min1" "len"
"index" "lge" "lgt" "lle" "llt" "aimag"
"conjg" "sqrt" "dsqrt" "csqrt" "exp" "dexp"
"cexp" "log" "alog" "dlog" "clog" "log10"
"alog10" "dlog10" "sin" "dsin" "csin" "cos"
"dcos" "ccos" "tan" "dtan" "asin" "dasin"
"acos" "dacos" "atan" "datan" "atan2" "datan2"
"sinh" "dsinh" "cosh" "dcosh" "tanh" "dtanh")
'paren) "[ \t]*(") '(1 font-lock-builtin-face))))
"Maximum highlighting for Fortran mode.
Consists of level 3 plus all other intrinsics not already highlighted.")
;; Comments are real pain in Fortran because there is no way to
;; represent the standard comment syntax in an Emacs syntax table.
;; (We can do so for F90-style). Therefore an unmatched quote in a
@ -408,6 +432,64 @@ These get fixed-format comments fontified.")
'(nil "^\\s-+\\(block\\s-*data\\)\\s-*$" 1))
"Value for `imenu-generic-expression' in Fortran mode.")
;; Hideshow support.
(defconst fortran-blocks-re
(concat "block[ \t]*data\\|select[ \t]*case\\|"
(regexp-opt '("do" "if" "interface" "function" "map" "program"
"structure" "subroutine" "union" "where")))
"Regexp potentially indicating the start or end of a Fortran \"block\".
Omits naked END statements, and DO-loops closed by anything other
than ENDDO.")
(defconst fortran-end-block-re
;; Do-loops terminated by things other than ENDDO cannot be handled
;; with a regexp. This omission does not seem to matter to hideshow...
(concat "^[ \t0-9]*\\<end[ \t]*\\("
fortran-blocks-re
;; Naked END statement.
"\\|!\\|$\\)")
"Regexp matching the end of a Fortran \"block\", from the line start.
Note that only ENDDO is handled for the end of a DO-loop. Used
in the Fortran entry in `hs-special-modes-alist'.")
(defconst fortran-start-block-re
(concat
"^[ \t0-9]*\\(" ; statement number
;; Structure label for DO, IF, SELECT, WHERE.
"\\(\\(\\sw+[ \t]*:[ \t]*\\)?"
;; IF blocks are a nuisance:
;; IF ( ... ) foo is not a block, but a single statement.
;; IF ( ... ) THEN can be split over multiple lines.
;; [So can, eg, a DO WHILE (... ), but that is less common, I hope.]
;; The regexp below allows for it to be split over at most 2 lines.
;; That leads to the problem of not matching two consecutive IF
;; statements as one, eg:
;; IF ( ... ) foo
;; IF ( ... ) THEN
;; It simply is not possible to do this in a 100% correct fashion
;; using a regexp - see the functions fortran-end-if,
;; fortran-beginning-if for the hoops we have to go through.
;; An alternative is to match on THEN at a line end, eg:
;; ".*)[ \t]*then[ \t]*\\($\\|!\\)"
;; This would also match ELSE branches, though. This does not seem
;; right to me, because then one has neighbouring blocks that are
;; not nested in each other.
"\\(if[ \t]*(\\(.*\\|"
".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|"
"do\\|select[ \t]*case\\|where\\)\\)\\|"
(regexp-opt '("interface" "function" "map" "program"
"structure" "subroutine" "union"))
"\\|block[ \t]*data\\)[ \t]*")
"Regexp matching the start of a Fortran \"block\", from the line start.
A simple regexp cannot do this in fully correct fashion, so this
tries to strike a compromise between complexity and flexibility.
Used in the Fortran entry in `hs-special-modes-alist'.")
(add-to-list 'hs-special-modes-alist
`(fortran-mode ,fortran-start-block-re ,fortran-end-block-re
"^[cC*!]" fortran-end-of-block nil))
(defvar fortran-mode-syntax-table
(let ((table (make-syntax-table)))
@ -422,7 +504,8 @@ These get fixed-format comments fontified.")
(modify-syntax-entry ?/ "." table)
(modify-syntax-entry ?\' "\"" table)
(modify-syntax-entry ?\" "\"" table)
;; Consistent with GNU Fortran -- see the manual.
;; Consistent with GNU Fortran's default -- see the manual.
;; The F77 standard imposes no rule on this issue.
(modify-syntax-entry ?\\ "\\" table)
;; This might be better as punctuation, as for C, but this way you
;; can treat floating-point numbers as symbols.
@ -446,6 +529,8 @@ These get fixed-format comments fontified.")
(define-key map "\C-c;" 'fortran-comment-region)
(define-key map "\M-;" 'fortran-indent-comment)
(define-key map "\M-\n" 'fortran-split-line)
(define-key map "\M-\C-n" 'fortran-end-of-block)
(define-key map "\M-\C-p" 'fortran-beginning-of-block)
(define-key map "\M-\C-q" 'fortran-indent-subprogram)
(define-key map "\C-c\C-w" 'fortran-window-create-momentarily)
(define-key map "\C-c\C-r" 'fortran-column-ruler)
@ -606,7 +691,7 @@ Key definitions:
Variables controlling indentation style and extra features:
`comment-start'
`fortran-comment-line-start'
To use comments starting with `!', set this to the string \"!\".
`fortran-do-indent'
Extra indentation within DO blocks (default 3).
@ -696,7 +781,8 @@ with no args, if that value is non-nil."
'((fortran-font-lock-keywords
fortran-font-lock-keywords-1
fortran-font-lock-keywords-2
fortran-font-lock-keywords-3)
fortran-font-lock-keywords-3
fortran-font-lock-keywords-4)
nil t ((?/ . "$/") ("_$" . "w"))
fortran-beginning-of-subprogram))
(set (make-local-variable 'font-lock-syntactic-keywords)
@ -1059,6 +1145,84 @@ Directive lines are treated as comments."
(if (not not-last-statement)
'last-statement)))
(defun fortran-looking-at-if-then ()
"Return non-nil if at the start of a line with an IF ... THEN statement."
;; cf f90-looking-at-if-then.
(let ((p (point))
(i (fortran-beginning-if)))
(if i
(save-excursion
(goto-char i)
(beginning-of-line)
(= (point) p)))))
;; Used in hs-special-modes-alist.
(defun fortran-end-of-block (&optional num)
"Move point forward to the end of the current code block.
With optional argument NUM, go forward that many balanced blocks.
If NUM is negative, go backward to the start of a block. Does
not check for consistency of block types. Interactively, pushes
mark before moving point."
(interactive "p")
(if (interactive-p) (push-mark (point) t))
(and num (< num 0) (fortran-beginning-of-block (- num)))
(let ((case-fold-search t)
(count (or num 1)))
(end-of-line)
(while (and (> count 0)
(re-search-forward
(concat "\\(" fortran-blocks-re
(if fortran-check-all-num-for-matching-do
"\\|^[ \t]*[0-9]+" "")
"\\|continue\\|end\\)\\>")
nil 'move))
(beginning-of-line)
(if (if (looking-at (concat "^[0-9 \t]*" fortran-if-start-re))
(fortran-looking-at-if-then)
(looking-at fortran-start-block-re))
(setq count (1+ count))
(if (or (looking-at fortran-end-block-re)
(and (or (looking-at "^[0-9 \t]*continue")
(and fortran-check-all-num-for-matching-do
(looking-at "[ \t]*[0-9]+")))
(fortran-check-for-matching-do)))
(setq count (1- count))))
(end-of-line))
(if (> count 0) (error "Missing block end"))))
(defun fortran-beginning-of-block (&optional num)
"Move point backwards to the start of the current code block.
With optional argument NUM, go backward that many balanced
blocks. If NUM is negative, go forward to the end of a block.
Does not check for consistency of block types. Interactively,
pushes mark before moving point."
(interactive "p")
(if (interactive-p) (push-mark (point) t))
(and num (< num 0) (fortran-end-of-block (- num)))
(let ((case-fold-search t)
(count (or num 1)))
(beginning-of-line)
(while (and (> count 0)
(re-search-backward
(concat "\\(" fortran-blocks-re
(if fortran-check-all-num-for-matching-do
"\\|^[ \t]*[0-9]+" "")
"\\|continue\\|end\\)\\>")
nil 'move))
(beginning-of-line)
(if (if (looking-at (concat "^[0-9 \t]*" fortran-if-start-re))
(fortran-looking-at-if-then)
(looking-at fortran-start-block-re))
(setq count (1- count))
(if (or (looking-at fortran-end-block-re)
(and (or (looking-at "^[0-9 \t]*continue")
(and fortran-check-all-num-for-matching-do
(looking-at "[ \t]*[0-9]+")))
(fortran-check-for-matching-do)))
(setq count (1+ count)))))
;; Includes an un-named main program block.
(if (> count 0) (error "Missing block start"))))
(defun fortran-blink-match (regex keyword find-begin)
"From a line matching REGEX, blink matching KEYWORD statement line.
@ -1679,8 +1843,9 @@ If ALL is nil, only match comments that start in column > 0."
(1+ (point)))))
(if (re-search-forward "\\S\"\\s\"\\S\"" eol t)
(backward-char 2))
;; If the current string is longer than 72 - 6 chars,
;; break it at the fill column (else infinite loop).
;; If the current string is longer than (fill-column
;; - 6) chars, break it at the fill column (else
;; infinite loop).
(if (> (- (point) start)
(- fill-column 6 fortran-continuation-indent))
fcpoint

View file

@ -1,6 +1,6 @@
;;; glasses.el --- make cantReadThis readable
;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Milan Zamazal <pdm@zamazal.org>
@ -251,7 +251,7 @@ recognized according to the current value of the variable `glasses-separator'."
"Minor mode for making identifiers likeThis readable.
When this mode is active, it tries to add virtual separators (like underscores)
at places they belong to."
nil " o^o" nil
:group 'glasses :lighter " o^o"
(save-excursion
(save-restriction
(widen)

View file

@ -531,6 +531,9 @@ off the specialized speedbar mode."
(defvar gdb-first-prompt t)
(defvar gud-filter-pending-text nil
"Non-nil means this is text that has been saved for later in `gud-filter'.")
;;;###autoload
(defun gdb (command-line)
"Run gdb on program FILE in buffer *gud-FILE*.
@ -562,6 +565,7 @@ and source-file directory for your debugger."
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
(setq paragraph-start comint-prompt-regexp)
(setq gdb-first-prompt t)
(setq gud-filter-pending-text nil)
(run-hooks 'gdb-mode-hook))
;; One of the nice features of GDB is its impressive support for
@ -2445,9 +2449,6 @@ comint mode, which see."
"Non-nil means don't process anything from the debugger right now.
It is saved for when this flag is not set.")
(defvar gud-filter-pending-text nil
"Non-nil means this is text that has been saved for later in `gud-filter'.")
;; These functions are responsible for inserting output from your debugger
;; into the buffer. The hard work is done by the method that is
;; the value of gud-marker-filter.
@ -2516,19 +2517,22 @@ It is saved for when this flag is not set.")
(gud-filter proc ""))))))
(defvar gud-minor-mode-type nil)
(defvar gud-overlay-arrow-position nil)
(put 'gud-overlay-arrow-position 'overlay-arrow-string "=>")
(add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position)
(defun gud-sentinel (proc msg)
(cond ((null (buffer-name (process-buffer proc)))
;; buffer killed
;; Stop displaying an arrow in a source file.
(setq overlay-arrow-position nil)
(setq gud-overlay-arrow-position nil)
(set-process-buffer proc nil)
(if (memq gud-minor-mode-type '(gdbmi gdba))
(gdb-reset)
(gud-reset)))
((memq (process-status proc) '(signal exit))
;; Stop displaying an arrow in a source file.
(setq overlay-arrow-position nil)
(setq gud-overlay-arrow-position nil)
(with-current-buffer gud-comint-buffer
(if (memq gud-minor-mode-type '(gdbmi gdba))
(gdb-reset)
@ -2611,13 +2615,13 @@ Obeying it means displaying in another window the specified file and line."
(goto-line line)
(setq pos (point))
(setq overlay-arrow-string "=>")
(or overlay-arrow-position
(setq overlay-arrow-position (make-marker)))
(set-marker overlay-arrow-position (point) (current-buffer)))
(or gud-overlay-arrow-position
(setq gud-overlay-arrow-position (make-marker)))
(set-marker gud-overlay-arrow-position (point) (current-buffer)))
(cond ((or (< pos (point-min)) (> pos (point-max)))
(widen)
(goto-char pos))))
(if window (set-window-point window overlay-arrow-position))))))
(if window (set-window-point window gud-overlay-arrow-position))))))
;; The gud-call function must do the right thing whether its invoking
;; keystroke is from the GUD buffer itself (via major-mode binding)

Some files were not shown because too many files have changed in this diff Show more