merge from trunk

This commit is contained in:
Tom Tromey 2013-03-17 05:17:24 -06:00
commit 6bd488cd8d
162 changed files with 24257 additions and 22174 deletions

View file

@ -1,3 +1,19 @@
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).
* configure.ac (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
(fsync): Remove check; now done by gnulib.
* lib/fdatasync.c, lib/fsync.c, m4/fdatasync.m4, m4/fsync.m4:
New files, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
Merge from gnulib, incorporating:
2013-03-13 putenv: port to Solaris 10
2013-03-12 mktime: fix configure typo
2013-03-11 regex: port to mingw's recent addition of undeclared alarm
2013-03-11 putenv: avoid compilation warning on mingw
2013-03-11 unistd: don't prevent Tru64 Unix from using gnulib strtod.
2013-03-06 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (TERM_HEADER): Remove duplicate definition (Bug#13872).

View file

@ -9,7 +9,6 @@ documented in config.in, and this file would not be necessary.
AIX
_AIX
BSD_SYSTEM
CYGWIN Compiling the Cygwin port.
__CYGWIN__ Ditto
GNU_LINUX
@ -149,7 +148,6 @@ HAVE_FORK
HAVE_FREEIFADDRS
HAVE_FREETYPE
HAVE_FSEEKO
HAVE_FSYNC
HAVE_FUTIMENS
HAVE_FUTIMES
HAVE_FUTIMESAT

View file

@ -1,3 +1,37 @@
2013-03-16 Glenn Morris <rgm@gnu.org>
* admin.el (manual-pdf, manual-dvi): Pass -I to texi2pdf, texi2dvi.
2013-03-16 Glenn Morris <rgm@gnu.org>
* admin.el (manual-html-mono, manual-html-node): Add -DWWW_GNU_ORG.
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).
* CPP-DEFINES (BSD_SYSTEM, HAVE_FSYNC): Remove.
* merge-gnulib (GNULIB_MODULES): Add fsync, fdatasync.
2013-03-11 Paul Eggert <eggert@cs.ucla.edu>
* notes/unicode: Improve notes about Emacs source file encoding.
2013-03-11 Glenn Morris <rgm@gnu.org>
* admin.el (make-manuals): Add emacs-lisp-intro and some more
doc/misc manuals.
(manual-html-mono, manual-html-node, manual-txt):
Pass -I to makeinfo.
2013-03-10 Glenn Morris <rgm@gnu.org>
* admin.el (add-release-logs): Use UTC for release date.
2013-03-09 Glenn Morris <rgm@gnu.org>
* admin.el (add-release-logs): Provide interactive defaults.
Allow specification of the release date. Don't exclude gnus/.
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
* notes/unicode: Add notes about Emacs source file encoding.

View file

@ -28,25 +28,38 @@
(defvar add-log-time-format) ; in add-log
(defun add-release-logs (root version)
;; Does this information need to be in every ChangeLog, as opposed to
;; just the top-level one? Only if you allow changes the same
;; day as the release.
;; http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00161.html
(defun add-release-logs (root version &optional date)
"Add \"Version VERSION released.\" change log entries in ROOT.
Root must be the root of an Emacs source tree."
(interactive "DEmacs root directory: \nNVersion number: ")
Root must be the root of an Emacs source tree.
Optional argument DATE is the release date, default today."
(interactive (list (read-directory-name "Emacs root directory: ")
(read-string "Version number: "
(format "%s.%s" emacs-major-version
emacs-minor-version))
(read-string "Release date: "
(progn (require 'add-log)
(let ((add-log-time-zone-rule t))
(funcall add-log-time-format))))))
(setq root (expand-file-name root))
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(error "%s doesn't seem to be the root of an Emacs source tree" root))
(require 'add-log)
(or date (setq date (let ((add-log-time-zone-rule t))
(funcall add-log-time-format))))
(let* ((logs (process-lines "find" root "-name" "ChangeLog"))
(entry (format "%s %s <%s>\n\n\t* Version %s released.\n\n"
(funcall add-log-time-format)
date
(or add-log-full-name (user-full-name))
(or add-log-mailing-address user-mail-address)
version)))
(dolist (log logs)
(unless (string-match "/gnus/" log)
(find-file log)
(goto-char (point-min))
(insert entry)))))
(find-file log)
(goto-char (point-min))
(insert entry))))
(defun set-version-in-file (root file version rx)
(find-file (expand-file-name file root))
@ -215,17 +228,33 @@ Root must be the root of an Emacs source tree."
(manual-pdf texi (expand-file-name "elisp.pdf" dest))
(manual-dvi texi (expand-file-name "elisp.dvi" dvi-dir)
(expand-file-name "elisp.ps" ps-dir)))
(let ((texi (expand-file-name "doc/lispintro/emacs-lisp-intro.texi" root))
(dest (expand-file-name "emacs-lisp-intro" dest))
dest2 dest3)
;; Mimic the atypical directory layout used for emacs-lisp-intro.
(make-directory dest)
(make-directory (setq dest2 (expand-file-name "html_node" dest)))
(manual-html-node texi dest2)
(make-directory (setq dest2 (expand-file-name "html_mono" dest)))
(manual-html-mono texi (expand-file-name "emacs-lisp-intro.html" dest2))
(make-directory (setq dest2 (expand-file-name "txt" dest)))
(manual-txt texi (expand-file-name "emacs-lisp-intro.txt" dest2))
(manual-pdf texi (expand-file-name "emacs-lisp-intro.pdf" dest))
(make-directory (setq dest2 (expand-file-name "dvi" dest)))
(make-directory (setq dest3 (expand-file-name "ps" dest)))
(manual-dvi texi (expand-file-name "emacs-lisp-intro.dvi" dest2)
(expand-file-name "emacs-lisp-intro.ps" dest3)))
;; Misc manuals
(let ((manuals '("ada-mode" "auth" "autotype" "calc" "cc-mode"
(let ((manuals '("ada-mode" "auth" "autotype" "bovine" "calc" "cc-mode"
"cl" "dbus" "dired-x" "ebrowse" "ede" "ediff"
"edt" "eieio" "emacs-mime" "epa" "erc" "ert"
"edt" "eieio" "emacs-gnutls" "emacs-mime" "epa" "erc" "ert"
"eshell" "eudc" "faq" "flymake" "forms"
"gnus" "emacs-gnutls" "idlwave" "info"
"gnus" "htmlfontify" "idlwave" "info"
"mairix-el" "message" "mh-e" "newsticker"
"nxml-mode" "org" "pcl-cvs" "pgg" "rcirc"
"remember" "reftex" "sasl" "sc" "semantic"
"ses" "sieve" "smtpmail" "speedbar" "tramp"
"url" "vip" "viper" "widget" "woman")))
"reftex" "remember" "sasl" "sc" "semantic"
"ses" "sieve" "smtpmail" "speedbar" "srecode" "tramp"
"url" "vip" "viper" "widget" "wisent" "woman")))
(dolist (manual manuals)
(manual-misc-html manual root html-node-dir html-mono-dir)))
(message "Manuals created in %s" dest)))
@ -256,6 +285,11 @@ This function also edits the HTML files so that they validate as
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
"--html" "--no-split" texi-file "-o" dest)
(with-temp-buffer
(insert-file-contents dest)
@ -277,6 +311,11 @@ the @import directive."
(unless (file-exists-p texi-file)
(error "Manual file %s not found" texi-file))
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
"--html" texi-file "-o" dir)
;; Loop through the node files, fixing them up.
(dolist (f (directory-files dir nil "\\.html\\'"))
@ -308,17 +347,31 @@ the @import directive."
(defun manual-txt (texi-file dest)
"Run Makeinfo on TEXI-FILE, emitting plaintext output to DEST."
(call-process "makeinfo" nil nil nil
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
"--plaintext" "--no-split" texi-file "-o" dest)
(shell-command (concat "gzip -c " dest " > " (concat dest ".gz"))))
(defun manual-pdf (texi-file dest)
"Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
(call-process "texi2pdf" nil nil nil texi-file "-o" dest))
(call-process "texi2pdf" nil nil nil
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
texi-file "-o" dest))
(defun manual-dvi (texi-file dest ps-dest)
"Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
Also generate PostScript output in PS-DEST."
(call-process "texi2dvi" nil nil nil texi-file "-o" dest)
(call-process "texi2dvi" nil nil nil
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
texi-file "-o" dest)
(call-process "dvips" nil nil nil dest "-o" ps-dest)
(call-process "gzip" nil nil nil dest)
(call-process "gzip" nil nil nil ps-dest))

View file

@ -50,7 +50,7 @@ The list returned is sorted by oldest-first."
(call-process "bzr" nil t nil "status" "-v")
(goto-char (point-min))
(when (re-search-forward "^conflicts:\n" nil t)
(error "You still have unresolved conflicts"))
(user-error "You still have unresolved conflicts"))
(let ((merges ())
found)
(if (not (re-search-forward "^pending merges:\n" nil t))
@ -62,7 +62,7 @@ The list returned is sorted by oldest-first."
(setq found
(not (equal "unknown" (match-string 1)))))))
found)
(error "You still have uncommitted changes"))
(user-error "You still have uncommitted changes"))
;; This is really stupid, but it seems there's no easy way to figure
;; out which revisions have been merged already. The only info I can
;; find is the "pending merges" from "bzr status -v", which is not
@ -171,7 +171,7 @@ Type `y' to skip this revision,
(enable-local-eval nil))
(find-file-noselect file))
(if (buffer-modified-p)
(error "Unsaved changes in %s" (current-buffer)))
(user-error "Unsaved changes in %s" (current-buffer)))
(save-excursion
(cond
((derived-mode-p 'change-log-mode)
@ -323,7 +323,7 @@ Does not make other difference."
BEWARE! Important metadata is kept in this Emacs session!
Do not commit without re-running `M-x bzrmerge' first!"
:warning bzrmerge-warning-buffer))
(error "Resolve conflicts manually")))))
(user-error "Resolve conflicts manually")))))
(cons merge skip)))))
(defun bzrmerge (from)

View file

@ -50,6 +50,14 @@ General steps (for each step, check for possible errors):
For a pretest, start at version .90. After .99, use .990 (so that
it sorts).
The final pretest should be a release candidate. Set the version
number to that of the actual release. Pick a date about a week
from now when you intend to make the release. Use M-x add-release-logs
to add the ChangeLog entries for that date to the tar file (but
not yet to the repository). Name the tar file as
emacs-XX.Y-rc1.tar. If all goes well in the following week, you
can simply rename the file and use it for the actual release.
5. autoreconf -i -I m4 --force
make bootstrap

View file

@ -29,7 +29,8 @@ GNULIB_MODULES='
alloca-opt c-ctype c-strcase
careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
dtoastr dtotimespec dup2 environ execinfo faccessat
fcntl-h fdopendir filemode fstatat getloadavg getopt-gnu gettime gettimeofday
fcntl-h fdatasync fdopendir filemode fstatat fsync
getloadavg getopt-gnu gettime gettimeofday
ignore-value intprops largefile lstat
manywarnings memrchr mktime
pselect pthread_sigmask putenv readlink readlinkat

View file

@ -104,12 +104,15 @@ Source file encoding
Most Emacs source files are encoded in UTF-8 (or in ASCII, which is a
subset), but there are a few exceptions, listed below. Perhaps
someday these files will be converted to UTF-8, for convenience when
using tools like 'grep -r', but this might need nontrivial changes to
the build process.
someday many of these files will be converted to UTF-8, for
convenience when using tools like 'grep -r', but this might need
nontrivial changes to the build process.
* chinese-big5
These are verbatim copies of files taken from external sources.
They haven't been converted to UTF-8.
leim/CXTERM-DIC/4Corner.tit
leim/CXTERM-DIC/ARRAY30.tit
leim/CXTERM-DIC/ECDICT.tit
@ -123,6 +126,9 @@ the build process.
* chinese-iso-8bit
These are verbatim copies of files taken from external sources.
They haven't been converted to UTF-8.
leim/CXTERM-DIC/CCDOSPY.tit
leim/CXTERM-DIC/Punct.tit
leim/CXTERM-DIC/QJ.tit
@ -132,28 +138,74 @@ the build process.
leim/MISC-DIC/CTLau.html
leim/MISC-DIC/ziranma.cin
* cp850
This file contains non-ASCII characters in unibyte strings. When
editing a keyboard layout it's more convenient to see 'é' than
'\202', and the MS-DOS compiler requires the single byte if a
backslash escape is not being used.
src/msdos.c
* iso-2022-cn-ext
This file is externally generated from leim/MISC-DIC/cangjie-table.b5
by Big5->CNS converter. It hasn't been converted to UTF-8.
leim/MISC-DIC/cangjie-table.cns
* iso-latin-2
etc/refcards/cs-refcard.tex
etc/refcards/sk-survival.tex
etc/refcards/cs-survival.tex
These files are processed by csplain, a program that requires
Latin-2 input. In 2012 the csplain maintainers started
recommending UTF-8, but these files haven't been converted yet.
etc/refcards/cs-dired-ref.tex
etc/refcards/cs-refcard.tex
etc/refcards/cs-survival.tex
etc/refcards/sk-dired-ref.tex
etc/refcards/sk-refcard.tex
etc/refcards/sk-survival.tex
* japanese-iso-8bit
SKK-JISYO.L is a verbatim copy of a file taken from an external source.
ja-dic.el is generated automatically by skkdic-convert; this process
hasn't been converted to use UTF-8.
leim/SKK-DIC/SKK-JISYO.L
leim/ja-dic/ja-dic.el
* japanese-shift-jis
This is a verbatim copy of a file taken from an external source.
It hasn't been converted to UTF-8.
admin/charsets/mapfiles/cns2ucsdkw.txt
* no-conversion
This file purposely contains arbitrary bytes interspersed within text,
to test whether the Emacs distribution is corrupted.
lib-src/testfile
* iso-2022-7bit
This file contains significant charset information, which is not
encoded in UTF-8.
etc/HELLO
These files contain characters that cannot be encoded in UTF-8.
leim/quail/tibetan.el
leim/quail/ethiopic.el
lisp/international/titdic-cnv.el
lisp/language/tibetan.el
lisp/language/tibet-util.el
lisp/language/ind-util.el
This file is part of GNU Emacs.

View file

@ -36,7 +36,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdopendir filemode fstatat getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -71,8 +71,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl_h.m4 \
$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/filemode.m4 \
$(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fstatat.m4 \
$(top_srcdir)/m4/fdatasync.m4 $(top_srcdir)/m4/fdopendir.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/fpending.m4 \
$(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/fsync.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/getloadavg.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettime.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
@ -657,6 +658,7 @@ LIBX_OTHER = @LIBX_OTHER@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_EACCESS = @LIB_EACCESS@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_MATH = @LIB_MATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
@ -988,13 +990,13 @@ EXTRA_DIST = alloca.in.h allocator.h openat-priv.h openat-proc.c \
careadlinkat.h close-stream.h md5.h sha1.h sha256.h sha512.h \
dirent.in.h dosname.h ftoastr.c ftoastr.h dup2.c euidaccess.c \
execinfo.c execinfo.in.h at-func.c faccessat.c fcntl.in.h \
fdopendir.c filemode.h fpending.c fpending.h at-func.c \
fstatat.c getgroups.c getloadavg.c getopt.c getopt.in.h \
getopt1.c getopt_int.h gettimeofday.c group-member.c \
ignore-value.h intprops.h inttypes.in.h lstat.c memrchr.c \
mktime-internal.h mktime.c openat.h pathmax.h pselect.c \
pthread_sigmask.c putenv.c readlink.c at-func.c readlinkat.c \
root-uid.h sig2str.c sig2str.h signal.in.h \
fdatasync.c fdopendir.c filemode.h fpending.c fpending.h \
at-func.c fstatat.c fsync.c getgroups.c getloadavg.c getopt.c \
getopt.in.h getopt1.c getopt_int.h gettimeofday.c \
group-member.c ignore-value.h intprops.h inttypes.in.h lstat.c \
memrchr.c mktime-internal.h mktime.c openat.h pathmax.h \
pselect.c pthread_sigmask.c putenv.c readlink.c at-func.c \
readlinkat.c root-uid.h sig2str.c sig2str.h signal.in.h \
$(top_srcdir)/build-aux/snippet/_Noreturn.h \
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
$(top_srcdir)/build-aux/snippet/c++defs.h \
@ -1028,13 +1030,13 @@ libgnu_a_SOURCES = allocator.c c-ctype.h c-ctype.c c-strcase.h \
libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES = openat-proc.c ftoastr.c dup2.c euidaccess.c \
execinfo.c at-func.c faccessat.c fdopendir.c fpending.c \
at-func.c fstatat.c getgroups.c getloadavg.c getopt.c \
getopt1.c gettimeofday.c group-member.c lstat.c memrchr.c \
mktime.c pselect.c pthread_sigmask.c putenv.c readlink.c \
at-func.c readlinkat.c sig2str.c stat.c strtoimax.c strtol.c \
strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \
strtoumax.c symlink.c time_r.c unsetenv.c
execinfo.c at-func.c faccessat.c fdatasync.c fdopendir.c \
fpending.c at-func.c fstatat.c fsync.c getgroups.c \
getloadavg.c getopt.c getopt1.c gettimeofday.c group-member.c \
lstat.c memrchr.c mktime.c pselect.c pthread_sigmask.c \
putenv.c readlink.c at-func.c readlinkat.c sig2str.c stat.c \
strtoimax.c strtol.c strtoll.c strtol.c strtoul.c strtoull.c \
strtoimax.c strtoumax.c symlink.c time_r.c unsetenv.c
# Because this Makefile snippet defines a variable used by other
# gnulib Makefile snippets, it must be present in all Makefile.am that
@ -1105,10 +1107,12 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@

2
autogen/aclocal.m4 vendored
View file

@ -998,10 +998,12 @@ m4_include([m4/extensions.m4])
m4_include([m4/extern-inline.m4])
m4_include([m4/faccessat.m4])
m4_include([m4/fcntl_h.m4])
m4_include([m4/fdatasync.m4])
m4_include([m4/fdopendir.m4])
m4_include([m4/filemode.m4])
m4_include([m4/fpending.m4])
m4_include([m4/fstatat.m4])
m4_include([m4/fsync.m4])
m4_include([m4/getgroups.m4])
m4_include([m4/getloadavg.m4])
m4_include([m4/getopt.m4])

View file

@ -56,12 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define on FreeBSD to work around an issue when reading from a PTY. */
#undef BROKEN_PTY_READ_AFTER_EAGAIN
/* Define if the system is compatible with BSD 4.2. */
#undef BSD_SYSTEM
/* Define if AH_BOTTOM should change BSD_SYSTEM. */
#undef BSD_SYSTEM_AHB
/* Define if Emacs cannot be dumped on your system. */
#undef CANNOT_DUMP
@ -218,9 +212,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */
#undef HAVE_AIX_SMT_EXP
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
@ -281,6 +272,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */
#undef HAVE_DBUS_WATCH_GET_UNIX_FD
/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
*/
#undef HAVE_DECL_ALARM
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
don't. */
#undef HAVE_DECL_FDATASYNC
/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
don't. */
#undef HAVE_DECL_FDOPENDIR
@ -329,6 +328,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
don't. */
#undef HAVE_DECL_UNSETENV
/* Define to 1 if you have the declaration of `_putenv', and to 0 if you
don't. */
#undef HAVE_DECL__PUTENV
/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
don't. */
#undef HAVE_DECL___FPENDING
@ -373,6 +376,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `faccessat' function. */
#undef HAVE_FACCESSAT
/* Define to 1 if you have the `fdatasync' function. */
#undef HAVE_FDATASYNC
/* Define to 1 if you have the `fdopendir' function. */
#undef HAVE_FDOPENDIR
@ -1130,9 +1136,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
/* Define to 1 if you have the `_putenv' function. */
#undef HAVE__PUTENV
/* Define to 1 if _setjmp and _longjmp work. */
#undef HAVE__SETJMP

238
autogen/configure vendored
View file

@ -1060,6 +1060,7 @@ GNULIB_FUTIMENS
GNULIB_FSTATAT
GNULIB_FSTAT
GNULIB_FCHMODAT
LIB_FDATASYNC
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
NEXT_FCNTL_H
REPLACE_OPENAT
@ -3340,6 +3341,7 @@ as_fn_append ac_func_list " fdopendir"
as_fn_append ac_header_list " stdio_ext.h"
as_fn_append ac_func_list " __fpending"
as_fn_append ac_func_list " fstatat"
as_fn_append ac_func_list " fsync"
gl_getopt_required=GNU
as_fn_append ac_header_list " getopt.h"
as_fn_append ac_func_list " gettimeofday"
@ -3349,7 +3351,6 @@ as_fn_append ac_header_list " wchar.h"
as_fn_append ac_header_list " stdint.h"
as_fn_append ac_header_list " inttypes.h"
as_fn_append ac_func_list " lstat"
as_fn_append ac_func_list " alarm"
as_fn_append ac_header_list " sys/select.h"
as_fn_append ac_func_list " pselect"
as_fn_append ac_func_list " pthread_sigmask"
@ -7182,10 +7183,12 @@ esac
# Code from module extern-inline:
# Code from module faccessat:
# Code from module fcntl-h:
# Code from module fdatasync:
# Code from module fdopendir:
# Code from module filemode:
# Code from module fpending:
# Code from module fstatat:
# Code from module fsync:
# Code from module getgroups:
# Code from module getloadavg:
# Code from module getopt-gnu:
@ -13803,7 +13806,7 @@ select getpagesize setlocale \
utimes getrlimit setrlimit shutdown getaddrinfo \
strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror mkstemp getline getdelim fsync sync \
gai_strerror mkstemp getline getdelim sync \
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
@ -15905,7 +15908,6 @@ esac
case $opsys in
aix4-2)
$as_echo "#define USG /**/" >>confdefs.h
@ -15944,44 +15946,11 @@ $as_echo "#define CYGWIN 1" >>confdefs.h
;;
darwin)
$as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
$as_echo "#define DARWIN_OS /**/" >>confdefs.h
;;
freebsd)
$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
;;
gnu | netbsd | openbsd )
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef BSD_SYSTEM
# error "BSD_SYSTEM not defined"
#endif
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
$as_echo "#define BSD_SYSTEM 43" >>confdefs.h
fi
rm -f conftest.err conftest.$ac_ext
;;
gnu-linux | gnu-kfreebsd )
$as_echo "#define USG /**/" >>confdefs.h
@ -17213,6 +17182,17 @@ _ACEOF
fi
ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FDATASYNC $ac_have_decl
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
@ -17366,6 +17346,8 @@ _ACEOF
GNULIB__EXIT=0;
GNULIB_ATOLL=0;
GNULIB_CALLOC_POSIX=0;
@ -19467,7 +19449,16 @@ _ACEOF
REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
REPLACE_TIMEGM=GNULIB_PORTCHECK;
ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
if test "x$ac_cv_have_decl_alarm" = x""yes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_ALARM $ac_have_decl
_ACEOF
GNULIB_PSELECT=0;
@ -21294,6 +21285,114 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; }
LIB_FDATASYNC=
if test $ac_cv_have_decl_fdatasync = no; then
HAVE_DECL_FDATASYNC=0
for ac_func in fdatasync
do :
ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
if test "x$ac_cv_func_fdatasync" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_FDATASYNC 1
_ACEOF
fi
done
if test $ac_cv_func_fdatasync = no; then
HAVE_FDATASYNC=0
fi
else
gl_saved_libs=$LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
$as_echo_n "checking for library containing fdatasync... " >&6; }
if test "${ac_cv_search_fdatasync+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char fdatasync ();
int
main ()
{
return fdatasync ();
;
return 0;
}
_ACEOF
for ac_lib in '' rt posix4; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_fdatasync=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if test "${ac_cv_search_fdatasync+set}" = set; then :
break
fi
done
if test "${ac_cv_search_fdatasync+set}" = set; then :
else
ac_cv_search_fdatasync=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
$as_echo "$ac_cv_search_fdatasync" >&6; }
ac_res=$ac_cv_search_fdatasync
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
test "$ac_cv_search_fdatasync" = "none required" ||
LIB_FDATASYNC=$ac_cv_search_fdatasync
fi
LIBS=$gl_saved_libs
fi
if test $HAVE_FDATASYNC = 0; then
gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
fi
GNULIB_FDATASYNC=1
ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
#include <dirent.h>
@ -21614,6 +21713,37 @@ $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
if test $ac_cv_func_fsync = no; then
HAVE_FSYNC=0
fi
if test $HAVE_FSYNC = 0; then
gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
:
fi
GNULIB_FSYNC=1
# Persuade glibc <stdlib.h> to declare getloadavg().
@ -22549,8 +22679,8 @@ else
# include <unistd.h>
#endif
#ifndef HAVE_ALARM
# define alarm(X) /* empty */
#if HAVE_DECL_ALARM
# include <signal.h>
#endif
/* Work around redefinition to rpl_putenv by other config tests. */
@ -22686,10 +22816,13 @@ main ()
int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
int time_t_signed = ! ((time_t) 0 < (time_t) -1);
#if HAVE_DECL_ALARM
/* This test makes some buggy mktime implementations loop.
Give up after 60 seconds; a mktime slower than that
isn't worth using anyway. */
signal (SIGALRM, SIG_DFL);
alarm (60);
#endif
time_t_max = (! time_t_signed
? (time_t) -1
@ -23267,16 +23400,16 @@ $as_echo "$gl_cv_func_svid_putenv" >&6; }
gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
for ac_func in _putenv
do :
ac_fn_c_check_func "$LINENO" "_putenv" "ac_cv_func__putenv"
if test "x$ac_cv_func__putenv" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE__PUTENV 1
_ACEOF
ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
if test "x$ac_cv_have_decl__putenv" = x""yes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
done
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL__PUTENV $ac_have_decl
_ACEOF
fi
@ -26514,15 +26647,8 @@ case "$opsys" in
LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
## This is here because src/Makefile.in did some extra fiddling around
## with LD_SWITCH_SYSTEM. The cpp logic was:
## #ifndef LD_SWITCH_SYSTEM
## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
## not using gcc, darwin.
## Because this was done in src/Makefile.in, the resulting part of
## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
## rather than LD_SWITCH_SYSTEM.
## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
## LD_SWITCH_SYSTEM_TEMACS instead,
test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
;;

View file

@ -2872,7 +2872,7 @@ select getpagesize setlocale \
utimes getrlimit setrlimit shutdown getaddrinfo \
strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror mkstemp getline getdelim fsync sync \
gai_strerror mkstemp getline getdelim sync \
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
@ -3774,7 +3774,6 @@ esac
dnl Define symbols to identify the version of Unix this is.
dnl Define all the symbols that apply correctly.
AH_TEMPLATE(BSD_SYSTEM, [Define if the system is compatible with BSD 4.2.])
AH_TEMPLATE(DOS_NT, [Define if the system is MS DOS or MS Windows.])
AH_TEMPLATE(MSDOS, [Define if the system is MS DOS.])
AH_TEMPLATE(USG, [Define if the system is compatible with System III.])
@ -3798,30 +3797,12 @@ case $opsys in
;;
darwin)
dnl BSD4_3 and BSD4_4 are already defined in sys/param.h.
AC_DEFINE(BSD_SYSTEM, [])
dnl More specific than the above two. We cannot use __APPLE__ as this
dnl may not be defined on non-OSX Darwin, and we cannot define DARWIN
dnl here because Panther and lower CoreFoundation.h uses DARWIN to
dnl Not __APPLE__, as this may not be defined on non-OSX Darwin.
dnl Not DARWIN, because Panther and lower CoreFoundation.h use DARWIN to
dnl distinguish OS X from pure Darwin.
AC_DEFINE(DARWIN_OS, [], [Define if the system is Darwin.])
;;
freebsd)
dnl Hack to avoid calling AC_PREPROC_IFELSE multiple times.
dnl Would not be needed with autoconf >= 2.67, where the
dnl preprocessed output is accessible in "conftest.i".
AC_DEFINE(BSD_SYSTEM_AHB, 1, [Define if AH_BOTTOM should change BSD_SYSTEM.])
;;
gnu | netbsd | openbsd )
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
#ifndef BSD_SYSTEM
# error "BSD_SYSTEM not defined"
#endif
]], [[]])], [], AC_DEFINE(BSD_SYSTEM, 43) )
;;
gnu-linux | gnu-kfreebsd )
AC_DEFINE(USG, [])
AC_DEFINE(GNU_LINUX, [], [Define if ths system is compatible with GNU/Linux.])
@ -4185,15 +4166,8 @@ case "$opsys" in
LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
## This is here because src/Makefile.in did some extra fiddling around
## with LD_SWITCH_SYSTEM. The cpp logic was:
## #ifndef LD_SWITCH_SYSTEM
## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
## not using gcc, darwin.
## Because this was done in src/Makefile.in, the resulting part of
## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
## rather than LD_SWITCH_SYSTEM.
## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
## LD_SWITCH_SYSTEM_TEMACS instead,
test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
;;

View file

@ -1,3 +1,11 @@
2013-03-16 Glenn Morris <rgm@gnu.org>
* emacs.texi (Top): Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
Prefer UTF-8 for documentation.

View file

@ -111,10 +111,21 @@ Cover art by Etienne Suvasa; cover design by Matt Lee.
@top The Emacs Editor
Emacs is the extensible, customizable, self-documenting real-time
display editor. This Info file describes how to edit with Emacs and
display editor. This manual describes how to edit with Emacs and
some of the ways to customize it; it corresponds to GNU Emacs version
@value{EMACSVER}.
@ifset WWW_GNU_ORG
@html
The homepage for GNU Emacs is at
<a href="/software/emacs/">http://www.gnu.org/software/emacs/</a>.<br>
To view this manual in other formats, click
<a href="/software/emacs/manual/emacs.html">here</a>.<br>
You can also purchase a printed copy from the
<a href="http://shop.fsf.org/product/emacs-manual/">FSF store</a>.
@end html
@end ifset
@ifinfo
If you are reading this in Emacs, type @kbd{h} to read a basic
introduction to the Info documentation system.

View file

@ -1,3 +1,11 @@
2013-03-16 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-03 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Digression into C): Update example.

View file

@ -227,6 +227,14 @@ This is an @cite{Introduction to Programming in Emacs Lisp}, for
people who are not programmers.
@sp 1
Edition @value{edition-number}, @value{update-date}
@ifset WWW_GNU_ORG
@html
<p>The homepage for GNU Emacs is at
<a href="http://www.gnu.org/software/emacs/">http://www.gnu.org/software/emacs/</a>.
<br>To view this manual in other formats, click
<a href="/software/emacs/emacs-lisp-intro/emacs-lisp-intro.html">here</a>.
@end html
@end ifset
@sp 1
Copyright @copyright{} 1990--1995, 1997, 2001--2013 Free Software
Foundation, Inc.

View file

@ -1,3 +1,14 @@
2013-03-16 Glenn Morris <rgm@gnu.org>
* elisp.texi: Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-11 Teodor Zlatanov <tzz@lifelogs.com>
* control.texi (Pattern matching case statement): Fix typo.
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
* elisp.texi, intro.texi: Switch from Latin-1 to UTF-8.

View file

@ -373,7 +373,7 @@ symbol to the value that it matched, so that you can later refer to it, either
in the @var{body-forms} or also later in the pattern.
@item _
This so-called @emph{don't care} pattern matches anything, like the previous
one, but unless symbol patterns it does not bind any variable.
one, but unlike symbol patterns it does not bind any variable.
@item (pred @var{pred})
This pattern matches if the function @var{pred} returns non-@code{nil} when
called with the object being matched.

View file

@ -97,6 +97,16 @@ This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@*
This is the @cite{GNU Emacs Lisp Reference Manual}
@end ifnottex
corresponding to Emacs version @value{EMACSVER}.
@ifset WWW_GNU_ORG
@html
<p>The homepage for GNU Emacs is at
<a href="/software/emacs/">http://www.gnu.org/software/emacs/</a>.<br>
For information on using Emacs, refer to
the <a href="/software/emacs/manual/html_node/emacs/index.html">Emacs
Manual</a>.<br> To view this manual in other formats,
click <a href="/software/emacs/manual/elisp.html">here</a>.
@end html
@end ifset
Copyright @copyright{} 1990--1996, 1998--2013 Free Software Foundation, Inc.

View file

@ -1,3 +1,14 @@
2013-03-15 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.7.
* trampver.texi: Update release number.
2013-03-09 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Basic Operations on Units): Streamline some
descriptions.
2013-03-08 Glenn Morris <rgm@gnu.org>
* faq.texi (Top): Don't say this was updated @today.

View file

@ -27859,7 +27859,8 @@ while typing @kbd{u c au/yr @key{RET}} produces
If the units you request are inconsistent with the original units, the
number will be converted into your units times whatever ``remainder''
units are left over. For example, converting @samp{55 mph} into acres
units are left over. (This can be disabled; @pxref{Customizing Calc}.)
For example, converting @samp{55 mph} into acres
produces @samp{6.08e-3 acre / m s}. (Recall that multiplication binds
more strongly than division in Calc formulas, so the units here are
acres per meter-second.) Remainder units are expressed in terms of
@ -27875,12 +27876,6 @@ change the @samp{s} to @samp{ms} to get @samp{9.8e-4 cm/ms^2}.
The ``remainder unit'' @samp{cm} is left alone rather than being
changed to the base unit @samp{m}.
If you want to disallow using inconsistent units, you can set the
customizable variable @code{calc-ensure-consistent-units} to @code{t}
(@pxref{Customizing Calc}). In this case, if you request units which
are inconsistent with the original units, you will be warned about it
and no conversion will occur.
You can use explicit unit conversion instead of the @kbd{u s} command
to gain more control over the units of the result of an expression.
For example, given @samp{5 m + 23 mm}, you can type @kbd{u c m} or
@ -27916,13 +27911,11 @@ prompt first for the old units which this value should be considered
to have, then for the new units. (If the value on the stack can be
simplified so that it doesn't contain any units, like @samp{ft/in} can
be simplified to 12, then @kbd{u c} will still prompt for both old
units and new units. You can ignore the prompt for old units with
@key{RET}, or turn off the prompt by setting the customizable variable
@code{calc-allow-units-as-numbers} to @code{nil};
@pxref{Customizing Calc}.) Assuming the old and new units you give are
consistent with each other, the result also will not contain any
units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts
the number 2 on the stack to 5.08.
units and new units. This can be disabled; @pxref{Customizing Calc}.)
Assuming the old and new units you give are consistent with each
other, the result also will not contain any units. For example,
@kbd{@w{u c} cm @key{RET} in @key{RET}} converts the number 2 on the
stack to 5.08.
@kindex u b
@pindex calc-base-units

View file

@ -8,7 +8,7 @@
@c In the Tramp CVS, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.2.7-pre
@set trampver 2.2.7
@c Other flags from configuration
@set instprefix /usr/local

View file

@ -1,3 +1,24 @@
2013-03-12 Paul Eggert <eggert@cs.ucla.edu>
Add coding tags for iso-2022-7bit files that are not already tagged.
* HELLO, tutorials/TUTORIAL.ko, tutorials/TUTORIAL.th:
Add coding tag. For TUTORIAL.th this prevents Emacs from
misinterpreting the file.
Switch encodings of tutorials, thai-word to UTF-8 (Bug#13880).
* refcards/ru-refcard.tex:
* tutorials/TUTORIAL.bg, tutorials/TUTORIAL.bg, tutorials/TUTORIAL.cn:
* tutorials/TUTORIAL.cs, tutorials/TUTORIAL.de, tutorials/TUTORIAL.eo:
* tutorials/TUTORIAL.es, tutorials/TUTORIAL.fr, tutorials/TUTORIAL.it:
* tutorials/TUTORIAL.nl, tutorials/TUTORIAL.pl, tutorials/TUTORIAL.pt_BR:
* tutorials/TUTORIAL.ro, tutorials/TUTORIAL.sk, tutorials/TUTORIAL.sv:
* tutorials/TUTORIAL.zh:
Switch to UTF-8.
2013-03-09 Jay Belanger <jay.p.belanger@gmail.com>
* refcards/calccard.tex: Remove incorrect entry.
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
FILE's lock is now always .#FILE and may be a regular file (Bug#13807).

View file

@ -93,4 +93,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Local Variables:
;;; tab-width: 32
;;; bidi-display-reordering: t
;;; coding: iso-2022-7bit
;;; End:

View file

@ -85,6 +85,26 @@ Eg View mode, etc.
* Changes in Specialized Modes and Packages in Emacs 24.4
** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
Affected files:
~/.emacs.d/timelog replaces ~/.timelog
~/.emacs.d/todo-do replaces ~/.todo-do
~/.emacs.d/todo-done replaces ~/.todo-done
~/.emacs.d/todo-top replaces ~/.todo-top
~/.emacs.d/vip replaces ~/.vip
~/.emacs.d/viper replaces ~/.viper
~/.emacs.d/ido.last replaces ~/.ido.last
~/.emacs.d/kkcrc replaces ~/.kkcrc
~/.emacs.d/quickurls replaces ~/.quickurls
~/.emacs.d/idlwave replaces ~/.idlwave
~/.emacs.d/bdfcache.el replaces ~/.bdfcache.el
~/.emacs.d/places replaces ~/.emacs-places
~/.emacs.d/shadows replaces ~/.shadows
~/.emacs.d/shadow_todo replaces ~/.shadow_todo
~/.emacs.d/strokes replaces ~/.strokes
~/.emacs.d/notes replaces ~/.notes
~/.emacs.d/type-break replaces ~/.type-break
** Delphi mode is now called OPascal mode.
*** All delphi-* variables and functions have been renamed to opascal-*.
*** `delphi-newline-always-indents' is not supported any more
@ -238,6 +258,11 @@ It is layered as:
* Incompatible Lisp Changes in Emacs 24.4
** `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
to that past, it is still done before input-decode-map/function-key-map/...
** Removed inhibit-local-menu-bar-menus.
** frame-local variables that affect redisplay do not work any more.
@ -264,6 +289,8 @@ file using `set-file-extended-attributes'.
* Lisp Changes in Emacs 24.4
** `dont-compile' is declared obsolete.
** Support for filesystem notifications.
Emacs now supports notifications of filesystem changes, such as
creation, modification, and deletion of files. This requires the

View file

@ -554,7 +554,6 @@ \section{Algebra}
\key{symbolic (vs.\ numeric) mode}{m s}
\key{fractions (vs.\ float) mode}{m f}
\key{suppress evaluation of formulas}{m O}
\key{simplify formulas automatically}{m S}
\key{return to default evaluation rules}{m D}
\key{``Big'' display mode}{d B}

View file

@ -1,4 +1,4 @@
% Reference Card for Dired -*- coding: iso-latin-1 -*-
% Reference Card for Dired -*- coding: utf-8 -*-
% Copyright (C) 2000-2013 Free Software Foundation, Inc.
@ -260,7 +260,7 @@
% renommer, copier, compresser, compiler des fichiers. Dans le tampon
% d'\'edition, vous pouvez modifier les attributs des fichiers, leur
% appliquer des commandes
% shell ou ins\'erer des sous-r\'epertoires. Vous pouvez « marquer » des
% shell ou ins\'erer des sous-r\'epertoires. Vous pouvez « marquer » des
% fichiers pour qu'ils soient supprim\'es plus tard ou pour leur
% appliquer des commandes ; cela peut \^etre fait pour un seul fichier \`a
% la fois ou pour un ensemble de fichiers correspondant \`a certains

View file

@ -296,7 +296,7 @@ \section{Arquivos}
\section{Ajuda (Help)}
Tecle \kbd{C-h} (ou \kbd{F1}) e siga as instru{\c{c}}{\~o}es.
Tecle \kbd{C-h} (ou \kbd{F1}) e siga as instru{\c{c}}{\~o}es.
\key{remove a janela de ajuda}{C-x 1}
\key{rola a janela de ajuda}{C-M-v}
@ -676,6 +676,5 @@ \section{Escrevendo Comandos}
% Local variables:
% compile-command: "pdftex pt-br-refcard"
% coding: iso-latin-1
% coding: utf-8
% End:

View file

@ -7,7 +7,7 @@
\usepackage{multicol,tabularx}
\usepackage[a4paper,hmargin={2cm,2cm},vmargin={2cm,2cm},nohead,twoside]{geometry}
\usepackage[T2A]{fontenc}
\usepackage[koi8-r]{inputenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{verbatim}
%\usepackage{enumerate,calc}
@ -33,7 +33,7 @@
\centerline{Copyright \copyright\ \cyear\ Free Software Foundation, Inc.}
\centerline{For GNU Emacs version \versionemacs}
\centerline{Designed by Stephen Gildea}
\centerline{Перевод Alex Ott <alexott@gmail.com>}
\centerline{Перевод Alex Ott <alexott@gmail.com>}
Permission is granted to make and distribute copies of
this card provided the copyright notice and this permission notice
@ -55,441 +55,441 @@
%\begin{multicols}{3}
\centerline{Справочник команд GNU Emacs}
\centerline{(для версии \versionemacs)}
\centerline{Справочник команд GNU Emacs}
\centerline{(для версии \versionemacs)}
\section{Запуск Emacs}
\section{Запуск Emacs}
Для запуска GNU Emacs \versionemacs, просто наберите имя программы: \kbd{emacs}
Для запуска GNU Emacs \versionemacs, просто наберите имя программы: \kbd{emacs}
\section{Выход из Emacs}
\section{Выход из Emacs}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
Приостановить работу Emacs (или свернуть в иконку при работе в X) & \kbd{C-z} \\
Выйти из Emacs & \kbd{C-x C-c} \\
Приостановить работу Emacs (или свернуть в иконку при работе в X) & \kbd{C-z} \\
Выйти из Emacs & \kbd{C-x C-c} \\
\end{tabular}
\section{Файлы}
\section{Файлы}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf открыть} файл в Emacs & \kbd{C-x C-f} \\
{\bf сохранить} файл обратно на диск & \kbd{C-x C-s} \\
сохранить {\bf все} файлы & \kbd{C-x s} \\
{\bf вставить} содержимое другого файла в текущий буфер & \kbd{C-x i} \\
открыть нужный вам файл вместо текущего & \kbd{C-x C-v} \\
сохранить буфер в указанном файле & \kbd{C-x C-w} \\
Переключить состояние буфера ``только для чтения'' & \kbd{C-x C-q} \\
{\bf открыть} файл в Emacs & \kbd{C-x C-f} \\
{\bf сохранить} файл обратно на диск & \kbd{C-x C-s} \\
сохранить {\bf все} файлы & \kbd{C-x s} \\
{\bf вставить} содержимое другого файла в текущий буфер & \kbd{C-x i} \\
открыть нужный вам файл вместо текущего & \kbd{C-x C-v} \\
сохранить буфер в указанном файле & \kbd{C-x C-w} \\
Переключить состояние буфера ``только для чтения'' & \kbd{C-x C-q} \\
\end{tabular}
\section{Получение помощи}
\section{Получение помощи}
Справочная система достаточно проста. Hажмите \kbd{C-h} (или \kbd{F1}) и
следуйте инструкциям. Если вы в первый раз работаете с Emacs, то наберите
\kbd{C-u C-h t Russian RET} для вызова {\bf учебника}.
Справочная система достаточно проста. Hажмите \kbd{C-h} (или \kbd{F1}) и
следуйте инструкциям. Если вы в первый раз работаете с Emacs, то наберите
\kbd{C-u C-h t Russian RET} для вызова {\bf учебника}.
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
Скрыть окно справки & \kbd{C-x 1} \\
Прокрутить окно справки & \kbd{C-M-v} \\
Скрыть окно справки & \kbd{C-x 1} \\
Прокрутить окно справки & \kbd{C-M-v} \\
apropos: показать команды, соответствующие строке & \kbd{C-h a} \\
показать имя функции, которая запускается клавишей & \kbd{C-h k} \\
получить информацию о функции & \kbd{C-h f} \\
получить информацию о режиме & \kbd{C-h m} \\
apropos: показать команды, соответствующие строке & \kbd{C-h a} \\
показать имя функции, которая запускается клавишей & \kbd{C-h k} \\
получить информацию о функции & \kbd{C-h f} \\
получить информацию о режиме & \kbd{C-h m} \\
\end{tabular}
\section{Исправление ошибок}
\section{Исправление ошибок}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf прервать} частично набранную или исполняемую команду & \kbd{C-g} \\
{\bf восстановить} файл, потерянный при крахе системы & \kbd{M-x recover-file} \\
{\bf отменить} нежелательные изменения & \kbd{C-x u, C-\_ {\rm или} C-/} \\
восстановить буфер в первоначальное состояние & \kbd{M-x revert-buffer} \\
перерисовать заполненный мусором экран & \kbd{C-l} \\
{\bf прервать} частично набранную или исполняемую команду & \kbd{C-g} \\
{\bf восстановить} файл, потерянный при крахе системы & \kbd{M-x recover-file} \\
{\bf отменить} нежелательные изменения & \kbd{C-x u, C-\_ {\rm или} C-/} \\
восстановить буфер в первоначальное состояние & \kbd{M-x revert-buffer} \\
перерисовать заполненный мусором экран & \kbd{C-l} \\
\end{tabular}
\section{Hаращиваемый поиск}
\section{Hаращиваемый поиск}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
поиск вперед & \kbd{C-s} \\
поиск назад & \kbd{C-r} \\
поиск по регулярному выражению вперед & \kbd{C-M-s} \\
поиск по регулярному выражению назад & \kbd{C-M-r} \\
поиск вперед & \kbd{C-s} \\
поиск назад & \kbd{C-r} \\
поиск по регулярному выражению вперед & \kbd{C-M-s} \\
поиск по регулярному выражению назад & \kbd{C-M-r} \\
выбрать предыдущую строку поиска & \kbd{M-p} \\
выбрать следующую строку поиска & \kbd{M-n} \\
прекратить наращиваемый поиск & \kbd{RET} \\
отменить эффект ввода последнего символа & \kbd{DEL} \\
прервать текущий поиск & \kbd{C-g} \\
выбрать предыдущую строку поиска & \kbd{M-p} \\
выбрать следующую строку поиска & \kbd{M-n} \\
прекратить наращиваемый поиск & \kbd{RET} \\
отменить эффект ввода последнего символа & \kbd{DEL} \\
прервать текущий поиск & \kbd{C-g} \\
\end{tabular}
Для повтора поиска в любом направлении используйте клавиши \kbd{C-s} или
\kbd{C-r}. Если Emacs все еще производит поиск, \kbd{C-g} отменит только
не выполненную часть.
Для повтора поиска в любом направлении используйте клавиши \kbd{C-s} или
\kbd{C-r}. Если Emacs все еще производит поиск, \kbd{C-g} отменит только
не выполненную часть.
\section{Перемещение}
\section{Перемещение}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf единицы перемещения} & {\bf назад} & {\bf вперед} \\
символ & \kbd{C-b} & \kbd{C-f} \\
слово & \kbd{M-b} & \kbd{M-f} \\
строка & \kbd{C-p} & \kbd{C-n} \\
начало (или конец) строки & \kbd{C-a} & \kbd{C-e} \\
предложение & \kbd{M-a} & \kbd{M-e} \\
абзац & \kbd{M-\{} & \kbd{M-\}} \\
страница & \kbd{C-x [} & \kbd{C-x ]} \\
выражение (sexp) & \kbd{C-M-b} & \kbd{C-M-f} \\
функция & \kbd{C-M-a} & \kbd{C-M-e} \\
переход в начало (или конец) буфера & \kbd{M-<} & \kbd{M->} \\
{\bf единицы перемещения} & {\bf назад} & {\bf вперед} \\
символ & \kbd{C-b} & \kbd{C-f} \\
слово & \kbd{M-b} & \kbd{M-f} \\
строка & \kbd{C-p} & \kbd{C-n} \\
начало (или конец) строки & \kbd{C-a} & \kbd{C-e} \\
предложение & \kbd{M-a} & \kbd{M-e} \\
абзац & \kbd{M-\{} & \kbd{M-\}} \\
страница & \kbd{C-x [} & \kbd{C-x ]} \\
выражение (sexp) & \kbd{C-M-b} & \kbd{C-M-f} \\
функция & \kbd{C-M-a} & \kbd{C-M-e} \\
переход в начало (или конец) буфера & \kbd{M-<} & \kbd{M->} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}l}
прокрутка экрана вниз & \kbd{C-v} \\
прокрутка экрана вверх & \kbd{M-v} \\
прокрутка влево & \kbd{C-x <} \\
прокрутка вправо & \kbd{C-x >} \\
установка текущей строки в центр экрана & \kbd{C-u C-l} \\
прокрутка экрана вниз & \kbd{C-v} \\
прокрутка экрана вверх & \kbd{M-v} \\
прокрутка влево & \kbd{C-x <} \\
прокрутка вправо & \kbd{C-x >} \\
установка текущей строки в центр экрана & \kbd{C-u C-l} \\
\end{tabular}
\section{Уничтожение и удаление}
\section{Уничтожение и удаление}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf уничтожаемый объект} & {\bf назад} & {\bf вперед} \\
символ (удаление, а не уничтожение) & \kbd{DEL} & \kbd{C-d} \\
слово & \kbd{M-DEL} & \kbd{M-d} \\
строка (до конца строки) & \kbd{M-0 C-k} & \kbd{C-k} \\
предложение & \kbd{C-x DEL} & \kbd{M-k} \\
выражение & \kbd{M-- C-M-k} & \kbd{C-M-k} \\
{\bf уничтожаемый объект} & {\bf назад} & {\bf вперед} \\
символ (удаление, а не уничтожение) & \kbd{DEL} & \kbd{C-d} \\
слово & \kbd{M-DEL} & \kbd{M-d} \\
строка (до конца строки) & \kbd{M-0 C-k} & \kbd{C-k} \\
предложение & \kbd{C-x DEL} & \kbd{M-k} \\
выражение & \kbd{M-- C-M-k} & \kbd{C-M-k} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}l}
уничтожить {\bf область} & \kbd{C-w} \\
скопировать область в список уничтожений & \kbd{M-w} \\
уничтожить до следующего вхождения символа {\it char} & \kbd{M-z {\it char}} \\
уничтожить {\bf область} & \kbd{C-w} \\
скопировать область в список уничтожений & \kbd{M-w} \\
уничтожить до следующего вхождения символа {\it char} & \kbd{M-z {\it char}} \\
вставить последний уничтоженный объект & \kbd{C-y} \\
заменить только что восстановленный текст предшествующим уничтоженным текстом & M-y \\
вставить последний уничтоженный объект & \kbd{C-y} \\
заменить только что восстановленный текст предшествующим уничтоженным текстом & M-y \\
\end{tabular}
\section{Пометка}
\section{Пометка}
\begin{tabular}{p{\ColWidth}l}
установить пометки & \kbd{C-@ {\rm или} C-SPC} \\
поменять местами курсор и пометку & \kbd{C-x C-x} \\
установить пометки & \kbd{C-@ {\rm или} C-SPC} \\
поменять местами курсор и пометку & \kbd{C-x C-x} \\
пометить {\it arg\/} {\bf слов} & \kbd{M-@} \\
пометить {\bf параграф} & \kbd{M-h} \\
пометить {\bf страницу} & \kbd{C-x C-p} \\
пометить {\bf выражение} & \kbd{C-M-@} \\
пометить {\bf функцию} & \kbd{C-M-h} \\
пометить весь {\bf буфер} & \kbd{C-x h} \\
пометить {\it arg\/} {\bf слов} & \kbd{M-@} \\
пометить {\bf параграф} & \kbd{M-h} \\
пометить {\bf страницу} & \kbd{C-x C-p} \\
пометить {\bf выражение} & \kbd{C-M-@} \\
пометить {\bf функцию} & \kbd{C-M-h} \\
пометить весь {\bf буфер} & \kbd{C-x h} \\
\end{tabular}
\section{Замена с запросом}
\section{Замена с запросом}
\begin{tabular}{p{\ColWidth}l}
интерактивная замена текстовой строки & \kbd{M-\%} \\
с использованием регулярных выражений & \kbd{M-x query-replace-regexp} \\
интерактивная замена текстовой строки & \kbd{M-\%} \\
с использованием регулярных выражений & \kbd{M-x query-replace-regexp} \\
\end{tabular}
В режиме интерактивной замены пользователю доступны следующие команды:
В режиме интерактивной замены пользователю доступны следующие команды:
\begin{tabular}{p{\ColWidth}l}
{\bf заменить} данное соответствие, перейти к следующему & \kbd{SPC} \\
заменить это соответствие, не перемещаться & \kbd{,} \\
{\bf пропустить} соответствие без замены & \kbd{DEL} \\
заменить все оставшиеся соответствия & \kbd{!} \\
{\bf вернуться} к предыдущему соответствию & \kbd{\^} \\
{\bf выйти} из режима ``замена с запросом'' & \kbd{RET} \\
войти в режим рекурсивного редактирования (для выхода используется \kbd{C-M-c}) & \kbd{C-r} \\
{\bf заменить} данное соответствие, перейти к следующему & \kbd{SPC} \\
заменить это соответствие, не перемещаться & \kbd{,} \\
{\bf пропустить} соответствие без замены & \kbd{DEL} \\
заменить все оставшиеся соответствия & \kbd{!} \\
{\bf вернуться} к предыдущему соответствию & \kbd{\^} \\
{\bf выйти} из режима ``замена с запросом'' & \kbd{RET} \\
войти в режим рекурсивного редактирования (для выхода используется \kbd{C-M-c}) & \kbd{C-r} \\
\end{tabular}
\section{Использование нескольких окон}
\section{Использование нескольких окон}
Команды, приведенные во втором столбце, применяются к другому
фрэйму (окну используемой оконной системы).
Команды, приведенные во втором столбце, применяются к другому
фрэйму (окну используемой оконной системы).
\begin{tabular}{p{\ColWidth}l}
удалить все остальные окна & \kbd{C-x 1} \\
удалить все остальные окна & \kbd{C-x 1} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
разбить окно по горизонтали & \kbd{C-x 2\ \ \ \ } & \kbd{C-x 5 2} \\
удалить данное окно & \kbd{C-x 0\ \ \ \ } & \kbd{C-x 5 0} \\
разбить окно по горизонтали & \kbd{C-x 2\ \ \ \ } & \kbd{C-x 5 2} \\
удалить данное окно & \kbd{C-x 0\ \ \ \ } & \kbd{C-x 5 0} \\
разбить окно по вертикали & \kbd{C-x 3} \\
разбить окно по вертикали & \kbd{C-x 3} \\
выполнить прокрутку в другом окне & \kbd{C-M-v} \\
выполнить прокрутку в другом окне & \kbd{C-M-v} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
переместить курсор в другое окно & \kbd{C-x o} & \kbd{C-x 5 o} \\
переместить курсор в другое окно & \kbd{C-x o} & \kbd{C-x 5 o} \\
выбрать буфер в другом окне & \kbd{C-x 4 b} & \kbd{C-x 5 b} \\
показать буфер в другом окне & \kbd{C-x 4 C-o} & \kbd{C-x 5 C-o} \\
загрузить файл в другое окно & \kbd{C-x 4 f} & \kbd{C-x 5 f} \\
открыть файл в режиме чтения в другом окне & \kbd{C-x 4 r} & \kbd{C-x 5 r} \\
запустить Dired в другом окне & \kbd{C-x 4 d} & \kbd{C-x 5 d} \\
найти таг в другом окне & \kbd{C-x 4 .} & \kbd{C-x 5 .} \\
выбрать буфер в другом окне & \kbd{C-x 4 b} & \kbd{C-x 5 b} \\
показать буфер в другом окне & \kbd{C-x 4 C-o} & \kbd{C-x 5 C-o} \\
загрузить файл в другое окно & \kbd{C-x 4 f} & \kbd{C-x 5 f} \\
открыть файл в режиме чтения в другом окне & \kbd{C-x 4 r} & \kbd{C-x 5 r} \\
запустить Dired в другом окне & \kbd{C-x 4 d} & \kbd{C-x 5 d} \\
найти таг в другом окне & \kbd{C-x 4 .} & \kbd{C-x 5 .} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}l}
увеличить высоту окна & \kbd{C-x \^} \\
сузить текущее окно & \kbd{C-x \{} \\
расширить текущее окно & \kbd{C-x \}} \\
увеличить высоту окна & \kbd{C-x \^} \\
сузить текущее окно & \kbd{C-x \{} \\
расширить текущее окно & \kbd{C-x \}} \\
\end{tabular}
\section{Форматирование}
\section{Форматирование}
\begin{tabular}{p{\ColWidth}l}
сделать отступ для текущей {\bf строки} (в зависимости от режима) & \kbd{TAB} \\
сделать отступ для {\bf области} (в зависимости от режима) & \kbd{C-M-$\backslash$} \\
сделать отступ для {\bf выражения} (в зависимости от режима) & \kbd{C-M-q} \\
сделать отступ к заданной {\it arg\/} колонке & \kbd{C-x TAB} \\
сделать отступ для текущей {\bf строки} (в зависимости от режима) & \kbd{TAB} \\
сделать отступ для {\bf области} (в зависимости от режима) & \kbd{C-M-$\backslash$} \\
сделать отступ для {\bf выражения} (в зависимости от режима) & \kbd{C-M-q} \\
сделать отступ к заданной {\it arg\/} колонке & \kbd{C-x TAB} \\
вставить новую строку после курсора & \kbd{C-o} \\
сдвинуть остаток строки вертикально вниз & \kbd{C-M-o} \\
удалить пустые строки вокруг курсора & \kbd{C-x C-o} \\
объединить строку с предыдущей (со следующими arg) & \kbd{M-\^} \\
удалить пустое пространство вокруг курсора & \kbd{M-$\backslash$} \\
поместить только один пробел в позиции курсора & \kbd{M-SPC} \\
вставить новую строку после курсора & \kbd{C-o} \\
сдвинуть остаток строки вертикально вниз & \kbd{C-M-o} \\
удалить пустые строки вокруг курсора & \kbd{C-x C-o} \\
объединить строку с предыдущей (со следующими arg) & \kbd{M-\^} \\
удалить пустое пространство вокруг курсора & \kbd{M-$\backslash$} \\
поместить только один пробел в позиции курсора & \kbd{M-SPC} \\
отформатировать текущий параграф & \kbd{M-q} \\
установить столбец заполнения & \kbd{C-x f} \\
установить префикс заполнения каждой строки & \kbd{C-x .} \\
отформатировать текущий параграф & \kbd{M-q} \\
установить столбец заполнения & \kbd{C-x f} \\
установить префикс заполнения каждой строки & \kbd{C-x .} \\
установить начертание (face) & \kbd{M-g} \\
установить начертание (face) & \kbd{M-g} \\
\end{tabular}
\section{Изменение регистра}
\section{Изменение регистра}
\begin{tabular}{p{\ColWidth}l}
сделать буквы слова заглавными & \kbd{M-u} \\
сделать буквы слова строчными & \kbd{M-l} \\
сделать первую букву слова заглавной & \kbd{M-c} \\
сделать буквы слова заглавными & \kbd{M-u} \\
сделать буквы слова строчными & \kbd{M-l} \\
сделать первую букву слова заглавной & \kbd{M-c} \\
сделать буквы области заглавными & \kbd{C-x C-u} \\
сделать буквы области строчными & \kbd{C-x C-l} \\
сделать буквы области заглавными & \kbd{C-x C-u} \\
сделать буквы области строчными & \kbd{C-x C-l} \\
\end{tabular}
\section{Минибуфер}
\section{Минибуфер}
Следующие клавиши (ключи) определены в минибуфере.
Следующие клавиши (ключи) определены в минибуфере.
\begin{tabular}{p{\ColWidth}l}
дополнить насколько возможно & \kbd{TAB} \\
дополнить до одного слова & \kbd{SPC} \\
дополнить и выполнить & \kbd{RET} \\
показать возможные дополнения & \kbd{?} \\
выбрать предыдущую строку из истории ввода & \kbd{M-p} \\
выбрать следующую строку из истории ввода & \kbd{M-n} \\
поиск в истории по регулярному выражению в обратном напрвлении & \kbd{M-r} \\
поиск в истории по регулярному выражению в прямом напрвлении & \kbd{M-s} \\
прервать команду & \kbd{C-g} \\
дополнить насколько возможно & \kbd{TAB} \\
дополнить до одного слова & \kbd{SPC} \\
дополнить и выполнить & \kbd{RET} \\
показать возможные дополнения & \kbd{?} \\
выбрать предыдущую строку из истории ввода & \kbd{M-p} \\
выбрать следующую строку из истории ввода & \kbd{M-n} \\
поиск в истории по регулярному выражению в обратном напрвлении & \kbd{M-r} \\
поиск в истории по регулярному выражению в прямом напрвлении & \kbd{M-s} \\
прервать команду & \kbd{C-g} \\
\end{tabular}
Наберите \kbd{C-x ESC ESC} для редактирования и повторения последней
команды набранной в минибуфере. Наберите \kbd{F10}, чтобы работать с
пунктами меню при помощи команд минибуфера.
Наберите \kbd{C-x ESC ESC} для редактирования и повторения последней
команды набранной в минибуфере. Наберите \kbd{F10}, чтобы работать с
пунктами меню при помощи команд минибуфера.
\section{Буфера}
\section{Буфера}
\begin{tabular}{p{\ColWidth}l}
выбрать другой буфер & \kbd{C-x b} \\
выдать список всех буферов & \kbd{C-x C-b} \\
уничтожить буфер & \kbd{C-x k} \\
выбрать другой буфер & \kbd{C-x b} \\
выдать список всех буферов & \kbd{C-x C-b} \\
уничтожить буфер & \kbd{C-x k} \\
\end{tabular}
\section{Перестановка данных}
\section{Перестановка данных}
\begin{tabular}{p{\ColWidth}l}
обменять местами {\bf символы} & \kbd{C-t} \\
обменять местами {\bf слова} & \kbd{M-t} \\
обменять местами {\bf строки} & \kbd{C-x C-t} \\
обменять местами {\bf выражения} & \kbd{C-M-t} \\
обменять местами {\bf символы} & \kbd{C-t} \\
обменять местами {\bf слова} & \kbd{M-t} \\
обменять местами {\bf строки} & \kbd{C-x C-t} \\
обменять местами {\bf выражения} & \kbd{C-M-t} \\
\end{tabular}
\section{Проверка правописания}
\section{Проверка правописания}
\begin{tabular}{p{\ColWidth}l}
проверить текущее слово & \kbd{M-\$} \\
проверить все слова в области & \kbd{M-x ispell-region} \\
выполнить проверку всего буфера & \kbd{M-x ispell-buffer} \\
проверить текущее слово & \kbd{M-\$} \\
проверить все слова в области & \kbd{M-x ispell-region} \\
выполнить проверку всего буфера & \kbd{M-x ispell-buffer} \\
\end{tabular}
\section{Теги}
\section{Теги}
\begin{tabular}{p{\ColWidth}l}
найти определение тега & \kbd{M-.} \\
найти следующее вхождение тега & \kbd{C-u M-.} \\
использовать новый файл с тегами & \kbd{M-x visit-tags-table} \\
найти определение тега & \kbd{M-.} \\
найти следующее вхождение тега & \kbd{C-u M-.} \\
использовать новый файл с тегами & \kbd{M-x visit-tags-table} \\
поиск по шаблону по всей таблице тегов & \kbd{M-x tags-search} \\
выполнить query-replace над всеми файлами & \kbd{M-x tags-query-replace} \\
продолжить поиск или поиск-замену тега & \kbd{M-,} \\
поиск по шаблону по всей таблице тегов & \kbd{M-x tags-search} \\
выполнить query-replace над всеми файлами & \kbd{M-x tags-query-replace} \\
продолжить поиск или поиск-замену тега & \kbd{M-,} \\
\end{tabular}
\section{Командные процессоры}
\section{Командные процессоры}
\begin{tabular}{p{\ColWidth}l}
Выполнить команду командного процессора & \kbd{M-!} \\
выполнить команду командного процессора над областью & \kbd{M-|} \\
пропустить содержимое области через команду командного процессора & \kbd{C-u M-|} \\
запустить командный процессор в окне \kbd{*shell*} & \kbd{M-x shell} \\
Выполнить команду командного процессора & \kbd{M-!} \\
выполнить команду командного процессора над областью & \kbd{M-|} \\
пропустить содержимое области через команду командного процессора & \kbd{C-u M-|} \\
запустить командный процессор в окне \kbd{*shell*} & \kbd{M-x shell} \\
\end{tabular}
\section{Прямоугольные области}
\section{Прямоугольные области}
\begin{tabular}{p{\ColWidth}l}
скопировать прямоугольную область в регистр & \kbd{C-x r r} \\
удалить прямоугольную область & \kbd{C-x r k} \\
вставить последную уничтоженную прямоугольную область & \kbd{C-x r y} \\
открыть прямоугольную область, сдвигая текст вправо & \kbd{C-x r o} \\
очистить прямоугольную область & \kbd{C-x r c} \\
предварить каждую строку строкой текста & \kbd{C-x r t} \\
скопировать прямоугольную область в регистр & \kbd{C-x r r} \\
удалить прямоугольную область & \kbd{C-x r k} \\
вставить последную уничтоженную прямоугольную область & \kbd{C-x r y} \\
открыть прямоугольную область, сдвигая текст вправо & \kbd{C-x r o} \\
очистить прямоугольную область & \kbd{C-x r c} \\
предварить каждую строку строкой текста & \kbd{C-x r t} \\
\end{tabular}
\section{Сокращения}
\section{Сокращения}
\begin{tabular}{p{\ColWidth}l}
добавить глобальное сокращение & \kbd{C-x a g} \\
добавить локальное для режима сокращение & \kbd{C-x a l} \\
добавить глобальное значение для данного сокращения & \kbd{C-x a i g} \\
добавить специфическое для режима значение данного сокращения & \kbd{C-x a i l} \\
явно вставить значение для сокращения & \kbd{C-x a e} \\
добавить глобальное сокращение & \kbd{C-x a g} \\
добавить локальное для режима сокращение & \kbd{C-x a l} \\
добавить глобальное значение для данного сокращения & \kbd{C-x a i g} \\
добавить специфическое для режима значение данного сокращения & \kbd{C-x a i l} \\
явно вставить значение для сокращения & \kbd{C-x a e} \\
динамически дополнить предыдущее слово & \kbd{M-/} \\
динамически дополнить предыдущее слово & \kbd{M-/} \\
\end{tabular}
\section{Регулярные выражения}
\section{Регулярные выражения}
\begin{tabular}{p{\ColWidth}l}
любой одиночный символ (за исключением символа новой строки) & \kbd{. {\rm(dot)}} \\
ноль или более повторений & \kbd{*} \\
одно или более повторений & \kbd{+} \\
ноль или одно повторение & \kbd{?} \\
экранировать специальный символ {\it c\/} & \kbd{$\backslash${\it c}} \\
выбор между альтернативами (``или'') & \kbd{$\backslash|$} \\
группировка & \kbd{$\backslash$( {\rm$\ldots$} $\backslash$)} \\
текст в {\it n\/}-й группе & \kbd{$\backslash${\it n}} \\
граница слова & \kbd{$\backslash$b} \\
не граница слова & \kbd{$\backslash$B} \\
любой одиночный символ (за исключением символа новой строки) & \kbd{. {\rm(dot)}} \\
ноль или более повторений & \kbd{*} \\
одно или более повторений & \kbd{+} \\
ноль или одно повторение & \kbd{?} \\
экранировать специальный символ {\it c\/} & \kbd{$\backslash${\it c}} \\
выбор между альтернативами (``или'') & \kbd{$\backslash|$} \\
группировка & \kbd{$\backslash$( {\rm$\ldots$} $\backslash$)} \\
текст в {\it n\/}-й группе & \kbd{$\backslash${\it n}} \\
граница слова & \kbd{$\backslash$b} \\
не граница слова & \kbd{$\backslash$B} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf объект} & {\bf начало соответствия} & {\bf конец соответствия} \\
строка & \kbd{\^} & \kbd{\$} \\
слово & \kbd{$\backslash$<} & \kbd{$\backslash$>} \\
буфер & \kbd{$\backslash$`} & \kbd{$\backslash$'} \\
{\bf объект} & {\bf начало соответствия} & {\bf конец соответствия} \\
строка & \kbd{\^} & \kbd{\$} \\
слово & \kbd{$\backslash$<} & \kbd{$\backslash$>} \\
буфер & \kbd{$\backslash$`} & \kbd{$\backslash$'} \\
\end{tabular}
\begin{tabular}{p{\ColWidth}p{\ColThreeWidth}p{\ColThreeWidth}}
{\bf класс символов} & {\bf соответ\-ствует им} & {\bf соответ\-ствует другим} \\
явный набор & \kbd{[ {\rm$\ldots$} ]} & \kbd{[\^ {\rm$\ldots$} ]} \\
символ-буква & \kbd{$\backslash$w} & \kbd{$\backslash$W} \\
символ с синтаксисом {\it c} & \kbd{$\backslash$s{\it c}} & \kbd{$\backslash$S{\it c}} \\
{\bf класс символов} & {\bf соответ\-ствует им} & {\bf соответ\-ствует другим} \\
явный набор & \kbd{[ {\rm$\ldots$} ]} & \kbd{[\^ {\rm$\ldots$} ]} \\
символ-буква & \kbd{$\backslash$w} & \kbd{$\backslash$W} \\
символ с синтаксисом {\it c} & \kbd{$\backslash$s{\it c}} & \kbd{$\backslash$S{\it c}} \\
\end{tabular}
\section{Международные наборы символов}
\section{Международные наборы символов}
\begin{tabular}{p{\ColWidth}l}
выбрать язык & \kbd{C-x RET l} \\
показать все возможные методы ввода & \kbd{M-x list-input-methods} \\
разрешить или запретить метод ввода & \kbd{C-$\backslash$} \\
установить систему кодирования для следующей команды & \kbd{C-x RET c} \\
показать список всех систем кодирования & \kbd{M-x list-coding-systems} \\
выбрать предпочтительную систему кодирования & \kbd{M-x prefer-coding-system} \\
выбрать язык & \kbd{C-x RET l} \\
показать все возможные методы ввода & \kbd{M-x list-input-methods} \\
разрешить или запретить метод ввода & \kbd{C-$\backslash$} \\
установить систему кодирования для следующей команды & \kbd{C-x RET c} \\
показать список всех систем кодирования & \kbd{M-x list-coding-systems} \\
выбрать предпочтительную систему кодирования & \kbd{M-x prefer-coding-system} \\
\end{tabular}
\section{Информация (система Info)}
\section{Информация (система Info)}
\begin{tabular}{p{\ColWidth}l}
запустить систему доступа к документации & \kbd{C-h i} \\
найти указанную функцию или переменную в документации & \kbd{C-h S} \\
запустить систему доступа к документации & \kbd{C-h i} \\
найти указанную функцию или переменную в документации & \kbd{C-h S} \\
\end{tabular}
Перемещение внутри узла (нодами):
Перемещение внутри узла (нодами):
\begin{tabular}{p{\ColWidth}l}
прокрутка вперед & \kbd{SPC} \\
прокрутка назад & \kbd{DEL} \\
перейти к началу узла & \kbd{. {\rm (dot)}} \\
прокрутка вперед & \kbd{SPC} \\
прокрутка назад & \kbd{DEL} \\
перейти к началу узла & \kbd{. {\rm (dot)}} \\
\end{tabular}
Перемещение между узлами:
Перемещение между узлами:
\begin{tabular}{p{\ColWidth}l}
{\bf следующий} узел & \kbd{n} \\
{\bf предыдущий} узел & \kbd{p} \\
перейти к {\bf верхнему} узлу & \kbd{u} \\
выбрать пункт меню по имени & \kbd{m} \\
выбрать {\it n\/}-й пункт меню по номеру (1--9) & \kbd{{\it n}} \\
перейти по ссылке (возврат с помощью \kbd{l}) & \kbd{f} \\
возвратится к последнему просмотренному узлу & \kbd{l} \\
возвратится к узлу-каталогу & \kbd{d} \\
Перейти к верхему узлу файла & \kbd{t} \\
перейти к узлу, заданному именем & \kbd{g} \\
{\bf следующий} узел & \kbd{n} \\
{\bf предыдущий} узел & \kbd{p} \\
перейти к {\bf верхнему} узлу & \kbd{u} \\
выбрать пункт меню по имени & \kbd{m} \\
выбрать {\it n\/}-й пункт меню по номеру (1--9) & \kbd{{\it n}} \\
перейти по ссылке (возврат с помощью \kbd{l}) & \kbd{f} \\
возвратится к последнему просмотренному узлу & \kbd{l} \\
возвратится к узлу-каталогу & \kbd{d} \\
Перейти к верхему узлу файла & \kbd{t} \\
перейти к узлу, заданному именем & \kbd{g} \\
\end{tabular}
Другие команды:
Другие команды:
\begin{tabular}{p{\ColWidth}l}
запустить {\bf учебник} по системе документации & \kbd{h} \\
поиск темы в индексе & \kbd{i} \\
поиск в узлах с помощью регулярных выражений & \kbd{s} \\
{\bf прекратить работу} с документацией & \kbd{q} \\
запустить {\bf учебник} по системе документации & \kbd{h} \\
поиск темы в индексе & \kbd{i} \\
поиск в узлах с помощью регулярных выражений & \kbd{s} \\
{\bf прекратить работу} с документацией & \kbd{q} \\
\end{tabular}
\section{Регистры}
\section{Регистры}
\begin{tabular}{p{\ColWidth}l}
сохранить область в регистре & \kbd{C-x r s} \\
вставить содержимое регистра в буфер & \kbd{C-x r i} \\
сохранить область в регистре & \kbd{C-x r s} \\
вставить содержимое регистра в буфер & \kbd{C-x r i} \\
сохранить положение курсора в регистре & \kbd{C-x r SPC} \\
перейти к положению курсора, сохраненному в регистре & \kbd{C-x r j} \\
сохранить положение курсора в регистре & \kbd{C-x r SPC} \\
перейти к положению курсора, сохраненному в регистре & \kbd{C-x r j} \\
\end{tabular}
\section{Клавиатурные макросы}
\section{Клавиатурные макросы}
\begin{tabular}{p{\ColWidth}l}
{\bf начать} определение клавиатурного макроса & \kbd{C-x (} \\
{\bf закончить} определение клавиатурного макроса & \kbd{C-x )} \\
{\bf выполнить} последний определенный макрос & \kbd{C-x e} \\
дополнить последний определенный макрос & \kbd{C-u C-x (} \\
задать имя для последнего определенного макроса & \kbd{M-x name-last-kbd-macro} \\
вставить в буфер определение макроса на языке Lisp & \kbd{M-x insert-kbd-macro} \\
{\bf начать} определение клавиатурного макроса & \kbd{C-x (} \\
{\bf закончить} определение клавиатурного макроса & \kbd{C-x )} \\
{\bf выполнить} последний определенный макрос & \kbd{C-x e} \\
дополнить последний определенный макрос & \kbd{C-u C-x (} \\
задать имя для последнего определенного макроса & \kbd{M-x name-last-kbd-macro} \\
вставить в буфер определение макроса на языке Lisp & \kbd{M-x insert-kbd-macro} \\
\end{tabular}
\section{Команды, связанные с Emacs Lisp}
\section{Команды, связанные с Emacs Lisp}
\begin{tabular}{p{\ColWidth}l}
вычислить {\bf выражение} перед курсором & \kbd{C-x C-e} \\
вычислить текущую функцию {\bf defun} & \kbd{C-M-x} \\
вычислить {\bf область} как выражение & \kbd{M-x eval-region} \\
считать и вычислить выражение из минибуфера & \kbd{M-:} \\
загрузить из стандартного системного каталога & \kbd{M-x load-library} \\
вычислить {\bf выражение} перед курсором & \kbd{C-x C-e} \\
вычислить текущую функцию {\bf defun} & \kbd{C-M-x} \\
вычислить {\bf область} как выражение & \kbd{M-x eval-region} \\
считать и вычислить выражение из минибуфера & \kbd{M-:} \\
загрузить из стандартного системного каталога & \kbd{M-x load-library} \\
\end{tabular}
\section{Простая настройка}
\section{Простая настройка}
\begin{tabular}{p{\ColWidth}l}
настроить переменные и оформление (faces) & \kbd{M-x customize} \\
настроить переменные и оформление (faces) & \kbd{M-x customize} \\
\end{tabular}
% The intended audience here is the person who wants to make simple
% customizations and knows Lisp syntax.
Создание глобальных привязок клавиш (ключей) на Emacs Lisp (примеры):
Создание глобальных привязок клавиш (ключей) на Emacs Lisp (примеры):
\begin{verbatim}
(global-set-key "\C-cg" 'goto-line)
(global-set-key "\M-#" 'query-replace-regexp)
\end{verbatim}
\section{Написание команд}
\section{Написание команд}
\begin{verbatim}
(defun <command-name> (<args>)
@ -497,7 +497,7 @@ \section{
<body>)
\end{verbatim}
Пример:
Пример:
\begin{verbatim}
(defun this-line-to-top-of-window (line)
@ -509,8 +509,8 @@ \section{
(prefix-numeric-value line))))
\end{verbatim}
Спецификация \kbd{interactive} сообщает о том, что аргумент надо считывать
интерактивно. Для дополнительной информации наберите \kbd{C-h f interactive}.
Спецификация \kbd{interactive} сообщает о том, что аргумент надо считывать
интерактивно. Для дополнительной информации наберите \kbd{C-h f interactive}.
\copyrightnotice
@ -520,6 +520,5 @@ \section{
% Local variables:
% compile-command: "pdflatex ru-refcard"
% coding: cyrillic-koi8
% coding: utf-8
% End:

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -997,3 +997,6 @@ COPYING$(C@L6s4B(B $(CFD@O@;(B $(C@P0m(B $(C3-(B $(CHD?!(B GNU $(C@L8
$(CAV=J=C?@(B. $(C@Z@/(B $(C<RGAF.?~>n8&(B $(C>20m(B $(C885i0m(B $(C0x@/GT@87N=a(B $(C<RGAF.?~>n(B
$(C9fGX8&(B ("$(C<R@/1G(B") $(C1Y@}GO4B5%(B $(C55?s=C4Y(B.
;;; Local Variables:
;;; coding: iso-2022-7bit
;;; End:

View file

@ -23,7 +23,7 @@ commando te proberen. Bijvoorbeeld:
herhalen als je klaar bent met het lezen van een scherm.
Merk op dat er een overlapping van twee regels is als je van een
scherm naar het volgende gaat; dat zorgt voor continuïteit bij het
scherm naar het volgende gaat; dat zorgt voor continuïteit bij het
lezen van de tekst.
Het eerste wat je moet weten, is hoe je je naar verschillende plaatsen
@ -55,7 +55,7 @@ De volgende commando's zijn handig om volledige schermen te bekijken:
Als je toetsenbord PageUp- en PageDn-toetsen heeft dan kun je deze ook
gebruiken om een scherm terug dan wel vooruit te gaan, maar het werken
met C-v en M-v is efficiënter.
met C-v en M-v is efficiënter.
* BASISCOMMANDO'S CURSORBEWEGINGEN
@ -65,7 +65,7 @@ Het is handig om je per scherm te bewegen, maar hoe beweeg je je nu
naar een specifieke plaats op het scherm?
Er is een aantal manieren waarop je dit kan doen. Je kan de
pijltjestoetsen gebruiken, maar het is efficiënter om je handen in de
pijltjestoetsen gebruiken, maar het is efficiënter om je handen in de
standaardhouding te laten, en de commando's C-p, C-b, C-f en C-n te
gebruiken. Deze commando's komen overeen met de pijltjestoetsen, als
in onderstaande figuur:
@ -206,7 +206,7 @@ makkelijk andere gevorderde cursorbewegingscommando's leren.
De meeste Emacs-commando's accepteren een numeriek argument. Voor de
meeste commando's is dit argument het aantal keren dat het commando
herhaald moet worden. Je geeft dit numerieke argument aan met C-u en
vervolgens de cijfers van het getal, vóór het commando. Als je
vervolgens de cijfers van het getal, vóór het commando. Als je
toetsenbord een META- (of EDIT- of ALT-) toets heeft, is er ook een
andere manier om het getal aan te geven: tik de cijfers terwijl je de
META toets ingedrukt houdt. We raden je aan de C-u manier te leren
@ -256,7 +256,7 @@ Je kan C-g ook gebruiken om een numeriek argument te verwijderen of om
het begin van een commando dat je niet wilt afmaken, af te breken.
>> Tik nu C-u 100 om een numeriek argument te maken met de waarde 100,
en tik dan C-g. Tik vervolgens C-f. Het zou de cursor maar één
en tik dan C-g. Tik vervolgens C-f. Het zou de cursor maar één
positie mogen verplaatsen, omdat je het argument verwijderd hebt
met C-g.
@ -288,7 +288,7 @@ niet uitvoeren en beantwoord je de vraag met "n" (van "no" of "nee").
Emacs kan meerdere vensters laten zien, elk venster met zijn eigen
tekst. We zullen later uitleggen hoe je met meerdere vensters kan
werken. Op dit moment willen we slechts uitleggen hoe je van extra
vensters af kunt komen en terug kan keren naar het werken met één
vensters af kunt komen en terug kan keren naar het werken met één
venster. Het is eenvoudig:
C-x 1 Een enkel venster (dat wil zeggen: verwijder alle
@ -318,7 +318,7 @@ bestaan uit twee, drie of vier tekens.
Als je tekst toe wil voegen, tik je die gewoon in. Tekens die je kan
zien, zoals A, 7, * en dergelijke, worden door Emacs als tekst
geïnterpreteerd en meteen toegevoegd. Tik <Return> (de "volgende
geïnterpreteerd en meteen toegevoegd. Tik <Return> (de "volgende
regel"-toets) om een Newline toe te voegen en dus een nieuwe regel te
beginnen.
@ -386,8 +386,8 @@ trekken, die begon met C-f en M-f (waarbij we voor het gemak even
vergeten dat <DEL> niet echt een CONTROL-teken is). C-k en M-k lijken
enigzins op C-e en M-e in hun relatie tot regels en zinnen.
Je kunt ook op één uniforme manier een willekeurig deel van de tekst
verwijderen. Beweeg daartoe naar één kant van het gedeelte dat je
Je kunt ook op één uniforme manier een willekeurig deel van de tekst
verwijderen. Beweeg daartoe naar één kant van het gedeelte dat je
wilt verwijderen en tik C-<SPC>. (<SPC> is de spatiebalk.) Beweeg nu
naar de andere kant van de tekst die je wilt verwijderen. Terwijl je
beweegt, markeert Emacs zichtbaar de tekst tussen de cursor en de
@ -427,7 +427,7 @@ terwijl tweemaal C-k tikken dat niet doet.
Het invoegen van de laatst verwijderde tekst heet yanken ("yanking").
Je kan de tekst yanken op de plek waar je het verwijderde, op een
andere plek of zelfs in een ander bestand. Je kan dezelfde tekst
meerdere keren yanken; op deze manier maak je meerdere kopieën van
meerdere keren yanken; op deze manier maak je meerdere kopieën van
dezelfde tekst. Verwijderen ("killing") en yanken worden in andere
programma's ook wel knip ("cut") en plak ("paste") genoemd (zie ook de
Glossary in de Emacs-handleiding).
@ -439,14 +439,14 @@ tekst in op de huidige cursorpositie.
Als je meerdere keren C-k achter elkaar hebt gedaan, dan worden alle
verwijderde tekstregels samen onthouden, zodat een enkele C-y al die
regels in één keer invoegt.
regels in één keer invoegt.
>> Probeer het nu: tik C-k een paar keer.
Om de verwijderde tekst terug te halen:
>> Tik C-y. Beweeg de cursor enkele regels naar beneden en tik weer
C-y. Je ziet nu hoe je tekst kan kopiëren.
C-y. Je ziet nu hoe je tekst kan kopiëren.
Wat moet je doen als je wat tekst terug wilt brengen, maar je intussen
al iets anders verwijderd hebt? C-y zou datgene terugbrengen wat je
@ -583,7 +583,7 @@ Je kan een bestand dat al bestaat bezoeken om het te bekijken of het
te wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat.
Dit is de manier om met Emacs een nieuw bestand te maken: bezoek het
bestand, dat eerst leeg zal zijn, en voeg tekst toe. Zodra je de
tekst opslaat, wordt het bestand werkelijk gecreëerd, met de nieuwe
tekst opslaat, wordt het bestand werkelijk gecreëerd, met de nieuwe
tekst als inhoud. Vanaf dat moment ben je dus bezig met een bestand
dat al bestaat.
@ -612,7 +612,7 @@ van een of andere buffer.
>> Tik C-x 1 om de bufferlijst uit het zicht krijgen.
Wanneer je met meerdere buffers werkt, dan is op elk moment slechts
één van die buffers "actueel". De actuele buffer is degene die je aan
één van die buffers "actueel". De actuele buffer is degene die je aan
het bewerken bent. Als je een andere buffer wilt bewerken, dan moet
je daarnaar "omschakelen". Als je wilt omschakelen naar een buffer
die overeenkomt met een bestand, dan kun je dit doen door dat bestand
@ -647,7 +647,7 @@ deze Emacs-sessie.
Als je de tekst van het ene bestand verandert en dan een ander bestand
bezoekt, wordt het eerste bestand niet opgeslagen. De wijzigingen
blijven in Emacs, in de buffer die bij het bestand hoort. Het creëren
blijven in Emacs, in de buffer die bij het bestand hoort. Het creëren
of veranderen van de buffer van het tweede bestand heeft geen effect
op de eerste buffer. Dit is erg nuttig, maar betekent ook dat er een
eenvoudige manier nodig is om het eerste bestand te bewaren. Het zou
@ -689,7 +689,7 @@ voordat Emacs helemaal stopt.)
Als je een grafisch scherm gebruikt heb je geen commando's nodig om
van Emacs naar een andere applicatie te gaan. Je gebruikt dat de muis
of commando's van de vensterbeheerder. Als je Emacs gebruikt in een
tekstvenster of terminal, die maar één applicatie tegelijkertijd kan
tekstvenster of terminal, die maar één applicatie tegelijkertijd kan
laten zien, moet je Emacs tijdelijk verlaten om naar een andere
applicatie te gaan.
@ -700,7 +700,7 @@ terug in de shell, maar Emacs is nog aanwezig. In de meeste shells
kan je Emacs weer activeren met het "fg" commando, of met "%emacs".
Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het
is ook het juiste commando om Emacs te beëindigen wanneer Emacs
is ook het juiste commando om Emacs te beëindigen wanneer Emacs
opgestart was door een mail-programma of iets dergelijks.
Er bestaan vele C-x commando's. Hier is een lijst van degene die je
@ -723,7 +723,7 @@ toont Emacs onderaan het scherm "M-x" en moet je de naam van het
commando intikken, in dit geval "replace-string". Als je gewoon
"repl s<TAB>" tikt maakt Emacs de naam zelf af. (<TAB> is de
Tab-toets, die meestal boven de CapsLock of Shift-toets zit aan de
linkerkant van het toetsenbord.) Beëindig het commando met <Return>.
linkerkant van het toetsenbord.) Beëindig het commando met <Return>.
Het replace-string commando heeft twee argumenten nodig: de string die
vervangen moet worden en de string waarmee die vervangen moet worden.
@ -801,7 +801,7 @@ heet een hoofdmodus ("major mode" in het Engels).
Emacs heeft verschillende hoofdmodi. Sommige daarvan zijn bedoeld
voor het bewerken van verschillende talen of soorten tekst, zoals
bijvoorbeeld Lisp-modus, Text-modus, etc. Op elk moment is er altijd
precies één modus actief, en de naam daarvan staat in de modusregel,
precies één modus actief, en de naam daarvan staat in de modusregel,
op de plaats waar nu "Fundamental" staat.
Elke hoofdmodus zorgt ervoor dat sommige commando's zich anders
@ -840,7 +840,7 @@ Hoofdmodi heten zo omdat er ook bijmodi zijn. Bijmodi zijn geen
alternatieven voor hoofdmodi; het zijn slechts kleine aanpassingen
daarvan. Elke bijmodus kan aan- of uitgezet worden, onafhankelijk van
andere bijmodi en onafhankelijk van de hoofdmodus. Het is dus
mogelijk geen bijmodi, één bijmodus of een willekeurige combinatie van
mogelijk geen bijmodi, één bijmodus of een willekeurige combinatie van
bijmodi te gebruiken.
Een nuttige bijmodus voor het bewerken van tekst in een natuurlijke
@ -857,7 +857,7 @@ zeggen dat het commando de modus "schakelt" ("to toggle" in het
Engels).
>> Tik nu M-x auto-fill-mode<Return>. Tik nu vele malen "asdf " op
een regel totdat je ziet dat de regel in tweeën gesplitst wordt.
een regel totdat je ziet dat de regel in tweeën gesplitst wordt.
Er moeten wel spaties tussen de woorden staan, omdat de Auto Fill
modus de regel alleen op spaties breekt.
@ -895,16 +895,16 @@ van "to search", zoeken); C-r start het achterwaarts zoeken (met de
Als je C-s tikt verschijnt de string "I-search" in het echo-gebied.
Dit betekent dat Emacs bezig is met een "incremental search"
(incrementele zoekopdracht) en wacht op het intikken van de
zoekstring. <Return> beëindigt het zoeken.
zoekstring. <Return> beëindigt het zoeken.
>> Tik nu C-s om het zoeken te starten. Tik nu, LANGZAAM, één letter
>> Tik nu C-s om het zoeken te starten. Tik nu, LANGZAAM, één letter
per keer, het woord "cursor", met een pauze na elke letter zodat je
kan zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het
woord "cursor" gezocht.
>> Tik nogmaals C-s, om naar het volgende voorkomen van het woord
"cursor" te zoeken.
>> Tik nu viermaal <Del> en let op de cursorbewegingen.
>> Tik <Return> om het zoeken te beëindigen.
>> Tik <Return> om het zoeken te beëindigen.
Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs
naar de eerste plek te gaan waar de string staat die je tot dan toe
@ -926,7 +926,7 @@ van de zoekstring afgehaald en de cursor gaat terug naar de plaats
waar "c" het eerst voorkwam.
Als je tijdens een zoekoperatie een CONTROL- of META-teken intikt, dan
wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk
wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk
tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en
C-r.
@ -997,7 +997,7 @@ verdwijnen. C-x 1 betekent zoveel als "ik wil maar 1 venster,
en wel het venster waar ik nu ben.")
Je hoeft niet dezelfde buffer in beide vensters te hebben. Wanneer je
C-x C-f gebruikt om een bestand in één van de vensters te bezoeken,
C-x C-f gebruikt om een bestand in één van de vensters te bezoeken,
verandert het andere venster niet. Je kunt de vensters onafhankelijk
van elkaar gebruiken om bestanden te bezoeken.
@ -1020,7 +1020,7 @@ vensters, menu's, scrollbalken, echo-gebied, etc. Op grafische
schermen is een Emacs-frame wat andere applicaties meestal een venter
(of een "window" in het Engels, vgl. Windows) noemen. Meerdere
grafische frames kunnen tegelijk op het scherm getoond worden. Een
tekstterminal kan maar één frame tegelijkertijd tonen.
tekstterminal kan maar één frame tegelijkertijd tonen.
>> Tik M-x make-frame <Return>.
Een nieuw frame verschijnt op het scherm.
@ -1144,7 +1144,7 @@ overeenkomende commandonaam zoals find-file.
C-h i Lees de handleidingen (ook wel Info genoemd).
Dit commando zet je in een speciale buffer genaamd
"*info*" waar je handleidingen kunt lezen van
software die op je computer is geïnstalleerd.
software die op je computer is geïnstalleerd.
Tik m Emacs <Return> om de handleiding van Emacs te
lezen. Als je nog nooit Info hebt gebruikt dan kun je
? tikken zodat Emacs je een rondleiding geeft langs de
@ -1190,7 +1190,7 @@ tegengekomen, blijf dan niet zitten en maak jezelf geen verwijten.
Doe je beklag!
* KOPIËREN
* KOPIËREN
-----------
(De Engelse versie van) deze inleiding is voorafgegaan door een lange
@ -1229,7 +1229,7 @@ voorwaarden:
onderdeel van GNU Emacs. Als dat niet het geval is, ga naar
www.gnu.org/licenses.
Lees het bestand COPYING en geef daarna kopieën van Emacs aan al je
Lees het bestand COPYING en geef daarna kopieën van Emacs aan al je
vrienden. Help bij het uitroeien van softwarebeschermingspolitiek
("eigendom") door vrije software te gebruiken, te schrijven en te
delen!
@ -1261,5 +1261,5 @@ your friends. Help stamp out software obstructionism ("ownership") by
using, writing, and sharing free software!
;;; Local Variables:
;;; coding: latin-1
;;; coding: utf-8
;;; End:

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1001,6 +1001,6 @@ virach@nectec.or.th
Translate - January 1999 by Virach Sornlertlamvanich
;;; Local Variables:
;;; sentence-end-double-space: nil
;;; sentence-end-double-space: nil
;;; coding: iso-2022-7bit
;;; End:

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,15 @@
2013-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
* quail/latin-ltx.el: Resolve conflicts (bug#13950).
(latin-ltx--mark-map, latin-ltx--mark-re): New constants.
(latin-ltx--define-rules): Check for conflicts. Eval `re's.
(rules): Use tighter regexps to avoid conflicts.
Consolidate the various rules for combining marks.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
* quail/latin-ltx.el: Add greek superscripts.

View file

@ -43,6 +43,26 @@ system, including many technical ones. Examples:
t t nil nil nil nil nil nil nil t)
(eval-when-compile
(require 'cl-lib)
(defconst latin-ltx--mark-map
'(("DOT BELOW" . "d")
("DOT ABOVE" . ".")
("OGONEK" . "k")
("CEDILLA" . "c")
("CARON" . "v")
;; ("HOOK ABOVE" . ??)
("MACRON" . "=")
("BREVE" . "u")
("TILDE" . "~")
("GRAVE" . "`")
("CIRCUMFLEX" . "^")
("DIAERESIS" . "\"")
("DOUBLE ACUTE" . "H")
("ACUTE" . "'")))
(defconst latin-ltx--mark-re (regexp-opt (mapcar #'car latin-ltx--mark-map)))
(defun latin-ltx--ascii-p (char)
(and (characterp char) (< char 128)))
@ -53,7 +73,8 @@ system, including many technical ones. Examples:
(pcase rule
(`(,_ ,(pred characterp)) (push rule newrules)) ;; Normal quail rule.
(`(,seq ,re)
(let ((count 0))
(let ((count 0)
(re (eval re t)))
(dolist (pair (ucs-names))
(let ((name (car pair))
(char (cdr pair)))
@ -68,9 +89,27 @@ system, including many technical ones. Examples:
(push (list x char) newrules))
(setq count (1+ count))
(push (list keys char) newrules))))))
;(message "latin-ltx: %d mapping for %S" count re)
;; (message "latin-ltx: %d mappings for %S" count re)
))))
`(quail-define-rules ,@(nreverse (delete-dups newrules))))))
(setq newrules (delete-dups newrules))
(let ((rules (copy-sequence newrules)))
(while rules
(let ((rule (pop rules)))
(when (assoc (car rule) rules)
(let ((conflicts (list (cadr rule)))
(tail rules)
c)
(while (setq c (assoc (car rule) tail))
(push (cadr c) conflicts)
(setq tail (cdr (memq c tail)))
(setq rules (delq c rules)))
(message "Conflict for %S: %S"
(car rule) (apply #'string conflicts)))))))
(let ((inputs (mapcar #'car newrules)))
(setq inputs (delete-dups inputs))
(message "latin-ltx: %d rules (+ %d conflicts)!"
(length inputs) (- (length newrules) (length inputs))))
`(quail-define-rules ,@(nreverse newrules)))))
(latin-ltx--define-rules
("!`" )
@ -89,69 +128,35 @@ system, including many technical ones. Examples:
("$^o$" )
("?`" ?¿)
("\\`" )
("\\`{}" ?`)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\`{%s}" c) (format "\\`%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH GRAVE")
(let* ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name)))
(mark1 (cdr (assoc (match-string 3 name) latin-ltx--mark-map)))
(mark2 (if (match-end 4)
(cdr (assoc (match-string 4 name) latin-ltx--mark-map))))
(marks (if mark2 (concat mark1 "\\" mark2) mark1)))
(cl-assert mark1)
(cons (format "\\%s{%s}" marks c)
;; Exclude "d" because we use "\\dh" for something else.
(unless (member (or mark2 mark1) '("d"));; "k"
(list (format "\\%s%s" marks c))))))
(concat "\\`LATIN \\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH \\("
latin-ltx--mark-re "\\)\\(?: AND \\("
latin-ltx--mark-re "\\)\\)?\\'"))
("\\'" )
("\\'{}" ?´)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\'{%s}" c) (format "\\'%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH ACUTE")
(let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
(cl-assert mark)
(list (format "\\%s" mark))))
(concat "\\`COMBINING \\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))
("\\^" )
("\\^{}" ?^)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\^{%s}" c) (format "\\^%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CIRCUMFLEX")
("\\~" )
("\\~{}" ?˜)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\~{%s}" c) (format "\\~%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH TILDE")
("\\\"" )
("\\\"{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\\"{%s}" c) (format "\\\"%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DIAERESIS")
("\\k" )
("\\k{}" ?˛)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\k{%s}" c) ;; (format "\\k%s" c)
)))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH OGONEK")
("\\c" )
("\\c{}" ?¸)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\c{%s}" c) (format "\\c%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CEDILLA")
(unless (latin-ltx--ascii-p char)
(let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
(cl-assert mark)
(list (format "\\%s{}" mark)))))
(concat "\\`\\(?:SPACING \\)?\\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))
("\\AA" ) ;; ("{\\AA}" ?Å)
("\\AE" ) ;; ("{\\AE}" ?Æ)
@ -166,42 +171,6 @@ system, including many technical ones. Examples:
("$\\div$" ) ("\\div" )
("\\o" ) ;; ("{\\o}" ?ø)
("\\=" )
("\\={}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\={%s}" c) (format "\\=%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH MACRON")
("\\u" )
("\\u{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\u{%s}" c) (format "\\u%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH BREVE")
("\\." )
("\\.{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\.{%s}" c) (format "\\.%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT ABOVE")
("\\v" )
("\\v{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\v{%s}" c) (format "\\v%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CARON")
("\\~{\\i}" )
("\\={\\i}" )
("\\u{\\i}" )
@ -214,12 +183,6 @@ system, including many technical ones. Examples:
("\\H" )
("\\H{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\H{%s}" c) (format "\\H%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOUBLE ACUTE")
("\\U{o}" ) ("\\Uo" ) ;; FIXME: Was it just a typo?
("\\OE" ) ;; ("{\\OE}" ?Œ)
@ -248,19 +211,11 @@ system, including many technical ones. Examples:
(string (if (match-end 2) ?^ ?_) basechar))))
"\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)")
((lambda (name char)
((lambda (name _char)
(let* ((basename (match-string 2 name))
(lbase (format "LATIN %s LETTER %s"
(match-string 1 name) basename))
(gbase (format "GREEK %s LETTER %s"
(match-string 1 name) basename))
tmp)
(cond
((assoc gbase (ucs-names)) (concat "^\\" (downcase basename)))
((latin-ltx--ascii-p (setq tmp (cdr (assoc lbase (ucs-names)))))
(string ?^ tmp))
(t (message "Unknown modifier letter %s" basename)))))
"MODIFIER LETTER \\(SMALL\\|CAPITAL\\) \\(.*\\)")
(name (if (match-end 1) (capitalize basename) (downcase basename))))
(concat "^" (if (> (length name) 1) "\\") name)))
"\\`MODIFIER LETTER \\(?:SMALL\\|CAPITA\\(L\\)\\) \\([[:ascii:]]+\\)\\'")
;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name))))
;; "\\`MODIFIER LETTER SMALL \\(.\\)\\'")
@ -272,22 +227,14 @@ system, including many technical ones. Examples:
("\\b" )
("\\d" )
;; ("\\d{}" ?) ;; FIXME: can't find the DOT BELOW character.
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\d{%s}" c) ;; (format "\\d%s" c)
)))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT BELOW")
("\\rq" ?)
;; FIXME: Provides some useful entries (yen, euro, copyright, registered,
;; currency, minus, micro), but also a lot of dubious ones.
((lambda (name char)
(unless (latin-ltx--ascii-p char)
(unless (or (latin-ltx--ascii-p char)
;; We prefer COMBINING LONG SOLIDUS OVERLAY for \not.
(member name '("NOT SIGN")))
(concat "\\" (downcase (match-string 1 name)))))
"\\`\\([^- ]+\\) SIGN\\'")
@ -377,7 +324,6 @@ system, including many technical ones. Examples:
("\\circledcirc" ?⊚)
("\\circleddash" ?⊝)
("\\clubsuit" ?♣)
("\\colon" ?:) ;FIXME: Conflict with "COLON SIGN" ₡.
("\\coloneq" ?≔)
("\\complement" ?∁)
("\\cong" ?≅)
@ -400,7 +346,6 @@ system, including many technical ones. Examples:
("\\ddots" ?⋱)
("\\diamond" ?⋄)
("\\diamondsuit" ?♢)
("\\digamma" ?Ϝ)
("\\divideontimes" ?⋇)
("\\doteq" ?≐)
("\\doteqdot" ?≑)

View file

@ -1,3 +1,34 @@
2013-03-16 Paul Eggert <eggert@cs.ucla.edu>
* pop.c: Fix ERRMAX typo (Bug#13925).
(socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]:
Use ERROR_MAX, not ERRMAX.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).
* Makefile.in (LIB_FDATASYNC): New macro.
(emacsclient${EXEEXT}): Use it.
* emacsclient.c (main): Use fdatasync, not fsync, since we don't
care about metadata. Keep trying if interrupted.
* movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since
fsync is available everywhere (or there is a substitute).
Don't report an error if fsync returns EINVAL.
Static checking by Sun C 5.12.
* etags.c (analyse_regex): Omit unreachable code.
* movemail.c (main): Call umask on all systems.
This is OK since Emacs already assumes umask elsewhere.
Don't grant more read permissions than necessary.
The old 0333 dates back to before we called setuid,
so it was needed back then to ensure user-readability,
but 0377 should suffice now.
2013-02-08 Paul Eggert <eggert@cs.ucla.edu>
* movemail.c (getenv): Remove decl (unused since 1994).
@ -5161,7 +5192,7 @@
(longopts): New long options without short counterpart are
globals, members, no-globals, no-members. Regexp options are now
defined conditionally to ETAGS_REGEXPS.
(print_help): Updated.
(print_help): Update.
1997-05-22 Francesco Potortì <F.Potorti@cnuce.cnr.it>

View file

@ -161,6 +161,8 @@ LIBRESOLV=@LIBRESOLV@
LIBS_MAIL=@LIBS_MAIL@
## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
## empty or -lrt or -lposix4 if HAVE_FDATASYNC
LIB_FDATASYNC = @LIB_FDATASYNC@
## Extra libraries to use when linking movemail.
LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
@ -334,7 +336,7 @@ pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h)
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
-DVERSION="\"${version}\"" \
$(LOADLIBES) -o emacsclient
$(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient
hexl${EXEEXT}: ${srcdir}/hexl.c $(config_h)
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl

View file

@ -1724,7 +1724,8 @@ main (int argc, char **argv)
needlf = 2;
}
fflush (stdout);
fsync (1);
while (fdatasync (1) != 0 && errno == EINTR)
continue;
/* Now, wait for an answer and print any messages. */
while (exit_status == EXIT_SUCCESS)
@ -1825,7 +1826,8 @@ main (int argc, char **argv)
if (needlf)
printf ("\n");
fflush (stdout);
fsync (1);
while (fdatasync (1) != 0 && errno == EINTR)
continue;
if (rl < 0)
exit_status = EXIT_FAILURE;

View file

@ -5628,10 +5628,7 @@ analyse_regex (char *regex_arg)
/* regexfile is a file containing regexps, one per line. */
regexfp = fopen (regexfile, "r");
if (regexfp == NULL)
{
pfatal (regexfile);
return;
}
pfatal (regexfile);
linebuffer_init (&regexbuf);
while (readline_internal (&regexbuf, regexfp) > 0)
analyse_regex (regexbuf.buffer);

View file

@ -380,13 +380,9 @@ main (int argc, char **argv)
if (indesc < 0)
pfatal_with_name (inname);
#ifdef BSD_SYSTEM
/* In case movemail is setuid to root, make sure the user can
read the output file. */
/* This is desirable for all systems
but I don't want to assume all have the umask system call */
umask (umask (0) & 0333);
#endif /* BSD_SYSTEM */
/* Make sure the user can read the output file. */
umask (umask (0) & 0377);
outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
if (outdesc < 0)
pfatal_with_name (outname);
@ -470,10 +466,8 @@ main (int argc, char **argv)
}
}
#ifdef BSD_SYSTEM
if (fsync (outdesc) < 0)
if (fsync (outdesc) != 0 && errno != EINVAL)
pfatal_and_delete (outname);
#endif
/* Prevent symlink attacks truncating other users' mailboxes */
if (setregid (-1, real_gid) < 0)
@ -754,21 +748,14 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse
}
}
/* On AFS, a call to write only modifies the file in the local
* workstation's AFS cache. The changes are not written to the server
* until a call to fsync or close is made. Users with AFS home
* directories have lost mail when over quota because these checks were
* not made in previous versions of movemail. */
#ifdef BSD_SYSTEM
if (fsync (mbfi) < 0)
if (fsync (mbfi) != 0 && errno != EINVAL)
{
error ("Error in fsync: %s", strerror (errno), 0);
close (mbfi);
return EXIT_FAILURE;
}
#endif
if (close (mbfi) == -1)
if (close (mbfi) != 0)
{
error ("Error in close: %s", strerror (errno), 0);
return EXIT_FAILURE;

View file

@ -1198,7 +1198,7 @@ socket_connection (char *host, int flags)
}
#elif defined HAVE_KRB5_ERROR_E_TEXT
if (err_ret && err_ret->e_text && **err_ret->e_text)
snprintf (pop_error + pop_error_len, ERRMAX - pop_error_len,
snprintf (pop_error + pop_error_len, ERROR_MAX - pop_error_len,
" [server says '%s']", *err_ret->e_text);
#endif
if (err_ret)

27
lib/fdatasync.c Normal file
View file

@ -0,0 +1,27 @@
/* Emulate fdatasync on platforms that lack it.
Copyright (C) 2011-2013 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <unistd.h>
int
fdatasync (int fd)
{
/* This does more work than strictly necessary, but is the best we
can do portably. */
return fsync (fd);
}

83
lib/fsync.c Normal file
View file

@ -0,0 +1,83 @@
/* Emulate fsync on platforms that lack it, primarily Windows and
cross-compilers like MinGW.
This is derived from sqlite3 sources.
http://www.sqlite.org/cvstrac/rlog?f=sqlite/src/os_win.c
http://www.sqlite.org/copyright.html
Written by Richard W.M. Jones <rjones.at.redhat.com>
Copyright (C) 2008-2013 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* FlushFileBuffers */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <errno.h>
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
int
fsync (int fd)
{
HANDLE h = (HANDLE) _get_osfhandle (fd);
DWORD err;
if (h == INVALID_HANDLE_VALUE)
{
errno = EBADF;
return -1;
}
if (!FlushFileBuffers (h))
{
/* Translate some Windows errors into rough approximations of Unix
* errors. MSDN is useless as usual - in this case it doesn't
* document the full range of errors.
*/
err = GetLastError ();
switch (err)
{
case ERROR_ACCESS_DENIED:
/* For a read-only handle, fsync should succeed, even though we have
no way to sync the access-time changes. */
return 0;
/* eg. Trying to fsync a tty. */
case ERROR_INVALID_HANDLE:
errno = EINVAL;
break;
default:
errno = EIO;
}
return -1;
}
return 0;
}
#else /* !Windows */
# error "This platform lacks fsync function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
#endif /* !Windows */

View file

@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdopendir filemode fstatat getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
MOSTLYCLEANFILES += core *.stackdump
@ -297,6 +297,15 @@ EXTRA_DIST += fcntl.in.h
## end gnulib module fcntl-h
## begin gnulib module fdatasync
EXTRA_DIST += fdatasync.c
EXTRA_libgnu_a_SOURCES += fdatasync.c
## end gnulib module fdatasync
## begin gnulib module fdopendir
@ -332,6 +341,15 @@ EXTRA_libgnu_a_SOURCES += at-func.c fstatat.c
## end gnulib module fstatat
## begin gnulib module fsync
EXTRA_DIST += fsync.c
EXTRA_libgnu_a_SOURCES += fsync.c
## end gnulib module fsync
## begin gnulib module getgroups
if gl_GNULIB_ENABLED_getgroups

View file

@ -62,7 +62,9 @@ static int
_unsetenv (const char *name)
{
size_t len;
#if !HAVE_DECL__PUTENV
char **ep;
#endif
if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
{
@ -72,7 +74,7 @@ _unsetenv (const char *name)
len = strlen (name);
#if HAVE__PUTENV
#if HAVE_DECL__PUTENV
{
int putenv_result, putenv_errno;
char *name_ = malloc (len + 2);
@ -125,46 +127,46 @@ putenv (char *string)
return _unsetenv (string);
}
#if HAVE__PUTENV
/* Rely on _putenv to allocate the new environment. If other
parts of the application use _putenv, the !HAVE__PUTENV code
would fight over who owns the environ vector, causing a crash. */
if (name_end[1])
return _putenv (string);
else
{
/* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
to allocate the environ vector and then replace the new
entry with "NAME=". */
int putenv_result, putenv_errno;
char *name_x = malloc (name_end - string + sizeof "= ");
if (!name_x)
return -1;
memcpy (name_x, string, name_end - string + 1);
name_x[name_end - string + 1] = ' ';
name_x[name_end - string + 2] = 0;
putenv_result = _putenv (name_x);
putenv_errno = errno;
for (ep = environ; *ep; ep++)
if (strcmp (*ep, name_x) == 0)
{
*ep = string;
break;
}
#if HAVE_DECL__PUTENV
/* Rely on _putenv to allocate the new environment. If other
parts of the application use _putenv, the !HAVE_DECL__PUTENV code
would fight over who owns the environ vector, causing a crash. */
if (name_end[1])
return _putenv (string);
else
{
/* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
to allocate the environ vector and then replace the new
entry with "NAME=". */
int putenv_result, putenv_errno;
char *name_x = malloc (name_end - string + sizeof "= ");
if (!name_x)
return -1;
memcpy (name_x, string, name_end - string + 1);
name_x[name_end - string + 1] = ' ';
name_x[name_end - string + 2] = 0;
putenv_result = _putenv (name_x);
putenv_errno = errno;
for (ep = environ; *ep; ep++)
if (strcmp (*ep, name_x) == 0)
{
*ep = string;
break;
}
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
if (putenv_result == 0)
{
/* _putenv propagated "NAME= " into the subprocess environment;
fix that by calling SetEnvironmentVariable directly. */
name_x[name_end - string] = 0;
putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
putenv_errno = ENOMEM; /* ENOMEM is the only way to fail. */
}
# endif
free (name_x);
__set_errno (putenv_errno);
return putenv_result;
if (putenv_result == 0)
{
/* _putenv propagated "NAME= " into the subprocess environment;
fix that by calling SetEnvironmentVariable directly. */
name_x[name_end - string] = 0;
putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
putenv_errno = ENOMEM; /* ENOMEM is the only way to fail. */
}
# endif
free (name_x);
__set_errno (putenv_errno);
return putenv_result;
}
#else
for (ep = environ; *ep; ep++)
if (strncmp (*ep, string, name_end - string) == 0
@ -186,7 +188,7 @@ putenv (char *string)
last_environ = new_environ;
environ = new_environ;
}
#endif
return 0;
#endif
}

View file

@ -61,8 +61,10 @@
/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
<unistd.h>. */
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
included here. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
#if !defined __GLIBC__ && !defined __osf__
# define __need_system_stdlib_h
# include <stdlib.h>
# undef __need_system_stdlib_h

View file

@ -1,10 +1,295 @@
2013-03-17 Roland Winkler <winkler@gnu.org>
* emacs-lisp/crm.el (completing-read-multiple): Ignore empty
strings in the list of return values.
2013-03-17 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-ext.el (math-read-number-fancy): Check for an explicit
radix before checking for HMS forms.
2013-03-16 Leo Liu <sdl.web@gmail.com>
* progmodes/scheme.el: Add indentation and font-locking for λ.
(Bug#13975)
2013-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/smie.el (smie-auto-fill): Don't inf-loop if there's no
token before point (bug#13942).
2013-03-16 Leo Liu <sdl.web@gmail.com>
* thingatpt.el (end-of-sexp): Fix bug#13952. Use syntax-after.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-16 Eli Zaretskii <eliz@gnu.org>
* startup.el (command-line-normalize-file-name): Fix handling of
backslashes in DOS and Windows file names. Reported by Xue Fuqiao
<xfq.free@gmail.com> in
http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00245.html.
2013-03-15 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.7.
* net/trampver.el: Update release number.
2013-03-14 Tassilo Horn <tsdh@gnu.org>
* doc-view.el Fix bug#13887.
(doc-view-insert-image): Don't modify overlay associated to
non-live windows, and implement horizontal centering of image in
case it's smaller than the window.
(doc-view-new-window-function): Force redisplay of new windows on
doc-view buffers.
2013-03-13 Karl Fogel <kfogel@red-bean.com>
* saveplace.el (save-place-alist-to-file): Don't sort
`save-place-alist', just pretty-print it (bug#13882).
2013-03-13 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-insert-directory): Check,
whether `default-file-name-coding-system' is bound. It isn't in
XEmacs.
2013-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/byte-run.el (defun-declarations-alist): Don't use
backquotes for `obsolete' (bug#13929).
* international/mule.el (find-auto-coding): Include file name in
obsolescence warning (bug#13922).
2013-03-12 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/cfengine.el (cfengine-parameters-indent): New variable
for CFEngine 3-specific indentation.
(cfengine3-indent-line): Use it. Fix up category regex.
(cfengine3-font-lock-keywords): Add bundle and namespace characters.
2013-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* type-break.el (type-break-file-name):
* textmodes/remember.el (remember-data-file):
* strokes.el (strokes-file):
* shadowfile.el (shadow-initialize):
* saveplace.el (save-place-file):
* ps-bdf.el (bdf-cache-file):
* progmodes/idlwave.el (idlwave-config-directory):
* net/quickurl.el (quickurl-url-file):
* international/kkc.el (kkc-init-file-name):
* ido.el (ido-save-directory-list-file):
* emulation/viper.el (viper-custom-file-name):
* emulation/vip.el (vip-startup-file):
* calendar/todo-mode.el (todo-file-do, todo-file-done, todo-file-top):
* calendar/timeclock.el (timeclock-file): Use locate-user-emacs-file.
2013-03-12 Paul Eggert <eggert@cs.ucla.edu>
Switch encodings of tutorials, thai-word to UTF-8 (Bug#13880).
* language/thai-word.el: Switch to UTF-8.
2013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
* recentf.el (recentf-save-file): Use locate-user-emacs-file (bug#13870).
2013-03-11 Thierry Volpiatto <thierry.volpiatto@gmail.com>
* net/net-utils.el (net-utils-remove-ctrl-m-filter):
Use with-current-buffer and don't move point.
(net-utils-run-simple): Remove useless code.
(net-utils-remove-ctl-m): Remove unused custom.
2013-03-11 Per Starbäck <starback@stp.lingfil.uu.se>
* international/characters.el (glyphless-set-char-table-range): New fun.
(update-glyphless-char-display): Use it (bug#13744).
2013-03-11 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/cfengine.el: Update for CFEngine 3.4.2 and higher:
namespaces in the syntax, indent closer for hanging brace
correctly, allow single-quote delimited 'strings', and make
`cfengine3-mode' the default.
2013-03-11 Jean-Philippe Gravel <jpgravel@gmail.com>
* progmodes/gdb-mi.el: Speed up initialization (bug#10580).
Use lexical-binding. Fix up docstring according to conventions.
(gdbmi-debug-mode): New var.
(gdbmi-start-with, gdbmi-same-start, gdbmi-is-number, gdbmi-bnf-init)
(gdbmi-bnf-output, gdbmi-bnf-skip-unrecognized, gdbmi-bnf-gdb-prompt)
(gdbmi-bnf-result-record, gdbmi-bnf-out-of-band-record)
(gdbmi-bnf-async-record, gdbmi-bnf-stream-record)
(gdbmi-bnf-console-stream-output, gdbmi-bnf-target-stream-output)
(gdbmi-bnf-log-stream-output, gdbmi-bnf-result-and-async-record-impl)
(gdbmi-bnf-incomplete-record-result): New functions.
(gdb-car<): Remove function.
(gdbmi-record-list): Remove variable.
(gdbmi-bnf-state, gdbmi-bnf-offset): New vars.
(gdbmi-bnf-result-state-configs): New const.
(gud-gdbmi-marker-filter): Rewrite.
(gdb-ignored-notification, gdb-thread-created, gdb-thread-exited)
(gdb-thread-selected, gdb-running, gdb-starting, gdb-stopped):
Add `token' argument.
(gdb-done, gdb-error): New functions.
(gdb-done-or-error): Add `is-complete' argument. Change arg order.
2013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
* term/xterm.el (xterm--report-background-handler): Don't burp
upon timeout.
(xterm--version-handler): Extract from terminal-init-xterm.
(xterm--query): Don't mishandle timeout. Remove debugging messages.
Allow multiple handlers.
(terminal-init-xterm): Handle OSX's Terminal.app's incorrect answer.
* term/xterm.el: Don't discard input (bug#6758). Use lexical-binding.
(xterm--report-background-handler, xterm--query): New functions.
(terminal-init-xterm): Use them.
2013-03-11 Michael R. Mauger <michael@mauger.com>
* progmodes/sql.el Version 3.2
Please note that my address changed to <michael@mauger.com>;
the <mmaug@yahoo.com> address remains active.
(sql-connection-alist): Updates documentation to fix bug#13715.
(sql-connect): Handle missing `sql-connection-alist' correctly.
(sql-mode-oracle-font-lock-keywords): Add missing keywords.
(sql-magic-go, sql-magic-semicolon): Mark with `delete-selection'
property.
(sql-default-value): New function.
(sql-get-login-ext, sql-get-login): Fixes bug where buffer-local
values were not used.
(sql-rename-buffer): Make sure alternate buffer name has no text
properties.
(sql-input-sender, sql-execute-feature): Fetch variable with
`buffer-local-value' rather than `with-current-buffer'.
(sql-*): Use #' function syntax consistently.
(sql-*): Use message/error/user-error consistently.
2013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
* xt-mouse.el (xterm-mouse-event-read): Remove.
(xterm-mouse--read-event-sequence-1000)
(xterm-mouse--read-event-sequence-1006): Use read-event instead.
2013-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
* term/xterm.el (xterm-function-map): Support format used with
formatOtherKeys=1 (bug#13839).
* emacs-lisp/byte-run.el (dont-compile): Declare obsolete.
(with-no-warnings): Use `declare'.
* whitespace.el (whitespace-enable-predicate): New variable.
(whitespace-enable-predicate): Use it.
* comint.el (comint-send-input, comint-snapshot-last-prompt)
(comint-output-filter, comint-update-fence):
Use with-silent-modifications.
2013-03-10 Jambunathan K <kjambunathan@gmail.com>
* replace.el (occur-read-regexp-defaults-function): New var.
(occur-read-regexp-defaults): New defun.
(occur-read-primary-args): Propagate above change (bug#13892).
2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
* mouse.el (mouse-drag-track): Remove left-over debugging code.
2013-03-09 Michael Albinus <michael.albinus@gmx.de>
Major rewrite due to changed D-Bus interface of GVFS 1.14.
* net/tramp-gvfs.el (top): Extend check for gvfs availability.
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
(tramp-gvfs-file-name-handler-alist) [directory-files]
[directory-files-and-attributes, file-exists-p, file-modes]:
Use Tramp default handler.
[file-acl, file-selinux-context, process-file, set-file-acl]:
[set-file-modes, set-file-selinux-context, shell-command]:
[start-file-process]: Remove handler.
[verify-visited-file-modtime]: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns. Replace all
calls of `dbus-string-to-byte-array' and
`tramp-gvfs-dbus-byte-array-to-string'.
(tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file, tramp-gvfs-handle-file-attributes)
(tramp-gvfs-handle-file-directory-p)
(tramp-gvfs-handle-file-executable-p)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-file-writable-p)
(tramp-gvfs-handle-insert-directory)
(tramp-gvfs-handle-insert-file-contents)
(tramp-gvfs-handle-make-directory, tramp-gvfs-handle-rename-file)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-handle-write-region): Rewrite.
(tramp-gvfs-handle-file-acl)
(tramp-gvfs-handle-file-selinux-context)
(tramp-gvfs-handle-process-file, tramp-gvfs-handle-set-file-acl)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-selinux-context)
(tramp-gvfs-handle-shell-command)
(tramp-gvfs-handle-start-file-process)
(tramp-gvfs-handle-verify-visited-file-modtime): Remove defuns.
(tramp-gvfs-url-file-name): Do not use `file-truename', we work
over the symlinks. Fix user handling.
(top, tramp-gvfs-handler-mounted-unmounted): Handle different names
of the D-Bus signals.
(tramp-gvfs-connection-mounted-p): Handle different names of the
D-Bus methods.
(tramp-gvfs-mount-spec-entry): New defun.
(tramp-gvfs-mount-spec): Use it.
(tramp-gvfs-maybe-open-connection): Check, that in case of "smb"
there is a share name. Handle different names of the D-Bus
signals and methods. Set connection properties needed for
`tramp-check-cached-permissions'.
(tramp-gvfs-send-command): Apply `tramp-gvfs-maybe-open-connection'.
Return t or nil.
* net/tramp.el (tramp-backtrace): Move up.
(tramp-error): Dump a backtrace into the debug buffer when
`tramp-verbose > 9.
(tramp-file-mode-type-map, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid, tramp-check-cached-permissions): Move from
tramp-sh.el.
* net/tramp-sh.el (tramp-file-mode-type-map)
(tramp-check-cached-permissions, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid): Move to tramp.el.
2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
Separate mouse-1-click-follows-link from mouse-drag-region.
* mouse.el (mouse--down-1-maybe-follows-link): New function.
(key-translation-map): Use it to implement mouse-1-click-follows-link.
(mouse-drag-line, mouse-drag-track):
Remove mouse-1-click-follows-link code.
(mouse--remap-link-click-p): Remove.
2013-03-08 Jambunathan K <kjambunathan@gmail.com>
* hi-lock.el (hi-lock-read-regexp-defaults-function): New var.
(hi-lock-read-regexp-defaults): New defun.
(hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Propagate above change. Update
docstring (bug#13892).
(hi-lock-face-phrase-buffer): Propagate above change.
Update docstring (bug#13892).
* subr.el (find-tag-default-as-regexp): New defun.
* replace.el (read-regexp): Propagate above change.
@ -45,13 +330,13 @@
2013-03-07 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/js.el (js--multi-line-declaration-indentation): Merge
from js2-mode (https://github.com/mooz/js2-mode/issues/89).
* progmodes/js.el (js--multi-line-declaration-indentation):
Merge from js2-mode (https://github.com/mooz/js2-mode/issues/89).
2013-03-06 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-syntax-propertize-function): Only
propertize regexp when not inside a string (Bug#13885).
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Only propertize regexp when not inside a string (Bug#13885).
2013-03-06 Alan Mackenzie <acm@muc.de>
@ -62,8 +347,8 @@
2013-03-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-compat.el (tramp-compat-delete-directory): Implement
TRASH argument.
* net/tramp-compat.el (tramp-compat-delete-directory):
Implement TRASH argument.
2013-03-05 Dmitry Gutov <dgutov@yandex.ru>
@ -314,6 +599,11 @@
Let-bind `isearch-other-end' to `start', `isearch-forward' to t
and `isearch-error' to nil.
2013-03-16 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-info-current-defun):
Enhance match-data cluttering prevention.
2013-02-22 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-tramp-file-p): Fix docstring.

View file

@ -2945,50 +2945,6 @@ If X is not an error form, return 1."
(and x sigma (math-scalarp x) (math-anglep sigma)
(list 'sdev x sigma))))
;; Hours (or degrees)
((or (string-match "^\\([^#^]+\\)[@oOhH]\\(.*\\)$" s)
(string-match "^\\([^#^]+\\)[dD][eE]?[gG]?\\(.*\\)$" s))
(let* ((hours (math-match-substring s 1))
(minsec (math-match-substring s 2))
(hours (math-read-number hours))
(minsec (if (> (length minsec) 0) (math-read-number minsec) 0)))
(and hours minsec
(math-num-integerp hours)
(not (math-negp hours)) (not (math-negp minsec))
(cond ((math-num-integerp minsec)
(and (Math-lessp minsec 60)
(list 'hms hours minsec 0)))
((and (eq (car-safe minsec) 'hms)
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
(seconds (math-match-substring s 2))
(minutes (math-read-number minutes))
(seconds (if (> (length seconds) 0) (math-read-number seconds) 0)))
(and minutes seconds
(math-num-integerp minutes)
(not (math-negp minutes)) (not (math-negp seconds))
(cond ((math-realp seconds)
(and (Math-lessp minutes 60)
(list 'hms 0 minutes seconds)))
((and (eq (car-safe seconds) 'hms)
(math-zerop (nth 1 seconds))
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
(and seconds (math-realp seconds)
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
;; Integer+fraction with explicit radix
((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s)
(let ((radix (string-to-number (math-match-substring s 1)))
@ -3061,6 +3017,50 @@ If X is not an error form, return 1."
(let ((digs (math-match-substring s 1)))
(math-read-radix digs 16)))
;; Hours (or degrees)
((or (string-match "^\\([^#^]+\\)[@oOhH]\\(.*\\)$" s)
(string-match "^\\([^#^]+\\)[dD][eE]?[gG]?\\(.*\\)$" s))
(let* ((hours (math-match-substring s 1))
(minsec (math-match-substring s 2))
(hours (math-read-number hours))
(minsec (if (> (length minsec) 0) (math-read-number minsec) 0)))
(and hours minsec
(math-num-integerp hours)
(not (math-negp hours)) (not (math-negp minsec))
(cond ((math-num-integerp minsec)
(and (Math-lessp minsec 60)
(list 'hms hours minsec 0)))
((and (eq (car-safe minsec) 'hms)
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
(seconds (math-match-substring s 2))
(minutes (math-read-number minutes))
(seconds (if (> (length seconds) 0) (math-read-number seconds) 0)))
(and minutes seconds
(math-num-integerp minutes)
(not (math-negp minutes)) (not (math-negp seconds))
(cond ((math-realp seconds)
(and (Math-lessp minutes 60)
(list 'hms 0 minutes seconds)))
((and (eq (car-safe seconds) 'hms)
(math-zerop (nth 1 seconds))
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
(and seconds (math-realp seconds)
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
;; Fraction using "/" instead of ":"
((string-match "^\\([0-9]+\\)/\\([0-9/]+\\)$" s)
(math-read-number (concat (math-match-substring s 1) ":"

View file

@ -81,7 +81,7 @@
;;; User Variables:
(defcustom timeclock-file (convert-standard-filename "~/.timelog")
(defcustom timeclock-file (locate-user-emacs-file "timelog" ".timelog")
"The file used to store timeclock data in."
:type 'file
:group 'timeclock)

View file

@ -281,11 +281,11 @@ show and mark todo entries for today, but may slow down processing of
the diary file somewhat."
:type 'string
:group 'todo)
(defcustom todo-file-do (convert-standard-filename "~/.todo-do")
(defcustom todo-file-do (locate-user-emacs-file "todo-do" ".todo-do")
"TODO mode list file."
:type 'file
:group 'todo)
(defcustom todo-file-done (convert-standard-filename "~/.todo-done")
(defcustom todo-file-done (locate-user-emacs-file "todo-done" ".todo-done")
"TODO mode archive file."
:type 'file
:group 'todo)
@ -315,7 +315,7 @@ window."
:group 'todo)
(defvar todo-edit-buffer " *TODO Edit*"
"TODO Edit buffer name.")
(defcustom todo-file-top (convert-standard-filename "~/.todo-top")
(defcustom todo-file-top (locate-user-emacs-file "todo-top" ".todo-top")
"TODO mode top priorities file.
Not in TODO format, but diary compatible.

View file

@ -1805,28 +1805,28 @@ Similarly for Soar, Scheme, etc."
(concat input "\n")))
(let ((beg (marker-position pmark))
(end (if no-newline (point) (1- (point))))
(inhibit-modification-hooks t))
(when (> end beg)
(add-text-properties beg end
'(front-sticky t
font-lock-face comint-highlight-input))
(unless comint-use-prompt-regexp
;; Give old user input a field property of `input', to
;; distinguish it from both process output and unsent
;; input. The terminating newline is put into a special
;; `boundary' field to make cursor movement between input
;; and output fields smoother.
(add-text-properties
beg end
'(mouse-face highlight
help-echo "mouse-2: insert after prompt as new input"))))
(unless (or no-newline comint-use-prompt-regexp)
;; Cover the terminating newline
(add-text-properties end (1+ end)
'(rear-nonsticky t
field boundary
inhibit-line-move-field-capture t))))
(end (if no-newline (point) (1- (point)))))
(with-silent-modifications
(when (> end beg)
(add-text-properties beg end
'(front-sticky t
font-lock-face comint-highlight-input))
(unless comint-use-prompt-regexp
;; Give old user input a field property of `input', to
;; distinguish it from both process output and unsent
;; input. The terminating newline is put into a special
;; `boundary' field to make cursor movement between input
;; and output fields smoother.
(add-text-properties
beg end
'(mouse-face highlight
help-echo "mouse-2: insert after prompt as new input"))))
(unless (or no-newline comint-use-prompt-regexp)
;; Cover the terminating newline
(add-text-properties end (1+ end)
'(rear-nonsticky t
field boundary
inhibit-line-move-field-capture t)))))
(comint-snapshot-last-prompt)
@ -1909,11 +1909,12 @@ See `comint-carriage-motion' for details.")
Freeze its attributes in place, even when more input comes along
and moves the prompt overlay."
(when comint-last-prompt-overlay
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(add-text-properties (overlay-start comint-last-prompt-overlay)
(overlay-end comint-last-prompt-overlay)
(overlay-properties comint-last-prompt-overlay)))))
(let ((inhibit-read-only t))
(with-silent-modifications
(add-text-properties
(overlay-start comint-last-prompt-overlay)
(overlay-end comint-last-prompt-overlay)
(overlay-properties comint-last-prompt-overlay))))))
(defun comint-carriage-motion (start end)
"Interpret carriage control characters in the region from START to END.
@ -2036,11 +2037,10 @@ Make backspaces delete the previous character."
(run-hook-with-args 'comint-output-filter-functions string)
(set-marker saved-point (point))
(goto-char (process-mark process)) ; in case a filter moved it
(goto-char (process-mark process)) ; In case a filter moved it.
(unless comint-use-prompt-regexp
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(with-silent-modifications
(add-text-properties comint-last-output-start (point)
'(front-sticky
(field inhibit-line-move-field-capture)
@ -2051,16 +2051,16 @@ Make backspaces delete the previous character."
;; Highlight the prompt, where we define `prompt' to mean
;; the most recent output that doesn't end with a newline.
(let ((prompt-start (save-excursion (forward-line 0) (point)))
(inhibit-read-only t)
(inhibit-modification-hooks t))
(inhibit-read-only t))
(when comint-prompt-read-only
(or (= (point-min) prompt-start)
(get-text-property (1- prompt-start) 'read-only)
(put-text-property
(1- prompt-start) prompt-start 'read-only 'fence))
(add-text-properties
prompt-start (point)
'(read-only t rear-nonsticky t front-sticky (read-only))))
(with-silent-modifications
(or (= (point-min) prompt-start)
(get-text-property (1- prompt-start) 'read-only)
(put-text-property
(1- prompt-start) prompt-start 'read-only 'fence))
(add-text-properties
prompt-start (point)
'(read-only t rear-nonsticky t front-sticky (read-only)))))
(unless (and (bolp) (null comint-last-prompt-overlay))
;; Need to create or move the prompt overlay (in the case
;; where there is no prompt ((bolp) == t), we still do
@ -2655,16 +2655,16 @@ read-only property of `fence', unless it already is read-only.
If the character after point does not have a front-sticky
read-only property, any read-only property of `fence' on the
preceding newline is removed."
(let* ((pt (point)) (lst (get-text-property pt 'front-sticky))
(inhibit-modification-hooks t))
(let* ((pt (point)) (lst (get-text-property pt 'front-sticky)))
(and (bolp)
(not (bobp))
(if (and (get-text-property pt 'read-only)
(if (listp lst) (memq 'read-only lst) t))
(unless (get-text-property (1- pt) 'read-only)
(put-text-property (1- pt) pt 'read-only 'fence))
(when (eq (get-text-property (1- pt) 'read-only) 'fence)
(remove-list-of-text-properties (1- pt) pt '(read-only)))))))
(with-silent-modifications
(if (and (get-text-property pt 'read-only)
(if (listp lst) (memq 'read-only lst) t))
(unless (get-text-property (1- pt) 'read-only)
(put-text-property (1- pt) pt 'read-only 'fence))
(when (eq (get-text-property (1- pt) 'read-only) 'fence)
(remove-list-of-text-properties (1- pt) pt '(read-only))))))))
(defun comint-kill-whole-line (&optional count)
"Kill current line, ignoring read-only and field properties.

View file

@ -324,7 +324,26 @@ of the page moves to the previous page."
;; `window' property is only effective if its value is a window).
(cl-assert (eq t (car winprops)))
(delete-overlay ol))
(image-mode-window-put 'overlay ol winprops)))
(image-mode-window-put 'overlay ol winprops)
(when (windowp (car winprops))
(if (stringp (get-char-property (point-min) 'display))
;; We're not already displaying an image, so this is the
;; initial window showing the document.
(run-with-timer nil nil
(lambda ()
;; In case a conversion is running, the
;; refresh will happen as defined by
;; `doc-view-conversion-refresh-interval'.
(unless doc-view-current-converter-processes
(with-selected-window (car winprops)
(doc-view-goto-page 1)))))
;; We've split the window showing the document. All we need
;; to do is selecting the new window to make the image appear
;; there, too.
(run-with-timer nil nil
(lambda ()
(save-window-excursion
(select-window (car winprops)))))))))
(defvar doc-view-current-files nil
"Only used internally.")
@ -535,7 +554,7 @@ Typically \"page-%s.png\".")
(with-selected-window win
(doc-view-goto-page page))))))))
(overlay-put (doc-view-current-overlay)
'help-echo (doc-view-current-info))))
'help-echo (doc-view-current-info))))
(defun doc-view-next-page (&optional arg)
"Browse ARG pages forward."
@ -1250,44 +1269,59 @@ ARGS is a list of image descriptors."
(when doc-view-pending-cache-flush
(clear-image-cache)
(setq doc-view-pending-cache-flush nil))
(let ((ol (doc-view-current-overlay))
(image (if (and file (file-readable-p file))
(if (not (and doc-view-scale-internally
(fboundp 'imagemagick-types)))
(apply 'create-image file doc-view--image-type nil args)
(unless (member :width args)
(setq args `(,@args :width ,doc-view-image-width)))
(apply 'create-image file 'imagemagick nil args))))
(slice (doc-view-current-slice)))
(setf (doc-view-current-image) image)
(move-overlay ol (point-min) (point-max))
(overlay-put ol 'display
(cond
(image
(if slice
(list (cons 'slice slice) image)
image))
;; We're trying to display a page that doesn't exist.
(doc-view-current-converter-processes
;; Maybe the page doesn't exist *yet*.
"Cannot display this page (yet)!")
(t
;; Typically happens if the conversion process somehow
;; failed. Better not signal an error here because it
;; could prevent a subsequent reconversion from fixing
;; the problem.
(concat "Cannot display this page!\n"
"Maybe because of a conversion failure!"))))
(let ((win (overlay-get ol 'window)))
(if (stringp (overlay-get ol 'display))
(progn ;Make sure the text is not scrolled out of view.
(set-window-hscroll win 0)
(set-window-vscroll win 0))
(let ((hscroll (image-mode-window-get 'hscroll win))
(vscroll (image-mode-window-get 'vscroll win)))
;; Reset scroll settings, in case they were changed.
(if hscroll (set-window-hscroll win hscroll))
(if vscroll (set-window-vscroll win vscroll)))))))
(let ((ol (doc-view-current-overlay)))
;; Only insert the image if the buffer is visible.
(when (window-live-p (overlay-get ol 'window))
(let* ((image (if (and file (file-readable-p file))
(if (not (and doc-view-scale-internally
(fboundp 'imagemagick-types)))
(apply 'create-image file doc-view--image-type nil args)
(unless (member :width args)
(setq args `(,@args :width ,doc-view-image-width)))
(apply 'create-image file 'imagemagick nil args))))
(slice (doc-view-current-slice))
(img-width (and image (car (image-size image))))
(displayed-img-width (if (and image slice)
(* (/ (float (nth 2 slice))
(car (image-size image 'pixels)))
img-width)
img-width))
(window-width (window-width (selected-window))))
(setf (doc-view-current-image) image)
(move-overlay ol (point-min) (point-max))
;; In case the window is wider than the image, center the image
;; horizontally.
(overlay-put ol 'before-string
(when (and image (> window-width displayed-img-width))
(propertize " " 'display
`(space :align-to (+ center (-0.5 . ,displayed-img-width))))))
(overlay-put ol 'display
(cond
(image
(if slice
(list (cons 'slice slice) image)
image))
;; We're trying to display a page that doesn't exist.
(doc-view-current-converter-processes
;; Maybe the page doesn't exist *yet*.
"Cannot display this page (yet)!")
(t
;; Typically happens if the conversion process somehow
;; failed. Better not signal an error here because it
;; could prevent a subsequent reconversion from fixing
;; the problem.
(concat "Cannot display this page!\n"
"Maybe because of a conversion failure!"))))
(let ((win (overlay-get ol 'window)))
(if (stringp (overlay-get ol 'display))
(progn ;Make sure the text is not scrolled out of view.
(set-window-hscroll win 0)
(set-window-vscroll win 0))
(let ((hscroll (image-mode-window-get 'hscroll win))
(vscroll (image-mode-window-get 'vscroll win)))
;; Reset scroll settings, in case they were changed.
(if hscroll (set-window-hscroll win hscroll))
(if vscroll (set-window-vscroll win vscroll)))))))))
(defun doc-view-sort (a b)
"Return non-nil if A should be sorted before B.

View file

@ -79,7 +79,8 @@ The return value of this function is not used."
(list 'quote f) (list 'quote arglist) (list 'quote when))))
(list 'obsolete
#'(lambda (f _args new-name when)
`(make-obsolete ',f ',new-name ,when)))
(list 'make-obsolete
(list 'quote f) (list 'quote new-name) (list 'quote when))))
(list 'compiler-macro
#'(lambda (f args compiler-function)
;; FIXME: Make it possible to just reuse `args'.
@ -378,7 +379,7 @@ obsolete."
(defmacro dont-compile (&rest body)
"Like `progn', but the body always runs interpreted (not compiled).
If you think you need this, you're probably making a mistake somewhere."
(declare (debug t) (indent 0))
(declare (debug t) (indent 0) (obsolete nil "24.4"))
(list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body)))))
@ -402,9 +403,9 @@ In interpreted code, this is entirely equivalent to `progn'."
;; macroexpansion.
(list 'quote (eval (cons 'progn body) lexical-binding)))
(put 'with-no-warnings 'lisp-indent-function 0)
(defun with-no-warnings (&rest body)
"Like `progn', but prevents compiler warnings in the body."
(declare (indent 0))
;; The implementation for the interpreter is basically trivial.
(car (last body)))

View file

@ -287,7 +287,8 @@ INHERIT-INPUT-METHOD."
prompt initial-input map
nil hist def inherit-input-method)))
(and def (string-equal input "") (setq input def))
(split-string input crm-separator)))
;; Ignore empty strings in the list of return values.
(split-string input crm-separator t)))
(remove-hook 'choose-completion-string-functions
'crm--choose-completion-string)))

View file

@ -1631,31 +1631,34 @@ to which that point should be aligned, if we were to reindent it.")
(defun smie-auto-fill ()
(let ((fc (current-fill-column)))
(while (and fc (> (current-column) fc))
(cond
((not (or (nth 8 (save-excursion
(syntax-ppss (line-beginning-position))))
(nth 8 (syntax-ppss))))
(save-excursion
(beginning-of-line)
(smie-indent-forward-token)
(let ((bsf (point))
(gain 0)
curcol)
(while (<= (setq curcol (current-column)) fc)
;; FIXME? `smie-indent-calculate' can (and often will)
;; return a result that actually depends on the presence/absence
;; of a newline, so the gain computed here may not be accurate,
;; but in practice it seems to works well enough.
(let* ((newcol (smie-indent-calculate))
(newgain (- curcol newcol)))
(when (> newgain gain)
(setq gain newgain)
(setq bsf (point))))
(smie-indent-forward-token))
(when (> gain 0)
(goto-char bsf)
(newline-and-indent)))))
(t (do-auto-fill))))))
(or (unless (or (nth 8 (save-excursion
(syntax-ppss (line-beginning-position))))
(nth 8 (syntax-ppss)))
(save-excursion
(let ((end (point))
(bsf (progn (beginning-of-line)
(smie-indent-forward-token)
(point)))
(gain 0)
curcol)
(while (and (<= (point) end)
(<= (setq curcol (current-column)) fc))
;; FIXME? `smie-indent-calculate' can (and often will)
;; return a result that actually depends on the
;; presence/absence of a newline, so the gain computed here
;; may not be accurate, but in practice it seems to works
;; well enough.
(let* ((newcol (smie-indent-calculate))
(newgain (- curcol newcol)))
(when (> newgain gain)
(setq gain newgain)
(setq bsf (point))))
(smie-indent-forward-token))
(when (> gain 0)
(goto-char bsf)
(newline-and-indent)
'done))))
(do-auto-fill)))))
(defun smie-setup (grammar rules-function &rest keywords)

View file

@ -159,7 +159,7 @@ If nil then it is bound to `delete-backward-char'."
(defvar vip-inhibit-startup-message nil)
(defvar vip-startup-file (convert-standard-filename "~/.vip")
(defvar vip-startup-file (locate-user-emacs-file "vip" ".vip")
"Filename used as startup file for vip.")
;; key bindings

View file

@ -1009,9 +1009,9 @@ as a Meta key and any number of multiple escapes are allowed."
(inhibit-quit t))
(if (viper-ESC-event-p event)
(progn
;; Some versions of Emacs (eg., 22.50.8 have a bug, which makes even
;; a single ESC into ;; a fast keyseq. To guard against this, we
;; added a check if there are other events as well. Keep the next
;; Some versions of Emacs (eg., 22.50.8 (?)) have a bug, which makes
;; even a single ESC into a fast keyseq. To guard against this, we
;; added a check if there are other events as well. Keep the next
;; line for the next time the bug reappears, so that will remember to
;; report it.
;;(if (and (viper-fast-keysequence-p) unread-command-events)

View file

@ -313,7 +313,7 @@
(require 'viper-keym)
;; better be defined before Viper custom group.
(defvar viper-custom-file-name (convert-standard-filename "~/.viper")
(defvar viper-custom-file-name (locate-user-emacs-file "viper" ".viper")
"Viper customization file.
If set by the user, this must be done _before_ Viper is loaded in `~/.emacs'.")

File diff suppressed because it is too large Load diff

View file

@ -927,7 +927,8 @@ ido is running. Copied from `icomplete-minibuffer-setup-hook'."
:type 'hook
:group 'ido)
(defcustom ido-save-directory-list-file (convert-standard-filename "~/.ido.last")
(defcustom ido-save-directory-list-file
(locate-user-emacs-file "ido.last" ".ido.last")
"File in which the ido state is saved between invocations.
Variables stored are: `ido-last-directory-list', `ido-work-directory-list',
`ido-work-file-list', and `ido-dir-file-cache'.

View file

@ -1410,16 +1410,16 @@ This function updates the char-table `glyphless-char-display'."
(or (memq method '(zero-width thin-space empty-box acronym hex-code))
(error "Invalid glyphless character display method: %s" method))
(cond ((eq target 'c0-control)
(set-char-table-range glyphless-char-display '(#x00 . #x1F)
method)
(glyphless-set-char-table-range glyphless-char-display
#x00 #x1F method)
;; Users will not expect their newlines and TABs be
;; displayed as anything but themselves, so exempt those
;; two characters from c0-control.
(set-char-table-range glyphless-char-display #x9 nil)
(set-char-table-range glyphless-char-display #xa nil))
((eq target 'c1-control)
(set-char-table-range glyphless-char-display '(#x80 . #x9F)
method))
(glyphless-set-char-table-range glyphless-char-display
#x80 #x9F method))
((eq target 'format-control)
(map-char-table
#'(lambda (char category)
@ -1443,6 +1443,14 @@ This function updates the char-table `glyphless-char-display'."
(t
(error "Invalid glyphless character group: %s" target))))))
(defun glyphless-set-char-table-range (chartable from to method)
(if (eq method 'acronym)
(let ((i from))
(while (<= i to)
(set-char-table-range chartable i (aref char-acronym-table i))
(setq i (1+ i))))
(set-char-table-range chartable (cons from to) method)))
;;; Control of displaying glyphless characters.
(defcustom glyphless-char-display-control
'((format-control . thin-space)

View file

@ -40,7 +40,7 @@
"String denoting KKC input method.
This string is shown at mode line when users are in KKC mode.")
(defvar kkc-init-file-name (convert-standard-filename "~/.kkcrc")
(defvar kkc-init-file-name (locate-user-emacs-file "kkcrc" ".kkcrc")
"Name of a file which contains user's initial setup code for KKC.")
;; A flag to control a file specified by `kkc-init-file-name'.

View file

@ -1,8 +1,8 @@
;;; latexenc.el --- guess correct coding system in LaTeX files -*-coding: iso-2022-7bit -*-
;;; latexenc.el --- guess correct coding system in LaTeX files -*-coding: utf-8 -*-
;; Copyright (C) 2005-2013 Free Software Foundation, Inc.
;; Author: Arne J,Ax(Brgensen <arne@arnested.dk>
;; Author: Arne Jørgensen <arne@arnested.dk>
;; Keywords: mule, coding system, latex
;; This file is part of GNU Emacs.

View file

@ -1,4 +1,4 @@
;;; mule-cmds.el --- commands for multilingual environment -*-coding: iso-2022-7bit -*-
;;; mule-cmds.el --- commands for multilingual environment -*-coding: utf-8 -*-
;; Copyright (C) 1997-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,

View file

@ -1844,8 +1844,11 @@ If nothing is specified, the return value is nil."
(re-search-forward
"\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"
head-end t))
(display-warning 'mule "`unibyte: t' is obsolete; \
use \"coding: 'raw-text\" instead." :warning)
(display-warning 'mule
(format "\"unibyte: t\" (in %s) is obsolete; \
use \"coding: 'raw-text\" instead."
(file-relative-name filename))
:warning)
(setq coding-system 'raw-text))
(when (and (not coding-system)
(re-search-forward

View file

@ -1,4 +1,4 @@
;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*-
;;; china-util.el --- utilities for Chinese -*- coding: utf-8 -*-
;; Copyright (C) 1995, 2001-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,

View file

@ -1,4 +1,4 @@
;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*-
;;; chinese.el --- support for Chinese -*- coding: utf-8; -*-
;; Copyright (C) 2001-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@ -114,7 +114,7 @@
iso-2022-cn)
(input-method . "chinese-py-punct")
(features china-util)
(sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B")
(sample-text . "Chinese (中文,普通话,汉语) 你好")
(documentation . "Support for Chinese GB2312 character set.")
(tutorial . "TUTORIAL.cn"))
'("Chinese"))
@ -146,7 +146,7 @@
(input-method . "chinese-py-punct-b5")
(ctext-non-standard-encodings "big5-0")
(features china-util)
(sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B")
(sample-text . "Cantonese (粵語,廣東話) 早晨, 你好")
(documentation . "Support for Chinese Big5 character set.")
(tutorial . "TUTORIAL.zh"))
'("Chinese"))
@ -251,7 +251,7 @@ converted to CNS)."))
chinese-iso-8bit) ; fixme?
(ctext-non-standard-encodings "gbk-0")
(input-method . "chinese-py-punct") ; fixme?
(sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D95$B9%(B")
(sample-text . "Chinese (中文,普通话,汉语) 妳好")
(features china-util)
(documentation . "Support for Chinese GBK character set.")
(tutorial . "TUTORIAL.cn"))
@ -277,7 +277,7 @@ converted to CNS)."))
(coding-priority gb18030 gbk iso-2022-cn chinese-big5
chinese-iso-8bit) ; fixme?
(input-method . "chinese-py-punct") ; fixme?
(sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D0_$B9%(B")
(sample-text . "Chinese (中文,普通话,汉语) 你好")
(features china-util)
(documentation
. "Support for Chinese GB18030 character set.")

View file

@ -1,4 +1,4 @@
;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
;;; cyrillic.el --- support for Cyrillic -*- coding: utf-8; -*-
;; Copyright (C) 1997-1998, 2001-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@ -74,7 +74,7 @@
(nonascii-translation . iso-8859-5)
(unibyte-display . cyrillic-iso-8bit)
(features cyril-util)
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
(sample-text . "Russian (Русский) Здравствуйте!")
(documentation . "Support for Cyrillic ISO-8859-5."))
'("Cyrillic"))
@ -103,7 +103,7 @@
(input-method . "russian-typewriter")
(features cyril-util)
(unibyte-display . cyrillic-koi8)
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
(sample-text . "Russian (Русский) Здравствуйте!")
(documentation . "Support for Cyrillic KOI8-R."))
'("Cyrillic"))
@ -117,7 +117,7 @@
(input-method . "russian-computer")
(features cyril-util)
(unibyte-display . cyrillic-koi8)
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
(sample-text . "Russian (Русский) Здравствуйте!")
(documentation . "\
Support for Russian using koi8-r and the russian-computer input method.")
(tutorial . "TUTORIAL.ru"))
@ -158,7 +158,7 @@ Support for Russian using koi8-r and the russian-computer input method.")
(input-method . "russian-typewriter")
(features cyril-util)
(unibyte-display . cyrillic-alternativnyj)
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
(sample-text . "Russian (Русский) Здравствуйте!")
(documentation . "Support for Cyrillic ALTERNATIVNYJ."))
'("Cyrillic"))

View file

@ -1,9 +1,9 @@
;;; czech.el --- support for Czech -*- coding: iso-2022-7bit -*-
;;; czech.el --- support for Czech -*- coding: utf-8 -*-
;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Pavel Jan,Am(Bk <Pavel@Janik.cz>
;; Maintainer: Pavel Janík <Pavel@Janik.cz>
;; Keywords: multilingual, Czech
;; This file is part of GNU Emacs.
@ -35,7 +35,7 @@
(nonascii-translation . iso-8859-2)
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.cs")
(sample-text . "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!")
(sample-text . "Přejeme vám hezký den!")
(documentation . "\
This language environment is almost the same as Latin-2,
but sets the default input method to \"czech\",

View file

@ -1,4 +1,4 @@
;;; korean.el --- support for Korean -*- coding: iso-2022-7bit -*-
;;; korean.el --- support for Korean -*- coding: utf-8 -*-
;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@ -74,7 +74,7 @@
(input-method . "korean-hangul")
(features korea-util)
(coding-priority korean-iso-8bit korean-cp949 iso-2022-kr)
(sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")
(sample-text . "Hangul (한글) 안녕하세요, 안녕하십니까")
(documentation . "\
The following key bindings are available for controlling Korean input methods:
Shift-SPC, Hangul: toggle-korean-input-method

View file

@ -1,10 +1,10 @@
;;; slovak.el --- support for Slovak -*- coding: iso-2022-7bit -*-
;;; slovak.el --- support for Slovak -*- coding: utf-8 -*-
;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk>,
;; Authors: Tibor Šimko <tibor.simko@fmph.uniba.sk>,
;; Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Pavel Jan,Am(Bk <Pavel@Janik.cz>
;; Maintainer: Pavel Janík <Pavel@Janik.cz>
;; Keywords: multilingual, Slovak
;; This file is part of GNU Emacs.
@ -36,7 +36,7 @@
(input-method . "slovak")
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.sk")
(sample-text . "Prajeme V,Ba(Bm pr,Bm(Bjemn,B}(B de,Br(B!")
(sample-text . "Prajeme Vám príjemný deň!")
(documentation . "\
This language environment is almost the same as Latin-2,
but sets the default input method to \"slovak\",

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*-
;;; vietnamese.el --- support for Vietnamese -*- coding: utf-8; -*-
;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@ -80,7 +80,7 @@
(input-method . "vietnamese-viqr")
(unibyte-display . vietnamese-viscii)
(features viet-util)
(sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn")
(sample-text . "Vietnamese (Tiếng Việt) Chào bạn")
(documentation . "\
For Vietnamese, Emacs uses special charsets internally.
They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR

View file

@ -93,6 +93,49 @@ point at the click position."
:version "22.1"
:group 'mouse)
(defun mouse--down-1-maybe-follows-link (&optional _prompt)
"Turn `mouse-1' events into `mouse-2' events if follows-link.
Expects to be bound to `down-mouse-1' in `key-translation-map'."
(if (or (null mouse-1-click-follows-link)
(not (eq (if (eq mouse-1-click-follows-link 'double)
'double-down-mouse-1 'down-mouse-1)
(car-safe last-input-event)))
(not (mouse-on-link-p (event-start last-input-event)))
(and (not mouse-1-click-in-non-selected-windows)
(not (eq (selected-window)
(posn-window (event-start last-input-event))))))
nil
(let ((this-event last-input-event)
(timedout
(sit-for (if (numberp mouse-1-click-follows-link)
(/ (abs mouse-1-click-follows-link) 1000.0)
0))))
(if (if (and (numberp mouse-1-click-follows-link)
(>= mouse-1-click-follows-link 0))
timedout (not timedout))
nil
(let ((event (read-event)))
(if (eq (car-safe event) (if (eq mouse-1-click-follows-link 'double)
'double-mouse-1 'mouse-1))
;; Turn the mouse-1 into a mouse-2 to follow links.
(let ((newup (if (eq mouse-1-click-follows-link 'double)
'double-mouse-2 'mouse-2))
(newdown (if (eq mouse-1-click-follows-link 'double)
'double-down-mouse-2 'down-mouse-2)))
;; If mouse-2 has never been done by the user, it doesn't have
;; the necessary property to be interpreted correctly.
(put newup 'event-kind (get (car event) 'event-kind))
(put newdown 'event-kind (get (car this-event) 'event-kind))
(push (cons newup (cdr event)) unread-command-events)
(vector (cons newdown (cdr this-event))))
(push event unread-command-events)
nil))))))
(define-key key-translation-map [down-mouse-1]
#'mouse--down-1-maybe-follows-link)
(define-key key-translation-map [double-down-mouse-1]
#'mouse--down-1-maybe-follows-link)
;; Provide a mode-specific menu on a mouse button.
@ -418,8 +461,6 @@ must be one of the symbols `header', `mode', or `vertical'."
(window (posn-window start))
(frame (window-frame window))
(minibuffer-window (minibuffer-window frame))
(on-link (and mouse-1-click-follows-link
(mouse-on-link-p start)))
(side (and (eq line 'vertical)
(or (cdr (assq 'vertical-scroll-bars
(frame-parameters frame)))
@ -507,12 +548,6 @@ must be one of the symbols `header', `mode', or `vertical'."
(- growth)))))))
;; Process the terminating event.
(unless dragged
(when (and (mouse-event-p event) on-link
(mouse--remap-link-click-p start-event event))
;; If mouse-2 has never been done by the user, it doesn't have
;; the necessary property to be interpreted correctly.
(put 'mouse-2 'event-kind 'mouse-click)
(setcar event 'mouse-2))
(push event unread-command-events))))
(defun mouse-drag-mode-line (start-event)
@ -770,7 +805,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(setq mouse-selection-click-count-buffer (current-buffer))
(deactivate-mark)
(let* ((scroll-margin 0) ; Avoid margin scrolling (Bug#9541).
(original-window (selected-window))
;; We've recorded what we needed from the current buffer and
;; window, now let's jump to the place of the event, where things
;; are happening.
@ -788,15 +822,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(nth 3 bounds)
;; Don't count the mode line.
(1- (nth 3 bounds))))
(on-link (and mouse-1-click-follows-link
;; Use start-point before the intangibility
;; treatment, in case we click on a link inside
;; intangible text.
(mouse-on-link-p start-posn)))
(click-count (1- (event-click-count start-event)))
(remap-double-click (and on-link
(eq mouse-1-click-follows-link 'double)
(= click-count 1)))
;; Suppress automatic hscrolling, because that is a nuisance
;; when setting point near the right fringe (but see below).
(auto-hscroll-mode-saved auto-hscroll-mode)
@ -809,8 +835,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(if (< (point) start-point)
(goto-char start-point))
(setq start-point (point))
(if remap-double-click
(setq click-count 0))
;; Activate the region, using `mouse-start-end' to determine where
;; to put point and mark (e.g., double-click will select a word).
@ -900,21 +924,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(or end-point
(= (window-start start-window)
start-window-start)))
(when (and on-link
(= start-point (point))
(mouse--remap-link-click-p start-event event))
;; If we rebind to mouse-2, reselect previous selected
;; window, so that the mouse-2 event runs in the same
;; situation as if user had clicked it directly. Fixes
;; the bug reported by juri@jurta.org on 2005-12-27.
(if (or (vectorp on-link) (stringp on-link))
(setq event (aref on-link 0))
(select-window original-window)
(setcar event 'mouse-2)
;; If this mouse click has never been done by the
;; user, it doesn't have the necessary property to be
;; interpreted correctly.
(put 'mouse-2 'event-kind 'mouse-click)))
(push event unread-command-events)))))))
(defun mouse--drag-set-mark-and-point (start click click-count)
@ -932,22 +941,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(set-mark beg)
(goto-char end)))))
(defun mouse--remap-link-click-p (start-event end-event)
(or (and (eq mouse-1-click-follows-link 'double)
(= (event-click-count start-event) 2))
(and
(not (eq mouse-1-click-follows-link 'double))
(= (event-click-count start-event) 1)
(= (event-click-count end-event) 1)
(or (not (integerp mouse-1-click-follows-link))
(let ((t0 (posn-timestamp (event-start start-event)))
(t1 (posn-timestamp (event-end end-event))))
(and (integerp t0) (integerp t1)
(if (> mouse-1-click-follows-link 0)
(<= (- t1 t0) mouse-1-click-follows-link)
(< (- t0 t1) mouse-1-click-follows-link))))))))
;; Commands to handle xterm-style multiple clicks.
(defun mouse-skip-word (dir)
"Skip over word, over whitespace, or over identical punctuation.

View file

@ -54,11 +54,6 @@
:group 'comm
:version "20.3")
(defcustom net-utils-remove-ctl-m (memq system-type '(windows-nt msdos))
"If non-nil, remove control-Ms from output."
:group 'net-utils
:type 'boolean)
(defcustom traceroute-program
(if (eq system-type 'windows-nt)
"tracert"
@ -319,25 +314,17 @@ This variable is only used if the variable
(defun net-utils-remove-ctrl-m-filter (process output-string)
"Remove trailing control Ms."
(let ((old-buffer (current-buffer))
(filtered-string output-string))
(unwind-protect
(let ((moving))
(set-buffer (process-buffer process))
(let ((inhibit-read-only t))
(setq moving (= (point) (process-mark process)))
(while (string-match "\r" filtered-string)
(setq filtered-string
(replace-match "" nil nil filtered-string)))
(save-excursion
;; Insert the text, moving the process-marker.
(goto-char (process-mark process))
(insert filtered-string)
(set-marker (process-mark process) (point))))
(if moving (goto-char (process-mark process))))
(set-buffer old-buffer))))
(with-current-buffer (process-buffer process)
(save-excursion
(let ((inhibit-read-only t)
(filtered-string output-string))
(while (string-match "\r" filtered-string)
(setq filtered-string
(replace-match "" nil nil filtered-string)))
;; Insert the text, moving the process-marker.
(goto-char (process-mark process))
(insert filtered-string)
(set-marker (process-mark process) (point))))))
(defun net-utils-run-program (name header program args)
"Run a network information program."
@ -375,7 +362,6 @@ This variable is only used if the variable
(apply 'start-process program-name
(current-buffer) program-name args)
'net-utils-remove-ctrl-m-filter)
(goto-char (point-min))
(unless nodisplay (display-buffer (current-buffer)))))
(defun net-utils--revert-function (&optional ignore-auto noconfirm)

View file

@ -94,7 +94,8 @@
:group 'abbrev
:prefix "quickurl-")
(defcustom quickurl-url-file (convert-standard-filename "~/.quickurls")
(defcustom quickurl-url-file
(locate-user-emacs-file "quickurls" ".quickurls")
"File that contains the URL list."
:type 'file
:group 'quickurl)

File diff suppressed because it is too large Load diff

View file

@ -788,25 +788,6 @@ existence, and file readability. Input shall be read via
here-document, otherwise the command could exceed maximum length
of command line.")
(defconst tramp-file-mode-type-map
'((0 . "-") ; Normal file (SVID-v2 and XPG2)
(1 . "p") ; fifo
(2 . "c") ; character device
(3 . "m") ; multiplexed character device (v7)
(4 . "d") ; directory
(5 . "?") ; Named special file (XENIX)
(6 . "b") ; block device
(7 . "?") ; multiplexed block device (v7)
(8 . "-") ; regular file
(9 . "n") ; network special file (HP-UX)
(10 . "l") ; symlink
(11 . "?") ; ACL shadow inode (Solaris, not userspace)
(12 . "s") ; socket
(13 . "D") ; door special (Solaris)
(14 . "w")) ; whiteout (BSD)
"A list of file types returned from the `stat' system call.
This is used to map a mode number to a permission string.")
;; New handlers should be added here. The following operations can be
;; handled using the normal primitives: file-name-sans-versions,
;; get-file-buffer.
@ -2587,7 +2568,9 @@ This is like `dired-recursive-delete-directory' for Tramp files."
;; Decode the output, it could be multibyte.
(decode-coding-region
beg (point-max)
(or file-name-coding-system default-file-name-coding-system))
(or file-name-coding-system
(and (boundp 'default-file-name-coding-system)
(symbol-value 'default-file-name-coding-system))))
;; The inserted file could be from somewhere else.
(when (and (not wildcard) (not full-directory-p))
@ -4654,76 +4637,6 @@ Return ATTR."
(tramp-get-device vec))
attr))
(defun tramp-check-cached-permissions (vec access)
"Check `file-attributes' caches for VEC.
Return t if according to the cache access type ACCESS is known to
be granted."
(let ((result nil)
(offset (cond
((eq ?r access) 1)
((eq ?w access) 2)
((eq ?x access) 3))))
(dolist (suffix '("string" "integer") result)
(setq
result
(or
result
(let ((file-attr
(tramp-get-file-property
vec (tramp-file-name-localname vec)
(concat "file-attributes-" suffix) nil))
(remote-uid
(tramp-get-connection-property
vec (concat "uid-" suffix) nil))
(remote-gid
(tramp-get-connection-property
vec (concat "gid-" suffix) nil)))
(and
file-attr
(or
;; Not a symlink
(eq t (car file-attr))
(null (car file-attr)))
(or
;; World accessible.
(eq access (aref (nth 8 file-attr) (+ offset 6)))
;; User accessible and owned by user.
(and
(eq access (aref (nth 8 file-attr) offset))
(equal remote-uid (nth 2 file-attr)))
;; Group accessible and owned by user's
;; principal group.
(and
(eq access (aref (nth 8 file-attr) (+ offset 3)))
(equal remote-gid (nth 3 file-attr)))))))))))
(defun tramp-file-mode-from-int (mode)
"Turn an integer representing a file mode into an ls(1)-like string."
(let ((type (cdr
(assoc (logand (lsh mode -12) 15) tramp-file-mode-type-map)))
(user (logand (lsh mode -6) 7))
(group (logand (lsh mode -3) 7))
(other (logand (lsh mode -0) 7))
(suid (> (logand (lsh mode -9) 4) 0))
(sgid (> (logand (lsh mode -9) 2) 0))
(sticky (> (logand (lsh mode -9) 1) 0)))
(setq user (tramp-file-mode-permissions user suid "s"))
(setq group (tramp-file-mode-permissions group sgid "s"))
(setq other (tramp-file-mode-permissions other sticky "t"))
(concat type user group other)))
(defun tramp-file-mode-permissions (perm suid suid-text)
"Convert a permission bitset into a string.
This is used internally by `tramp-file-mode-from-int'."
(let ((r (> (logand perm 4) 0))
(w (> (logand perm 2) 0))
(x (> (logand perm 1) 0)))
(concat (or (and r "r") "-")
(or (and w "w") "-")
(or (and suid x suid-text) ; suid, execute
(and suid (upcase suid-text)) ; suid, !execute
(and x "x") "-")))) ; !suid
(defun tramp-shell-case-fold (string)
"Converts STRING to shell glob pattern which ignores case."
(mapconcat
@ -4992,14 +4905,6 @@ This is used internally by `tramp-file-mode-from-int'."
;; The command might not always return a number.
(if (and (equal id-format 'integer) (not (integerp res))) -1 res))))
(defun tramp-get-local-uid (id-format)
(if (equal id-format 'integer) (user-uid) (user-login-name)))
(defun tramp-get-local-gid (id-format)
(if (and (fboundp 'group-gid) (equal id-format 'integer))
(tramp-compat-funcall 'group-gid)
(nth 3 (tramp-compat-file-attributes "~/" id-format))))
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)
"Return the compress command related to PROP.

View file

@ -1505,12 +1505,18 @@ applicable)."
(concat (format "(%d) # " level) fmt-string)
args)))))))
(defsubst tramp-backtrace (vec-or-proc)
"Dump a backtrace into the debug buffer.
This function is meant for debugging purposes."
(tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
(defsubst tramp-error (vec-or-proc signal fmt-string &rest args)
"Emit an error.
VEC-OR-PROC identifies the connection to use, SIGNAL is the
signal identifier to be raised, remaining args passed to
`tramp-message'. Finally, signal SIGNAL is raised."
(let (tramp-message-show-message)
(tramp-backtrace vec-or-proc)
(tramp-message
vec-or-proc 1 "%s"
(error-message-string
@ -1543,11 +1549,6 @@ an input event arrives. The other arguments are passed to `tramp-error'."
"`M-x tramp-cleanup-this-connection'"))
(sit-for 30))))))
(defsubst tramp-backtrace (vec-or-proc)
"Dump a backtrace into the debug buffer.
This function is meant for debugging purposes."
(tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
(defmacro with-parsed-tramp-file-name (filename var &rest body)
"Parse a Tramp filename and make components available in the body.
@ -3660,6 +3661,107 @@ would yield `t'. On the other hand, the following check results in nil:
(t (error "Tenth char `%c' must be one of `xtT-'"
other-execute-or-sticky)))))))
(defconst tramp-file-mode-type-map
'((0 . "-") ; Normal file (SVID-v2 and XPG2)
(1 . "p") ; fifo
(2 . "c") ; character device
(3 . "m") ; multiplexed character device (v7)
(4 . "d") ; directory
(5 . "?") ; Named special file (XENIX)
(6 . "b") ; block device
(7 . "?") ; multiplexed block device (v7)
(8 . "-") ; regular file
(9 . "n") ; network special file (HP-UX)
(10 . "l") ; symlink
(11 . "?") ; ACL shadow inode (Solaris, not userspace)
(12 . "s") ; socket
(13 . "D") ; door special (Solaris)
(14 . "w")) ; whiteout (BSD)
"A list of file types returned from the `stat' system call.
This is used to map a mode number to a permission string.")
;;;###tramp-autoload
(defun tramp-file-mode-from-int (mode)
"Turn an integer representing a file mode into an ls(1)-like string."
(let ((type (cdr
(assoc (logand (lsh mode -12) 15) tramp-file-mode-type-map)))
(user (logand (lsh mode -6) 7))
(group (logand (lsh mode -3) 7))
(other (logand (lsh mode -0) 7))
(suid (> (logand (lsh mode -9) 4) 0))
(sgid (> (logand (lsh mode -9) 2) 0))
(sticky (> (logand (lsh mode -9) 1) 0)))
(setq user (tramp-file-mode-permissions user suid "s"))
(setq group (tramp-file-mode-permissions group sgid "s"))
(setq other (tramp-file-mode-permissions other sticky "t"))
(concat type user group other)))
(defun tramp-file-mode-permissions (perm suid suid-text)
"Convert a permission bitset into a string.
This is used internally by `tramp-file-mode-from-int'."
(let ((r (> (logand perm 4) 0))
(w (> (logand perm 2) 0))
(x (> (logand perm 1) 0)))
(concat (or (and r "r") "-")
(or (and w "w") "-")
(or (and suid x suid-text) ; suid, execute
(and suid (upcase suid-text)) ; suid, !execute
(and x "x") "-")))) ; !suid
;;;###tramp-autoload
(defun tramp-get-local-uid (id-format)
(if (equal id-format 'integer) (user-uid) (user-login-name)))
;;;###tramp-autoload
(defun tramp-get-local-gid (id-format)
(if (and (fboundp 'group-gid) (equal id-format 'integer))
(tramp-compat-funcall 'group-gid)
(nth 3 (tramp-compat-file-attributes "~/" id-format))))
;;;###tramp-autoload
(defun tramp-check-cached-permissions (vec access)
"Check `file-attributes' caches for VEC.
Return t if according to the cache access type ACCESS is known to
be granted."
(let ((result nil)
(offset (cond
((eq ?r access) 1)
((eq ?w access) 2)
((eq ?x access) 3))))
(dolist (suffix '("string" "integer") result)
(setq
result
(or
result
(let ((file-attr
(tramp-get-file-property
vec (tramp-file-name-localname vec)
(concat "file-attributes-" suffix) nil))
(remote-uid
(tramp-get-connection-property
vec (concat "uid-" suffix) nil))
(remote-gid
(tramp-get-connection-property
vec (concat "gid-" suffix) nil)))
(and
file-attr
(or
;; Not a symlink
(eq t (car file-attr))
(null (car file-attr)))
(or
;; World accessible.
(eq access (aref (nth 8 file-attr) (+ offset 6)))
;; User accessible and owned by user.
(and
(eq access (aref (nth 8 file-attr) offset))
(equal remote-uid (nth 2 file-attr)))
;; Group accessible and owned by user's
;; principal group.
(and
(eq access (aref (nth 8 file-attr) (+ offset 3)))
(equal remote-gid (nth 3 file-attr)))))))))))
;;;###tramp-autoload
(defun tramp-local-host-p (vec)
"Return t if this points to the local host, nil otherwise."

View file

@ -31,7 +31,7 @@
;; should be changed only there.
;;;###tramp-autoload
(defconst tramp-version "2.2.7-pre"
(defconst tramp-version "2.2.7"
"This version of Tramp.")
;;;###tramp-autoload
@ -44,7 +44,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
(format "Tramp 2.2.7-pre is not fit for %s"
(format "Tramp 2.2.7 is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))

View file

@ -5,7 +5,7 @@
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: languages
;; Version: 1.1
;; Version: 1.2
;; This file is part of GNU Emacs.
@ -58,6 +58,70 @@
:group 'cfengine
:type 'integer)
(defcustom cfengine-parameters-indent '(promise pname 0)
"*Indentation of CFEngine3 promise parameters (hanging indent).
For example, say you have this code:
bundle x y
{
section:
class::
promise ...
promiseparameter => ...
}
You can choose to indent promiseparameter from the beginning of
the line (absolutely) or from the word \"promise\" (relatively).
You can also choose to indent the start of the word
\"promiseparameter\" or the arrow that follows it.
Finally, you can choose the amount of the indent.
The default is to anchor at promise, indent parameter name, and offset 0:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}
Here we anchor at beginning of line, indent arrow, and offset 10:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}
Some, including cfengine_stdlib.cf, like to anchor at promise, indent
arrow, and offset 16 or so:
bundle agent rcfiles
{
files:
any::
\"/tmp/netrc\"
comment => \"my netrc\",
perms => mog(\"600\", \"tzz\", \"tzz\");
}
"
:group 'cfengine
:type '(list
(choice (const :tag "Anchor at beginning of promise" promise)
(const :tag "Anchor at beginning of line" bol))
(choice (const :tag "Indent parameter name" pname)
(const :tag "Indent arrow" arrow))
(integer :tag "Indentation amount from anchor")))
(defvar cfengine-mode-debug nil
"Whether `cfengine-mode' should print debugging info.")
@ -94,7 +158,7 @@ This includes those for cfservd as well as cfagent.")
(regexp-opt cfengine3-defuns t)
"Regex to match the CFEngine 3.x defuns.")
(defconst cfengine3-class-selector-regex "\\([[:alnum:]_().&|!]+\\)::")
(defconst cfengine3-class-selector-regex "\\([[:alnum:]_().&|!:]+\\)::")
(defconst cfengine3-category-regex "\\([[:alnum:]_]+\\):")
@ -126,8 +190,8 @@ This includes those for cfservd as well as cfagent.")
;; Defuns. This happens early so they don't get caught by looser
;; patterns.
(,(concat "\\<" cfengine3-defuns-regex "\\>"
"[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
"[ \t]+\\<\\([[:alnum:]_]+\\)"
"[ \t]+\\<\\([[:alnum:]_.:]+\\)\\>"
"[ \t]+\\<\\([[:alnum:]_.:]+\\)"
;; Optional parentheses with variable names inside.
"\\(?:(\\([^)]*\\))\\)?")
(1 font-lock-builtin-face)
@ -144,8 +208,8 @@ This includes those for cfservd as well as cfagent.")
1 font-lock-builtin-face)
;; Variables, including scope, e.g. module.var
("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face)
("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face)
("[@$](\\([[:alnum:]_.:]+\\))" 1 font-lock-variable-name-face)
("[@$]{\\([[:alnum:]_.:]+\\)}" 1 font-lock-variable-name-face)
;; Variable definitions.
("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face)
@ -305,10 +369,10 @@ Intended as the value of `indent-line-function'."
((looking-at (concat cfengine3-defuns-regex "\\>"))
(indent-line-to 0))
;; Categories are indented one step.
((looking-at (concat cfengine3-category-regex "[ \t]*$"))
((looking-at (concat cfengine3-category-regex "[ \t]*\\(#.*\\)*$"))
(indent-line-to cfengine-indent))
;; Class selectors are indented two steps.
((looking-at (concat cfengine3-class-selector-regex "[ \t]*$"))
((looking-at (concat cfengine3-class-selector-regex "[ \t]*\\(#.*\\)*$"))
(indent-line-to (* 2 cfengine-indent)))
;; Outdent leading close brackets one step.
((or (eq ?\} (char-after))
@ -317,6 +381,8 @@ Intended as the value of `indent-line-function'."
(indent-line-to (save-excursion
(forward-char)
(backward-sexp)
(move-beginning-of-line nil)
(skip-chars-forward " \t")
(current-column)))
(error nil)))
;; Inside a string and it starts before this line.
@ -331,7 +397,23 @@ Intended as the value of `indent-line-function'."
;; plus 2. That way, promises indent deeper than class
;; selectors, which in turn are one deeper than categories.
((= 1 (nth 0 parse))
(indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent)))
(let ((p-anchor (nth 0 cfengine-parameters-indent))
(p-what (nth 1 cfengine-parameters-indent))
(p-indent (nth 2 cfengine-parameters-indent)))
;; Do we have the parameter anchor and location and indent
;; defined, and are we looking at a promise parameter?
(if (and p-anchor p-what p-indent
(looking-at "\\([[:alnum:]_]+[ \t]*\\)=>"))
(let* ((arrow-offset (* -1 (length (match-string 1))))
(extra-offset (if (eq p-what 'arrow) arrow-offset 0))
(base-offset (if (eq p-anchor 'promise)
(* (+ 2 (nth 0 parse)) cfengine-indent)
0)))
(indent-line-to (max 0 (+ p-indent base-offset extra-offset))))
;; Else, indent to cfengine-indent times the nested depth
;; plus 2. That way, promises indent deeper than class
;; selectors, which in turn are one deeper than categories.
(indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent)))))
;; Inside brackets/parens: indent to start column of non-comment
;; token on line following open bracket or by one step from open
;; bracket's column.
@ -436,7 +518,8 @@ Intended as the value of `indent-line-function'."
;; The syntax defaults seem OK to give reasonable word movement.
(modify-syntax-entry ?# "<" table)
(modify-syntax-entry ?\n ">#" table)
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\" "\"" table) ; "string"
(modify-syntax-entry ?\' "\"" table) ; 'string'
;; Variable substitution.
(modify-syntax-entry ?$ "." table)
;; Doze path separators.
@ -475,7 +558,6 @@ to the action header."
;; Shell commands can be quoted by single, double or back quotes.
;; It's debatable whether we should define string syntax, but it
;; should avoid potential confusion in some cases.
(modify-syntax-entry ?\' "\"" cfengine2-mode-syntax-table)
(modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table)
(set (make-local-variable 'indent-line-function) #'cfengine2-indent-line)
@ -505,7 +587,7 @@ on the buffer contents"
(forward-line)))
(if v3 (cfengine3-mode) (cfengine2-mode))))
(defalias 'cfengine-mode 'cfengine-auto-mode)
(defalias 'cfengine-mode 'cfengine3-mode)
(provide 'cfengine3)
(provide 'cfengine)

View file

@ -1,4 +1,4 @@
;;; gdb-mi.el --- User Interface for running GDB
;;; gdb-mi.el --- User Interface for running GDB -*- lexical-binding: t -*-
;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
@ -192,8 +192,8 @@ address for root variables.")
(defvar gdb-disassembly-position nil)
(defvar gdb-location-alist nil
"Alist of breakpoint numbers and full filenames. Only used for files that
Emacs can't find.")
"Alist of breakpoint numbers and full filenames.
Only used for files that Emacs can't find.")
(defvar gdb-active-process nil
"GUD tooltips display variable values when t, and macro definitions otherwise.")
(defvar gdb-error "Non-nil when GDB is reporting an error.")
@ -227,9 +227,8 @@ This variable is updated in `gdb-done-or-error' and returned by
It is initialized to `gdb-non-stop-setting' at the beginning of
every GDB session.")
(defvar gdb-buffer-type nil
(defvar-local gdb-buffer-type nil
"One of the symbols bound in `gdb-buffer-rules'.")
(make-variable-buffer-local 'gdb-buffer-type)
(defvar gdb-output-sink 'nil
"The disposition of the output of the current gdb command.
@ -294,9 +293,7 @@ argument (see `gdb-emit-signal')."
(funcall (cdr subscriber) signal)))
(defvar gdb-buf-publisher '()
"Used to invalidate GDB buffers by emitting a signal in
`gdb-update'.
"Used to invalidate GDB buffers by emitting a signal in `gdb-update'.
Must be a list of pairs with cars being buffers and cdr's being
valid signal handlers.")
@ -327,8 +324,7 @@ valid signal handlers.")
"When in non-stop mode, stopped threads can be examined while
other threads continue to execute.
GDB session needs to be restarted for this setting to take
effect."
GDB session needs to be restarted for this setting to take effect."
:type 'boolean
:group 'gdb-non-stop
:version "23.2")
@ -336,19 +332,18 @@ effect."
;; TODO Some commands can't be called with --all (give a notice about
;; it in setting doc)
(defcustom gdb-gud-control-all-threads t
"When enabled, GUD execution commands affect all threads when
in non-stop mode. Otherwise, only current thread is affected."
"When non-nil, GUD execution commands affect all threads when
in non-stop mode. Otherwise, only current thread is affected."
:type 'boolean
:group 'gdb-non-stop
:version "23.2")
(defcustom gdb-switch-reasons t
"List of stop reasons which cause Emacs to switch to the thread
which caused the stop. When t, switch to stopped thread no matter
what the reason was. When nil, never switch to stopped thread
automatically.
"List of stop reasons for which Emacs should switch thread.
When t, switch to stopped thread no matter what the reason was.
When nil, never switch to stopped thread automatically.
This setting is used in non-stop mode only. In all-stop mode,
This setting is used in non-stop mode only. In all-stop mode,
Emacs always switches to the thread which caused the stop."
;; exited, exited-normally and exited-signaled are not
;; thread-specific stop reasons and therefore are not included in
@ -404,7 +399,7 @@ and GDB buffers were updated in `gdb-stopped'."
:link '(info-link "(gdb)GDB/MI Async Records"))
(defcustom gdb-switch-when-another-stopped t
"When nil, Emacs won't switch to stopped thread if some other
"When nil, don't switch to stopped thread if some other
stopped thread is already selected."
:type 'boolean
:group 'gdb-non-stop
@ -447,8 +442,7 @@ stopped thread is already selected."
:version "23.2")
(defcustom gdb-show-threads-by-default nil
"Show threads list buffer instead of breakpoints list by
default."
"Show threads list buffer instead of breakpoints list by default."
:type 'boolean
:group 'gdb-buffers
:version "23.2")
@ -490,12 +484,12 @@ predefined macros."
(defcustom gdb-create-source-file-list t
"Non-nil means create a list of files from which the executable was built.
Set this to nil if the GUD buffer displays \"initializing...\" in the mode
line for a long time when starting, possibly because your executable was
built from a large number of files. This allows quicker initialization
but means that these files are not automatically enabled for debugging,
e.g., you won't be able to click in the fringe to set a breakpoint until
execution has already stopped there."
Set this to nil if the GUD buffer displays \"initializing...\" in the mode
line for a long time when starting, possibly because your executable was
built from a large number of files. This allows quicker initialization
but means that these files are not automatically enabled for debugging,
e.g., you won't be able to click in the fringe to set a breakpoint until
execution has already stopped there."
:type 'boolean
:group 'gdb
:version "23.1")
@ -507,6 +501,9 @@ Also display the main routine in the disassembly buffer if present."
:group 'gdb
:version "22.1")
(defvar gdbmi-debug-mode nil
"When non-nil, print the messages sent/received from GDB/MI in *Messages*.")
(defun gdb-force-mode-line-update (status)
(let ((buffer gud-comint-buffer))
(if (and buffer (buffer-name buffer))
@ -570,7 +567,7 @@ When `gdb-non-stop' is nil, return COMMAND unchanged."
(defmacro gdb-gud-context-call (cmd1 &optional cmd2 noall noarg)
"`gud-call' wrapper which adds --thread/--all options between
CMD1 and CMD2. NOALL is the same as in `gdb-gud-context-command'.
CMD1 and CMD2. NOALL is the same as in `gdb-gud-context-command'.
NOARG must be t when this macro is used outside `gud-def'"
`(gud-call
@ -603,7 +600,7 @@ and source-file directory for your debugger.
COMMAND-LINE is the shell command for starting the gdb session.
It should be a string consisting of the name of the gdb
executable followed by command-line options. The command-line
executable followed by command line options. The command line
options should include \"-i=mi\" to use gdb's MI text interface.
Note that the old \"--annotate\" option is no longer supported.
@ -846,6 +843,8 @@ detailed description of this mode.
gdb-register-names '()
gdb-non-stop gdb-non-stop-setting)
;;
(gdbmi-bnf-init)
;;
(setq gdb-buffer-type 'gdbmi)
;;
(gdb-force-mode-line-update
@ -1254,7 +1253,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(cond
((> new previous)
;; Add new children to list.
(dotimes (dummy previous)
(dotimes (_ previous)
(push (pop temp-var-list) var-list))
(dolist (child children)
(let ((varchild
@ -1268,9 +1267,9 @@ With arg, enter name of variable to be watched in the minibuffer."
(push varchild var-list))))
;; Remove deleted children from list.
((< new previous)
(dotimes (dummy new)
(dotimes (_ new)
(push (pop temp-var-list) var-list))
(dotimes (dummy (- previous new))
(dotimes (_ (- previous new))
(pop temp-var-list)))))
(push var1 var-list))
(setq var1 (pop temp-var-list)))
@ -1502,7 +1501,7 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
(gdb-input
(concat "-inferior-tty-set " tty) 'ignore))))
(defun gdb-inferior-io-sentinel (proc str)
(defun gdb-inferior-io-sentinel (proc _str)
(when (eq (process-status proc) 'failed)
;; When the debugged process exits, Emacs gets an EIO error on
;; read from the pty, and stops listening to it. If the gdb
@ -1739,6 +1738,7 @@ complete."
(setq gdb-token-number (1+ gdb-token-number))
(setq command (concat (number-to-string gdb-token-number) command))
(push (cons gdb-token-number handler-function) gdb-handler-alist)
(if gdbmi-debug-mode (message "gdb-input: %s" command))
(process-send-string (get-buffer-process gud-comint-buffer)
(concat command "\n")))
@ -1761,8 +1761,7 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks."
"*"))
(defun gdb-current-context-mode-name (mode)
"Add thread information to MODE which is to be used as
`mode-name'."
"Add thread information to MODE which is to be used as `mode-name'."
(concat mode
(if gdb-thread-number
(format " [thread %s]" gdb-thread-number)
@ -1809,7 +1808,8 @@ If NO-PROC is non-nil, do not try to contact the GDB process."
;; because we may need to update current gud-running value without
;; changing current thread (see gdb-running)
(defun gdb-setq-thread-number (number)
"Only this function must be used to change `gdb-thread-number'
"Set `gdb-thread-number' to NUMBER.
Only this function must be used to change `gdb-thread-number'
value to NUMBER, because `gud-running' and `gdb-frame-number'
need to be updated appropriately when current thread changes."
;; GDB 6.8 and earlier always output thread-id="0" when stopping.
@ -1824,7 +1824,7 @@ need to be updated appropriately when current thread changes."
Note that when `gdb-gud-control-all-threads' is t, `gud-running'
cannot be reliably used to determine whether or not execution
control buttons should be shown in menu or toolbar. Use
control buttons should be shown in menu or toolbar. Use
`gdb-running-threads-count' and `gdb-stopped-threads-count'
instead.
@ -1874,23 +1874,337 @@ is running."
(set-window-buffer source-window buffer))
source-window))
(defun gdb-car< (a b)
(< (car a) (car b)))
(defvar gdbmi-record-list
'((gdb-gdb . "(gdb) \n")
(gdb-done . "\\([0-9]*\\)\\^done,?\\(.*?\\)\n")
(gdb-starting . "\\([0-9]*\\)\\^running\n")
(gdb-error . "\\([0-9]*\\)\\^error,\\(.*?\\)\n")
(gdb-console . "~\\(\".*?\"\\)\n")
(gdb-internals . "&\\(\".*?\"\\)\n")
(gdb-stopped . "\\*stopped,?\\(.*?\\)\n")
(gdb-running . "\\*running,\\(.*?\n\\)")
(gdb-thread-created . "=thread-created,\\(.*?\n\\)")
(gdb-thread-selected . "=thread-selected,\\(.*?\\)\n")
(gdb-thread-exited . "=thread-exited,\\(.*?\n\\)")
(gdb-ignored-notification . "=[-[:alpha:]]+,?\\(.*?\\)\n")
(gdb-shell . "\\(\\(?:^.+\n\\)+\\)")))
(defun gdbmi-start-with (str offset match)
"Return non-nil if string STR starts with MATCH, else returns nil.
OFFSET is the position in STR at which the comparison takes place."
(let ((match-length (length match))
(str-length (- (length str) offset)))
(when (>= str-length match-length)
(string-equal match (substring str offset (+ offset match-length))))))
(defun gdbmi-same-start (str offset match)
"Return non-nil iff STR and MATCH are equal up to the end of either strings.
OFFSET is the position in STR at which the comparison takes place."
(let* ((str-length (- (length str) offset))
(match-length (length match))
(compare-length (min str-length match-length)))
(when (> compare-length 0)
(string-equal (substring str offset (+ offset compare-length))
(substring match 0 compare-length)))))
(defun gdbmi-is-number (character)
"Return non-nil iff CHARACTER is a numerical character between 0 and 9."
(and (>= character ?0)
(<= character ?9)))
(defvar-local gdbmi-bnf-state 'gdbmi-bnf-output
"Current GDB/MI output parser state.
The parser is placed in a different state when an incomplete data steam is
received from GDB.
This variable will preserve the state required to resume the parsing
when more data arrives.")
(defvar-local gdbmi-bnf-offset 0
"Offset in `gud-marker-acc' at which the parser is reading.
This offset is used to be able to parse the GDB/MI message
in-place, without the need of copying the string in a temporary buffer
or discarding parsed tokens by substringing the message.")
(defun gdbmi-bnf-init ()
"Initialize the GDB/MI message parser."
(setq gdbmi-bnf-state 'gdbmi-bnf-output)
(setq gdbmi-bnf-offset 0)
(setq gud-marker-acc ""))
(defun gdbmi-bnf-output ()
"Implementation of the following GDB/MI output grammar rule:
output ==>
( out-of-band-record )* [ result-record ] gdb-prompt"
(gdbmi-bnf-skip-unrecognized)
(while (gdbmi-bnf-out-of-band-record))
(gdbmi-bnf-result-record)
(gdbmi-bnf-gdb-prompt))
(defun gdbmi-bnf-skip-unrecognized ()
"Skip characters until is encounters the beginning of a valid record.
Used as a protection mechanism in case something goes wrong when parsing
a GDB/MI reply message."
(let ((acc-length (length gud-marker-acc))
(prefix-offset gdbmi-bnf-offset)
(prompt "(gdb) \n"))
(while (and (< prefix-offset acc-length)
(gdbmi-is-number (aref gud-marker-acc prefix-offset)))
(setq prefix-offset (1+ prefix-offset)))
(if (and (< prefix-offset acc-length)
(not (memq (aref gud-marker-acc prefix-offset)
'(?^ ?* ?+ ?= ?~ ?@ ?&)))
(not (gdbmi-same-start gud-marker-acc gdbmi-bnf-offset prompt))
(string-match "\\([^^*+=~@&]+\\)" gud-marker-acc
gdbmi-bnf-offset))
(let ((unrecognized-str (match-string 0 gud-marker-acc)))
(setq gdbmi-bnf-offset (match-end 0))
(if gdbmi-debug-mode
(message "gdbmi-bnf-skip-unrecognized: %s" unrecognized-str))
(gdb-shell unrecognized-str)
t))))
(defun gdbmi-bnf-gdb-prompt ()
"Implementation of the following GDB/MI output grammar rule:
gdb-prompt ==>
'(gdb)' nl
nl ==>
CR | CR-LF"
(let ((prompt "(gdb) \n"))
(when (gdbmi-start-with gud-marker-acc gdbmi-bnf-offset prompt)
(if gdbmi-debug-mode (message "gdbmi-bnf-gdb-prompt: %s" prompt))
(gdb-gdb prompt)
(setq gdbmi-bnf-offset (+ gdbmi-bnf-offset (length prompt)))
;; Returns non-nil to tell gud-gdbmi-marker-filter we've reached
;; the end of a GDB reply message.
t)))
(defun gdbmi-bnf-result-record ()
"Implementation of the following GDB/MI output grammar rule:
result-record ==>
[ token ] '^' result-class ( ',' result )* nl
token ==>
any sequence of digits."
(gdbmi-bnf-result-and-async-record-impl))
(defun gdbmi-bnf-out-of-band-record ()
"Implementation of the following GDB/MI output grammar rule:
out-of-band-record ==>
async-record | stream-record"
(or (gdbmi-bnf-async-record)
(gdbmi-bnf-stream-record)))
(defun gdbmi-bnf-async-record ()
"Implementation of the following GDB/MI output grammar rules:
async-record ==>
exec-async-output | status-async-output | notify-async-output
exec-async-output ==>
[ token ] '*' async-output
status-async-output ==>
[ token ] '+' async-output
notify-async-output ==>
[ token ] '=' async-output
async-output ==>
async-class ( ',' result )* nl"
(gdbmi-bnf-result-and-async-record-impl))
(defun gdbmi-bnf-stream-record ()
"Implement the following GDB/MI output grammar rule:
stream-record ==>
console-stream-output | target-stream-output | log-stream-output
console-stream-output ==>
'~' c-string
target-stream-output ==>
'@' c-string
log-stream-output ==>
'&' c-string"
(when (< gdbmi-bnf-offset (length gud-marker-acc))
(if (and (member (aref gud-marker-acc gdbmi-bnf-offset) '(?~ ?@ ?&))
(string-match "\\([~@&]\\)\\(\".*?\"\\)\n" gud-marker-acc
gdbmi-bnf-offset))
(let ((prefix (match-string 1 gud-marker-acc))
(c-string (match-string 2 gud-marker-acc)))
(setq gdbmi-bnf-offset (match-end 0))
(if gdbmi-debug-mode (message "gdbmi-bnf-stream-record: %s"
(match-string 0 gud-marker-acc)))
(cond ((string-equal prefix "~")
(gdbmi-bnf-console-stream-output c-string))
((string-equal prefix "@")
(gdbmi-bnf-target-stream-output c-string))
((string-equal prefix "&")
(gdbmi-bnf-log-stream-output c-string)))
t))))
(defun gdbmi-bnf-console-stream-output (c-string)
"Handler for the console-stream-output GDB/MI output grammar rule."
(gdb-console c-string))
(defun gdbmi-bnf-target-stream-output (_c-string)
"Handler for the target-stream-output GDB/MI output grammar rule."
;; Not currently used.
)
(defun gdbmi-bnf-log-stream-output (c-string)
"Handler for the log-stream-output GDB/MI output grammar rule."
;; Suppress "No registers." GDB 6.8 and earlier
;; duplicates MI error message on internal stream.
;; Don't print to GUD buffer.
(if (not (string-equal (read c-string) "No registers.\n"))
(gdb-internals c-string)))
(defconst gdbmi-bnf-result-state-configs
'(("^" . (("done" . (gdb-done . progressive))
("error" . (gdb-error . progressive))
("running" . (gdb-starting . atomic))))
("*" . (("stopped" . (gdb-stopped . atomic))
("running" . (gdb-running . atomic))))
("+" . ())
("=" . (("thread-created" . (gdb-thread-created . atomic))
("thread-selected" . (gdb-thread-selected . atomic))
("thread-existed" . (gdb-ignored-notification . atomic))
('default . (gdb-ignored-notification . atomic)))))
"Alist of alists, mapping the type and class of message to a handler function.
Handler functions are all flagged as either `progressive' or `atomic'.
`progressive' handlers are capable of parsing incomplete messages.
They can be called several time with new data chunk as they arrive from GDB.
`progressive' handlers must have an extra argument that is set to a non-nil
value when the message is complete.
Implement the following GDB/MI output grammar rule:
result-class ==>
'done' | 'running' | 'connected' | 'error' | 'exit'
async-class ==>
'stopped' | others (where others will be added depending on the needs
--this is still in development).")
(defun gdbmi-bnf-result-and-async-record-impl ()
"Common implementation of the result-record and async-record rule.
Both rules share the same syntax. Those records may be very large in size.
For that reason, the \"result\" part of the record is parsed by
`gdbmi-bnf-incomplete-record-result', which will keep
receiving characters as they arrive from GDB until the record is complete."
(let ((acc-length (length gud-marker-acc))
(prefix-offset gdbmi-bnf-offset))
(while (and (< prefix-offset acc-length)
(gdbmi-is-number (aref gud-marker-acc prefix-offset)))
(setq prefix-offset (1+ prefix-offset)))
(if (and (< prefix-offset acc-length)
(member (aref gud-marker-acc prefix-offset) '(?* ?+ ?= ?^))
(string-match "\\([0-9]*\\)\\([*+=^]\\)\\(.+?\\)\\([,\n]\\)"
gud-marker-acc gdbmi-bnf-offset))
(let ((token (match-string 1 gud-marker-acc))
(prefix (match-string 2 gud-marker-acc))
(class (match-string 3 gud-marker-acc))
(complete (string-equal (match-string 4 gud-marker-acc) "\n"))
class-alist
class-command)
(setq gdbmi-bnf-offset (match-end 0))
(if gdbmi-debug-mode (message "gdbmi-bnf-result-record: %s"
(match-string 0 gud-marker-acc)))
(setq class-alist
(cdr (assoc prefix gdbmi-bnf-result-state-configs)))
(setq class-command (cdr (assoc class class-alist)))
(if (null class-command)
(setq class-command (cdr (assoc 'default class-alist))))
(if complete
(if class-command
(if (equal (cdr class-command) 'progressive)
(funcall (car class-command) token "" complete)
(funcall (car class-command) token "")))
(setq gdbmi-bnf-state
(lambda ()
(gdbmi-bnf-incomplete-record-result token class-command)))
(funcall gdbmi-bnf-state))
t))))
(defun gdbmi-bnf-incomplete-record-result (token class-command)
"State of the parser used to progressively parse a result-record or async-record
rule from an incomplete data stream. The parser will stay in this state until
the end of the current result or async record is reached."
(when (< gdbmi-bnf-offset (length gud-marker-acc))
;; Search the data stream for the end of the current record:
(let* ((newline-pos (string-match "\n" gud-marker-acc gdbmi-bnf-offset))
(is-progressive (equal (cdr class-command) 'progressive))
(is-complete (not (null newline-pos)))
result-str)
;; Update the gdbmi-bnf-offset only if the current chunk of data can
;; be processed by the class-command handler:
(when (or is-complete is-progressive)
(setq result-str
(substring gud-marker-acc gdbmi-bnf-offset newline-pos))
(setq gdbmi-bnf-offset (+ 1 newline-pos)))
(if gdbmi-debug-mode
(message "gdbmi-bnf-incomplete-record-result: %s"
(substring gud-marker-acc gdbmi-bnf-offset newline-pos)))
;; Update the parsing state before invoking the handler in class-command
;; to make sure it's not left in an invalid state if the handler was
;; to generate an error.
(if is-complete
(setq gdbmi-bnf-state 'gdbmi-bnf-output))
(if class-command
(if is-progressive
(funcall (car class-command) token result-str is-complete)
(if is-complete
(funcall (car class-command) token result-str))))
(unless is-complete
;; Incomplete gdb response: abort parsing until we receive more data.
(if gdbmi-debug-mode (message "gdbmi-bnf-incomplete-record-result, aborting: incomplete stream"))
(throw 'gdbmi-incomplete-stream nil))
is-complete)))
; The following grammar rules are not yet implemented by this GDBMI-BNF parser.
; The handling of those rules is currently done by the handlers registered
; in gdbmi-bnf-result-state-configs
;
; result ==>
; variable "=" value
;
; variable ==>
; string
;
; value ==>
; const | tuple | list
;
; const ==>
; c-string
;
; tuple ==>
; "{}" | "{" result ( "," result )* "}"
;
; list ==>
; "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]"
(defun gud-gdbmi-marker-filter (string)
"Filter GDB/MI output."
@ -1907,46 +2221,20 @@ is running."
;; Start accumulating output for the GUD buffer.
(setq gdb-filter-output "")
(let (output-record-list)
;; Process all the complete markers in this chunk.
(dolist (gdbmi-record gdbmi-record-list)
(while (string-match (cdr gdbmi-record) gud-marker-acc)
(push (list (match-beginning 0)
(car gdbmi-record)
(match-string 1 gud-marker-acc)
(match-string 2 gud-marker-acc)
(match-end 0))
output-record-list)
(setq gud-marker-acc
(concat (substring gud-marker-acc 0 (match-beginning 0))
;; Pad with spaces to preserve position.
(make-string (length (match-string 0 gud-marker-acc)) 32)
(substring gud-marker-acc (match-end 0))))))
(let ((acc-length (length gud-marker-acc)))
(catch 'gdbmi-incomplete-stream
(while (and (< gdbmi-bnf-offset acc-length)
(funcall gdbmi-bnf-state)))))
(setq output-record-list (sort output-record-list 'gdb-car<))
(when (/= gdbmi-bnf-offset 0)
(setq gud-marker-acc (substring gud-marker-acc gdbmi-bnf-offset))
(setq gdbmi-bnf-offset 0))
(dolist (output-record output-record-list)
(let ((record-type (cadr output-record))
(arg1 (nth 2 output-record))
(arg2 (nth 3 output-record)))
(cond ((eq record-type 'gdb-error)
(gdb-done-or-error arg2 arg1 'error))
((eq record-type 'gdb-done)
(gdb-done-or-error arg2 arg1 'done))
;; Suppress "No registers." GDB 6.8 and earlier
;; duplicates MI error message on internal stream.
;; Don't print to GUD buffer.
((not (and (eq record-type 'gdb-internals)
(string-equal (read arg1) "No registers.\n")))
(funcall record-type arg1)))))
(when (and gdbmi-debug-mode (> (length gud-marker-acc) 0))
(message "gud-gdbmi-marker-filter, unparsed string: %s" gud-marker-acc))
(setq gdb-output-sink 'user)
;; Remove padding.
(string-match "^ *" gud-marker-acc)
(setq gud-marker-acc (substring gud-marker-acc (match-end 0)))
gdb-filter-output))
gdb-filter-output)
(defun gdb-gdb (_output-field))
@ -1954,13 +2242,13 @@ is running."
(setq gdb-filter-output
(concat output-field gdb-filter-output)))
(defun gdb-ignored-notification (_output-field))
(defun gdb-ignored-notification (_token _output-field))
;; gdb-invalidate-threads is defined to accept 'update-threads signal
(defun gdb-thread-created (_output-field))
(defun gdb-thread-exited (output-field)
"Handle =thread-exited async record: unset `gdb-thread-number'
if current thread exited and update threads list."
(defun gdb-thread-created (_token _output-field))
(defun gdb-thread-exited (_token output-field)
"Handle =thread-exited async record.
Unset `gdb-thread-number' if current thread exited and update threads list."
(let* ((thread-id (bindat-get-field (gdb-json-string output-field) 'id)))
(if (string= gdb-thread-number thread-id)
(gdb-setq-thread-number nil))
@ -1971,7 +2259,7 @@ is running."
(gdb-wait-for-pending
(gdb-emit-signal gdb-buf-publisher 'update-threads))))
(defun gdb-thread-selected (output-field)
(defun gdb-thread-selected (_token output-field)
"Handler for =thread-selected MI output record.
Sets `gdb-thread-number' to new id."
@ -1988,7 +2276,7 @@ Sets `gdb-thread-number' to new id."
(gdb-wait-for-pending
(gdb-update))))
(defun gdb-running (output-field)
(defun gdb-running (_token output-field)
(let* ((thread-id
(bindat-get-field (gdb-json-string output-field) 'thread-id)))
;; We reset gdb-frame-number to nil if current thread has gone
@ -2006,7 +2294,7 @@ Sets `gdb-thread-number' to new id."
(setq gdb-active-process t)
(gdb-emit-signal gdb-buf-publisher 'update-threads))
(defun gdb-starting (_output-field)
(defun gdb-starting (_output-field _result)
;; CLI commands don't emit ^running at the moment so use gdb-running too.
(setq gdb-inferior-status "running")
(gdb-force-mode-line-update
@ -2020,7 +2308,7 @@ Sets `gdb-thread-number' to new id."
;; -break-insert -t didn't give a reason before gdb 6.9
(defun gdb-stopped (output-field)
(defun gdb-stopped (_token output-field)
"Given the contents of *stopped MI async record, select new
current thread and update GDB buffers."
;; Reason is available with target-async only
@ -2106,7 +2394,13 @@ current thread and update GDB buffers."
(setq gdb-filter-output
(gdb-concat-output gdb-filter-output (read output-field))))
(defun gdb-done-or-error (output-field token-number type)
(defun gdb-done (token-number output-field is-complete)
(gdb-done-or-error token-number 'done output-field is-complete))
(defun gdb-error (token-number output-field is-complete)
(gdb-done-or-error token-number 'error output-field is-complete))
(defun gdb-done-or-error (token-number type output-field is-complete)
(if (string-equal token-number "")
;; Output from command entered by user
(progn
@ -2122,14 +2416,12 @@ current thread and update GDB buffers."
;; Output from command from frontend.
(setq gdb-output-sink 'emacs))
(gdb-clear-partial-output)
;; The process may already be dead (e.g. C-d at the gdb prompt).
(let* ((proc (get-buffer-process gud-comint-buffer))
(no-proc (or (null proc)
(memq (process-status proc) '(exit signal)))))
(when gdb-first-done-or-error
(when (and is-complete gdb-first-done-or-error)
(unless (or token-number gud-running no-proc)
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
(gdb-update no-proc)
@ -2138,13 +2430,19 @@ current thread and update GDB buffers."
(setq gdb-filter-output
(gdb-concat-output gdb-filter-output output-field))
(when token-number
;; We are done concatenating to the output sink. Restore it to user sink:
(setq gdb-output-sink 'user)
(when (and token-number is-complete)
(with-current-buffer
(gdb-get-buffer-create 'gdb-partial-output-buffer)
(funcall
(cdr (assoc (string-to-number token-number) gdb-handler-alist))))
(setq gdb-handler-alist
(assq-delete-all token-number gdb-handler-alist)))))
(assq-delete-all token-number gdb-handler-alist)))
(when is-complete
(gdb-clear-partial-output))))
(defun gdb-concat-output (so-far new)
(cond
@ -2169,8 +2467,8 @@ Field names are wrapped in double quotes and equal signs are
replaced with semicolons.
If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurrences from
partial output. This is used to get rid of useless keys in lists
in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and
partial output. This is used to get rid of useless keys in lists
in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and
-break-info are examples of MI commands which issue such
responses.
@ -2337,16 +2635,16 @@ calling `gdb-table-string'."
handler-name
&optional signal-list)
"Define a trigger TRIGGER-NAME which sends GDB-COMMAND and sets
HANDLER-NAME as its handler. HANDLER-NAME is bound to current
HANDLER-NAME as its handler. HANDLER-NAME is bound to current
buffer with `gdb-bind-function-to-buffer'.
If SIGNAL-LIST is non-nil, GDB-COMMAND is sent only when the
defined trigger is called with an argument from SIGNAL-LIST. It's
defined trigger is called with an argument from SIGNAL-LIST. It's
not recommended to define triggers with empty SIGNAL-LIST.
Normally triggers should respond at least to 'update signal.
Normally the trigger defined by this command must be called from
the buffer where HANDLER-NAME must work. This should be done so
the buffer where HANDLER-NAME must work. This should be done so
that buffer-local thread number may be used in GDB-COMMAND (by
calling `gdb-current-context-command').
`gdb-bind-function-to-buffer' is used to achieve this, see
@ -2375,32 +2673,33 @@ Handlers are normally called from the buffers they put output in.
Delete ((current-buffer) . TRIGGER-NAME) from
`gdb-pending-triggers', erase current buffer and evaluate
CUSTOM-DEFUN. Then `gdb-update-buffer-name' is called.
CUSTOM-DEFUN. Then `gdb-update-buffer-name' is called.
If NOPRESERVE is non-nil, window point is not restored after CUSTOM-DEFUN."
`(defun ,handler-name ()
(gdb-delete-pending (cons (current-buffer) ',trigger-name))
(let* ((buffer-read-only nil)
(window (get-buffer-window (current-buffer) 0))
(start (window-start window))
(p (window-point window)))
(let* ((inhibit-read-only t)
,@(unless nopreserve
'((window (get-buffer-window (current-buffer) 0))
(start (window-start window))
(p (window-point window)))))
(erase-buffer)
(,custom-defun)
(gdb-update-buffer-name)
,(when (not nopreserve)
'(set-window-start window start)
'(set-window-point window p)))))
,@(when (not nopreserve)
'((set-window-start window start)
(set-window-point window p))))))
(defmacro def-gdb-trigger-and-handler (trigger-name gdb-command
handler-name custom-defun
&optional signal-list)
"Define trigger and handler.
TRIGGER-NAME trigger is defined to send GDB-COMMAND. See
`def-gdb-auto-update-trigger'.
TRIGGER-NAME trigger is defined to send GDB-COMMAND.
See `def-gdb-auto-update-trigger'.
HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
`def-gdb-auto-update-handler'."
HANDLER-NAME handler uses customization of CUSTOM-DEFUN.
See `def-gdb-auto-update-handler'."
`(progn
(def-gdb-auto-update-trigger ,trigger-name
,gdb-command
@ -2757,37 +3056,38 @@ corresponding to the mode line clicked."
gdb-running-threads-count
gdb-stopped-threads-count))
(gdb-table-add-row table
(list
(bindat-get-field thread 'id)
(concat
(if gdb-thread-buffer-verbose-names
(concat (bindat-get-field thread 'target-id) " ") "")
(bindat-get-field thread 'state)
;; Include frame information for stopped threads
(if (not running)
(concat
" in " (bindat-get-field thread 'frame 'func)
(if gdb-thread-buffer-arguments
(concat
" ("
(let ((args (bindat-get-field thread 'frame 'args)))
(mapconcat
(lambda (arg)
(apply #'format "%s=%s"
(gdb-get-many-fields arg 'name 'value)))
args ","))
")")
"")
(if gdb-thread-buffer-locations
(gdb-frame-location (bindat-get-field thread 'frame)) "")
(if gdb-thread-buffer-addresses
(concat " at " (bindat-get-field thread 'frame 'addr)) ""))
"")))
(list
'gdb-thread thread
'mouse-face 'highlight
'help-echo "mouse-2, RET: select thread")))
(gdb-table-add-row
table
(list
(bindat-get-field thread 'id)
(concat
(if gdb-thread-buffer-verbose-names
(concat (bindat-get-field thread 'target-id) " ") "")
(bindat-get-field thread 'state)
;; Include frame information for stopped threads
(if (not running)
(concat
" in " (bindat-get-field thread 'frame 'func)
(if gdb-thread-buffer-arguments
(concat
" ("
(let ((args (bindat-get-field thread 'frame 'args)))
(mapconcat
(lambda (arg)
(apply #'format "%s=%s"
(gdb-get-many-fields arg 'name 'value)))
args ","))
")")
"")
(if gdb-thread-buffer-locations
(gdb-frame-location (bindat-get-field thread 'frame)) "")
(if gdb-thread-buffer-addresses
(concat " at " (bindat-get-field thread 'frame 'addr)) ""))
"")))
(list
'gdb-thread thread
'mouse-face 'highlight
'help-echo "mouse-2, RET: select thread")))
(when (string-equal gdb-thread-number
(bindat-get-field thread 'id))
(setq marked-line (length gdb-threads-list))))
@ -2803,8 +3103,8 @@ corresponding to the mode line clicked."
"Define a NAME command which will act upon thread on the current line.
CUSTOM-DEFUN may use locally bound `thread' variable, which will
be the value of 'gdb-thread property of the current line. If
'gdb-thread is nil, error is signaled."
be the value of 'gdb-thread property of the current line.
If `gdb-thread' is nil, error is signaled."
`(defun ,name (&optional event)
,(when doc doc)
(interactive (list last-input-event))
@ -2953,7 +3253,7 @@ line."
(defun gdb-memory-column-width (size format)
"Return length of string with memory unit of SIZE in FORMAT.
SIZE is in bytes, as in `gdb-memory-unit'. FORMAT is a string as
SIZE is in bytes, as in `gdb-memory-unit'. FORMAT is a string as
in `gdb-memory-format'."
(let ((format-base (cdr (assoc format
'(("x" . 16)
@ -3455,8 +3755,7 @@ DOC is an optional documentation string."
(error "Not recognized as break/watchpoint line")))))
(defun gdb-goto-breakpoint (&optional event)
"Go to the location of breakpoint at current line of
breakpoints buffer."
"Go to the location of breakpoint at current line of breakpoints buffer."
(interactive (list last-input-event))
(if event (posn-set-point (event-end event)))
;; Hack to stop gdb-goto-breakpoint displaying in GUD buffer.
@ -3840,7 +4139,7 @@ member."
(defun gdb-get-source-file-list ()
"Create list of source files for current GDB session.
If buffers already exist for any of these files, gud-minor-mode
If buffers already exist for any of these files, `gud-minor-mode'
is set in them."
(goto-char (point-min))
(while (re-search-forward gdb-source-file-regexp nil t)
@ -3851,8 +4150,8 @@ is set in them."
(gdb-init-buffer)))))
(defun gdb-get-main-selected-frame ()
"Trigger for `gdb-frame-handler' which uses main current
thread. Called from `gdb-update'."
"Trigger for `gdb-frame-handler' which uses main current thread.
Called from `gdb-update'."
(if (not (gdb-pending-p 'gdb-get-main-selected-frame))
(progn
(gdb-input (gdb-current-context-command "-stack-info-frame")
@ -3860,7 +4159,7 @@ thread. Called from `gdb-update'."
(gdb-add-pending 'gdb-get-main-selected-frame))))
(defun gdb-frame-handler ()
"Sets `gdb-selected-frame' and `gdb-selected-file' to show
"Set `gdb-selected-frame' and `gdb-selected-file' to show
overlay arrow in source buffer."
(gdb-delete-pending 'gdb-get-main-selected-frame)
(let ((frame (bindat-get-field (gdb-json-partial-output) 'frame)))
@ -3921,8 +4220,8 @@ overlay arrow in source buffer."
(defun gdb-preempt-existing-or-display-buffer (buf &optional split-horizontal)
"Find window displaying a buffer with the same
`gdb-buffer-type' as BUF and show BUF there. If no such window
exists, just call `gdb-display-buffer' for BUF. If the window
`gdb-buffer-type' as BUF and show BUF there. If no such window
exists, just call `gdb-display-buffer' for BUF. If the window
found is already dedicated, split window according to
SPLIT-HORIZONTAL and show BUF in the new window."
(if buf
@ -4310,8 +4609,7 @@ CONTEXT is the text before COMMAND on the line."
(gud-gdb-fetch-lines-break (length context))
(gud-gdb-fetched-lines nil)
;; This filter dumps output lines to `gud-gdb-fetched-lines'.
(gud-marker-filter #'gud-gdbmi-fetch-lines-filter)
complete-list)
(gud-marker-filter #'gud-gdbmi-fetch-lines-filter))
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(gdb-input (concat "complete " context command)
(lambda () (setq gud-gdb-fetch-lines-in-progress nil)))

View file

@ -27,7 +27,7 @@
;;; Commentary:
;; IDLWAVE enables feature-rich development and interaction with IDL,
;; the Interactive Data Language. It provides a compelling,
;; the Interactive Data Language. It provides a compelling,
;; full-featured alternative to the IDLDE development environment
;; bundled with IDL.
@ -447,7 +447,7 @@ value of `!DIR'. See also `idlwave-library-path'."
;; Configuration files
(defcustom idlwave-config-directory
(convert-standard-filename "~/.idlwave")
(locate-user-emacs-file "idlwave" ".idlwave")
"Directory for configuration files and user-library catalog."
:group 'idlwave-routine-info
:type 'file)

View file

@ -310,7 +310,7 @@ See `run-hooks'."
"(" (regexp-opt
'("begin" "call-with-current-continuation" "call/cc"
"call-with-input-file" "call-with-output-file" "case" "cond"
"do" "else" "for-each" "if" "lambda"
"do" "else" "for-each" "if" "lambda" "λ"
"let" "let*" "let-syntax" "letrec" "letrec-syntax"
;; SRFI 11 usage comes up often enough.
"let-values" "let*-values"
@ -410,6 +410,7 @@ that variable's value is a string."
(put 'make 'scheme-indent-function 1)
(put 'style 'scheme-indent-function 1)
(put 'root 'scheme-indent-function 1)
(put 'scheme-indent-function 1)
(defvar dsssl-font-lock-keywords
(eval-when-compile

View file

@ -3,8 +3,8 @@
;; Copyright (C) 1998-2013 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Michael Mauger <mmaug@yahoo.com>
;; Version: 3.1
;; Maintainer: Michael Mauger <michael@mauger.com>
;; Version: 3.2
;; Keywords: comm languages processes
;; URL: http://savannah.gnu.org/projects/emacs/
@ -209,7 +209,7 @@
;; nino <nino@inform.dk>
;; Berend de Boer <berend@pobox.com>
;; Adam Jenkins <adam@thejenkins.org>
;; Michael Mauger <mmaug@yahoo.com> -- improved product support
;; Michael Mauger <michael@mauger.com> -- improved product support
;; Drew Adams <drew.adams@oracle.com> -- Emacs 20 support
;; Harald Maier <maierh@myself.com> -- sql-send-string
;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections;
@ -218,6 +218,9 @@
;; Andrew Schein <andrew@andrewschein.com> -- sql-port bug
;; Ian Bjorhovde <idbjorh@dataproxy.com> -- db2 escape newlines
;; incorrectly enabled by default
;; Roman Scherer <roman.scherer@nugg.ad> -- Connection documentation
;; Mark Wilkinson <wilkinsonmr@gmail.com> -- file-local variables ignored
;;
@ -605,11 +608,12 @@ Each element of the alist is as follows:
\(CONNECTION \(SQL-VARIABLE VALUE) ...)
Where CONNECTION is a symbol identifying the connection, SQL-VARIABLE
is the symbol name of a SQL mode variable, and VALUE is the value to
be assigned to the variable. The most common SQL-VARIABLE settings
associated with a connection are: `sql-product', `sql-user',
`sql-password', `sql-port', `sql-server', and `sql-database'.
Where CONNECTION is a case-insensitive string identifying the
connection, SQL-VARIABLE is the symbol name of a SQL mode
variable, and VALUE is the value to be assigned to the variable.
The most common SQL-VARIABLE settings associated with a
connection are: `sql-product', `sql-user', `sql-password',
`sql-port', `sql-server', and `sql-database'.
If a SQL-VARIABLE is part of the connection, it will not be
prompted for during login. The command `sql-connect' starts a
@ -1299,7 +1303,7 @@ Based on `comint-mode-map'.")
;; double quotes (") don't delimit strings
(modify-syntax-entry ?\" "." table)
;; Make these all punctuation
(mapc (lambda (c) (modify-syntax-entry c "." table))
(mapc #'(lambda (c) (modify-syntax-entry c "." table))
(string-to-list "!#$%&+,.:;<=>?@\\|"))
table)
"Syntax table used in `sql-mode' and `sql-interactive-mode'.")
@ -1509,7 +1513,7 @@ to add functions and PL/SQL keywords.")
(not (derived-mode-p 'sql-interactive-mode)))
(not sql-buffer)
(not (eq sql-product 'oracle)))
(error "Not an Oracle buffer")
(user-error "Not an Oracle buffer")
(let ((b "*RESERVED WORDS*"))
(sql-execute sql-buffer b
@ -1692,7 +1696,7 @@ to add functions and PL/SQL keywords.")
"noswitch" "not" "nothing" "notimeout" "novalidate" "nowait" "null"
"nulls" "object" "of" "off" "offline" "oidindex" "old" "on" "online"
"only" "open" "operator" "optimal" "option" "or" "order"
"organization" "out" "outer" "outline" "overflow" "overriding"
"organization" "out" "outer" "outline" "over" "overflow" "overriding"
"package" "packages" "parallel" "parallel_enable" "parameters"
"parent" "partition" "partitions" "password" "password_grace_time"
"password_life_time" "password_lock_time" "password_reuse_max"
@ -1745,7 +1749,7 @@ to add functions and PL/SQL keywords.")
;; Oracle PL/SQL Functions
(sql-font-lock-keywords-builder 'font-lock-builtin-face nil
"delete" "trim" "extend" "exists" "first" "last" "count" "limit"
"prior" "next"
"prior" "next" "sqlcode" "sqlerrm"
)
;; Oracle PL/SQL Reserved words
@ -2402,7 +2406,7 @@ highlighting rules in SQL mode.")
(let ((init (or (and initial (symbol-name initial)) "ansi")))
(intern (completing-read
prompt
(mapcar (lambda (info) (symbol-name (car info)))
(mapcar #'(lambda (info) (symbol-name (car info)))
sql-product-alist)
nil 'require-match
init 'sql-product-history init))))
@ -2418,7 +2422,7 @@ configuration."
;; Don't do anything if the product is already supported
(if (assoc product sql-product-alist)
(message "Product `%s' is already defined" product)
(user-error "Product `%s' is already defined" product)
;; Add product to the alist
(add-to-list 'sql-product-alist `((,product :name ,display . ,plist)))
@ -2437,11 +2441,11 @@ configuration."
;; after this product's name.
(let ((next-item)
(down-display (downcase display)))
(map-keymap (lambda (k b)
(when (and (not next-item)
(string-lessp down-display
(downcase (cadr b))))
(setq next-item k)))
(map-keymap #'(lambda (k b)
(when (and (not next-item)
(string-lessp down-display
(downcase (cadr b))))
(setq next-item k)))
(easy-menu-get-map sql-mode-menu '("Product")))
next-item))
product))
@ -2472,7 +2476,7 @@ argument must be a plist keyword accepted by
(symbolp v))
(set v newvalue)
(setcdr p (plist-put (cdr p) feature newvalue)))
(message "`%s' is not a known product; use `sql-add-product' to add it first." product))))
(error "`%s' is not a known product; use `sql-add-product' to add it first." product))))
(defun sql-get-product-feature (product feature &optional fallback not-indirect)
"Lookup FEATURE associated with a SQL PRODUCT.
@ -2502,7 +2506,7 @@ See `sql-product-alist' for a list of products and supported features."
(symbolp v))
(symbol-value v)
v))
(message "`%s' is not a known product; use `sql-add-product' to add it first." product)
(error "`%s' is not a known product; use `sql-add-product' to add it first." product)
nil)))
(defun sql-product-font-lock (keywords-only imenu)
@ -2543,13 +2547,13 @@ also be configured."
(font-lock-mode-internal t))
(add-hook 'font-lock-mode-hook
(lambda ()
;; Provide defaults for new font-lock faces.
(defvar font-lock-builtin-face
(if (boundp 'font-lock-preprocessor-face)
font-lock-preprocessor-face
font-lock-keyword-face))
(defvar font-lock-doc-face font-lock-string-face))
#'(lambda ()
;; Provide defaults for new font-lock faces.
(defvar font-lock-builtin-face
(if (boundp 'font-lock-preprocessor-face)
font-lock-preprocessor-face
font-lock-keyword-face))
(defvar font-lock-doc-face font-lock-string-face))
nil t)
;; Setup imenu; it needs the same syntax-alist.
@ -2592,10 +2596,10 @@ adds a fontification pattern to fontify identifiers ending in
"Iterate through login parameters and return a list of results."
(delq nil
(mapcar
(lambda (param)
(let ((token (or (car-safe param) param))
(plist (cdr-safe param)))
(funcall body token plist)))
#'(lambda (param)
(let ((token (or (car-safe param) param))
(plist (cdr-safe param)))
(funcall body token plist)))
login-params)))
@ -2604,8 +2608,8 @@ adds a fontification pattern to fontify identifiers ending in
(defun sql-product-syntax-table ()
(let ((table (copy-syntax-table sql-mode-syntax-table)))
(mapc (lambda (entry)
(modify-syntax-entry (car entry) (cdr entry) table))
(mapc #'(lambda (entry)
(modify-syntax-entry (car entry) (cdr entry) table))
(sql-get-product-feature sql-product :syntax-alist))
table))
@ -2613,10 +2617,10 @@ adds a fontification pattern to fontify identifiers ending in
(append
;; Change all symbol character to word characters
(mapcar
(lambda (entry) (if (string= (substring (cdr entry) 0 1) "_")
(cons (car entry)
(concat "w" (substring (cdr entry) 1)))
entry))
#'(lambda (entry) (if (string= (substring (cdr entry) 0 1) "_")
(cons (car entry)
(concat "w" (substring (cdr entry) 1)))
entry))
(sql-get-product-feature sql-product :syntax-alist))
'((?_ . "w"))))
@ -2639,7 +2643,7 @@ adds a fontification pattern to fontify identifiers ending in
(list (sql-read-product "SQL product: ")))
(if (stringp product) (setq product (intern product)))
(when (not (assoc product sql-product-alist))
(error "SQL product %s is not supported; treated as ANSI" product)
(user-error "SQL product %s is not supported; treated as ANSI" product)
(setq product 'ansi))
;; Save product setting and fontify.
@ -2765,6 +2769,7 @@ local variable."
(comint-bol nil)
(looking-at "go\\b")))
(comint-send-input)))
(put 'sql-magic-go 'delete-selection t)
(defun sql-magic-semicolon (arg)
"Insert semicolon and call `comint-send-input'.
@ -2773,6 +2778,7 @@ local variable."
(self-insert-command (prefix-numeric-value arg))
(if (equal sql-electric-stuff 'semicolon)
(comint-send-input)))
(put 'sql-magic-semicolon 'delete-selection t)
(defun sql-accumulate-and-indent ()
"Continue SQL statement on the next line."
@ -2861,6 +2867,15 @@ appended to the SQLi buffer without disturbing your SQL buffer."
t t doc 0)))
doc)
(defun sql-default-value (var)
"Fetch the value of a variable.
If the current buffer is in `sql-interactive-mode', then fetch
the global value, otherwise use the buffer local value."
(if (derived-mode-p 'sql-interactive-mode)
(default-value var)
(buffer-local-value var (current-buffer))))
(defun sql-get-login-ext (symbol prompt history-var plist)
"Prompt user with extended login parameters.
@ -2882,7 +2897,7 @@ value. (The property value is used as the PREDICATE argument to
(set-default
symbol
(let* ((default (plist-get plist :default))
(last-value (default-value symbol))
(last-value (sql-default-value symbol))
(prompt-def
(if default
(if (string-match "\\(\\):[ \t]*\\'" prompt)
@ -2950,7 +2965,7 @@ function like this: (sql-get-login 'user 'password 'database)."
(`password
(setq-default sql-password
(read-passwd "Password: " nil sql-password)))
(read-passwd "Password: " nil (sql-default-value 'sql-password))))
(`server
(sql-get-login-ext 'sql-server "Server: " 'sql-server-history plist))
@ -2978,10 +2993,10 @@ In order to qualify, the SQLi buffer must be alive, be in
(sql-buffer-live-p buf prod connection)
buf)
;; Look thru each buffer
(car (apply 'append
(mapcar (lambda (b)
(and (sql-buffer-live-p b prod connection)
(list (buffer-name b))))
(car (apply #'append
(mapcar #'(lambda (b)
(and (sql-buffer-live-p b prod connection)
(list (buffer-name b))))
(buffer-list)))))))
(defun sql-set-sqli-buffer-generally ()
@ -3022,10 +3037,10 @@ If you call it from anywhere else, it sets the global copy of
(interactive)
(let ((default-buffer (sql-find-sqli-buffer)))
(if (null default-buffer)
(error "There is no suitable SQLi buffer")
(user-error "There is no suitable SQLi buffer")
(let ((new-buffer (read-buffer "New SQLi buffer: " default-buffer t)))
(if (null (sql-buffer-live-p new-buffer))
(error "Buffer %s is not a working SQLi buffer" new-buffer)
(user-error "Buffer %s is not a working SQLi buffer" new-buffer)
(when new-buffer
(setq sql-buffer new-buffer)
(run-hooks 'sql-set-sqli-hook)))))))
@ -3038,10 +3053,10 @@ variable `sql-buffer'. See `sql-help' on how to create such a buffer."
(interactive)
(if (or (null sql-buffer)
(null (buffer-live-p (get-buffer sql-buffer))))
(message "%s has no SQLi buffer set." (buffer-name (current-buffer)))
(user-error "%s has no SQLi buffer set" (buffer-name (current-buffer)))
(if (null (get-buffer-process sql-buffer))
(message "Buffer %s has no process." sql-buffer)
(message "Current SQLi buffer is %s." sql-buffer))))
(user-error "Buffer %s has no process" sql-buffer)
(user-error "Current SQLi buffer is %s" sql-buffer))))
(defun sql-make-alternate-buffer-name ()
"Return a string that can be used to rename a SQLi buffer.
@ -3062,35 +3077,35 @@ server/database name."
;; Build a name using the :sqli-login setting
(setq name
(apply 'concat
(apply #'concat
(cdr
(apply 'append nil
(apply #'append nil
(sql-for-each-login
(sql-get-product-feature sql-product :sqli-login)
(lambda (token plist)
(pcase token
(`user
(unless (string= "" sql-user)
(list "/" sql-user)))
(`port
(unless (or (not (numberp sql-port))
(= 0 sql-port))
(list ":" (number-to-string sql-port))))
(`server
(unless (string= "" sql-server)
(list "."
(if (plist-member plist :file)
(file-name-nondirectory sql-server)
sql-server))))
(`database
(unless (string= "" sql-database)
(list "@"
(if (plist-member plist :file)
(file-name-nondirectory sql-database)
sql-database))))
#'(lambda (token plist)
(pcase token
(`user
(unless (string= "" sql-user)
(list "/" sql-user)))
(`port
(unless (or (not (numberp sql-port))
(= 0 sql-port))
(list ":" (number-to-string sql-port))))
(`server
(unless (string= "" sql-server)
(list "."
(if (plist-member plist :file)
(file-name-nondirectory sql-server)
sql-server))))
(`database
(unless (string= "" sql-database)
(list "@"
(if (plist-member plist :file)
(file-name-nondirectory sql-database)
sql-database))))
;; (`password nil)
(_ nil))))))))
;; (`password nil)
(_ nil))))))))
;; If there's a connection, use it and the name thus far
(if sql-connection
@ -3125,7 +3140,7 @@ NEW-NAME is empty, then the buffer name will be \"*SQL*\"."
(interactive "P")
(if (not (derived-mode-p 'sql-interactive-mode))
(message "Current buffer is not a SQL interactive buffer")
(user-error "Current buffer is not a SQL interactive buffer")
(setq sql-alternate-buffer-name
(cond
@ -3135,6 +3150,7 @@ NEW-NAME is empty, then the buffer name will be \"*SQL*\"."
sql-alternate-buffer-name))
(t sql-alternate-buffer-name)))
(setq sql-alternate-buffer-name (substring-no-properties sql-alternate-buffer-name))
(rename-buffer (if (string= "" sql-alternate-buffer-name)
"*SQL*"
(format "*SQL: %s*" sql-alternate-buffer-name))
@ -3222,7 +3238,7 @@ Allows the suppression of continuation prompts.")
(defun sql-input-sender (proc string)
"Send STRING to PROC after applying filters."
(let* ((product (with-current-buffer (process-buffer proc) sql-product))
(let* ((product (buffer-local-value 'sql-product (process-buffer proc)))
(filter (sql-get-product-feature product :input-filter)))
;; Apply filter(s)
@ -3232,15 +3248,13 @@ Allows the suppression of continuation prompts.")
((functionp filter)
(setq string (funcall filter string)))
((listp filter)
(mapc (lambda (f) (setq string (funcall f string))) filter))
(mapc #'(lambda (f) (setq string (funcall f string))) filter))
(t nil))
;; Count how many newlines in the string
(setq sql-output-newline-count 0)
(mapc (lambda (ch)
(when (eq ch ?\n)
(setq sql-output-newline-count (1+ sql-output-newline-count))))
string)
(setq sql-output-newline-count
(apply #'+ (mapcar #'(lambda (ch)
(if (eq ch ?\n) 1 0)) string)))
;; Send the string
(comint-simple-send proc string)))
@ -3320,7 +3334,7 @@ to avoid deleting non-prompt output."
(if sql-send-terminator
(sql-send-magic-terminator sql-buffer s sql-send-terminator))
(message "Sent string to buffer %s." sql-buffer)))
(message "Sent string to buffer %s" sql-buffer)))
;; Display the sql buffer
(if sql-pop-to-buffer-after-send-region
@ -3328,7 +3342,7 @@ to avoid deleting non-prompt output."
(display-buffer sql-buffer)))
;; We don't have no stinkin' sql
(message "No SQL process started."))))
(user-error "No SQL process started"))))
(defun sql-send-region (start end)
"Send a region to the SQL process."
@ -3421,7 +3435,7 @@ list of SQLi command strings."
(when visible
(message "Executing SQL command..."))
(if (consp command)
(mapc (lambda (c) (sql-redirect-one sqlbuf c outbuf save-prior))
(mapc #'(lambda (c) (sql-redirect-one sqlbuf c outbuf save-prior))
command)
(sql-redirect-one sqlbuf command outbuf save-prior))
(when visible
@ -3498,11 +3512,11 @@ for each match."
(match-string regexp-groups))
;; list of numbers; return the specified matches only
((consp regexp-groups)
(mapcar (lambda (c)
(cond
((numberp c) (match-string c))
((stringp c) (match-substitute-replacement c))
(t (error "sql-redirect-value: unknown REGEXP-GROUPS value - %s" c))))
(mapcar #'(lambda (c)
(cond
((numberp c) (match-string c))
((stringp c) (match-substitute-replacement c))
(t (error "sql-redirect-value: unknown REGEXP-GROUPS value - %s" c))))
regexp-groups))
;; String is specified; return replacement string
((stringp regexp-groups)
@ -3528,15 +3542,15 @@ strings are formatted with ARG and executed.
If the results are empty the OUTBUF is deleted, otherwise the
buffer is popped into a view window."
(mapc
(lambda (c)
(cond
((stringp c)
(sql-redirect sqlbuf (if arg (format c arg) c) outbuf) t)
((functionp c)
(apply c sqlbuf outbuf enhanced arg nil))
(t (error "Unknown sql-execute item %s" c))))
#'(lambda (c)
(cond
((stringp c)
(sql-redirect sqlbuf (if arg (format c arg) c) outbuf) t)
((functionp c)
(apply c sqlbuf outbuf enhanced arg nil))
(t (error "Unknown sql-execute item %s" c))))
(if (consp command) command (cons command nil)))
(setq outbuf (get-buffer outbuf))
(if (zerop (buffer-size outbuf))
(kill-buffer outbuf)
@ -3551,11 +3565,11 @@ buffer is popped into a view window."
(defun sql-execute-feature (sqlbuf outbuf feature enhanced arg)
"List objects or details in a separate display buffer."
(let (command)
(with-current-buffer sqlbuf
(setq command (sql-get-product-feature sql-product feature)))
(let (command
(product (buffer-local-value 'sql-product (get-buffer sqlbuf))))
(setq command (sql-get-product-feature product feature))
(unless command
(error "%s does not support %s" sql-product feature))
(error "%s does not support %s" product feature))
(when (consp command)
(setq command (if enhanced
(cdr command)
@ -3582,7 +3596,7 @@ The list is maintained in SQL interactive buffers.")
(apply f (current-buffer) (cons schema nil)))
cl)
(unless (member e cl) (setq cl (cons e cl))))
(sort cl (function string<)))))))
(sort cl #'string<))))))
(defun sql-build-completions (schema)
"Generate a list of names in the database for use as completions."
@ -3646,7 +3660,7 @@ details or extends the listing to include other schemas objects."
(interactive "P")
(let ((sqlbuf (sql-find-sqli-buffer)))
(unless sqlbuf
(error "No SQL interactive buffer found"))
(user-error "No SQL interactive buffer found"))
(sql-execute-feature sqlbuf "*List All*" :list-all enhanced nil)
(with-current-buffer sqlbuf
;; Contains the name of database objects
@ -3662,9 +3676,9 @@ ENHANCED, displays additional details about each column."
current-prefix-arg))
(let ((sqlbuf (sql-find-sqli-buffer)))
(unless sqlbuf
(error "No SQL interactive buffer found"))
(user-error "No SQL interactive buffer found"))
(unless name
(error "No table name specified"))
(user-error "No table name specified"))
(sql-execute-feature sqlbuf (format "*List %s*" name)
:list-table enhanced name)))
@ -3898,7 +3912,7 @@ Sentinels will always get the two parameters PROCESS and EVENT."
"Read a connection name."
(let ((completion-ignore-case t))
(completing-read prompt
(mapcar (lambda (c) (car c))
(mapcar #'(lambda (c) (car c))
sql-connection-alist)
nil t initial 'sql-connection-history default)))
@ -3917,7 +3931,7 @@ is specified in the connection settings."
(if sql-connection-alist
(list (sql-read-connection "Connection: " nil '(nil))
current-prefix-arg)
nil))
(user-error "No SQL Connections defined")))
;; Are there connections defined
(if sql-connection-alist
@ -3941,27 +3955,27 @@ is specified in the connection settings."
;; Params in the connection
(setq set-params
(mapcar
(lambda (v)
(pcase (car v)
(`sql-user 'user)
(`sql-password 'password)
(`sql-server 'server)
(`sql-database 'database)
(`sql-port 'port)
(s s)))
#'(lambda (v)
(pcase (car v)
(`sql-user 'user)
(`sql-password 'password)
(`sql-server 'server)
(`sql-database 'database)
(`sql-port 'port)
(s s)))
(cdr connect-set)))
;; the remaining params (w/o the connection params)
(setq rem-params
(sql-for-each-login login-params
(lambda (token plist)
(unless (member token set-params)
(if plist (cons token plist) token)))))
#'(lambda (token plist)
(unless (member token set-params)
(if plist (cons token plist) token)))))
;; Set the parameters and start the interactive session
(mapc
(lambda (vv)
(set-default (car vv) (eval (cadr vv))))
#'(lambda (vv)
(set-default (car vv) (eval (cadr vv))))
(cdr connect-set))
(setq-default sql-connection connection)
@ -3969,10 +3983,10 @@ is specified in the connection settings."
(eval `(let ((,param-var ',rem-params))
(sql-product-interactive ',sql-product ',new-name))))
(message "SQL Connection <%s> does not exist" connection)
(user-error "SQL Connection <%s> does not exist" connection)
nil)))
(message "No SQL Connections defined")
(user-error "No SQL Connections defined")
nil))
(defun sql-save-connection (name)
@ -3984,7 +3998,7 @@ optionally is saved to the user's init file."
(interactive "sNew connection name: ")
(unless (derived-mode-p 'sql-interactive-mode)
(error "Not in a SQL interactive mode!"))
(user-error "Not in a SQL interactive mode!"))
;; Capture the buffer local settings
(let* ((buf (current-buffer))
@ -4009,18 +4023,18 @@ optionally is saved to the user's init file."
;; Add the new connection if it doesn't exist
(if (assoc name alist)
(message "Connection <%s> already exists" name)
(user-error "Connection <%s> already exists" name)
(setq connect
(cons name
(sql-for-each-login
`(product ,@login)
(lambda (token _plist)
(pcase token
(`product `(sql-product ',product))
(`user `(sql-user ,user))
(`database `(sql-database ,database))
(`server `(sql-server ,server))
(`port `(sql-port ,port)))))))
#'(lambda (token _plist)
(pcase token
(`product `(sql-product ',product))
(`user `(sql-user ,user))
(`database `(sql-database ,database))
(`server `(sql-server ,server))
(`port `(sql-port ,port)))))))
(setq alist (append alist (list connect)))
@ -4033,21 +4047,20 @@ optionally is saved to the user's init file."
"Generate menu entries for using each connection."
(append
(mapcar
(lambda (conn)
(vector
(format "Connection <%s>\t%s" (car conn)
(let ((sql-user "") (sql-database "")
(sql-server "") (sql-port 0))
(eval `(let ,(cdr conn) (sql-make-alternate-buffer-name)))))
(list 'sql-connect (car conn))
t))
#'(lambda (conn)
(vector
(format "Connection <%s>\t%s" (car conn)
(let ((sql-user "") (sql-database "")
(sql-server "") (sql-port 0))
(eval `(let ,(cdr conn) (sql-make-alternate-buffer-name)))))
(list 'sql-connect (car conn))
t))
sql-connection-alist)
tail))
;;; Entry functions for different SQL interpreters.
;;;###autoload
(defun sql-product-interactive (&optional product new-name)
"Run PRODUCT interpreter as an inferior process.
@ -4140,7 +4153,7 @@ the call to \\[sql-product-interactive] with
;; All done.
(message "Login...done")
(pop-to-buffer new-sqli-buffer)))))
(message "No default SQL product defined. Set `sql-product'.")))
(user-error "No default SQL product defined. Set `sql-product'.")))
(defun sql-comint (product params)
"Set up a comint buffer to run the SQL processor.
@ -4164,7 +4177,7 @@ passed as command line arguments."
(setq buf-name (format "SQL-%s%d" product i))))
(setq i (1+ i))))))
(set-buffer
(apply 'make-comint buf-name program nil params))))
(apply #'make-comint buf-name program nil params))))
;;;###autoload
(defun sql-oracle (&optional buffer)
@ -4256,7 +4269,7 @@ The default comes from `process-coding-system-alist' and
;;
(append
;; (apply 'concat (append
;; (apply #'concat (append
;; '("SET")
;; option value...
@ -4304,8 +4317,8 @@ The default comes from `process-coding-system-alist' and
;; Remove any settings that haven't changed
(mapc
(lambda (one-cur-setting)
(setq saved-settings (delete one-cur-setting saved-settings)))
#'(lambda (one-cur-setting)
(setq saved-settings (delete one-cur-setting saved-settings)))
(sql-oracle-save-settings sqlbuf))
;; Restore the changed settings
@ -4822,10 +4835,10 @@ Try to set `comint-output-filter-functions' like this:
(sql-redirect sqlbuf "\\a"))
;; Return the list of table names (public schema name can be omitted)
(mapcar (lambda (tbl)
(if (string= (car tbl) "public")
(cadr tbl)
(format "%s.%s" (car tbl) (cadr tbl))))
(mapcar #'(lambda (tbl)
(if (string= (car tbl) "public")
(cadr tbl)
(format "%s.%s" (car tbl) (cadr tbl))))
cl))))

View file

@ -91,12 +91,7 @@ If BDFNAME doesn't exist, return nil."
(insert-file-contents bdfname)
buf))))
(defvar bdf-cache-file (if (eq system-type 'ms-dos)
;; convert-standard-filename doesn't
;; guarantee that the .el extension will be
;; preserved.
"~/_bdfcache.el"
(convert-standard-filename "~/.bdfcache.el"))
(defvar bdf-cache-file (locate-user-emacs-file "bdfcache.el" ".bdfcache.el")
"Name of cache file which contains information of `BDF' font files.")
(defvar bdf-cache nil

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