Merge from trunk.

This commit is contained in:
Eli Zaretskii 2013-05-16 12:58:56 +03:00
commit a9519e2685
73 changed files with 1392 additions and 1082 deletions

View file

@ -1,3 +1,15 @@
2013-05-16 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2013-05-15 manywarnings: update for GCC 4.8.0
2013-05-15 stdio: use __REDIRECT for fwrite, fwrite_unlocked
2013-05-15 sig2str, stdio, warnings: port to clang
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* Makefile.in (install-doc): DOC file is not version specific any more.
* .bzrignore: Don't ignore DOC-* any more.
2013-05-13 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -nopie.

View file

@ -608,10 +608,6 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
## guaranteed to do the right thing; eg if we are root and tar is
## preserving source permissions.
## We install only the relevant DOC file if possible
## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
## (Note "otherwise" is inaccurate since 2009-08-23.)
## Note that install-arch-indep deletes and recreates the entire
## installed etc/ directory, so we need it to run before this does.
install-doc: src install-arch-indep
@ -619,13 +615,7 @@ install-doc: src install-arch-indep
umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
if [ `cd ./etc; /bin/pwd` != `cd $(DESTDIR)${docdir}; /bin/pwd` ]; \
then \
fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \
if [ -f "./etc/DOC-$${fullversion}" ]; \
then \
docfile="DOC-$${fullversion}"; \
else \
docfile="DOC"; \
fi; \
docfile="DOC"; \
echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
$(set_installuser); \

View file

@ -1,3 +1,13 @@
2013-05-16 Glenn Morris <rgm@gnu.org>
* cus-test.el (cus-test-cus-load-groups): New function.
(cus-test-get-options): Add option to return groups.
(cus-test-noloads): Also check custom groups.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* quick-install-emacs: Don't prune DOC-* files a any more.
2013-05-14 Glenn Morris <rgm@gnu.org>
* cus-test.el (cus-test-get-lisp-files): Ignore obsolete/.

View file

@ -232,17 +232,38 @@ The detected problematic options are stored in `cus-test-errors'."
(length cus-test-tested-variables))
(cus-test-errors-display))
(defun cus-test-get-options (regexp)
"Return a list of custom options matching REGEXP."
(let (found)
(defun cus-test-cus-load-groups (&optional cus-load)
"Return a list of current custom groups.
If CUS-LOAD is non-nil, include groups from cus-load.el."
(append (mapcar 'cdr custom-current-group-alist)
(if cus-load
(with-temp-buffer
(insert-file-contents (locate-library "cus-load.el"))
(search-forward "(put '")
(beginning-of-line)
(let (res)
(while (and (looking-at "^(put '\\(\\S-+\\)")
(zerop (forward-line 1)))
(push (intern (match-string 1)) res))
res)))))
(defun cus-test-get-options (regexp &optional group)
"Return a list of custom options matching REGEXP.
If GROUP is non-nil, return groups rather than options.
If GROUP is `cus-load', include groups listed in cus-loads as well as
currently defined groups."
(let ((groups (if group (cus-test-cus-load-groups (eq group 'cus-load))))
found)
(mapatoms
(lambda (symbol)
(and
(or
;; (user-variable-p symbol)
(get symbol 'standard-value)
;; (get symbol 'saved-value)
(get symbol 'custom-type))
(if group
(memq symbol groups)
(or
;; (user-variable-p symbol)
(get symbol 'standard-value)
;; (get symbol 'saved-value)
(get symbol 'custom-type)))
(string-match regexp (symbol-name symbol))
(not (member symbol cus-test-skip-list))
(push symbol found))))
@ -492,17 +513,17 @@ It is suitable for batch mode. E.g., invoke
in the Emacs source directory."
(interactive)
(let (cus-loaded)
(let ((groups-loaded (cus-test-get-options "" 'cus-load))
cus-loaded groups-not-loaded)
(message "Running %s" 'cus-test-load-custom-loads)
(cus-test-load-custom-loads)
(setq cus-loaded
(cus-test-get-options ""))
(setq cus-loaded (cus-test-get-options ""))
(message "Running %s" 'cus-test-load-libs)
(cus-test-load-libs "all")
(setq cus-test-vars-not-cus-loaded
(cus-test-get-options ""))
(setq cus-test-vars-not-cus-loaded (cus-test-get-options "")
groups-not-loaded (cus-test-get-options "" t))
(dolist (o cus-loaded)
(setq cus-test-vars-not-cus-loaded
@ -512,7 +533,15 @@ in the Emacs source directory."
(message "No options not loaded by custom-load-symbol found")
(message "The following options were not loaded by custom-load-symbol:")
(cus-test-message
(sort cus-test-vars-not-cus-loaded 'string<)))))
(sort cus-test-vars-not-cus-loaded 'string<)))
(dolist (o groups-loaded)
(setq groups-not-loaded (delete o groups-not-loaded)))
(if (not groups-not-loaded)
(message "No groups not in cus-load.el found")
(message "The following groups are not in cus-load.el:")
(cus-test-message (sort groups-not-loaded 'string<)))))
(provide 'cus-test)

View file

@ -105,8 +105,8 @@ and build directories reside.
Optionally, $me can also remove old versions of
automatically generated files that are version-specific (such as the
versioned emacs executables in the \`src' directory, and the DOC-* files
in the \`etc' directory). The latter action is called \`pruning,' and
versioned emacs executables in the \`src' directory).
The latter action is called \`pruning,' and
can be enabled using the \`-p' or \`--prune' options.
EOF
exit 0
@ -209,10 +209,6 @@ maybe_mkdir "$DST_INFO"
PRUNED=""
if test x"$PRUNE" != xno; then
for D in `ls -1t $BUILD/etc/DOC-* | sed 1d`; do
echo $REMOVE_CMD $D
PRUNED="$PRUNED $D"
done
for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
echo $REMOVE_CMD $D
PRUNED="$PRUNED $D"

View file

@ -1,3 +1,8 @@
2013-05-15 Juri Linkov <juri@jurta.org>
* search.texi (Repeat Isearch): Mention key `RET' to finish
editing the string. (Bug#13348)
2013-05-14 Glenn Morris <rgm@gnu.org>
* ack.texi (Acknowledgments): Don't mention obsolete sup-mouse.el.

View file

@ -175,7 +175,7 @@ element in the minibuffer, where you can edit it.
@kindex M-e @r{(Incremental search)}
To edit the current search string in the minibuffer without
replacing it with items from the search ring, type @kbd{M-e}. Type
replacing it with items from the search ring, type @kbd{M-e}. Type @key{RET},
@kbd{C-s} or @kbd{C-r} to finish editing the string and search for it.
@node Error in Isearch

View file

@ -1,3 +1,9 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* loading.texi (Autoload):
* help.texi (Documentation Basics, Accessing Documentation)
(Accessing Documentation, Accessing Documentation): DOC-* is now DOC.
2013-04-23 Glenn Morris <rgm@gnu.org>
* internals.texi (Writing Emacs Primitives): Remove obvious example.
@ -24,8 +30,8 @@
2013-04-06 Chong Yidong <cyd@gnu.org>
* display.texi (Faces): Minor clarifications.
(Defining Faces): Clarify default vs custom face specs. Document
face-spec-set.
(Defining Faces): Clarify default vs custom face specs.
Document face-spec-set.
* display.texi (Overlay Properties):
* text.texi (Special Properties): Use the "anonymous face"
@ -2050,8 +2056,8 @@
2012-02-04 Chong Yidong <cyd@gnu.org>
* functions.texi (What Is a Function): Add closures. Mention
"return value" terminology. Add xref for command-execute.
* functions.texi (What Is a Function): Add closures.
Mention "return value" terminology. Add xref for command-execute.
Remove unused "keystroke command" terminology.
(Lambda Expressions): Give a different example than in the
following subsection. Add xref to Anonymous Functions.
@ -11598,7 +11604,7 @@
2002-05-13 Kim F. Storm <storm@cua.dk>
* variables.texi (Intro to Buffer-Local): Updated warning and
* variables.texi (Intro to Buffer-Local): Update warning and
example relating to changing buffer inside let.
2002-03-10 Jan Djärv <jan.h.d@swipnet.se>

View file

@ -93,13 +93,12 @@ When you define a variable with a @code{defvar} or related form
(@pxref{Defining Variables}), the documentation is stored in the
variable's @code{variable-documentation} property.
@cindex @file{DOC-@var{version}} (documentation) file
@cindex @file{DOC} (documentation) file
@item
To save memory, the documentation for preloaded functions and
variables (including primitive functions and autoloaded functions) is
not kept in memory, but in the file
@file{emacs/etc/DOC-@var{version}}, where @var{version} is the Emacs
version number (@pxref{Version Info}).
@file{emacs/etc/DOC}).
@item
When a function or variable is loaded from a byte-compiled file during
@ -126,7 +125,7 @@ customization groups (but for function documentation, use the
@code{documentation} command, below).
If the value recorded in the property list refers to a documentation
string stored in a @file{DOC-@var{version}} file or a byte-compiled
string stored in a @file{DOC} file or a byte-compiled
file, it looks up that string and returns it. If the property value
isn't @code{nil}, isn't a string, and doesn't refer to text in a file,
then it is evaluated as a Lisp expression to obtain a string.
@ -296,12 +295,12 @@ memory in the function definitions and variable property lists.
Emacs reads the file @var{filename} from the @file{emacs/etc} directory.
When the dumped Emacs is later executed, the same file will be looked
for in the directory @code{doc-directory}. Usually @var{filename} is
@code{"DOC-@var{version}"}.
@code{"DOC"}.
@end defun
@defvar doc-directory
This variable holds the name of the directory which should contain the
file @code{"DOC-@var{version}"} that contains documentation strings for
file @code{"DOC"} that contains documentation strings for
built-in and preloaded functions and variables.
In most cases, this is the same as @code{data-directory}. They may be

View file

@ -483,7 +483,7 @@ For example,
@noindent
In this case, @code{"prolog"} is the name of the file to load, 169681
refers to the documentation string in the
@file{emacs/etc/DOC-@var{version}} file (@pxref{Documentation Basics}),
@file{emacs/etc/DOC} file (@pxref{Documentation Basics}),
@code{t} means the function is interactive, and @code{nil} that it is
not a macro or a keymap.
@end defun

1
etc/.gitignore vendored
View file

@ -1,3 +1,2 @@
DOC
DOC-*
icons/

View file

@ -1,3 +1,7 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* .gitignore: Don't ignore DOC-* any more.
2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)

View file

@ -282,6 +282,12 @@ when possible.
*** Handlers for `file-acl' and `set-file-acl' for remote machines
which support POSIX ACLs.
** VHDL mode
*** New options: `vhdl-actual-generic-name', `vhdl-beautify-options'.
*** New commands: `vhdl-fix-statement-region', `vhdl-fix-statement-buffer'.
** Woman
*** The commands `woman-default-faces' and `woman-monochrome-faces'
@ -327,6 +333,9 @@ It is layered as:
* Incompatible Lisp Changes in Emacs 24.4
** Default process filers and sentinels are not nil any more.
Instead they default to a function which does what the nil value used to do.
** `read-event' does not return decoded chars in ttys any more.
Just as was the case in Emacs-22 and before, decoding of tty input according to
keyboard-coding-system is not performed in read-event any more. But contrary

View file

@ -551,7 +551,7 @@ with CEDET 1.0pre4) or later.
*** Self-documentation messages are garbled.
This means that the file `etc/DOC-...' doesn't properly correspond
This means that the file `etc/DOC' doesn't properly correspond
with the Emacs executable. Redumping Emacs and then installing the
corresponding pair of files should fix the problem.

View file

@ -1,3 +1,7 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* makefile.w32-in ($(DOC)): Use DOC rather than DOC-X.
2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
* make-docfile.c (search_lisp_doc_at_eol) [DEBUG]: Fix typo,

View file

@ -292,10 +292,10 @@ $(DOC): stamp_BLD $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(l
"$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1)
"$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2)
"$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(OTHER_PLATFORM_SUPPORT)
$(CP) $(DOC) ../etc/DOC-X
$(CP) $(DOC) ../etc/DOC
- mkdir "../src/$(OBJDIR)"
- mkdir "../src/$(OBJDIR)/etc"
$(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X
$(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC
{$(BLD)}.$(O){$(BLD)}.exe:
$(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS)

View file

@ -325,21 +325,25 @@ sig2str (int signum, char *signame)
{
int rtmin = SIGRTMIN;
int rtmax = SIGRTMAX;
int base, delta;
if (! (rtmin <= signum && signum <= rtmax))
return -1;
if (signum <= rtmin + (rtmax - rtmin) / 2)
{
int delta = signum - rtmin;
sprintf (signame, delta ? "RTMIN+%d" : "RTMIN", delta);
strcpy (signame, "RTMIN");
base = rtmin;
}
else
{
int delta = rtmax - signum;
sprintf (signame, delta ? "RTMAX-%d" : "RTMAX", delta);
strcpy (signame, "RTMAX");
base = rtmax;
}
delta = signum - base;
if (delta != 0)
sprintf (signame + 5, "%+d", delta);
return 0;
}
}

View file

@ -579,13 +579,23 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
which sometimes causes an unwanted diagnostic for fwrite calls.
This affects only function declaration attributes under certain
versions of gcc, and is not needed for C++. */
versions of gcc and clang, and is not needed for C++. */
# if (0 < __USE_FORTIFY_LEVEL \
&& __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
&& 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
&& !defined __cplusplus)
# undef fwrite
# define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
# undef fwrite_unlocked
extern size_t __REDIRECT (rpl_fwrite,
(const void *__restrict, size_t, size_t,
FILE *__restrict),
fwrite);
extern size_t __REDIRECT (rpl_fwrite_unlocked,
(const void *__restrict, size_t, size_t,
FILE *__restrict),
fwrite_unlocked);
# define fwrite rpl_fwrite
# define fwrite_unlocked rpl_fwrite_unlocked
# endif
# endif
_GL_CXXALIASWARN (fwrite);

View file

@ -1,7 +1,142 @@
2013-05-16 Leo Liu <sdl.web@gmail.com>
* progmodes/octave.el (octave-indent-defun): Mark obsolete.
(octave-mode-menu, octave-mode-map): Remove its uses.
2013-05-16 Reto Zimmermann <reto@gnu.org>
Sync with upstream vhdl mode v3.34.2.
* progmodes/vhdl-mode.el: Use `push' throughout.
(vhdl-version, vhdl-time-stamp, vhdl-doc-release-notes): Update.
(vhdl-compiler-alist): Replace "\t\n" by "\\t\\n".
Add IBM & Quartus compiler. Enhance entry for ADVance MS compiler.
(vhdl-actual-generic-name): New option to derive actual generic name.
(vhdl-port-paste-signals): Replace formal by actual generics.
(vhdl-beautify): New name for old group vhdl-align. Update users.
(vhdl-beautify-options): New option.
(vhdl-last-input-event): New compat alias. Use throughout.
(vhdl-goto-line): Replace user level function `goto-line'.
(vhdl-mode-map): Add bindings for vhdl-fix-statement-region,
vhdl-fix-statement-buffer.
(vhdl-create-mode-menu): Add some entries.
(vhdl-align-region-groups): Respect vhdl-beautify-options.
(vhdl-align-inline-comment-region-1): Handle "--" inside string.
(vhdl-fixup-whitespace-region): Handle symbols at EOL.
(vhdl-fix-statement-region, vhdl-fix-statement-buffer): New commands,
to force statements on one line.
(vhdl-remove-trailing-spaces-region):
New, split from vhdl-remove-trailing-spaces.
(vhdl-beautify-region): Fix statements, trailing spaces, ^M character.
Respect vhdl-beautify-options.
(vhdl-update-sensitivity-list-buffer): If non-interactive save buffer.
(vhdl-update-sensitivity-list): Not add with index if exists without.
Not include array index with signal. Ignore keywords in comments.
(vhdl-get-visible-signals): Regexp tweaks.
(vhdl-template-component-inst): Handle empty library.
(vhdl-template-type): Add template for 'enum' type.
(vhdl-port-paste-generic-map, vhdl-port-paste-constants):
Use vhdl-replace-string.
(vhdl-port-paste-signals): Use vhdl-prepare-search-1.
(vhdl-speedbar-mode-map): Rename from vhdl-speedbar-key-map.
(vhdl-speedbar-initialize): Update for above name change.
(vhdl-compose-wire-components): Fix in handling of constants.
(vhdl-error-regexp-emacs-alist): New variable.
(vhdl-error-regexp-add-emacs): New function;
adds support for new compile.el (Emacs 22+)
(vhdl-generate-makefile-1): Change target order for single lib. units.
Allow use of absolute file names.
2013-05-16 Leo Liu <sdl.web@gmail.com>
* simple.el (prog-indent-sexp): Indent enclosing defun.
2013-05-15 Glenn Morris <rgm@gnu.org>
* cus-start.el (show-trailing-whitespace): Move to editing basics.
* faces.el (trailing-whitespace): Don't use whitespace-faces group.
* obsolete/old-whitespace.el (whitespace-faces): Remove group.
(whitespace-highlight): Move to whitespace group.
* comint.el (comint-source):
* pcmpl-linux.el (pcmpl-linux):
* shell.el (shell-faces):
* eshell/esh-opt.el (eshell-opt):
* international/ccl.el (ccl): Remove empty custom groups.
* completion.el (dynamic-completion-mode):
* jit-lock.el (jit-lock-debug-mode):
* minibuffer.el (completion-in-region-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* emulation/tpu-edt.el (tpu-edt-mode):
* progmodes/subword.el (global-subword-mode, global-superword-mode):
* progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
* term/vt100.el (vt100-wide-mode): Specify explicit :group.
* term/xterm.el (xterm): Change parent group to terminals.
* master.el (master): Remove empty custom group.
(master-mode): Remove unused :group argument.
* textmodes/refill.el (refill): Remove empty custom group.
(refill-mode): Remove unused :group argument.
* textmodes/rst.el (rst-compile-toolsets): Use rst-compile group.
* cus-dep.el: Provide a feature.
(custom-make-dependencies): Ignore dotfiles (dir-locals).
Don't mistakenly ignore files whose basenames match a basename
from preloaded-file-list (eg cedet/ede/simple.el).
Add a fallback method for getting :group.
2013-05-15 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-char-by-name): Rename from
`isearch-insert-char-by-name'. Doc fix.
(isearch-forward): Mention `isearch-char-by-name' in
the docstring. (Bug#13348)
* isearch.el (minibuffer-local-isearch-map): Bind "\r" to
`exit-minibuffer' instead of
`isearch-nonincremental-exit-minibuffer'.
(isearch-edit-string): Remove mention of
`isearch-nonincremental-exit-minibuffer' from docstring.
(isearch-nonincremental-exit-minibuffer): Mark as obsolete.
(isearch-forward-exit-minibuffer)
(isearch-reverse-exit-minibuffer): Add docstring. (Bug#13348)
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* loadup.el: Just use unversioned DOC.
* nxml/nxml-mode.el: Treat unclosed <[[, <?, comment, and other
literals as extending to EOB.
(nxml-last-fontify-end): Remove unused variable.
(nxml-after-change1): Use with-silent-modifications.
(nxml-extend-after-change-region): Simplify.
(nxml-extend-after-change-region1): Remove function.
(nxml-after-change1): Don't adjust for dependent regions.
(nxml-fontify-matcher): Simplify.
* nxml/xmltok.el (xmltok-dependent-regions): Remove variable.
(xmltok-add-dependent): Remove function.
(xmltok-scan-after-lt, xmltok-scan-after-processing-instruction-open)
(xmltok-scan-after-comment-open, xmltok-scan-prolog-literal)
(xmltok-scan-prolog-after-processing-instruction-open): Treat
unclosed <[[, <?, comment, and other literals as extending to EOB.
* nxml/rng-valid.el (rng-mark-xmltok-dependent-regions)
(rng-mark-xmltok-dependent-region, rng-dependent-region-changed):
Remove functions.
(rng-do-some-validation-1): Don't mark dependent regions.
* nxml/nxml-rap.el (nxml-adjust-start-for-dependent-regions)
(nxml-mark-parse-dependent-regions, nxml-mark-parse-dependent-region)
(nxml-clear-dependent-regions): Remove functions.
(nxml-scan-after-change, nxml-scan-prolog, nxml-tokenize-forward)
(nxml-ensure-scan-up-to-date):
Don't clear&mark dependent regions.
2013-05-15 Leo Liu <sdl.web@gmail.com>
* progmodes/octave.el (octave-goto-function-definition): Improve
and fix callers.
* progmodes/octave.el (octave-goto-function-definition):
Improve and fix callers.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
@ -277,7 +412,8 @@
their declaration.
(vhdl-mode-syntax-table-init): Remove.
* progmodes/m4-mode.el (m4-mode-syntax-table): Add comment on last change.
* progmodes/m4-mode.el (m4-mode-syntax-table): Add comment on
last change.
* progmodes/ld-script.el (ld-script-mode-syntax-table): Use symbol
syntax for "_".
@ -292,7 +428,8 @@
Handle a _ with symbol syntax.
(autoconf-mode): Don't change the syntax-table for imenu and font-lock.
* progmodes/ada-mode.el (ada-mode-abbrev-table): Consolidate declaration.
* progmodes/ada-mode.el (ada-mode-abbrev-table):
Consolidate declaration.
(ada-mode-syntax-table, ada-mode-symbol-syntax-table): Initialize in
the declaration.
(ada-create-syntax-table): Remove.

View file

@ -1,3 +1,9 @@
2013-05-15 Glenn Morris <rgm@gnu.org>
* semantic/symref/list.el (semantic-symref-auto-expand-results)
(semantic-symref-results-mode-hook)
(semantic-symref-results-summary-function): Fix :group.
2013-05-14 Glenn Morris <rgm@gnu.org>
* ede/simple.el, semantic/java.el: Set generated-autoload-load-name.

View file

@ -178,12 +178,12 @@ Display the references in`semantic-symref-results-mode'."
(defcustom semantic-symref-auto-expand-results nil
"Non-nil to expand symref results on buffer creation."
:group 'semantic-symref
:group 'semantic-symref-results-mode
:type 'boolean)
(defcustom semantic-symref-results-mode-hook nil
"Hook run when `semantic-symref-results-mode' starts."
:group 'semantic-symref
:group 'semantic-symref-results-mode
:type 'hook)
(defvar semantic-symref-current-results nil
@ -217,7 +217,7 @@ RESULTS is an object of class `semantic-symref-results'."
(defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype
"*Function to use when creating items in Imenu.
Some useful functions are found in `semantic-format-tag-functions'."
:group 'semantic-symref
:group 'semantic-symref-results-mode
:type semantic-format-tag-custom-list)
(defun semantic-symref-results-dump (results)

View file

@ -148,10 +148,11 @@
"Completion facilities in comint."
:group 'comint)
(defgroup comint-source nil
"Source finding facilities in comint."
:prefix "comint-"
:group 'comint)
;; Unused.
;;; (defgroup comint-source nil
;;; "Source finding facilities in comint."
;;; :prefix "comint-"
;;; :group 'comint)
(defvar comint-prompt-regexp "^"
"Regexp to recognize prompts in the inferior process.

View file

@ -2342,6 +2342,7 @@ With a prefix argument ARG, enable the mode if ARG is positive,
and disable it otherwise. If called from Lisp, enable the mode
if ARG is omitted or nil."
:global t
:group 'completion
;; This is always good, not specific to dynamic-completion-mode.
(define-key function-key-map [C-return] [?\C-\r])

View file

@ -61,16 +61,14 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
;; the args as directories after we are done.
(while (setq subdir (pop command-line-args-left))
(message "Directory %s" subdir)
(let ((files (directory-files subdir nil "\\`[^=].*\\.el\\'"))
(let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'"))
(default-directory (expand-file-name subdir))
(preloaded (concat "\\`"
(regexp-opt (mapcar
'file-name-base
preloaded-file-list) t)
(preloaded (concat "\\`\\(\\./+\\)?"
(regexp-opt preloaded-file-list t)
"\\.el\\'")))
(dolist (file files)
(unless (or (string-match custom-dependencies-no-scan-regexp file)
(string-match preloaded file)
(string-match preloaded (format "%s/%s" subdir file))
(not (file-exists-p file)))
(erase-buffer)
(kill-all-local-variables)
@ -91,13 +89,30 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
(while (re-search-forward
"^(def\\(custom\\|face\\|group\\)" nil t)
(beginning-of-line)
(let ((expr (read (current-buffer))))
(let ((type (match-string 1))
(expr (read (current-buffer))))
(condition-case nil
(let ((custom-dont-initialize t))
;; Why do we need to eval just for the name?
(eval expr)
(put (nth 1 expr) 'custom-where name))
(error nil))))
;; Eval to get the 'custom-group, -tag,
;; -version, group-documentation etc properties.
(put (nth 1 expr) 'custom-where name)
(eval expr))
;; Eval failed for some reason. Eg maybe the
;; defcustom uses something defined earlier
;; in the file (we haven't loaded the file).
;; In most cases, we can still get the :group.
(error
(ignore-errors
(let ((group (cadr (memq :group expr))))
(and group
(eq (car group) 'quote)
(custom-add-to-group
(cadr group)
(nth 1 expr)
(intern (format "custom-%s"
(if (equal type "custom")
"variable"
type)))))))))))
(error nil)))))))))
(message "Generating %s..." generated-custom-dependencies-file)
(set-buffer (find-file-noselect generated-custom-dependencies-file))
@ -187,5 +202,6 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
(message "Generating %s...done" generated-custom-dependencies-file))
(provide 'cus-dep)
;;; cus-dep.el ends here

View file

@ -449,7 +449,8 @@ since it could result in memory overflow and make Emacs crash."
(other :tag "Always (t)" :value t))
"24.3")
;; xdisp.c
(show-trailing-whitespace whitespace-faces boolean nil
;; The whitespace group is for whitespace.el.
(show-trailing-whitespace editing-basics boolean nil
:safe booleanp)
(scroll-step windows integer)
(scroll-conservatively windows integer)

View file

@ -983,7 +983,7 @@ and the total number of lines in the buffer."
With a prefix argument ARG, enable the mode if ARG is positive,
and disable it otherwise. If called from Lisp, enable the mode
if ARG is omitted or nil."
:global t
:global t :group 'tpu
(if tpu-edt-mode (tpu-edt-on) (tpu-edt-off)))
(defalias 'TPU-EDT-MODE 'tpu-edt-mode)

View file

@ -1,3 +1,11 @@
2013-05-15 Glenn Morris <rgm@gnu.org>
* erc-list.el (erc-list):
* erc-menu.el (erc-menu):
* erc-ring.el (erc-ring): Define custom groups, for define-erc-module.
* erc-list.el: Provide a feature.
2013-05-09 Glenn Morris <rgm@gnu.org>
* erc-desktop-notifications.el (erc-notifications-icon):

View file

@ -30,6 +30,10 @@
(require 'erc)
(defgroup erc-list nil
"Support for the /list command."
:group 'erc)
;; This is implicitly the width of the channel name column. Pick
;; something small enough that the topic has a chance of being
;; readable, but long enough that most channel names won't make for
@ -214,6 +218,8 @@ to RFC and send the LIST header (#321) at start of list transmission."
""))))
(put 'erc-cmd-LIST 'do-not-parse-args t)
(provide 'erc-list)
;;; erc-list.el ends here
;;
;; Local Variables:

View file

@ -30,6 +30,10 @@
(require 'erc)
(require 'easymenu)
(defgroup erc-menu nil
"ERC menu support."
:group 'erc)
(defvar erc-menu-definition
(list "ERC"
["Connect to server..." erc t]

View file

@ -38,6 +38,10 @@
(require 'comint)
(require 'ring)
(defgroup erc-ring nil
"An input ring for ERC."
:group 'erc)
;;;###autoload (autoload 'erc-ring-mode "erc-ring" nil t)
(define-erc-module ring nil
"Stores input in a ring so that previous commands and messages can

View file

@ -27,11 +27,12 @@
(eval-when-compile (require 'esh-ext))
(defgroup eshell-opt nil
"The options processing code handles command argument parsing for
Eshell commands implemented in Lisp."
:tag "Command options processing"
:group 'eshell)
;; Unused.
;;; (defgroup eshell-opt nil
;;; "The options processing code handles command argument parsing for
;;; Eshell commands implemented in Lisp."
;;; :tag "Command options processing"
;;; :group 'eshell)
;;; User Functions:

View file

@ -2292,7 +2292,6 @@ terminal type to a different value."
(t :inverse-video t))
"Basic face for highlighting trailing whitespace."
:version "21.1"
:group 'whitespace-faces ; like `show-trailing-whitespace'
:group 'basic-faces)
(defface escape-glyph

View file

@ -1,3 +1,8 @@
2013-05-15 Glenn Morris <rgm@gnu.org>
* shr-color.el (shr-color-visible-luminance-min)
(shr-color-visible-distance-min): Use shr-color group.
2013-05-11 Glenn Morris <rgm@gnu.org>
* gnus-vm.el: Make it loadable without VM.

View file

@ -36,14 +36,14 @@
(defcustom shr-color-visible-luminance-min 40
"Minimum luminance distance between two colors to be considered visible.
Must be between 0 and 100."
:group 'shr
:group 'shr-color
:type 'number)
(defcustom shr-color-visible-distance-min 5
"Minimum color distance between two colors to be considered visible.
This value is used to compare result for `ciede2000'. It's an
absolute value without any unit."
:group 'shr
:group 'shr-color
:type 'integer)
(defconst shr-color-html-colors-alist

View file

@ -43,10 +43,11 @@
;;; Code:
(defgroup ccl nil
"CCL (Code Conversion Language) compiler."
:prefix "ccl-"
:group 'i18n)
;; Unused.
;;; (defgroup ccl nil
;;; "CCL (Code Conversion Language) compiler."
;;; :prefix "ccl-"
;;; :group 'i18n)
(defconst ccl-command-table
[if branch loop break repeat write-repeat write-read-repeat

View file

@ -47,7 +47,7 @@
;; modify the search string before executing the search. There are
;; three commands to terminate the editing: C-s and C-r exit the
;; minibuffer and search forward and reverse respectively, while C-m
;; exits and does a nonincremental search.
;; exits and searches in the last search direction.
;; Exiting immediately from isearch uses isearch-edit-string instead
;; of nonincremental-search, if search-nonincremental-instead is non-nil.
@ -515,12 +515,12 @@ This is like `describe-bindings', but displays only Isearch keys."
(define-key map "\M-so" 'isearch-occur)
(define-key map "\M-shr" 'isearch-highlight-regexp)
;; The key translations defined in the C-x 8 prefix should insert
;; characters into the search string. See iso-transl.el.
;; The key translations defined in the C-x 8 prefix should add
;; characters to the search string. See iso-transl.el.
(define-key map "\C-x" nil)
(define-key map [?\C-x t] 'isearch-other-control-char)
(define-key map "\C-x8" nil)
(define-key map "\C-x8\r" 'isearch-insert-char-by-name)
(define-key map "\C-x8\r" 'isearch-char-by-name)
map)
"Keymap for `isearch-mode'.")
@ -528,7 +528,7 @@ This is like `describe-bindings', but displays only Isearch keys."
(defvar minibuffer-local-isearch-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map "\r" 'isearch-nonincremental-exit-minibuffer)
(define-key map "\r" 'exit-minibuffer)
(define-key map "\M-\t" 'isearch-complete-edit)
(define-key map "\C-s" 'isearch-forward-exit-minibuffer)
(define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
@ -679,6 +679,8 @@ Type \\[isearch-yank-kill] to yank the last string of killed text.
Type \\[isearch-yank-pop] to replace string just yanked into search prompt
with string killed before it.
Type \\[isearch-quote-char] to quote control character to search for it.
Type \\[isearch-char-by-name] to add a character to search by Unicode name,\
with completion.
\\[isearch-abort] while searching or when search has failed cancels input\
back to what has
been found successfully.
@ -1273,7 +1275,6 @@ You can update the global isearch variables by setting new values to
The following additional command keys are active while editing.
\\<minibuffer-local-isearch-map>
\\[exit-minibuffer] to resume incremental searching with the edited string.
\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search.
\\[isearch-forward-exit-minibuffer] to resume isearching forward.
\\[isearch-reverse-exit-minibuffer] to resume isearching backward.
\\[isearch-complete-edit] to complete the search string using the search ring."
@ -1307,13 +1308,18 @@ The following additional command keys are active while editing.
(interactive)
(setq isearch-nonincremental t)
(exit-minibuffer))
;; Changing the value of `isearch-nonincremental' has no effect here,
;; because `isearch-edit-string' ignores this change. Thus marked as obsolete.
(make-obsolete 'isearch-nonincremental-exit-minibuffer 'exit-minibuffer "24.4")
(defun isearch-forward-exit-minibuffer ()
"Resume isearching forward from the minibuffer that edits the search string."
(interactive)
(setq isearch-new-forward t)
(exit-minibuffer))
(defun isearch-reverse-exit-minibuffer ()
"Resume isearching backward from the minibuffer that edits the search string."
(interactive)
(setq isearch-new-forward nil)
(exit-minibuffer))
@ -1866,11 +1872,12 @@ Subword is used when `subword-mode' is activated. "
(lambda () (let ((inhibit-field-text-motion t))
(line-end-position (if (eolp) 2 1))))))
(defun isearch-insert-char-by-name ()
"Read a character by its Unicode name and insert it into search string."
(defun isearch-char-by-name ()
"Read a character by its Unicode name and add it to the search string.
Completion is available like in `read-char-by-name' used by `insert-char'."
(interactive)
(with-isearch-suspended
(let ((char (read-char-by-name "Insert character (Unicode name or hex): ")))
(let ((char (read-char-by-name "Add character to search (Unicode name or hex): ")))
(when char
(setq isearch-new-string (concat isearch-string (string char))
isearch-new-message (concat isearch-message

View file

@ -258,7 +258,7 @@ the variable `jit-lock-stealth-nice'."
When this minor mode is enabled, jit-lock runs as little code as possible
during redisplay and moves the rest to a timer, where things
like `debug-on-error' and Edebug can be used."
:global t
:global t :group 'jit-lock
(when jit-lock-defer-timer
(cancel-timer jit-lock-defer-timer)
(setq jit-lock-defer-timer nil))

View file

@ -308,32 +308,10 @@
(message "Finding pointers to doc strings...")
(if (or (equal (nth 3 command-line-args) "dump")
(equal (nth 4 command-line-args) "dump"))
(let ((name emacs-version))
(while (string-match "[^-+_.a-zA-Z0-9]+" name)
(setq name (concat (downcase (substring name 0 (match-beginning 0)))
"-"
(substring name (match-end 0)))))
(if (memq system-type '(ms-dos windows-nt))
(let ((name1 (expand-file-name
(if (fboundp 'x-create-frame) "DOC-X" "DOC")
"../etc")))
;; There will be no DOC-X on MS-Windows when we build
;; using the Posix Makefile's. In that case, we want
;; to create DOC-XX.YY.ZZ, as on Unix.
(if (file-exists-p name1)
(setq name name1)
(setq name (concat (expand-file-name "../etc/DOC-") name))
(if (file-exists-p name)
(delete-file name))
(copy-file (expand-file-name "../etc/DOC") name t)))
(setq name (concat (expand-file-name "../etc/DOC-") name))
(if (file-exists-p name)
(delete-file name))
(copy-file (expand-file-name "../etc/DOC") name t))
(Snarf-documentation (file-name-nondirectory name)))
(condition-case nil
(Snarf-documentation "DOC")
(error nil)))
(Snarf-documentation "DOC")
(condition-case nil
(Snarf-documentation "DOC")
(error nil)))
(message "Finding pointers to doc strings...done")
;; Note: You can cause additional libraries to be preloaded

View file

@ -53,10 +53,11 @@
;;; Code:
(defgroup master nil
"Support for master/slave relationships between buffers."
:version "22.1"
:group 'convenience)
;; Unused.
;;; (defgroup master nil
;;; "Support for master/slave relationships between buffers."
;;; :version "22.1"
;;; :group 'convenience)
;; Variables that don't need initialization.
@ -84,7 +85,8 @@ using the 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'."
:group 'master
;; Not global, so no effect.
;;; :group 'master
:keymap
'(("\C-c\C-n" . master-says-scroll-up)
("\C-c\C-p" . master-says-scroll-down)

View file

@ -1856,6 +1856,7 @@ With a prefix argument ARG, enable the modemode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil."
:global t
:group 'minibuffer
(setq completion-in-region--data nil)
;; (remove-hook 'pre-command-hook #'completion-in-region--prech)
(remove-hook 'post-command-hook #'completion-in-region--postch)

View file

@ -352,11 +352,6 @@ Use `nxml-parent-document-set' to set it.")
See the function `xmltok-forward-prolog' for more information.")
(make-variable-buffer-local 'nxml-prolog-regions)
(defvar nxml-last-fontify-end nil
"Position where fontification last ended.
It is nil if the buffer changed since the last fontification.")
(make-variable-buffer-local 'nxml-last-fontify-end)
(defvar nxml-degraded nil
"Non-nil if currently operating in degraded mode.
Degraded mode is enabled when an internal error is encountered in the
@ -538,7 +533,6 @@ Many aspects this mode can be customized using
(save-excursion
(save-restriction
(widen)
(nxml-clear-dependent-regions (point-min) (point-max))
(setq nxml-scan-end (copy-marker (point-min) nil))
(with-silent-modifications
(nxml-clear-inside (point-min) (point-max))
@ -583,12 +577,9 @@ Many aspects this mode can be customized using
;; Clean up fontification.
(save-excursion
(widen)
(let ((inhibit-read-only t)
(buffer-undo-list t)
(modified (buffer-modified-p)))
(with-silent-modifications
(nxml-with-invisible-motion
(remove-text-properties (point-min) (point-max) '(face)))
(set-buffer-modified-p modified)))
(remove-text-properties (point-min) (point-max) '(face)))))
(remove-hook 'change-major-mode-hook 'nxml-cleanup t))
(defun nxml-degrade (context err)
@ -638,10 +629,6 @@ the full extent of the area needing refontification.
For bookkeeping, call this function even when fontification is
disabled."
(let ((pre-change-end (+ start pre-change-length)))
(setq start
(nxml-adjust-start-for-dependent-regions start
end
pre-change-length))
;; If the prolog might have changed, rescan the prolog
(when (<= start
;; Add 2 so as to include the < and following char that
@ -902,26 +889,16 @@ Called with `font-lock-beg' and `font-lock-end' dynamically bound."
(defun nxml-extend-after-change-region (start end pre-change-length)
(unless nxml-degraded
(setq nxml-last-fontify-end nil)
(let ((region (nxml-with-degradation-on-error
'nxml-extend-after-change-region
(save-excursion
(save-restriction
(widen)
(save-match-data
(nxml-with-invisible-motion
(with-silent-modifications
(nxml-extend-after-change-region1
start end pre-change-length)))))))))
(if (consp region) region))))
(defun nxml-extend-after-change-region1 (start end pre-change-length)
(let* ((region (nxml-after-change1 start end pre-change-length))
(font-lock-beg (car region))
(font-lock-end (cdr region)))
(nxml-extend-region)
(cons font-lock-beg font-lock-end)))
(nxml-with-degradation-on-error
'nxml-extend-after-change-region
(save-excursion
(save-restriction
(widen)
(save-match-data
(nxml-with-invisible-motion
(with-silent-modifications
(nxml-after-change1
start end pre-change-length)))))))))
(defun nxml-fontify-matcher (bound)
"Called as font-lock keyword matcher."
@ -936,13 +913,12 @@ Called with `font-lock-beg' and `font-lock-end' dynamically bound."
(nxml-fontify-prolog)
(goto-char nxml-prolog-end))
(let (xmltok-dependent-regions
xmltok-errors)
(let (xmltok-errors)
(while (and (nxml-tokenize-forward)
(<= (point) bound)) ; Intervals are open-ended.
(nxml-apply-fontify-rule)))
(setq nxml-last-fontify-end (point)))
)
;; Since we did the fontification internally, tell font-lock to not
;; do anything itself.

View file

@ -69,18 +69,6 @@
;; typical proportion of comments, CDATA sections and processing
;; instructions is small relative to other things. Secondly, to scan
;; we just search for the regexp <[!?].
;;
;; One problem is unclosed comments, processing instructions and CDATA
;; sections. Suppose, for example, we encounter a <!-- but there's no
;; matching -->. This is not an unexpected situation if the user is
;; creating a comment. It is not helpful to treat the whole of the
;; file starting from the <!-- onwards as a single unclosed comment
;; token. Instead we treat just the <!-- as a piece of not well-formed
;; markup and continue. The problem is that if at some later stage a
;; --> gets added to the buffer after the unclosed <!--, we will need
;; to reparse the buffer starting from the <!--. We need to keep
;; track of these reparse dependencies; they are called dependent
;; regions in the code.
;;; Code:
@ -144,8 +132,7 @@ any 'inside' regions and at the beginning of a token."
(if (>= start nxml-scan-end)
nxml-scan-end
(let ((inside-remove-start start)
xmltok-errors
xmltok-dependent-regions)
xmltok-errors)
(while (or (when (xmltok-forward-special (min end nxml-scan-end))
(when (memq xmltok-type
'(comment
@ -169,9 +156,7 @@ any 'inside' regions and at the beginning of a token."
(when inside-end
(setq end inside-end)
t))))
(nxml-clear-inside inside-remove-start end)
(nxml-clear-dependent-regions start end)
(nxml-mark-parse-dependent-regions))
(nxml-clear-inside inside-remove-start end))
(when (> end nxml-scan-end)
(set-marker nxml-scan-end end))
end))
@ -182,63 +167,14 @@ any 'inside' regions and at the beginning of a token."
(defun nxml-scan-prolog ()
(goto-char (point-min))
(let (xmltok-dtd
xmltok-errors
xmltok-dependent-regions)
xmltok-errors)
(setq nxml-prolog-regions (xmltok-forward-prolog))
(setq nxml-prolog-end (point))
(nxml-clear-inside (point-min) nxml-prolog-end)
(nxml-clear-dependent-regions (point-min) nxml-prolog-end)
(nxml-mark-parse-dependent-regions))
(nxml-clear-inside (point-min) nxml-prolog-end))
(when (< nxml-scan-end nxml-prolog-end)
(set-marker nxml-scan-end nxml-prolog-end)))
;;; Dependent regions
(defun nxml-adjust-start-for-dependent-regions (start end pre-change-length)
(let ((overlays (overlays-in (1- start) start))
(adjusted-start start))
(while overlays
(let* ((overlay (car overlays))
(ostart (overlay-start overlay)))
(when (and (eq (overlay-get overlay 'category) 'nxml-dependent)
(< ostart adjusted-start))
(let ((funargs (overlay-get overlay 'nxml-funargs)))
(when (apply (car funargs)
(append (list start
end
pre-change-length
ostart
(overlay-end overlay))
(cdr funargs)))
(setq adjusted-start ostart)))))
(setq overlays (cdr overlays)))
adjusted-start))
(defun nxml-mark-parse-dependent-regions ()
(while xmltok-dependent-regions
(apply 'nxml-mark-parse-dependent-region
(car xmltok-dependent-regions))
(setq xmltok-dependent-regions
(cdr xmltok-dependent-regions))))
(defun nxml-mark-parse-dependent-region (fun start end &rest args)
(let ((overlay (make-overlay start end nil t t)))
(overlay-put overlay 'category 'nxml-dependent)
(overlay-put overlay 'nxml-funargs (cons fun args))))
(put 'nxml-dependent 'evaporate t)
(defun nxml-clear-dependent-regions (start end)
(let ((overlays (overlays-in start end)))
(while overlays
(let* ((overlay (car overlays))
(category (overlay-get overlay 'category)))
(when (and (eq category 'nxml-dependent)
(<= start (overlay-start overlay)))
(delete-overlay overlay)))
(setq overlays (cdr overlays)))))
;;; Random access parsing
(defun nxml-token-after ()
@ -286,17 +222,14 @@ Sets variables like `nxml-token-after'."
(point)))
(defun nxml-tokenize-forward ()
(let (xmltok-dependent-regions
xmltok-errors)
(let (xmltok-errors)
(when (and (xmltok-forward)
(> (point) nxml-scan-end))
(cond ((memq xmltok-type '(comment
cdata-section
processing-instruction))
(with-silent-modifications
(nxml-set-inside (1+ xmltok-start) (point) xmltok-type)))
(xmltok-dependent-regions
(nxml-mark-parse-dependent-regions)))
(nxml-set-inside (1+ xmltok-start) (point) xmltok-type))))
(set-marker nxml-scan-end (point)))
xmltok-type))
@ -304,7 +237,7 @@ Sets variables like `nxml-token-after'."
"Move point backwards outside any 'inside' regions or tags.
Point will not move past `nxml-prolog-end'.
Point will either be at BOUND or a '<' character starting a tag
outside any 'inside' regions. Ignores dependent regions.
outside any 'inside' regions.
As a precondition, point must be >= BOUND."
(nxml-move-outside-backwards)
(when (not (equal (char-after) ?<))
@ -331,8 +264,7 @@ Leave point unmoved if it is not inside anything special."
(when (< nxml-scan-end pos)
(save-excursion
(goto-char nxml-scan-end)
(let (xmltok-errors
xmltok-dependent-regions)
(let (xmltok-errors)
(while (when (xmltok-forward-special pos)
(when (memq xmltok-type
'(comment
@ -346,8 +278,6 @@ Leave point unmoved if it is not inside anything special."
t
(setq pos (point))
nil)))
(nxml-clear-dependent-regions nxml-scan-end pos)
(nxml-mark-parse-dependent-regions)
(set-marker nxml-scan-end pos))))))
;;; Element scanning

View file

@ -530,7 +530,6 @@ Return t if there is work to do, nil otherwise."
xmltok-replacement
xmltok-attributes
xmltok-namespace-attributes
xmltok-dependent-regions
xmltok-errors)
(when (= (point) 1)
(let ((regions (xmltok-forward-prolog)))
@ -566,7 +565,6 @@ Return t if there is work to do, nil otherwise."
;; do this before setting rng-validate-up-to-date-end
;; in case we get a quit
(rng-mark-xmltok-errors)
(rng-mark-xmltok-dependent-regions)
(setq rng-validate-up-to-date-end
(marker-position rng-conditional-up-to-date-end))
(rng-clear-conditional-region)
@ -591,7 +589,6 @@ Return t if there is work to do, nil otherwise."
(when (not have-remaining-chars)
(rng-process-end-document))
(rng-mark-xmltok-errors)
(rng-mark-xmltok-dependent-regions)
(setq rng-validate-up-to-date-end pos)
(when rng-conditional-up-to-date-end
(cond ((<= rng-conditional-up-to-date-end pos)
@ -661,57 +658,9 @@ Return t if there is work to do, nil otherwise."
;; if overlays left over from a previous use
;; of rng-validate-mode that ended with a change of mode
(when rng-error-count
(setq rng-error-count (1- rng-error-count)))))
((and (eq category 'rng-dependent)
(<= beg (overlay-start overlay)))
(delete-overlay overlay))))
(setq rng-error-count (1- rng-error-count)))))))
(setq overlays (cdr overlays))))))
;;; Dependent regions
(defun rng-mark-xmltok-dependent-regions ()
(while xmltok-dependent-regions
(apply 'rng-mark-xmltok-dependent-region
(car xmltok-dependent-regions))
(setq xmltok-dependent-regions
(cdr xmltok-dependent-regions))))
(defun rng-mark-xmltok-dependent-region (fun start end &rest args)
(let ((overlay (make-overlay start end nil t t)))
(overlay-put overlay 'category 'rng-dependent)
(overlay-put overlay 'rng-funargs (cons fun args))))
(put 'rng-dependent 'evaporate t)
(put 'rng-dependent 'modification-hooks '(rng-dependent-region-changed))
(put 'rng-dependent 'insert-behind-hooks '(rng-dependent-region-changed))
(defun rng-dependent-region-changed (overlay
after-p
change-start
change-end
&optional pre-change-length)
(when (and after-p
;; Emacs sometimes appears to call deleted overlays
(overlay-start overlay)
(let ((funargs (overlay-get overlay 'rng-funargs)))
(save-match-data
(save-excursion
(save-restriction
(widen)
(apply (car funargs)
(append (list change-start
change-end
pre-change-length
(overlay-start overlay)
(overlay-end overlay))
(cdr funargs))))))))
(rng-after-change-function (overlay-start overlay)
change-end
(+ pre-change-length
(- (overlay-start overlay)
change-start)))
(delete-overlay overlay)))
;;; Error state
(defun rng-mark-xmltok-errors ()

View file

@ -132,33 +132,6 @@ from referencing the entity in element content and AR is either nil,
meaning the replacement text included a <, or a string which is the
normalized attribute value.")
(defvar xmltok-dependent-regions nil
"List of descriptors of regions that a parsed token depends on.
A token depends on a region if the region occurs after the token and a
change in the region may require the token to be reparsed. This only
happens with markup that is not well-formed. For example, if a <?
occurs without a matching ?>, then the <? is returned as a
not-well-formed token. However, this token is dependent on region
from the end of the token to the end of the buffer: if this ever
contains ?> then the buffer must be reparsed from the <?.
A region descriptor is a list (FUN START END ARG ...), where FUN is a
function to be called when the region changes, START and END are
integers giving the start and end of the region, and ARG... are
additional arguments to be passed to FUN. FUN will be called with 5
arguments followed by the additional arguments if any: the position of
the start of the changed area in the region, the position of the end
of the changed area in the region, the length of the changed area
before the change, the position of the start of the region, the
position of the end of the region. FUN must return non-nil if the
region needs reparsing. FUN will be called in a `save-excursion'
with match-data saved.
`xmltok-forward', `xmltok-forward-special' and `xmltok-forward-prolog'
may add entries to the beginning of this list, but will not clear it.
`xmltok-forward' and `xmltok-forward-special' will only add entries
when returning tokens of type not-well-formed.")
(defvar xmltok-errors nil
"List of errors detected by `xmltok-forward' and `xmltok-forward-prolog'.
@ -176,7 +149,6 @@ indicating the position of the error.")
xmltok-replacement
xmltok-attributes
xmltok-namespace-attributes
xmltok-dependent-regions
xmltok-errors)
,@body))
@ -298,14 +270,6 @@ and VALUE-END, otherwise a STRING giving the value."
(or end (point)))
xmltok-errors)))
(defun xmltok-add-dependent (fun &optional start end &rest args)
(setq xmltok-dependent-regions
(cons (cons fun
(cons (or start xmltok-start)
(cons (or end (point-max))
args)))
xmltok-dependent-regions)))
(defun xmltok-forward ()
(setq xmltok-start (point))
(let* ((case-fold-search nil)
@ -684,14 +648,8 @@ Return the type of the token."
(setq xmltok-type 'empty-element))
((xmltok-after-lt start cdata-section-open)
(setq xmltok-type
(if (search-forward "]]>" nil t)
'cdata-section
(xmltok-add-error "No closing ]]>")
(xmltok-add-dependent 'xmltok-unclosed-reparse-p
nil
nil
"]]>")
'not-well-formed)))
(progn (search-forward "]]>" nil 'move)
'cdata-section)))
((xmltok-after-lt start processing-instruction-question)
(xmltok-scan-after-processing-instruction-open))
((xmltok-after-lt start comment-open)
@ -758,68 +716,44 @@ Return the type of the token."
;; xmltok-scan-prolog-after-processing-instruction-open
;; XXX maybe should include rest of line (up to any <,>) in unclosed PI
(defun xmltok-scan-after-processing-instruction-open ()
(cond ((not (search-forward "?>" nil t))
(xmltok-add-error "No closing ?>"
xmltok-start
(+ xmltok-start 2))
(xmltok-add-dependent 'xmltok-unclosed-reparse-p
nil
nil
"?>")
(setq xmltok-type 'not-well-formed))
(t
(cond ((not (save-excursion
(goto-char (+ 2 xmltok-start))
(and (looking-at (xmltok-ncname regexp))
(setq xmltok-name-end (match-end 0)))))
(setq xmltok-name-end (+ xmltok-start 2))
(xmltok-add-error "<? not followed by name"
(+ xmltok-start 2)
(+ xmltok-start 3)))
((not (or (memq (char-after xmltok-name-end)
'(?\n ?\t ?\r ? ))
(= xmltok-name-end (- (point) 2))))
(xmltok-add-error "Target not followed by whitespace"
xmltok-name-end
(1+ xmltok-name-end)))
((and (= xmltok-name-end (+ xmltok-start 5))
(save-excursion
(goto-char (+ xmltok-start 2))
(let ((case-fold-search t))
(looking-at "xml"))))
(xmltok-add-error "Processing instruction target is xml"
(+ xmltok-start 2)
(+ xmltok-start 5))))
(setq xmltok-type 'processing-instruction))))
(search-forward "?>" nil 'move)
(cond ((not (save-excursion
(goto-char (+ 2 xmltok-start))
(and (looking-at (xmltok-ncname regexp))
(setq xmltok-name-end (match-end 0)))))
(setq xmltok-name-end (+ xmltok-start 2))
(xmltok-add-error "<? not followed by name"
(+ xmltok-start 2)
(+ xmltok-start 3)))
((not (or (memq (char-after xmltok-name-end)
'(?\n ?\t ?\r ? ))
(= xmltok-name-end (- (point) 2))))
(xmltok-add-error "Target not followed by whitespace"
xmltok-name-end
(1+ xmltok-name-end)))
((and (= xmltok-name-end (+ xmltok-start 5))
(save-excursion
(goto-char (+ xmltok-start 2))
(let ((case-fold-search t))
(looking-at "xml"))))
(xmltok-add-error "Processing instruction target is xml"
(+ xmltok-start 2)
(+ xmltok-start 5))))
(setq xmltok-type 'processing-instruction))
(defun xmltok-scan-after-comment-open ()
(setq xmltok-type
(cond ((not (search-forward "--" nil t))
(xmltok-add-error "No closing -->")
(xmltok-add-dependent 'xmltok-unclosed-reparse-p
nil
nil
;; not --> because
;; -- is not allowed
;; in comments in XML
"--")
'not-well-formed)
((eq (char-after) ?>)
(goto-char (1+ (point)))
'comment)
(t
(xmltok-add-dependent
'xmltok-semi-closed-reparse-p
nil
(point)
"--"
2)
;; just include the <!-- in the token
(goto-char (+ xmltok-start 4))
;; Need do this after the goto-char because
;; marked error should just apply to <!--
(xmltok-add-error "First following `--' not followed by `>'")
'not-well-formed))))
(let ((found-- (search-forward "--" nil 'move)))
(setq xmltok-type
(cond ((or (eq (char-after) ?>) (not found--))
(goto-char (1+ (point)))
'comment)
(t
;; just include the <!-- in the token
(goto-char (+ xmltok-start 4))
;; Need do this after the goto-char because
;; marked error should just apply to <!--
(xmltok-add-error "First following `--' not followed by `>'")
'not-well-formed)))))
(defun xmltok-scan-attributes ()
(let ((recovering nil)
@ -1124,7 +1058,7 @@ comment, processing-instruction-left, processing-instruction-right,
markup-declaration-open, markup-declaration-close,
internal-subset-open, internal-subset-close, hash-name, keyword,
literal, encoding-name.
Adds to `xmltok-errors' and `xmltok-dependent-regions' as appropriate."
Adds to `xmltok-errors' as appropriate."
(let ((case-fold-search nil)
xmltok-start
xmltok-type
@ -1148,7 +1082,6 @@ Adds to `xmltok-errors' and `xmltok-dependent-regions' as appropriate."
(1- xmltok-internal-subset-start)
xmltok-internal-subset-start))
(xmltok-parse-entities)
;; XXX prune dependent-regions for those entirely in prolog
(nreverse xmltok-prolog-regions)))
(defconst xmltok-bad-xml-decl-regexp
@ -1648,95 +1581,68 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(end (save-excursion
(goto-char safe-end)
(search-forward delim nil t))))
(or (cond ((not end)
(xmltok-add-dependent 'xmltok-unclosed-reparse-p
nil
nil
delim)
nil)
((save-excursion
(goto-char end)
(looking-at "[ \t\r\n>%[]"))
(goto-char end)
(setq xmltok-type 'literal))
((eq (1+ safe-end) end)
(goto-char end)
(xmltok-add-error (format "Missing space after %s" delim)
safe-end)
(setq xmltok-type 'literal))
(t
(xmltok-add-dependent 'xmltok-semi-closed-reparse-p
xmltok-start
(1+ end)
delim
1)
nil))
(progn
(xmltok-add-error (format "Missing closing %s" delim))
(goto-char safe-end)
(skip-chars-backward " \t\r\n")
(setq xmltok-type 'not-well-formed)))))
(cond ((or (not end)
(save-excursion
(goto-char end)
(looking-at "[ \t\r\n>%[]")))
(goto-char end))
((eq (1+ safe-end) end)
(goto-char end)
(xmltok-add-error (format "Missing space after %s" delim)
safe-end)))
(setq xmltok-type 'literal)))
(defun xmltok-scan-prolog-after-processing-instruction-open ()
(cond ((not (search-forward "?>" nil t))
(xmltok-add-error "No closing ?>"
xmltok-start
(+ xmltok-start 2))
(xmltok-add-dependent 'xmltok-unclosed-reparse-p
nil
nil
"?>")
(setq xmltok-type 'not-well-formed))
(t
(let* ((end (point))
(target
(save-excursion
(goto-char (+ xmltok-start 2))
(and (looking-at (xmltok-ncname regexp))
(or (memq (char-after (match-end 0))
'(?\n ?\t ?\r ? ))
(= (match-end 0) (- end 2)))
(match-string-no-properties 0)))))
(cond ((not target)
(xmltok-add-error "\
(search-forward "?>" nil 'move)
(let* ((end (point))
(target
(save-excursion
(goto-char (+ xmltok-start 2))
(and (looking-at (xmltok-ncname regexp))
(or (memq (char-after (match-end 0))
'(?\n ?\t ?\r ? ))
(= (match-end 0) (- end 2)))
(match-string-no-properties 0)))))
(cond ((not target)
(xmltok-add-error "\
Processing instruction does not start with a name"
(+ xmltok-start 2)
(+ xmltok-start 3)))
((not (and (= (length target) 3)
(let ((case-fold-search t))
(string-match "xml" target)))))
((= xmltok-start 1)
(xmltok-add-error "Invalid XML declaration"
xmltok-start
(point)))
((save-excursion
(goto-char xmltok-start)
(looking-at (xmltok-xml-declaration regexp)))
(xmltok-add-error "XML declaration not at beginning of file"
xmltok-start
(point)))
(t
(xmltok-add-error "Processing instruction has target of xml"
(+ xmltok-start 2)
(+ xmltok-start 5))))
(xmltok-add-prolog-region 'processing-instruction-left
xmltok-start
(+ xmltok-start
2
(if target
(length target)
0)))
(xmltok-add-prolog-region 'processing-instruction-right
(if target
(save-excursion
(goto-char (+ xmltok-start
(length target)
2))
(skip-chars-forward " \t\r\n")
(point))
(+ xmltok-start 2))
(point)))
(setq xmltok-type 'processing-instruction))))
(+ xmltok-start 2)
(+ xmltok-start 3)))
((not (and (= (length target) 3)
(let ((case-fold-search t))
(string-match "xml" target)))))
((= xmltok-start 1)
(xmltok-add-error "Invalid XML declaration"
xmltok-start
(point)))
((save-excursion
(goto-char xmltok-start)
(looking-at (xmltok-xml-declaration regexp)))
(xmltok-add-error "XML declaration not at beginning of file"
xmltok-start
(point)))
(t
(xmltok-add-error "Processing instruction has target of xml"
(+ xmltok-start 2)
(+ xmltok-start 5))))
(xmltok-add-prolog-region 'processing-instruction-left
xmltok-start
(+ xmltok-start
2
(if target
(length target)
0)))
(xmltok-add-prolog-region 'processing-instruction-right
(if target
(save-excursion
(goto-char (+ xmltok-start
(length target)
2))
(skip-chars-forward " \t\r\n")
(point))
(+ xmltok-start 2))
(point)))
(setq xmltok-type 'processing-instruction))
(defun xmltok-parse-entities ()
(let ((todo xmltok-dtd))

View file

@ -288,12 +288,6 @@ To disable timer scans, set this to zero."
:type 'boolean
:group 'whitespace)
(defgroup whitespace-faces nil
"Faces used in whitespace."
:prefix "whitespace-"
:group 'whitespace
:group 'faces)
(defface whitespace-highlight '((((class color) (background light))
(:background "green1"))
(((class color) (background dark))
@ -305,7 +299,7 @@ To disable timer scans, set this to zero."
(background dark))
(:background "white")))
"Face used for highlighting the bogus whitespaces that exist in the buffer."
:group 'whitespace-faces)
:group 'whitespace)
(define-obsolete-face-alias 'whitespace-highlight-face
'whitespace-highlight "22.1")

View file

@ -46,6 +46,7 @@
;;;; Customization variables
;; Unused. Cf org-completion.
(defgroup org-complete nil
"Outline-based notes management and organizer."
:tag "Org"

View file

@ -31,9 +31,10 @@
(require 'pcomplete)
(defgroup pcmpl-linux nil
"Functions for dealing with GNU/Linux completions."
:group 'pcomplete)
;; Unused.
;;; (defgroup pcmpl-linux nil
;;; "Functions for dealing with GNU/Linux completions."
;;; :group 'pcomplete)
;; Functions:

View file

@ -98,8 +98,6 @@ parenthetical grouping.")
(let ((map (make-sparse-keymap)))
(define-key map "\M-." 'octave-find-definition)
(define-key map "\M-\C-j" 'octave-indent-new-comment-line)
;; C-c C-q is also used by cc modes for similar command
(define-key map "\C-c\C-q" 'octave-indent-defun)
(define-key map "\C-c\C-p" 'octave-previous-code-line)
(define-key map "\C-c\C-n" 'octave-next-code-line)
(define-key map "\C-c\C-a" 'octave-beginning-of-line)
@ -134,27 +132,26 @@ parenthetical grouping.")
"Menu for Octave mode."
'("Octave"
("Lines"
["Previous Code Line" octave-previous-code-line t]
["Next Code Line" octave-next-code-line t]
["Begin of Continuation" octave-beginning-of-line t]
["End of Continuation" octave-end-of-line t]
["Split Line at Point" octave-indent-new-comment-line t])
["Previous Code Line" octave-previous-code-line t]
["Next Code Line" octave-next-code-line t]
["Begin of Continuation" octave-beginning-of-line t]
["End of Continuation" octave-end-of-line t]
["Split Line at Point" octave-indent-new-comment-line t])
("Blocks"
["Mark Block" octave-mark-block t]
["Close Block" smie-close-block t])
["Mark Block" octave-mark-block t]
["Close Block" smie-close-block t])
("Functions"
["Indent Function" octave-indent-defun t]
["Insert Function" octave-insert-defun t]
["Update function file comment" octave-update-function-file-comment t])
["Insert Function" octave-insert-defun t]
["Update function file comment" octave-update-function-file-comment t])
"-"
("Debug"
["Send Current Line" octave-send-line t]
["Send Current Block" octave-send-block t]
["Send Current Function" octave-send-defun t]
["Send Region" octave-send-region t]
["Show Process Buffer" octave-show-process-buffer t]
["Hide Process Buffer" octave-hide-process-buffer t]
["Kill Process" octave-kill-process t])
["Send Current Line" octave-send-line t]
["Send Current Block" octave-send-block t]
["Send Current Function" octave-send-defun t]
["Send Region" octave-send-region t]
["Show Process Buffer" octave-show-process-buffer t]
["Hide Process Buffer" octave-hide-process-buffer t]
["Kill Process" octave-kill-process t])
"-"
["Indent Line" indent-according-to-mode t]
["Complete Symbol" completion-at-point t]
@ -1111,14 +1108,8 @@ The new line is properly indented."
(insert (concat " " octave-continuation-string))
(reindent-then-newline-and-indent))))
(defun octave-indent-defun ()
"Properly indent the Octave function which contains point."
(interactive)
(save-excursion
(mark-defun)
(message "Indenting function...")
(indent-region (point) (mark) nil))
(message "Indenting function...done."))
(define-obsolete-function-alias
'octave-indent-defun 'prog-indent-sexp "24.4")
;;; Motion

View file

@ -148,6 +148,7 @@ as words.
;;;###autoload
(define-global-minor-mode global-subword-mode subword-mode
:group 'convenience
(lambda () (subword-mode 1)))
(defun subword-forward (&optional arg)
@ -301,6 +302,7 @@ edit them as words.
;;;###autoload
(define-global-minor-mode global-superword-mode superword-mode
:group 'convenience
(lambda () (superword-mode 1)))

File diff suppressed because it is too large Load diff

View file

@ -111,9 +111,10 @@
"Directory support in shell mode."
:group 'shell)
(defgroup shell-faces nil
"Faces in shell buffers."
:group 'shell)
;; Unused.
;;; (defgroup shell-faces nil
;;; "Faces in shell buffers."
;;; :group 'shell)
;;;###autoload
(defcustom shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe")

View file

@ -380,12 +380,18 @@ Other major modes are defined by comparison with this one."
map)
"Keymap used for programming modes.")
(defun prog-indent-sexp ()
"Indent the expression after point."
(interactive)
(let ((start (point))
(end (save-excursion (forward-sexp 1) (point))))
(indent-region start end nil)))
(defun prog-indent-sexp (&optional defun)
"Indent the expression after point.
When interactively called with prefix, indent the enclosing defun
instead."
(interactive "P")
(save-excursion
(when defun
(end-of-line)
(beginning-of-defun))
(let ((start (point))
(end (progn (forward-sexp 1) (point))))
(indent-region start end nil))))
(define-derived-mode prog-mode fundamental-mode "Prog"
"Major mode for editing programming language source code."

View file

@ -46,6 +46,7 @@ With a prefix argument ARG, switch to 132-column mode if ARG is
positive, and 80-column mode otherwise. If called from Lisp,
switch to 132-column mode if ARG is omitted or nil."
:global t :init-value (= (frame-width) 132)
:group 'terminals
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
(set-frame-width terminal-frame (if vt100-wide-mode 132 80)))

View file

@ -27,7 +27,7 @@
(defgroup xterm nil
"XTerm support."
:version "24.1"
:group 'environment)
:group 'terminals)
(defcustom xterm-extra-capabilities 'check
"Whether Xterm supports some additional, more modern, features.

View file

@ -83,9 +83,10 @@
;;; Code:
(defgroup refill nil
"Refilling paragraphs on changes."
:group 'fill)
;; Unused.
;;; (defgroup refill nil
;;; "Refilling paragraphs on changes."
;;; :group 'fill)
(defvar refill-ignorable-overlay nil
"Portion of the most recently filled paragraph not needing filling.
@ -222,7 +223,8 @@ characters only cause refilling if they would cause
auto-filling.
For true \"word wrap\" behavior, use `visual-line-mode' instead."
:group 'refill
;; Not global, so no effect.
;;; :group 'refill
:lighter " Refill"
:keymap '(("\177" . backward-delete-char-untabify))
;; Remove old state if necessary

View file

@ -3932,7 +3932,7 @@ string)) to be used for converting the document."
(choice :tag "Command options"
(const :tag "No options" nil)
(string :tag "Options"))))
:group 'rst
:group 'rst-compile
:package-version "1.2.0")
(rst-testcover-defcustom)

View file

@ -418,7 +418,7 @@ Variables controlling the display of messages in the mode line include:
`global-mode-string'
`type-break-mode-line-break-message'
`type-break-mode-line-warning'"
:global t)
:global t :group 'type-break)
(define-minor-mode type-break-query-mode
"Toggle typing break queries.
@ -428,7 +428,7 @@ enable them if ARG is omitted or nil.
The user may also enable or disable this mode simply by setting
the variable of the same name."
:global t)
:global t :group 'type-break)
;;; session file functions

View file

@ -1,3 +1,7 @@
2013-05-15 Glenn Morris <rgm@gnu.org>
* url-news.el (url-news): Remove empty custom group.
2013-02-16 Glenn Morris <rgm@gnu.org>
* url-http.el (url-http-wait-for-headers-change-function):

View file

@ -28,9 +28,10 @@
(autoload 'url-warn "url")
(autoload 'gnus-group-read-ephemeral-group "gnus-group")
(defgroup url-news nil
"News related options."
:group 'url)
;; Unused.
;;; (defgroup url-news nil
;;; "News related options."
;;; :group 'url)
(defun url-news-open-host (host port user pass)
(if (fboundp 'nnheader-init-server-buffer)

View file

@ -98,6 +98,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-W \
-Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
-Warray-bounds \
-Wattributes \
@ -125,7 +126,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wformat-security \
-Wformat-y2k \
-Wformat-zero-length \
-Wformat=2 \
-Wfree-nonheap-object \
-Wignored-qualifiers \
-Wimplicit \
@ -143,9 +143,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
-Wmissing-format-attribute \
-Wmissing-include-dirs \
-Wmissing-noreturn \
-Wmissing-parameter-type \
-Wmissing-prototypes \
-Wmudflap \
@ -166,6 +164,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wpointer-sign \
-Wpointer-to-int-cast \
-Wpragmas \
-Wreturn-local-addr \
-Wreturn-type \
-Wsequence-point \
-Wshadow \
@ -187,7 +186,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
-Wtype-limits \
-Wuninitialized \
-Wunknown-pragmas \
-Wunreachable-code \
-Wunsafe-loop-optimizations \
-Wunused \
-Wunused-but-set-parameter \

View file

@ -1,4 +1,4 @@
# warnings.m4 serial 7
# warnings.m4 serial 8
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -27,7 +27,7 @@ AC_DEFUN([gl_COMPILER_OPTION_IF],
AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
gl_save_compiler_FLAGS="$gl_Flags"
gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $1"])
gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors $1"])
AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
[AS_VAR_SET(gl_Warn, [yes])],
[AS_VAR_SET(gl_Warn, [no])])
@ -38,6 +38,14 @@ AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
])
# gl_UNKNOWN_WARNINGS_ARE_ERRORS
# ------------------------------
# Clang doesn't complain about unknown warning options unless one also
# specifies -Wunknown-warning-option -Werror. Detect this.
AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option],
[gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'],
[gl_unknown_warnings_are_errors=])])
# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
# [PROGRAM = AC_LANG_PROGRAM()])
@ -47,7 +55,8 @@ AS_VAR_POPDEF([gl_Warn])dnl
#
# If VARIABLE is a variable name, AC_SUBST it.
AC_DEFUN([gl_WARN_ADD],
[gl_COMPILER_OPTION_IF([$1],
[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
gl_COMPILER_OPTION_IF([$1],
[gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
[],
[$3])

View file

@ -1,3 +1,7 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* sed1x.inp: Don't rewrite DOC any more.
2013-02-08 Paul Eggert <eggert@cs.ucla.edu>
* sedlibmk.inp: Sync with changes in lib/Makefile.in.

View file

@ -17,7 +17,7 @@
# ----------------------------------------------------------------------
s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.!
s!^ @true *$! @rem!
s/DOC/DOC-X/g
#s/DOC/DOC-X/g
/^OLDXMENU *=/s!=.*!= ${oldXMenudir}libXMenu11.a!
/^LIBXMENU *=/s!= *!= ${OLDXMENU}!
/^LIBX_OTHER *=/s!= *!= ${LIBXT} ${LIBX_EXTRA}!

View file

@ -1,3 +1,7 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* makefile.w32-in (clean, top-distclean): DOC-X doesn't exist any more.
2013-05-08 Juanma Barranquero <lekktu@gmail.com>
* config.nt: Sync with autogen/config.in.

View file

@ -29,7 +29,7 @@ See the end of the file for license conditions.
Along with this file should be six subdirectories (bin, etc, info,
lisp, leim, site-lisp). If you have downloaded the barebin
distribution, then it will contain only the bin directory and the
built in documentation in etc/DOC-X, the rest of the subdirectories
built in documentation in etc/DOC, the rest of the subdirectories
are in the src distribution, which the barebin distribution is
designed to be used with.

View file

@ -315,7 +315,7 @@ clean: clean-other-dirs-$(MAKETYPE)
- $(DEL) $(COMPILER_TEMP_FILES)
- $(DEL_TREE) $(OBJDIR)
- $(DEL) stamp_BLD
- $(DEL) ../etc/DOC ../etc/DOC-X
- $(DEL) ../etc/DOC
clean-other-dirs-nmake:
cd ..\lib
@ -375,7 +375,7 @@ top-distclean:
- $(DEL_TREE) oo
- $(DEL_TREE) oo-spd
- $(DEL) stamp_BLD
- $(DEL) ../etc/DOC ../etc/DOC-X
- $(DEL) ../etc/DOC
- $(DEL) config.log Makefile
- $(DEL) ../README.W32

View file

@ -1,3 +1,31 @@
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* makefile.w32-in (DOC): Use just "DOC".
* Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
* process.c: Export default filters and sentinels to Elisp.
(Qinternal_default_process_sentinel, Qinternal_default_process_filter):
New constants.
(pset_filter, pset_sentinel, make_process, Fset_process_filter)
(Fset_process_sentinel, Fformat_network_address):
Default to them instead of nil.
(server_accept_connection): Sentinels can't be nil any more.
(read_and_dispose_of_process_output): New function, extracted from
read_process_output.
(read_process_output): Use it; filters can't be nil.
(Finternal_default_process_filter): New function, extracted from
read_process_output.
(exec_sentinel_unwind): Remove function.
(exec_sentinel): Don't zilch sentinel while running.
(status_notify): Sentinels can't be nil.
(Finternal_default_process_sentinel): New function extracted from
status_notify.
(setup_process_coding_systems): Default filter is not nil any more.
(syms_of_process): Export new Elisp functions and initialize
new constants.
* lisp.h (make_lisp_proc): New function.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.

View file

@ -555,7 +555,7 @@ clean: mostlyclean
## It should remove all files generated during a compilation/bootstrap,
## but not things like config.status or TAGS.
bootstrap-clean: clean
rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu ../etc/DOC-*
rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu
if test -f ./.gdbinit; then \
mv ./.gdbinit ./.gdbinit.save; \
if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \

View file

@ -58,7 +58,7 @@ read_bytecode_char (bool unreadflag)
}
/* Extract a doc string from a file. FILEPOS says where to get it.
If it is an integer, use that position in the standard DOC-... file.
If it is an integer, use that position in the standard DOC file.
If it is (FILE . INTEGER), use FILE as the file name
and INTEGER as the position in that file.
But if INTEGER is negative, make it positive.
@ -608,7 +608,7 @@ the same file name is found in the `doc-directory'. */)
while (*beg && c_isspace (*beg)) ++beg;
for (end = beg; *end && ! c_isspace (*end); ++end)
if (*end == '/') beg = end+1; /* skip directory part */
if (*end == '/') beg = end + 1; /* Skip directory part. */
len = end - beg;
if (len > 4 && end[-4] == '.' && end[-3] == 'o')

View file

@ -585,10 +585,12 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
(eassert (KBOARD_OBJFWDP (a)), &((a)->u_kboard_objfwd))
/* Pseudovector types. */
struct Lisp_Process;
LISP_INLINE Lisp_Object make_lisp_proc (struct Lisp_Process *p)
{ return make_lisp_ptr (p, Lisp_Vectorlike); }
#define XPROCESS(a) (eassert (PROCESSP (a)), \
(struct Lisp_Process *) XUNTAG (a, Lisp_Vectorlike))
#define XWINDOW(a) (eassert (WINDOWP (a)), \
#define XWINDOW(a) (eassert (WINDOWP (a)), \
(struct window *) XUNTAG (a, Lisp_Vectorlike))
#define XTERMINAL(a) (eassert (TERMINALP (a)), \
(struct terminal *) XUNTAG (a, Lisp_Vectorlike))

View file

@ -3557,7 +3557,7 @@ read_list (bool flag, Lisp_Object readcharfun)
{
if (NILP (Vdoc_file_name))
/* We have not yet called Snarf-documentation, so assume
this file is described in the DOC-MM.NN file
this file is described in the DOC file
and Snarf-documentation will fill in the right value later.
For now, replace the whole list with 0. */
doc_reference = 1;

View file

@ -41,7 +41,7 @@ TRES = $(BLD)/emacs.res
TLASTLIB = $(BLD)/lastfile.$(A)
GNULIB = ../lib/$(BLD)/libgnu.$(A)
DOC = $(OBJDIR)/etc/DOC-X
DOC = $(OBJDIR)/etc/DOC
FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK)

View file

@ -174,6 +174,8 @@ static Lisp_Object QClocal, QCremote, QCcoding;
static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop;
static Lisp_Object QCsentinel, QClog, QCoptions, QCplist;
static Lisp_Object Qlast_nonmenu_event;
static Lisp_Object Qinternal_default_process_sentinel;
static Lisp_Object Qinternal_default_process_filter;
#define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork))
#define NETCONN1_P(p) (EQ (p->type, Qnetwork))
@ -359,7 +361,7 @@ pset_encoding_buf (struct Lisp_Process *p, Lisp_Object val)
static void
pset_filter (struct Lisp_Process *p, Lisp_Object val)
{
p->filter = val;
p->filter = NILP (val) ? Qinternal_default_process_filter : val;
}
static void
pset_log (struct Lisp_Process *p, Lisp_Object val)
@ -384,7 +386,7 @@ pset_plist (struct Lisp_Process *p, Lisp_Object val)
static void
pset_sentinel (struct Lisp_Process *p, Lisp_Object val)
{
p->sentinel = val;
p->sentinel = NILP (val) ? Qinternal_default_process_sentinel : val;
}
static void
pset_status (struct Lisp_Process *p, Lisp_Object val)
@ -700,6 +702,8 @@ make_process (Lisp_Object name)
}
name = name1;
pset_name (p, name);
pset_sentinel (p, Qinternal_default_process_sentinel);
pset_filter (p, Qinternal_default_process_filter);
XSETPROCESS (val, p);
Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist);
return val;
@ -979,10 +983,10 @@ DEFUN ("process-mark", Fprocess_mark, Sprocess_mark,
DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter,
2, 2, 0,
doc: /* Give PROCESS the filter function FILTER; nil means no filter.
doc: /* Give PROCESS the filter function FILTER; nil means default.
A value of t means stop accepting output from the process.
When a process has a filter, its buffer is not used for output.
When a process has a non-default filter, its buffer is not used for output.
Instead, each time it does output, the entire string of output is
passed to the filter.
@ -1008,6 +1012,9 @@ The string argument is normally a multibyte string, except:
(debug)
(set-process-filter process ...) */
if (NILP (filter))
filter = Qinternal_default_process_filter;
if (p->infd >= 0)
{
if (EQ (filter, Qt) && !EQ (p->status, Qlisten))
@ -1033,7 +1040,7 @@ The string argument is normally a multibyte string, except:
DEFUN ("process-filter", Fprocess_filter, Sprocess_filter,
1, 1, 0,
doc: /* Returns the filter function of PROCESS; nil if none.
doc: /* Return the filter function of PROCESS.
See `set-process-filter' for more info on filter functions. */)
(register Lisp_Object process)
{
@ -1043,7 +1050,7 @@ See `set-process-filter' for more info on filter functions. */)
DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel,
2, 2, 0,
doc: /* Give PROCESS the sentinel SENTINEL; nil for none.
doc: /* Give PROCESS the sentinel SENTINEL; nil for default.
The sentinel is called as a function when the process changes state.
It gets two arguments: the process, and a string describing the change. */)
(register Lisp_Object process, Lisp_Object sentinel)
@ -1053,6 +1060,9 @@ It gets two arguments: the process, and a string describing the change. */)
CHECK_PROCESS (process);
p = XPROCESS (process);
if (NILP (sentinel))
sentinel = Qinternal_default_process_sentinel;
pset_sentinel (p, sentinel);
if (NETCONN1_P (p) || SERIALCONN1_P (p))
pset_childp (p, Fplist_put (p->childp, QCsentinel, sentinel));
@ -1061,7 +1071,7 @@ It gets two arguments: the process, and a string describing the change. */)
DEFUN ("process-sentinel", Fprocess_sentinel, Sprocess_sentinel,
1, 1, 0,
doc: /* Return the sentinel of PROCESS; nil if none.
doc: /* Return the sentinel of PROCESS.
See `set-process-sentinel' for more info on sentinels. */)
(register Lisp_Object process)
{
@ -1378,8 +1388,8 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
pset_plist (XPROCESS (proc), Qnil);
pset_type (XPROCESS (proc), Qreal);
pset_buffer (XPROCESS (proc), buffer);
pset_sentinel (XPROCESS (proc), Qnil);
pset_filter (XPROCESS (proc), Qnil);
pset_sentinel (XPROCESS (proc), Qinternal_default_process_sentinel);
pset_filter (XPROCESS (proc), Qinternal_default_process_filter);
pset_command (XPROCESS (proc), Flist (nargs - 2, args + 2));
#ifdef HAVE_GNUTLS
@ -4039,7 +4049,8 @@ server_accept_connection (Lisp_Object server, int channel)
process name of the server process concatenated with the caller
identification. */
if (!NILP (ps->filter) && !EQ (ps->filter, Qt))
if (!(EQ (ps->filter, Qinternal_default_process_filter)
|| EQ (ps->filter, Qt)))
buffer = Qnil;
else
{
@ -4108,7 +4119,7 @@ server_accept_connection (Lisp_Object server, int channel)
/* Setup coding system for new process based on server process.
This seems to be the proper thing to do, as the coding system
of the new process should reflect the settings at the time the
server socket was opened; not the current settings. */
server socket was opened; not the current settings. */
pset_decode_coding_system (p, ps->decode_coding_system);
pset_encode_coding_system (p, ps->encode_coding_system);
@ -4127,11 +4138,10 @@ server_accept_connection (Lisp_Object server, int channel)
(STRINGP (host) ? host : build_string ("-")),
build_string ("\n")));
if (!NILP (p->sentinel))
exec_sentinel (proc,
concat3 (build_string ("open from "),
(STRINGP (host) ? host : build_string ("-")),
build_string ("\n")));
exec_sentinel (proc,
concat3 (build_string ("open from "),
(STRINGP (host) ? host : build_string ("-")),
build_string ("\n")));
}
/* This variable is different from waiting_for_input in keyboard.c.
@ -4263,8 +4273,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
break;
/* Compute time from now till when time limit is up */
/* Exit if already run out */
/* Compute time from now till when time limit is up. */
/* Exit if already run out. */
if (nsecs < 0)
{
/* A negative timeout means
@ -4871,8 +4881,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
}
}
#endif /* NON_BLOCKING_CONNECT */
} /* end for each file descriptor */
} /* end while exit conditions not met */
} /* End for each file descriptor. */
} /* End while exit conditions not met. */
unbind_to (count, Qnil);
@ -4907,6 +4917,11 @@ read_process_output_error_handler (Lisp_Object error_val)
return Qt;
}
static void
read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars,
ssize_t nbytes,
struct coding_system *coding);
/* Read pending output from the process channel,
starting with our buffered-ahead character if we have one.
Yield number of decoded characters read.
@ -4923,9 +4938,7 @@ read_process_output (Lisp_Object proc, register int channel)
{
register ssize_t nbytes;
char *chars;
register Lisp_Object outstream;
register struct Lisp_Process *p = XPROCESS (proc);
register ptrdiff_t opoint;
struct coding_system *coding = proc_decode_coding_system[channel];
int carryover = p->decoding_carryover;
int readmax = 4096;
@ -5013,122 +5026,144 @@ read_process_output (Lisp_Object proc, register int channel)
friends don't expect current-buffer to be changed from under them. */
record_unwind_current_buffer ();
/* Read and dispose of the process output. */
outstream = p->filter;
if (!NILP (outstream))
{
Lisp_Object text;
bool outer_running_asynch_code = running_asynch_code;
int waiting = waiting_for_user_input_p;
read_and_dispose_of_process_output (p, chars, nbytes, coding);
/* No need to gcpro these, because all we do with them later
is test them for EQness, and none of them should be a string. */
/* Handling the process output should not deactivate the mark. */
Vdeactivate_mark = odeactivate;
unbind_to (count, Qnil);
return nbytes;
}
static void
read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars,
ssize_t nbytes,
struct coding_system *coding)
{
Lisp_Object outstream = p->filter;
Lisp_Object text;
bool outer_running_asynch_code = running_asynch_code;
int waiting = waiting_for_user_input_p;
/* No need to gcpro these, because all we do with them later
is test them for EQness, and none of them should be a string. */
#if 0
Lisp_Object obuffer, okeymap;
XSETBUFFER (obuffer, current_buffer);
okeymap = BVAR (current_buffer, keymap);
Lisp_Object obuffer, okeymap;
XSETBUFFER (obuffer, current_buffer);
okeymap = BVAR (current_buffer, keymap);
#endif
/* We inhibit quit here instead of just catching it so that
hitting ^G when a filter happens to be running won't screw
it up. */
specbind (Qinhibit_quit, Qt);
specbind (Qlast_nonmenu_event, Qt);
/* We inhibit quit here instead of just catching it so that
hitting ^G when a filter happens to be running won't screw
it up. */
specbind (Qinhibit_quit, Qt);
specbind (Qlast_nonmenu_event, Qt);
/* In case we get recursively called,
and we already saved the match data nonrecursively,
save the same match data in safely recursive fashion. */
if (outer_running_asynch_code)
{
Lisp_Object tem;
/* Don't clobber the CURRENT match data, either! */
tem = Fmatch_data (Qnil, Qnil, Qnil);
restore_search_regs ();
record_unwind_save_match_data ();
Fset_match_data (tem, Qt);
}
/* For speed, if a search happens within this code,
save the match data in a special nonrecursive fashion. */
running_asynch_code = 1;
decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt);
text = coding->dst_object;
Vlast_coding_system_used = CODING_ID_NAME (coding->id);
/* A new coding system might be found. */
if (!EQ (p->decode_coding_system, Vlast_coding_system_used))
{
pset_decode_coding_system (p, Vlast_coding_system_used);
/* Don't call setup_coding_system for
proc_decode_coding_system[channel] here. It is done in
detect_coding called via decode_coding above. */
/* If a coding system for encoding is not yet decided, we set
it as the same as coding-system for decoding.
But, before doing that we must check if
proc_encode_coding_system[p->outfd] surely points to a
valid memory because p->outfd will be changed once EOF is
sent to the process. */
if (NILP (p->encode_coding_system)
&& proc_encode_coding_system[p->outfd])
{
pset_encode_coding_system
(p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil));
setup_coding_system (p->encode_coding_system,
proc_encode_coding_system[p->outfd]);
}
}
if (coding->carryover_bytes > 0)
{
if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes));
memcpy (SDATA (p->decoding_buf), coding->carryover,
coding->carryover_bytes);
p->decoding_carryover = coding->carryover_bytes;
}
if (SBYTES (text) > 0)
/* FIXME: It's wrong to wrap or not based on debug-on-error, and
sometimes it's simply wrong to wrap (e.g. when called from
accept-process-output). */
internal_condition_case_1 (read_process_output_call,
Fcons (outstream,
Fcons (proc, Fcons (text, Qnil))),
!NILP (Vdebug_on_error) ? Qnil : Qerror,
read_process_output_error_handler);
/* If we saved the match data nonrecursively, restore it now. */
/* In case we get recursively called,
and we already saved the match data nonrecursively,
save the same match data in safely recursive fashion. */
if (outer_running_asynch_code)
{
Lisp_Object tem;
/* Don't clobber the CURRENT match data, either! */
tem = Fmatch_data (Qnil, Qnil, Qnil);
restore_search_regs ();
running_asynch_code = outer_running_asynch_code;
record_unwind_save_match_data ();
Fset_match_data (tem, Qt);
}
/* Restore waiting_for_user_input_p as it was
when we were called, in case the filter clobbered it. */
waiting_for_user_input_p = waiting;
/* For speed, if a search happens within this code,
save the match data in a special nonrecursive fashion. */
running_asynch_code = 1;
decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt);
text = coding->dst_object;
Vlast_coding_system_used = CODING_ID_NAME (coding->id);
/* A new coding system might be found. */
if (!EQ (p->decode_coding_system, Vlast_coding_system_used))
{
pset_decode_coding_system (p, Vlast_coding_system_used);
/* Don't call setup_coding_system for
proc_decode_coding_system[channel] here. It is done in
detect_coding called via decode_coding above. */
/* If a coding system for encoding is not yet decided, we set
it as the same as coding-system for decoding.
But, before doing that we must check if
proc_encode_coding_system[p->outfd] surely points to a
valid memory because p->outfd will be changed once EOF is
sent to the process. */
if (NILP (p->encode_coding_system)
&& proc_encode_coding_system[p->outfd])
{
pset_encode_coding_system
(p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil));
setup_coding_system (p->encode_coding_system,
proc_encode_coding_system[p->outfd]);
}
}
if (coding->carryover_bytes > 0)
{
if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes));
memcpy (SDATA (p->decoding_buf), coding->carryover,
coding->carryover_bytes);
p->decoding_carryover = coding->carryover_bytes;
}
if (SBYTES (text) > 0)
/* FIXME: It's wrong to wrap or not based on debug-on-error, and
sometimes it's simply wrong to wrap (e.g. when called from
accept-process-output). */
internal_condition_case_1 (read_process_output_call,
Fcons (outstream,
Fcons (make_lisp_proc (p),
Fcons (text, Qnil))),
!NILP (Vdebug_on_error) ? Qnil : Qerror,
read_process_output_error_handler);
/* If we saved the match data nonrecursively, restore it now. */
restore_search_regs ();
running_asynch_code = outer_running_asynch_code;
/* Restore waiting_for_user_input_p as it was
when we were called, in case the filter clobbered it. */
waiting_for_user_input_p = waiting;
#if 0 /* Call record_asynch_buffer_change unconditionally,
because we might have changed minor modes or other things
that affect key bindings. */
if (! EQ (Fcurrent_buffer (), obuffer)
|| ! EQ (current_buffer->keymap, okeymap))
if (! EQ (Fcurrent_buffer (), obuffer)
|| ! EQ (current_buffer->keymap, okeymap))
#endif
/* But do it only if the caller is actually going to read events.
Otherwise there's no need to make him wake up, and it could
cause trouble (for example it would make sit_for return). */
if (waiting_for_user_input_p == -1)
record_asynch_buffer_change ();
}
/* But do it only if the caller is actually going to read events.
Otherwise there's no need to make him wake up, and it could
cause trouble (for example it would make sit_for return). */
if (waiting_for_user_input_p == -1)
record_asynch_buffer_change ();
}
/* If no filter, write into buffer if it isn't dead. */
else if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer)))
DEFUN ("internal-default-process-filter", Finternal_default_process_filter,
Sinternal_default_process_filter, 2, 2, 0,
doc: /* Function used as default process filter. */)
(Lisp_Object proc, Lisp_Object text)
{
struct Lisp_Process *p;
ptrdiff_t opoint;
CHECK_PROCESS (proc);
p = XPROCESS (proc);
CHECK_STRING (text);
if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer)))
{
Lisp_Object old_read_only;
ptrdiff_t old_begv, old_zv;
ptrdiff_t old_begv_byte, old_zv_byte;
ptrdiff_t before, before_byte;
ptrdiff_t opoint_byte;
Lisp_Object text;
struct buffer *b;
Fset_buffer (p->buffer);
@ -5161,31 +5196,6 @@ read_process_output (Lisp_Object proc, register int channel)
if (! (BEGV <= PT && PT <= ZV))
Fwiden ();
decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt);
text = coding->dst_object;
Vlast_coding_system_used = CODING_ID_NAME (coding->id);
/* A new coding system might be found. See the comment in the
similar code in the previous `if' block. */
if (!EQ (p->decode_coding_system, Vlast_coding_system_used))
{
pset_decode_coding_system (p, Vlast_coding_system_used);
if (NILP (p->encode_coding_system)
&& proc_encode_coding_system[p->outfd])
{
pset_encode_coding_system
(p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil));
setup_coding_system (p->encode_coding_system,
proc_encode_coding_system[p->outfd]);
}
}
if (coding->carryover_bytes > 0)
{
if (SCHARS (p->decoding_buf) < coding->carryover_bytes)
pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes));
memcpy (SDATA (p->decoding_buf), coding->carryover,
coding->carryover_bytes);
p->decoding_carryover = coding->carryover_bytes;
}
/* Adjust the multibyteness of TEXT to that of the buffer. */
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
!= ! STRING_MULTIBYTE (text))
@ -5230,18 +5240,13 @@ read_process_output (Lisp_Object proc, register int channel)
if (old_begv != BEGV || old_zv != ZV)
Fnarrow_to_region (make_number (old_begv), make_number (old_zv));
bset_read_only (current_buffer, old_read_only);
SET_PT_BOTH (opoint, opoint_byte);
}
/* Handling the process output should not deactivate the mark. */
Vdeactivate_mark = odeactivate;
unbind_to (count, Qnil);
return nbytes;
return Qnil;
}
/* Sending data to subprocess */
/* Sending data to subprocess. */
/* In send_process, when a write fails temporarily,
wait_reading_process_output is called. It may execute user code,
@ -6187,13 +6192,6 @@ deliver_child_signal (int sig)
}
static Lisp_Object
exec_sentinel_unwind (Lisp_Object data)
{
pset_sentinel (XPROCESS (XCAR (data)), XCDR (data));
return Qnil;
}
static Lisp_Object
exec_sentinel_error_handler (Lisp_Object error_val)
{
@ -6231,13 +6229,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason)
record_unwind_current_buffer ();
sentinel = p->sentinel;
if (NILP (sentinel))
return;
/* Zilch the sentinel while it's running, to avoid recursive invocations;
assure that it gets restored no matter how the sentinel exits. */
pset_sentinel (p, Qnil);
record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel));
/* Inhibit quit so that random quits don't screw up a running filter. */
specbind (Qinhibit_quit, Qt);
specbind (Qlast_nonmenu_event, Qt); /* Why? --Stef */
@ -6295,7 +6287,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason)
static void
status_notify (struct Lisp_Process *deleting_process)
{
register Lisp_Object proc, buffer;
register Lisp_Object proc;
Lisp_Object tail, msg;
struct gcpro gcpro1, gcpro2;
@ -6333,8 +6325,6 @@ status_notify (struct Lisp_Process *deleting_process)
&& p != deleting_process
&& read_process_output (proc, p->infd) > 0);
buffer = p->buffer;
/* Get the text to use for the message. */
if (p->raw_status_new)
update_status (p);
@ -6355,66 +6345,83 @@ status_notify (struct Lisp_Process *deleting_process)
}
/* The actions above may have further incremented p->tick.
So set p->update_tick again
so that an error in the sentinel will not cause
this code to be run again. */
So set p->update_tick again so that an error in the sentinel will
not cause this code to be run again. */
p->update_tick = p->tick;
/* Now output the message suitably. */
if (!NILP (p->sentinel))
exec_sentinel (proc, msg);
/* Don't bother with a message in the buffer
when a process becomes runnable. */
else if (!EQ (symbol, Qrun) && !NILP (buffer))
{
Lisp_Object tem;
struct buffer *old = current_buffer;
ptrdiff_t opoint, opoint_byte;
ptrdiff_t before, before_byte;
/* Avoid error if buffer is deleted
(probably that's why the process is dead, too) */
if (!BUFFER_LIVE_P (XBUFFER (buffer)))
continue;
Fset_buffer (buffer);
opoint = PT;
opoint_byte = PT_BYTE;
/* Insert new output into buffer
at the current end-of-output marker,
thus preserving logical ordering of input and output. */
if (XMARKER (p->mark)->buffer)
Fgoto_char (p->mark);
else
SET_PT_BOTH (ZV, ZV_BYTE);
before = PT;
before_byte = PT_BYTE;
tem = BVAR (current_buffer, read_only);
bset_read_only (current_buffer, Qnil);
insert_string ("\nProcess ");
{ /* FIXME: temporary kludge */
Lisp_Object tem2 = p->name; Finsert (1, &tem2); }
insert_string (" ");
Finsert (1, &msg);
bset_read_only (current_buffer, tem);
set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
if (opoint >= before)
SET_PT_BOTH (opoint + (PT - before),
opoint_byte + (PT_BYTE - before_byte));
else
SET_PT_BOTH (opoint, opoint_byte);
set_buffer_internal (old);
}
exec_sentinel (proc, msg);
}
} /* end for */
update_mode_lines++; /* in case buffers use %s in mode-line-format */
update_mode_lines++; /* In case buffers use %s in mode-line-format. */
UNGCPRO;
}
DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel,
Sinternal_default_process_sentinel, 2, 2, 0,
doc: /* Function used as default sentinel for processes. */)
(Lisp_Object proc, Lisp_Object msg)
{
Lisp_Object buffer, symbol;
struct Lisp_Process *p;
CHECK_PROCESS (proc);
p = XPROCESS (proc);
buffer = p->buffer;
symbol = p->status;
if (CONSP (symbol))
symbol = XCAR (symbol);
if (!EQ (symbol, Qrun) && !NILP (buffer))
{
Lisp_Object tem;
struct buffer *old = current_buffer;
ptrdiff_t opoint, opoint_byte;
ptrdiff_t before, before_byte;
/* Avoid error if buffer is deleted
(probably that's why the process is dead, too). */
if (!BUFFER_LIVE_P (XBUFFER (buffer)))
return Qnil;
Fset_buffer (buffer);
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
msg = (code_convert_string_norecord
(msg, Vlocale_coding_system, 1));
opoint = PT;
opoint_byte = PT_BYTE;
/* Insert new output into buffer
at the current end-of-output marker,
thus preserving logical ordering of input and output. */
if (XMARKER (p->mark)->buffer)
Fgoto_char (p->mark);
else
SET_PT_BOTH (ZV, ZV_BYTE);
before = PT;
before_byte = PT_BYTE;
tem = BVAR (current_buffer, read_only);
bset_read_only (current_buffer, Qnil);
insert_string ("\nProcess ");
{ /* FIXME: temporary kludge. */
Lisp_Object tem2 = p->name; Finsert (1, &tem2); }
insert_string (" ");
Finsert (1, &msg);
bset_read_only (current_buffer, tem);
set_marker_both (p->mark, p->buffer, PT, PT_BYTE);
if (opoint >= before)
SET_PT_BOTH (opoint + (PT - before),
opoint_byte + (PT_BYTE - before_byte));
else
SET_PT_BOTH (opoint, opoint_byte);
set_buffer_internal (old);
}
return Qnil;
}
DEFUN ("set-process-coding-system", Fset_process_coding_system,
Sset_process_coding_system, 1, 3, 0,
@ -6606,13 +6613,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
break;
/* Compute time from now till when time limit is up */
/* Exit if already run out */
/* Compute time from now till when time limit is up. */
/* Exit if already run out. */
if (nsecs < 0)
{
/* A negative timeout means
gobble output available now
but don't wait at all. */
but don't wait at all. */
timeout = make_emacs_time (0, 0);
}
@ -6805,9 +6812,8 @@ setup_process_coding_systems (Lisp_Object process)
if (!proc_decode_coding_system[inch])
proc_decode_coding_system[inch] = xmalloc (sizeof (struct coding_system));
coding_system = p->decode_coding_system;
if (! NILP (p->filter))
;
else if (BUFFERP (p->buffer))
if (EQ (p->filter, Qinternal_default_process_filter)
&& BUFFERP (p->buffer))
{
if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters)))
coding_system = raw_text_coding_system (coding_system);
@ -6916,7 +6922,7 @@ kill_buffer_processes (Lisp_Object buffer)
DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p,
Swaiting_for_user_input_p, 0, 0, 0,
doc: /* Returns non-nil if Emacs is waiting for input from the user.
doc: /* Return non-nil if Emacs is waiting for input from the user.
This is intended for use by asynchronous process output filters and sentinels. */)
(void)
{
@ -7222,6 +7228,10 @@ syms_of_process (void)
DEFSYM (Qcutime, "cutime");
DEFSYM (Qcstime, "cstime");
DEFSYM (Qctime, "ctime");
DEFSYM (Qinternal_default_process_sentinel,
"internal-default-process-sentinel");
DEFSYM (Qinternal_default_process_filter,
"internal-default-process-filter");
DEFSYM (Qpri, "pri");
DEFSYM (Qnice, "nice");
DEFSYM (Qthcount, "thcount");
@ -7317,6 +7327,8 @@ The variable takes effect when `start-process' is called. */);
defsubr (&Ssignal_process);
defsubr (&Swaiting_for_user_input_p);
defsubr (&Sprocess_type);
defsubr (&Sinternal_default_process_sentinel);
defsubr (&Sinternal_default_process_filter);
defsubr (&Sset_process_coding_system);
defsubr (&Sprocess_coding_system);
defsubr (&Sset_process_filter_multibyte);