+2013-04-18 John Marino <gnugcc@marino.st> (tiny change)
+
+ * configure.ac: Add DragonFly BSD, mostly same as FreeBSD. (Bug#14068)
+
+2013-04-18 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (AC_PROG_LN_S): Remove, too restrictive.
+ (LN_S_FILEONLY): New output variable.
+ * Makefile.in (LN_S): Remove.
+ (LN_S_FILEONLY): New, set by configure.
+ (install-arch-dep): Use LN_S_FILEONLY rather than LN_S.
+
+2013-04-12 Ken Brown <kbrown@cornell.edu>
+
+ * configure.ac (canonical): Adapt to 64-bit Cygwin, for which
+ `canonical' is `x86_64-unknown-cygwin'.
+
2013-04-09 Ken Brown <kbrown@cornell.edu>
* configure.ac (W32_RES_LINK): Remove unneeded linker directive
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
MKDIR_P = @MKDIR_P@
-LN_S = @LN_S@
+# Create a link to a file in the same directory as the target.
+LN_S_FILEONLY = @LN_S_FILEONLY@
# We use gzip to compress installed .el files.
GZIP_PROG = @GZIP_PROG@
chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) || true; \
if test "x${NO_BIN_LINK}" = x; then \
rm -f $(DESTDIR)${bindir}/$(EMACS) ; \
- cd $(DESTDIR)${bindir} && $(LN_S) $(EMACSFULL) $(EMACS); \
+ cd $(DESTDIR)${bindir} && $(LN_S_FILEONLY) $(EMACSFULL) $(EMACS); \
fi; \
else \
subdir=${ns_appresdir}/site-lisp; \
LIB_PTHREAD = @LIB_PTHREAD@
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
LIB_TIMER_TIME = @LIB_TIMER_TIME@
-LN_S = @LN_S@
+LN_S_FILEONLY = @LN_S_FILEONLY@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
PAXCTL
GZIP_PROG
INSTALL_INFO
-LN_S
+LN_S_FILEONLY
GNULIB_WARN_CFLAGS
WARN_CFLAGS
WERROR_CFLAGS
opsys=freebsd
;;
+ ## DragonFly ports
+ *-*-dragonfly* )
+ opsys=dragonfly
+ ;;
+
## FreeBSD kernel + glibc based userland
*-*-kfreebsd*gnu* )
opsys=gnu-kfreebsd
## fi
;;
+ ## Cygwin ports
+ *-*-cygwin )
+ opsys=cygwin
+ ;;
+
## HP 9000 series 700 and 800, running HP/UX
hppa*-hp-hpux10.2* )
opsys=hpux10-20
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
case "${canonical}" in
- *-cygwin ) opsys=cygwin ;;
*-darwin* ) opsys=darwin ;;
*-sysv4.2uw* ) opsys=unixware ;;
*-sysv5uw* ) opsys=unixware ;;
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
+$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
+rm -f conf$$ conf$$.file
+
+LN_S_FILEONLY='cp -p'
+
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ LN_S_FILEONLY='ln -s'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ LN_S_FILEONLY=ln
+ fi
+fi
+
+rm -f conf$$ conf$$.file
+
+if test "$LN_S_FILEONLY" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
+$as_echo "no, using $LN_S_FILEONLY" >&6; }
fi
+
+
# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
LD_SWITCH_SYSTEM=
case "$opsys" in
- freebsd)
+ freebsd|dragonfly)
## Let `ld' find image libs and similar things in /usr/local/lib.
## The system compiler, GCC, has apparently been modified to not
## look there, contrary to what a stock GCC would do.
## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
- freebsd) LIBS_SYSTEM="-lutil" ;;
+ freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
## Adding -lm confuses the dynamic linker, so omit it.
LIB_MATH=
;;
- freebsd )
+ freebsd | dragonfly )
SYSTEM_TYPE=berkeley-unix
;;
gnu-linux | gnu-kfreebsd )
case "$opsys" in
aix4-2) mail_lock="lockf" ;;
- gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
+ gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
## On GNU/Linux systems, both methods are used by various mail programs.
## I assume most people are using newer mailers that have heard of flock.
fi
;;
- openbsd) LIBS_TERMCAP="-lncurses" ;;
+ openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
## hpux: Make sure we get select from libc rather than from libcurses
## because libcurses on HPUX 10.10 has a broken version of select.
esac
case $opsys in
- darwin | freebsd | netbsd | openbsd )
+ darwin | dragonfly | freebsd | netbsd | openbsd )
$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
;;
- gnu-linux | gnu-kfreebsd | freebsd | netbsd )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
if test "x$ac_cv_func_grantpt" = xyes; then
$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
case $opsys in
- aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
+ aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
$as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
;;
darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
;;
- gnu | freebsd | netbsd | openbsd )
+ gnu | dragonfly | freebsd | netbsd | openbsd )
$as_echo "#define TABDLY OXTABS" >>confdefs.h
else
case $opsys in
- freebsd | netbsd | openbsd | irix6-5 | sol2* )
+ dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
$as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
;;
opsys=freebsd
;;
+ ## DragonFly ports
+ *-*-dragonfly* )
+ opsys=dragonfly
+ ;;
+
## FreeBSD kernel + glibc based userland
*-*-kfreebsd*gnu* )
opsys=gnu-kfreebsd
## fi
;;
+ ## Cygwin ports
+ *-*-cygwin )
+ opsys=cygwin
+ ;;
+
## HP 9000 series 700 and 800, running HP/UX
hppa*-hp-hpux10.2* )
opsys=hpux10-20
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
case "${canonical}" in
- *-cygwin ) opsys=cygwin ;;
*-darwin* ) opsys=darwin ;;
*-sysv4.2uw* ) opsys=unixware ;;
*-sysv5uw* ) opsys=unixware ;;
dnl if test "x$RANLIB" = x; then
dnl AC_PROG_RANLIB
dnl fi
-AC_PROG_LN_S
+
+
+dnl Sadly, AC_PROG_LN_S is too restrictive. It also tests whether links
+dnl can be made to directories. This is not relevant for our usage, and
+dnl excludes some cases that work fine for us. Eg MS Windows or files
+dnl hosted on AFS, both examples where simple links work, but links to
+dnl directories fail. We use a cut-down version instead.
+dnl AC_PROG_LN_S
+
+AC_MSG_CHECKING([whether ln -s works for files in the same directory])
+rm -f conf$$ conf$$.file
+
+LN_S_FILEONLY='cp -p'
+
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ LN_S_FILEONLY='ln -s'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ LN_S_FILEONLY=ln
+ fi
+fi
+
+rm -f conf$$ conf$$.file
+
+if test "$LN_S_FILEONLY" = "ln -s"; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no, using $LN_S_FILEONLY])
+fi
+
+AC_SUBST(LN_S_FILEONLY)
+
AC_PATH_PROG(INSTALL_INFO, install-info, :,
$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin)
LD_SWITCH_SYSTEM=
case "$opsys" in
- freebsd)
+ freebsd|dragonfly)
## Let `ld' find image libs and similar things in /usr/local/lib.
## The system compiler, GCC, has apparently been modified to not
## look there, contrary to what a stock GCC would do.
## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
- freebsd) LIBS_SYSTEM="-lutil" ;;
+ freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
## Adding -lm confuses the dynamic linker, so omit it.
LIB_MATH=
;;
- freebsd )
+ freebsd | dragonfly )
SYSTEM_TYPE=berkeley-unix
;;
gnu-linux | gnu-kfreebsd )
case "$opsys" in
aix4-2) mail_lock="lockf" ;;
- gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
+ gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
## On GNU/Linux systems, both methods are used by various mail programs.
## I assume most people are using newer mailers that have heard of flock.
fi
;;
- openbsd) LIBS_TERMCAP="-lncurses" ;;
+ openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
## hpux: Make sure we get select from libc rather than from libcurses
## because libcurses on HPUX 10.10 has a broken version of select.
esac
case $opsys in
- darwin | freebsd | netbsd | openbsd )
+ darwin | dragonfly | freebsd | netbsd | openbsd )
AC_DEFINE(DONT_REOPEN_PTY, 1, [Define if process.c does not need to
close a pty to make it a controlling terminal (it is already a
controlling terminal of the subprocess, because we did ioctl TIOCSCTTY).])
AC_DEFINE(FIRST_PTY_LETTER, ['p'])
;;
- gnu-linux | gnu-kfreebsd | freebsd | netbsd )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
dnl if HAVE_GRANTPT
if test "x$ac_cv_func_grantpt" = xyes; then
AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
case $opsys in
dnl Perry Smith <pedz@ddivt1.austin.ibm.com> says this is correct for AIX.
dnl thomas@mathematik.uni-bremen.de says this is needed for IRIX.
- aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
+ aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
AC_DEFINE(SIGNALS_VIA_CHARACTERS, 1)
;;
case $opsys in
darwin) AC_DEFINE(TAB3, OXTABS) ;;
- gnu | freebsd | netbsd | openbsd )
+ gnu | dragonfly | freebsd | netbsd | openbsd )
AC_DEFINE(TABDLY, OXTABS, [Undocumented.])
AC_DEFINE(TAB3, OXTABS)
;;
else
case $opsys in
dnl irix: Tested on Irix 6.5. SCM worked on earlier versions.
- freebsd | netbsd | openbsd | irix6-5 | sol2* )
+ dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
AC_DEFINE(GC_SETJMP_WORKS, 1)
;;
esac
+2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com>
+
+ * tips.texi (Coding Conventions): Mention separation of package
+ descriptor and name of internal symbols by two hyphens.
+
+2013-04-13 Stephen Berman <stephen.berman@gmx.net>
+
+ * windows.texi (Splitting Windows): Change category of
+ split-window from a command to a function.
+
2013-04-06 Chong Yidong <cyd@gnu.org>
* display.texi (Faces): Minor clarifications.
@item
You should choose a short word to distinguish your program from other
-Lisp programs. The names of all global variables, constants, and
-functions in your program should begin with that chosen prefix.
-Separate the prefix from the rest of the name with a hyphen, @samp{-}.
-This practice helps avoid name conflicts, since all global variables
-in Emacs Lisp share the same name space, and all functions share
-another name space@footnote{The benefits of a Common Lisp-style
-package system are considered not to outweigh the costs.}.
+Lisp programs. The names of all global symbols in your program, that
+is the names of variables, constants, and functions, should begin with
+that chosen prefix. Separate the prefix from the rest of the name
+with a hyphen, @samp{-}. Use two hyphens if the symbol is not meant
+to be used by other packages. This practice helps avoid name
+conflicts, since all global variables in Emacs Lisp share the same
+name space, and all functions share another name space@footnote{The
+benefits of a Common Lisp-style package system are considered not to
+outweigh the costs.}.
Occasionally, for a command name intended for users to use, it is more
convenient if some words come before the package's name prefix. And
This section describes functions for creating a new window by
@dfn{splitting} an existing one.
-@deffn Command split-window &optional window size side
+@defun split-window &optional window size side
This function creates a new live window next to the window
@var{window}. If @var{window} is omitted or @code{nil}, it defaults
to the selected window. That window is ``split'', and reduced in
lieu of the usual action of @code{split-window}. Otherwise, this
function obeys the @code{window-atom} or @code{window-side} window
parameter, if any. @xref{Window Parameters}.
-@end deffn
+@end defun
As an example, here is a sequence of @code{split-window} calls that
yields the window configuration discussed in @ref{Windows and Frames}.
+2013-04-16 Michael Albinus <michael.albinus@gmx.de>
+
+ * tramp.texi (Frequently Asked Questions): Precise, how to define
+ an own ControlPath.
+
+2013-04-15 Michael Albinus <michael.albinus@gmx.de>
+
+ * tramp.texi (Frequently Asked Questions): New item for
+ ControlPath settings.
+
2013-03-31 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi: (Basic Operations on Units): Streamline some
@end example
+@item
+@value{tramp} does not use my @command{ssh} @code{ControlPath}
+
+Your @code{ControlPath} setting will be overwritten by @command{ssh}
+sessions initiated by @value{tramp}. This is because a master
+session, initiated outside @value{emacsname}, could be closed, which
+would stall all other @command{ssh} sessions for that host inside
+@value{emacsname}.
+
+Consequently, if you connect to a remote host via @value{tramp}, you
+might be prompted for a password again, even if you have established
+already an @command{ssh} connection to that host. Further
+@value{tramp} connections to that host, for example in order to run a
+process on that host, will reuse that initial @command{ssh}
+connection.
+
+If your @command{ssh} version supports the @code{ControlPersist}
+option, you could customize the variable
+@code{tramp-ssh-controlmaster-options} to use your @code{ControlPath},
+for example:
+
+@lisp
+(setq tramp-ssh-controlmaster-options
+ (concat
+ "-o ControlPath=/tmp/ssh-ControlPath-%%r@@%%h:%%p "
+ "-o ControlMaster=auto -o ControlPersist=yes"))
+@end lisp
+
+Note, that "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and
+"%%p", respectively. The entries of @code{ControlPath},
+@code{ControlMaster} and @code{ControlPersist} can be removed from
+this setting, if they are configured properly in your
+@file{~/.ssh/config}:
+
+@lisp
+(setq tramp-ssh-controlmaster-options "")
+@end lisp
+
+
@item
File name completion does not work with @value{tramp}
+2013-04-18 Leo Liu <sdl.web@gmail.com>
+
+ * NEWS: Mention new key ? for describe-prefix-bindings.
+
+2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com>
+
+ * NEWS: Mention separation of package descriptor and name of
+ internal symbols by two hyphens.
+
+2013-04-13 Stephen Berman <stephen.berman@gmx.net>
+
+ * NEWS: Mention fixing `split-window' to be non-interactive.
+
2013-04-09 Tassilo Horn <tsdh@gnu.org>
* themes/tsdh-dark-theme.el (tsdh-dark): Add some more faces.
\f
* Changes in Emacs 24.4
+** Key ? also describes prefix bindings like C-h.
+
+++
** `apropos-variable' is now `apropos-user-option'
`apropos-user-option' shows all user options while `apropos-variable'
\f
* Editing Changes in Emacs 24.4
+** `split-window' is no longer a command, just a non-interactive function.
+As a command it was a special case of `split-window-below', and as such
+superfluous. After being reimplemented in Lisp, its interactive form
+was mistakenly retained.
+
** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
bound to <f11> and M-<f10>, respectively.
\f
* Lisp Changes in Emacs 24.4
-** `dont-compile' is declared obsolete.
+** Obsoleted functions:
+*** `dont-compile'
+*** `lisp-complete-symbol'
+*** `field-complete'
+*** `minibuffer-completion-contents'
+
+** `with-wrapper-hook' is obsoleted by `add-function'.
+The few hooks that used with-wrapper-hook are replaced as follows:
+*** `abbrev-expand-function' obsoletes `abbrev-expand-functions'.
+*** `completion-in-region-function' obsoletes `completion-in-region-functions'.
+*** `filter-buffer-substring-function' obsoletes `filter-buffer-substring-functions'.
+
** `get-upcase-table' is obsoleted by the new `case-table-get-table'.
`preserve-extended-attributes' as it now handles both SELinux context
and ACL entries.
+** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4
+
+*** The package descriptor and name of global variables, constants,
+and functions should be separated by two hypens if the symbol is not
+meant to be used by other packages.
+
\f
* Changes in Emacs 24.4 on Non-Free Operating Systems
+2013-04-19 Masatake YAMATO <yamato@redhat.com>
+
+ * progmodes/sh-script.el (sh-imenu-generic-expression): Handle
+ function names with a single character. (Bug#11182)
+
+2013-04-19 Dima Kogan <dima@secretsauce.net> (tiny change)
+
+ * progmodes/gud.el (gud-perldb-marker-filter): Understand position info
+ for subroutines defined in an eval (bug#14182).
+
+2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com>
+
+ * bookmark.el (bookmark-completing-read): Improve handling of empty
+ string (bug#14176).
+
+2013-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-dispatcher.el (vc-do-command): Get rid of default sentinel msg.
+
+2013-04-19 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ New faster Imenu implementation (bug#14058).
+ * progmodes/python.el:
+ (python-imenu-prev-index-position):
+ (python-imenu-format-item-label-function)
+ (python-imenu-format-parent-item-label-function)
+ (python-imenu-format-parent-item-jump-label-function):
+ New vars.
+ (python-imenu-format-item-label)
+ (python-imenu-format-parent-item-label)
+ (python-imenu-format-parent-item-jump-label)
+ (python-imenu--put-parent, python-imenu--build-tree)
+ (python-imenu-create-index, python-imenu-create-flat-index)
+ (python-util-popn): New functions.
+ (python-mode): Set imenu-create-index-function to
+ python-imenu-create-index.
+
+2013-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * winner.el (winner-active-region): Use region-active-p, activate-mark
+ and deactivate-mark (bug#14225).
+
+ * simple.el (deactivate-mark): Don't inline it.
+
+2013-04-18 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-remote-process-environment): Add "TMOUT=0".
+
+2013-04-18 Tassilo Horn <tsdh@gnu.org>
+
+ * files.el (auto-mode-alist): Delete OpenDocument and StarOffice
+ file extensions from the archive-mode entry in order to prefer
+ doc-view-mode-maybe with archive-mode as fallback (bug#14188).
+
+2013-04-18 Leo Liu <sdl.web@gmail.com>
+
+ * bindings.el (help-event-list): Add ?\?.
+
+2013-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * subr.el (with-wrapper-hook): Declare obsolete.
+ * simple.el (filter-buffer-substring-function): New hook.
+ (filter-buffer-substring): Use it.
+ (filter-buffer-substring-functions): Mark obsolete.
+ * minibuffer.el (completion-in-region-function): New hook.
+ (completion-in-region): Use it.
+ (completion-in-region-functions): Mark obsolete.
+ * mail/mailabbrev.el (mail-abbrevs-setup): Use abbrev-expand-function.
+ * abbrev.el (abbrev-expand-function): New hook.
+ (expand-abbrev): Use it.
+ (abbrev-expand-functions): Mark obsolete.
+ * emacs-lisp/nadvice.el (advice--where-alist): Add :filter-args
+ and :filter-return.
+
+2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * progmodes/python.el (python-nav--syntactically): Fix cornercases
+ and do not care about match data.
+
+2013-04-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/lisp.el (lisp-completion-at-point): Provide specialized
+ completion tables when completing error conditions and
+ `declare' arguments.
+ (lisp-complete-symbol, field-complete): Mark as obsolete.
+ (check-parens): Unmatched parens are user errors.
+ * minibuffer.el (minibuffer-completion-contents): Mark as obsolete.
+
+2013-04-17 Michal Nazarewicz <mina86@mina86.com>
+
+ * textmodes/flyspell.el (flyspell-check-pre-word-p): Return nil if
+ command changed buffer (ie. `flyspell-pre-buffer' is not current
+ buffer), which prevents making decisions based on invalid value of
+ `flyspell-pre-point' in the wrong buffer. Most notably, this used to
+ cause an error when `flyspell-pre-point' was nil after switching
+ buffers.
+ (flyspell-post-command-hook): No longer needs to change buffers when
+ checking pre-word. While at it remove unnecessary progn.
+
+2013-04-17 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change)
+
+ * textmodes/ispell.el (ispell-add-per-file-word-list):
+ Fix `flyspell-correct-word-before-point' error when accepting
+ words and `coment-padding' is an integer by using
+ `comment-normalize-vars' (Bug #14214).
+
+2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ New defun movement commands.
+ * progmodes/python.el (python-nav--syntactically)
+ (python-nav--forward-defun, python-nav-backward-defun)
+ (python-nav-forward-defun): New functions.
+
+2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * progmodes/python.el (python-syntax--context-compiler-macro): New defun.
+ (python-syntax-context): Use named compiler-macro for backwards
+ compatibility with Emacs 24.x.
+
+2013-04-17 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/octave-mod.el (octave-mode-map): Fix key binding to
+ octave-hide-process-buffer.
+
+2013-04-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-hg.el (vc-hg-annotate-re): Disallow ": " in file names
+ (bug#14216).
+
+2013-04-17 Jean-Philippe Gravel <jpgravel@gmail.com>
+
+ * progmodes/gdb-mi.el (gdbmi-bnf-incomplete-record-result):
+ Fix adjustment of offset when receiving incomplete responses from GDB
+ (bug#14129).
+
+2013-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/python.el (python-mode-skeleton-abbrev-table): Rename from
+ python-mode-abbrev-table.
+ (python-skeleton-define): Adjust accordingly.
+ (python-mode-abbrev-table): New table that inherits from it so that
+ python-skeleton-autoinsert does not affect non-skeleton abbrevs.
+
+ * abbrev.el (abbrev--symbol): New function, extracted from abbrev-symbol.
+ (abbrev-symbol): Use it.
+ (abbrev--before-point): Use it since we already handle inheritance.
+
+2013-04-16 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/octave-mod.el (octave-mode-map): Remove redundant key
+ binding to info-lookup-symbol.
+
+2013-04-16 Juanma Barranquero <lekktu@gmail.com>
+
+ * minibuffer.el (completion--twq-all):
+ * term/ns-win.el (ns-initialize-window-system):
+ * term/w32-win.el (w32-initialize-window-system): Silence byte-compiler.
+
+2013-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/nadvice.el (add-function): Default simple vars to their
+ global bindings.
+
+ * doc-view.el (doc-view-start-process): Handle url-handler directories.
+
+2013-04-15 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-beginning-of-defun)
+ (ruby-end-of-defun, ruby-move-to-block): Bind `case-fold-search'
+ to nil.
+ (ruby-end-of-defun): Remove the unused arg, change the docstring
+ to reflect that this function is only used as the value of
+ `end-of-defun-function'.
+ (ruby-beginning-of-defun): Remove "top-level" from the docstring,
+ to reflect an earlier change that beginning/end-of-defun functions
+ jump between methods in a class definition, as well as top-level
+ functions.
+
+2013-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el (minibuffer-complete): Don't just scroll
+ a *Completions* that's been iconified.
+ (minibuffer-force-complete): Make sure repetitions do cycle when going
+ through completion-in-region -> minibuffer-complete.
+
+2013-04-15 Alan Mackenzie <acm@muc.de>
+
+ Correct the placement of c-cpp-delimiters when there're #s not at
+ col 0.
+
+ * progmodes/cc-langs.el (c-anchored-cpp-prefix): Reformulate and
+ place a submatch around the #.
+ * progmodes/cc-mode.el(c-neutralize-syntax-in-and-mark-CPP):
+ Start a search at BOL. Put the c-cpp-delimiter category text propertiy
+ on the #, not BOL.
+
+2013-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/nadvice.el: Properly test names when adding advice.
+ (advice--member-p): New arg `name'.
+ (advice--add-function, advice-member-p): Use it (bug#14202).
+
+2013-04-15 Filipp Gunbin <fgunbin@fastmail.fm>
+
+ Reformulate java imenu-generic-expression.
+ The old expression contained ill formed regexps.
+
+ * progmodes/cc-menus.el (cc-imenu-java-ellipsis-regexp)
+ (cc-imenu-java-type-spec-regexp, cc-imenu-java-comment-regexp)
+ (cc-imenu-java-method-arg-regexp): New defconsts.
+ (cc-imenu-java-build-type-args-regex): New defun.
+ (cc-imenu-java-generic-expression): Fix, to remove "ambiguous"
+ handling of spaces in the regexp.
+
+2013-03-15 Agustín Martín Domingo <agustin.martin@hispalinux.es>
+
+ * textmodes/ispell.el (ispell-command-loop): Remove
+ flyspell highlight of a word when ispell accepts it (bug #14178).
+
+2013-04-15 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/ange-ftp.el (ange-ftp-run-real-handler-orig): New defun,
+ uses code from the previous `ange-ftp-run-real-handler'.
+ (ange-ftp-run-real-handler): Set it to `tramp-run-real-handler'
+ only in case that function exist. This is needed for proper
+ unloading of Tramp.
+
+2013-04-15 Tassilo Horn <tsdh@gnu.org>
+
+ * textmodes/reftex-vars.el (reftex-label-regexps): New defcustom.
+
+ * textmodes/reftex.el (reftex-compile-variables): Use it.
+
+2013-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * files.el (normal-mode): Only use default major-mode if no other mode
+ was specified.
+
+ * emacs-lisp/trace.el (trace-values): New function.
+
+ * files.el: Allow : in local variables (bug#14089).
+ (hack-local-variable-regexp): New var.
+ (hack-local-variables-prop-line, hack-local-variables): Use it.
+
+2013-04-13 Roland Winkler <winkler@gnu.org>
+
+ * textmodes/bibtex.el (bibtex-search-entries): Bug fix. Use match
+ data before it gets modified by bibtex-beginning-of-entry.
+
+2013-04-13 Roland Winkler <winkler@gnu.org>
+
+ * textmodes/bibtex.el (bibtex-url): Doc fix.
+
+2013-04-13 Roland Winkler <winkler@gnu.org>
+
+ * textmodes/bibtex.el (bibtex-initialize): If the current buffer
+ does not visit a BibTeX file, exclude it from the list of buffers
+ returned by bibtex-initialize.
+
+2013-04-13 Stephen Berman <stephen.berman@gmx.net>
+
+ * window.el (split-window): Remove interactive form, since as a
+ command this function is a special case of split-window-below.
+ Correct doc string.
+
+2013-04-12 Roland Winkler <winkler@gnu.org>
+
+ * faces.el (read-face-name): Do not override value of arg default.
+ Allow single faces and strings as default values. Remove those
+ elements from return value that are not faces.
+ (describe-face): Simplify.
+ (face-at-point): New optional args thing and multiple so that this
+ function can provide the same functionality previously provided by
+ read-face-name.
+ (make-face-bold, make-face-unbold, make-face-italic)
+ (make-face-unitalic, make-face-bold-italic, invert-face)
+ (modify-face, read-face-and-attribute): Use face-at-point.
+
+ * cus-edit.el (customize-face, customize-face-other-window)
+ * cus-theme.el (custom-theme-add-face)
+ * face-remap.el (buffer-face-set)
+ * facemenu.el (facemenu-set-face): Use face-at-point.
+
+2013-04-12 Michael Albinus <michael.albinus@gmx.de>
+
+ * info.el (Info-file-list-for-emacs): Add "tramp" and "dbus".
+
+2013-04-10 Tassilo Horn <tsdh@gnu.org>
+
+ * textmodes/reftex-cite.el (reftex-parse-bibtex-entry): Don't cut
+ off leading { and trailing } from field values.
+
+2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/timer.el (timer--check): New function.
+ (timer--time, timer-set-function, timer-event-handler): Use it.
+ (timer-set-idle-time): Simplify.
+ (timer--activate): CSE.
+ (timer-event-handler): Give more info in error message.
+ (internal-timer-start-idle): New function, moved from C.
+
+ * mpc.el (mpc-proc): Add `restart' argument.
+ (mpc-proc-cmd): Use it.
+ (mpc--status-timer-run): Also catch signals from `mpc-proc'.
+ (mpc-status-buffer-show, mpc-tagbrowser-dir-toggle): Call `mpc-proc'
+ less often.
+
2013-04-10 Masatake YAMATO <yamato@redhat.com>
* progmodes/sh-script.el: Implement `sh-mode' own
* whitespace.el (whitespace-color-on, whitespace-color-off):
Only call `font-lock-fontify-buffer' when `font-lock-mode' is on.
-2013-04-05 Jacek Chrząszcz <chrzaszcz@mimuw.edu.pl> (tiny change)
+2013-04-05 Jacek Chrząszcz <chrzaszcz@mimuw.edu.pl> (tiny change)
* ispell.el (ispell-set-spellchecker-params):
Really set `ispell-args' for all equivs.
2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell/em-unix.el: Move su and sudo to...
- * eshell/em-tramp.el: ...Eshell tramp module
+ * eshell/em-tramp.el: ...Eshell tramp module.
2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/eieio-opt.el (eieio-class-button, eieio-describe-generic)
(eieio-browse-tree, eieio-browse): Use eieio--check-type.
-
2013-02-18 Aidan Gauland <aidalgol@no8wireless.co.nz>
* eshell/em-cmpl.el: Correct "context-related help" keybinding in
[scpc, rsyncc]: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
- (tramp-do-copy-or-rename-file-out-of-band): Change trace level.
+ (tramp-do-copy-or-rename-file-out-of-band): Change trace level.
(tramp-maybe-open-connection): Reuse tmpfile for ControlPath.
2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
2013-02-13 Jambunathan K <kjambunathan@gmail.com>
- * icomplete.el (icomplete-hide-common-prefix): New user option.
+ * icomplete.el (icomplete-hide-common-prefix): New user option.
(icomplete-first-match): New face.
(icomplete-completions): Correct handling of "complete but not
unique" (Bug#12638).
instead passing extra parameter HERE to several functions.
Remove 'BOD strategy.
-2013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change)
+2013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change)
* emacs-lisp/package.el (describe-package-1): Tell what archive is
used to install the package.
* xml.el (xml-entity-or-char-ref-re): Fix regexp.
-2013-01-24 Aaron Ecay <aaronecay@gmail.com> (tiny change)
+2013-01-24 Aaron Ecay <aaronecay@gmail.com> (tiny change)
* paren.el (show-paren-function): Make sure to set 'priority and
'face only if the overlay does exist.
2013-01-15 Michael R. Mauger <mmaug@yahoo.com>
- * progmodes/sql.el: (sql-imenu-generic-expression):
+ * progmodes/sql.el (sql-imenu-generic-expression):
(sql-mode-font-lock-object-name): Match schema qualified names.
(sql-connect): Use string keys.
(sql-product-interactive): Wait for interpreter prompt.
* calc/calc-forms.el (math-parse-date): Try using
`math-parse-iso-date' when it looks like it might be needed.
Allow times of 24:00.
- (math-parse-date-validate, math-parse-iso-date-validate): Allow times
+ (math-parse-date-validate, math-parse-iso-date-validate): Allow times
of 24:00.
2012-12-30 Glenn Morris <rgm@gnu.org>
(tramp-adb-get-toolbox): New defun. Check for remote shell
implementation (BusyBox or Toolbox).
-2012-12-24 Constantin Kulikov <zxnotdead@gmail.com> (tiny change)
+2012-12-24 Constantin Kulikov <zxnotdead@gmail.com> (tiny change)
* startup.el (initial-buffer-choice): Allow function as value
(Bug#13251).
Add `file-acl' and `set-file-acl' handlers.
(tramp-smb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES.
-2012-12-17 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
+2012-12-17 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
* help-macro.el (make-help-screen): Instead of switch-to-buffer
use pop-to-buffer with NORECORD argument t. As buffer name, use
2012-12-11 Jay Belanger <jay.p.belanger@gmail.com>
- * calc/calc.el (calc-standard-date-formats): Add more date
+ * calc/calc.el (calc-standard-date-formats): Add more date
formats.
* calc/calc-forms.el (math-parse-iso-date): New function.
(math-parse-date): Use `math-parse-iso-date' when appropriate.
* subr.el (inotify-event-p, inotify-handle-event): New functions.
-2012-12-10 Dani Moncayo <dmoncayo@gmail.com>
+2012-12-10 Dani Moncayo <dmoncayo@gmail.com>
* simple.el (just-one-space): Doc fix.
2012-11-19 Jay Belanger <jay.p.belanger@gmail.com>
- * calc/calc-forms.el (math-leap-year-p): Fix formula for negative
+ * calc/calc-forms.el (math-leap-year-p): Fix formula for negative
year numbers.
(math-date-to-julian-dt): Adjust the initial approximation for the
year to deal with the new definition of the DATE.
Recover input meta mode when the new coding system doesn not use 8-bit.
Supply TERMINAL arg to set-input-meta-mode.
-2012-10-17 Michael Heerdegen <michael_heerdegen@web.de>
+2012-10-17 Michael Heerdegen <michael_heerdegen@web.de>
* wdired.el (wdired-old-marks): New variable.
(wdired-change-to-wdired-mode): Locally set wdired-old-marks.
the current abbrev table before abbrev lookup happens."
:type 'hook
:group 'abbrev-mode)
-(make-obsolete-variable 'pre-abbrev-expand-hook 'abbrev-expand-functions "23.1")
+(make-obsolete-variable 'pre-abbrev-expand-hook 'abbrev-expand-function "23.1")
(defun clear-abbrev-table (table)
"Undefine all abbrevs in abbrev table TABLE, leaving it empty."
tables))))
+(defun abbrev--symbol (abbrev table)
+ "Return the symbol representing abbrev named ABBREV in TABLE.
+This symbol's name is ABBREV, but it is not the canonical symbol of that name;
+it is interned in the abbrev-table TABLE rather than the normal obarray.
+The value is nil if that abbrev is not defined."
+ (let* ((case-fold (not (abbrev-table-get table :case-fixed)))
+ ;; In case the table doesn't set :case-fixed but some of the
+ ;; abbrevs do, we have to be careful.
+ (sym
+ ;; First try without case-folding.
+ (or (intern-soft abbrev table)
+ (when case-fold
+ ;; We didn't find any abbrev, try case-folding.
+ (let ((sym (intern-soft (downcase abbrev) table)))
+ ;; Only use it if it doesn't require :case-fixed.
+ (and sym (not (abbrev-get sym :case-fixed))
+ sym))))))
+ (if (symbol-value sym)
+ sym)))
+
(defun abbrev-symbol (abbrev &optional table)
"Return the symbol representing abbrev named ABBREV.
This symbol's name is ABBREV, but it is not the canonical symbol of that name;
The default is to try buffer's mode-specific abbrev table, then global table."
(let ((tables (abbrev--active-tables table))
sym)
- (while (and tables (not (symbol-value sym)))
- (let* ((table (pop tables))
- (case-fold (not (abbrev-table-get table :case-fixed))))
+ (while (and tables (not sym))
+ (let* ((table (pop tables)))
(setq tables (append (abbrev-table-get table :parents) tables))
- ;; In case the table doesn't set :case-fixed but some of the
- ;; abbrevs do, we have to be careful.
- (setq sym
- ;; First try without case-folding.
- (or (intern-soft abbrev table)
- (when case-fold
- ;; We didn't find any abbrev, try case-folding.
- (let ((sym (intern-soft (downcase abbrev) table)))
- ;; Only use it if it doesn't require :case-fixed.
- (and sym (not (abbrev-get sym :case-fixed))
- sym)))))))
- (if (symbol-value sym)
- sym)))
+ (setq sym (abbrev--symbol abbrev table))))
+ sym))
(defun abbrev-expansion (abbrev &optional table)
(setq start (match-beginning 1))
(setq end (match-end 1)))))
(setq name (buffer-substring start end))
- (let ((abbrev (abbrev-symbol name table)))
+ (let ((abbrev (abbrev--symbol name table)))
(when abbrev
(setq enable-fun (abbrev-get abbrev :enable-function))
(and (or (not enable-fun) (funcall enable-fun))
value))
(defvar abbrev-expand-functions nil
- "Wrapper hook around `expand-abbrev'.
-The functions on this special hook are called with one argument:
-a function that performs the abbrev expansion. It should return
-the abbrev symbol if expansion took place.")
+ "Wrapper hook around `expand-abbrev'.")
+(make-obsolete-variable 'abbrev-expand-functions 'abbrev-expand-function "24.4")
+
+(defvar abbrev-expand-function #'abbrev--default-expand
+ "Function to perform abbrev expansion.
+Takes no argument and should return the abbrev symbol if expansion took place.")
(defun expand-abbrev ()
"Expand the abbrev before point, if there is an abbrev there.
return value is that of `abbrev-insert'.)"
(interactive)
(run-hooks 'pre-abbrev-expand-hook)
+ (funcall abbrev-expand-function))
+
+(defun abbrev--default-expand ()
(with-wrapper-hook abbrev-expand-functions ()
(pcase-let ((`(,sym ,name ,wordstart ,wordend) (abbrev--before-point)))
(when sym
(garbage-collect)
\f
-(setq help-event-list '(help f1))
+(setq help-event-list '(help f1 ?\?))
(make-variable-buffer-local 'minor-mode-overriding-map-alist)
"Prompting with PROMPT, read a bookmark name in completion.
PROMPT will get a \": \" stuck on the end no matter what, so you
probably don't want to include one yourself.
-Optional second arg DEFAULT is a string to return if the user enters
-the empty string."
+Optional arg DEFAULT is a string to return if the user input is empty.
+If DEFAULT is nil then return empty string for empty input."
(bookmark-maybe-load-default-file) ; paranoia
(if (listp last-nonmenu-event)
(bookmark-menu-popup-paned-menu t prompt
'string-lessp)
(bookmark-all-names)))
(let* ((completion-ignore-case bookmark-completion-ignore-case)
- (default default)
+ (default (unless (equal "" default) default))
(prompt (concat prompt (if default
(format " (%s): " default)
- ": ")))
- (str
- (completing-read prompt
- (lambda (string pred action)
- (if (eq action 'metadata)
- '(metadata (category . bookmark))
- (complete-with-action
- action bookmark-alist string pred)))
- nil
- 0
- nil
- 'bookmark-history)))
- (if (string-equal "" str) default str))))
+ ": "))))
+ (completing-read prompt
+ (lambda (string pred action)
+ (if (eq action 'metadata)
+ '(metadata (category . bookmark))
+ (complete-with-action
+ action bookmark-alist string pred)))
+ nil 0 nil 'bookmark-history default))))
(defmacro bookmark-maybe-historicize-string (string)
Interactively, when point is on text which has a face specified,
suggest to customize that face, if it's customizable."
- (interactive (list (read-face-name "Customize face" "all faces" t)))
+ (interactive (list (read-face-name "Customize face"
+ (or (face-at-point t t) "all faces") t)))
(if (member face '(nil ""))
(setq face (face-list)))
(if (and (listp face) (null (cdr face)))
Interactively, when point is on text which has a face specified,
suggest to customize that face, if it's customizable."
- (interactive (list (read-face-name "Customize face" "all faces" t)))
+ (interactive (list (read-face-name "Customize face"
+ (or (face-at-point t t) "all faces") t)))
(customize-face face t))
(defalias 'customize-customized 'customize-unsaved)
(defun custom-theme-add-face (face &optional spec)
"Add a widget for FACE (a symbol) to the *New Custom Theme* buffer.
SPEC, if non-nil, should be a face spec to which to set the widget."
- (interactive (list (read-face-name "Face name" nil nil) nil))
+ (interactive (list (read-face-name "Face name" (face-at-point t))))
(unless (or (facep face) spec)
(error "`%s' has no face definition" face))
(let ((entry (assq face custom-theme-faces)))
(defun doc-view-start-process (name program args callback)
;; Make sure the process is started in an existing directory, (rather than
;; some file-name-handler-managed dir, for example).
- (let* ((default-directory (if (file-readable-p default-directory)
- default-directory
+ (let* ((default-directory (or (unhandled-file-name-directory
+ default-directory)
(expand-file-name "~/")))
(proc (apply 'start-process name doc-view-conversion-buffer
program args)))
:group 'lisp)
(defvar forward-sexp-function nil
+ ;; FIXME:
+ ;; - for some uses, we may want a "sexp-only" version, which only
+ ;; jumps over a well-formed sexp, rather than some dwimish thing
+ ;; like jumping from an "else" back up to its "if".
+ ;; - for up-list, we could use the "sexp-only" behavior as well
+ ;; to treat the dwimish halfsexp as a form of "up-list" step.
"If non-nil, `forward-sexp' delegates to this function.
Should take the same arguments and behave similarly to `forward-sexp'.")
;; "Unbalanced parentheses", but those may not be so
;; accurate/helpful, e.g. quotes may actually be
;; mismatched.
- (error "Unmatched bracket or quote"))))
+ (user-error "Unmatched bracket or quote"))))
\f
(defun field-complete (table &optional predicate)
+ (declare (obsolete completion-in-region "24.4"))
(let ((minibuffer-completion-table table)
(minibuffer-completion-predicate predicate)
;; This made sense for lisp-complete-symbol, but for
symbols with function definitions are considered. Otherwise, all
symbols with function definitions, values or properties are
considered."
+ (declare (obsolete completion-at-point "24.4"))
(interactive)
(let* ((data (lisp-completion-at-point predicate))
(plist (nthcdr 3 data)))
(skip-syntax-forward "'")
(point))
(scan-error pos)))
- (predicate
- (or predicate
- (save-excursion
- (goto-char beg)
- (if (not (eq (char-before) ?\())
- (lambda (sym) ;why not just nil ? -sm
- (or (boundp sym) (fboundp sym)
- (symbol-plist sym)))
- ;; Looks like a funcall position. Let's double check.
- (if (condition-case nil
- (progn (up-list -2) (forward-char 1)
- (eq (char-after) ?\())
- (error nil))
- ;; If the first element of the parent list is an open
- ;; paren we are probably not in a funcall position.
- ;; Maybe a `let' varlist or something.
- nil
- ;; Else, we assume that a function name is expected.
- 'fboundp)))))
(end
(unless (or (eq beg (point-max))
(member (char-syntax (char-after beg)) '(?\" ?\( ?\))))
(forward-sexp 1)
(when (>= (point) pos)
(point)))
- (scan-error pos)))))
+ (scan-error pos))))
+ (funpos (eq (char-before beg) ?\()) ;t if in function position.
+ (table-etc
+ (if (not funpos)
+ ;; FIXME: We could look at the first element of the list and
+ ;; use it to provide a more specific completion table in some
+ ;; cases. E.g. filter out keywords that are not understood by
+ ;; the macro/function being called.
+ (list nil obarray ;Could be anything.
+ :annotation-function
+ (lambda (str) (if (fboundp (intern-soft str)) " <f>")))
+ ;; Looks like a funcall position. Let's double check.
+ (save-excursion
+ (goto-char (1- beg))
+ (let ((parent
+ (condition-case nil
+ (progn (up-list -1) (forward-char 1)
+ (let ((c (char-after)))
+ (if (eq c ?\() ?\(
+ (if (memq (char-syntax c) '(?w ?_))
+ (read (current-buffer))))))
+ (error nil))))
+ (pcase parent
+ ;; FIXME: Rather than hardcode special cases here,
+ ;; we should use something like a symbol-property.
+ (`declare
+ (list t (mapcar (lambda (x) (symbol-name (car x)))
+ (delete-dups
+ (append
+ macro-declarations-alist
+ defun-declarations-alist)))))
+ ((or `condition-case `condition-case-unless-debug)
+ (list t obarray
+ :predicate (lambda (sym) (get sym 'error-conditions))))
+ (_ (list nil obarray #'fboundp))))))))
(when end
- (list beg end obarray
- :predicate predicate
- :annotation-function
- (unless (eq predicate 'fboundp)
- (lambda (str) (if (fboundp (intern-soft str)) " <f>"))))))))
+ (let ((tail (if (null (car table-etc))
+ (cdr table-etc)
+ (cons
+ (if (memq (char-syntax (char-after end))
+ '(?\s ?>))
+ (cadr table-etc)
+ (apply-partially 'completion-table-with-terminator
+ " " (cadr table-etc)))
+ (cddr table-etc)))))
+ `(,beg ,end ,@tail))))))
;;; lisp.el ends here
(:after-until "\300\302\002\"\206\013\000\300\301\002\"\207" 4)
(:after-while "\300\302\002\"\205\013\000\300\301\002\"\207" 4)
(:before-until "\300\301\002\"\206\013\000\300\302\002\"\207" 4)
- (:before-while "\300\301\002\"\205\013\000\300\302\002\"\207" 4))
+ (:before-while "\300\301\002\"\205\013\000\300\302\002\"\207" 4)
+ (:filter-args "\300\302\301\ 3!\"\207" 5)
+ (:filter-return "\301\300\302\ 3\"!\207" 5))
"List of descriptions of how to add a function.
Each element has the form (WHERE BYTECODE STACK) where:
WHERE is a keyword indicating where the function is added.
(advice--make-1 (nth 1 desc) (nth 2 desc)
function main props)))
-(defun advice--member-p (function definition)
+(defun advice--member-p (function name definition)
(let ((found nil))
(while (and (not found) (advice--p definition))
(if (or (equal function (advice--car definition))
- (equal function (cdr (assq 'name (advice--props definition)))))
+ (when name
+ (equal name (cdr (assq 'name (advice--props definition))))))
(setq found t)
(setq definition (advice--cdr definition))))
found))
;;;###autoload
(defmacro add-function (where place function &optional props)
;; TODO:
- ;; - obsolete with-wrapper-hook (mostly requires buffer-local support).
;; - provide some kind of control over ordering. E.g. debug-on-entry, ELP
;; and tracing want to stay first.
;; - maybe let `where' specify some kind of predicate and use it
`:before-until' (lambda (&rest r) (or (apply FUNCTION r) (apply OLDFUN r)))
`:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r)))
`:after-until' (lambda (&rest r) (or (apply OLDFUN r) (apply FUNCTION r)))
+`:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r)))
+`:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r)))
If FUNCTION was already added, do nothing.
PROPS is an alist of additional properties, among which the following have
a special meaning:
- `name': a string or symbol. It can be used to refer to this piece of advice.
-PLACE cannot be a simple variable. Instead it should either be
-\(default-value 'VAR) or (local 'VAR) depending on whether FUNCTION
-should be applied to VAR buffer-locally or globally.
+If PLACE is a simple variable, only its global value will be affected.
+Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally.
If one of FUNCTION or OLDFUN is interactive, then the resulting function
is also interactive. There are 3 cases:
(cond ((eq 'local (car-safe place))
(setq place `(advice--buffer-local ,@(cdr place))))
((symbolp place)
- (error "Use (default-value '%S) or (local '%S)" place place)))
+ (setq place `(default-value ',place))))
`(advice--add-function ,where (gv-ref ,place) ,function ,props))
;;;###autoload
(defun advice--add-function (where ref function props)
- (unless (advice--member-p function (gv-deref ref))
+ (unless (advice--member-p function (cdr (assq 'name props))
+ (gv-deref ref))
(setf (gv-deref ref)
(advice--make where function (gv-deref ref) props))))
"Return non-nil if ADVICE has been added to FUNCTION-NAME.
Instead of ADVICE being the actual function, it can also be the `name'
of the piece of advice."
- (advice--member-p advice
+ (advice--member-p advice advice
(or (get function-name 'advice--pending)
(advice--strip-macro
(if (fboundp function-name)
;;; Code:
-;; Layout of a timer vector:
-;; [triggered-p high-seconds low-seconds usecs repeat-delay
-;; function args idle-delay psecs]
-;; triggered-p is nil if the timer is active (waiting to be triggered),
-;; t if it is inactive ("already triggered", in theory)
-
(eval-when-compile (require 'cl-lib))
(cl-defstruct (timer
- (:constructor nil)
- (:copier nil)
- (:constructor timer-create ())
- (:type vector)
- (:conc-name timer--))
+ (:constructor nil)
+ (:copier nil)
+ (:constructor timer-create ())
+ (:type vector)
+ (:conc-name timer--))
+ ;; nil if the timer is active (waiting to be triggered),
+ ;; non-nil if it is inactive ("already triggered", in theory).
(triggered t)
- high-seconds low-seconds usecs repeat-delay function args idle-delay psecs)
+ ;; Time of next trigger: for normal timers, absolute time, for idle timers,
+ ;; time relative to idle-start.
+ high-seconds low-seconds usecs
+ ;; For normal timers, time between repetitions, or nil. For idle timers,
+ ;; non-nil iff repeated.
+ repeat-delay
+ function args ;What to do when triggered.
+ idle-delay ;If non-nil, this is an idle-timer.
+ psecs)
(defun timerp (object)
"Return t if OBJECT is a timer."
(and (vectorp object) (= (length object) 9)))
+(defsubst timer--check (timer)
+ (or (timerp timer) (signal 'wrong-type-argument (list #'timerp timer))))
+
;; Pseudo field `time'.
(defun timer--time (timer)
(list (timer--high-seconds timer)
(gv-define-simple-setter timer--time
(lambda (timer time)
- (or (timerp timer) (error "Invalid timer"))
+ (timer--check timer)
(setf (timer--high-seconds timer) (pop time))
(let ((low time) (usecs 0) (psecs 0))
(if (consp time)
- (progn
- (setq low (pop time))
- (if time
- (progn
- (setq usecs (pop time))
- (if time
- (setq psecs (car time)))))))
+ (progn
+ (setq low (pop time))
+ (if time
+ (progn
+ (setq usecs (pop time))
+ (if time
+ (setq psecs (car time)))))))
(setf (timer--low-seconds timer) low)
(setf (timer--usecs timer) usecs)
(setf (timer--psecs timer) psecs))))
timer)
(defun timer-set-idle-time (timer secs &optional repeat)
+ ;; FIXME: Merge with timer-set-time.
"Set the trigger idle time of TIMER to SECS.
SECS may be an integer, floating point number, or the internal
time format returned by, e.g., `current-idle-time'.
If optional third argument REPEAT is non-nil, make the timer
fire each time Emacs is idle for that many seconds."
- (if (consp secs)
- (setf (timer--time timer) secs)
- (setf (timer--time timer) '(0 0 0))
- (timer-inc-time timer secs))
+ (setf (timer--time timer) (if (consp secs) secs (seconds-to-time secs)))
(setf (timer--repeat-delay timer) repeat)
timer)
(defun timer-set-function (timer function &optional args)
"Make TIMER call FUNCTION with optional ARGS when triggering."
- (or (timerp timer)
- (error "Invalid timer"))
+ (timer--check timer)
(setf (timer--function timer) function)
(setf (timer--args timer) args)
timer)
(setcdr reuse-cell timers))
(setq reuse-cell (cons timer timers)))
;; Insert new timer after last which possibly means in front of queue.
- (cond (last (setcdr last reuse-cell))
- (idle (setq timer-idle-list reuse-cell))
- (t (setq timer-list reuse-cell)))
+ (setf (cond (last (cdr last))
+ (idle timer-idle-list)
+ (t timer-list))
+ reuse-cell)
(setf (timer--triggered timer) triggered-p)
(setf (timer--idle-delay timer) idle)
nil)
(defun cancel-timer (timer)
"Remove TIMER from the list of active timers."
- (or (timerp timer)
- (error "Invalid timer"))
+ (timer--check timer)
(setq timer-list (delq timer timer-list))
(setq timer-idle-list (delq timer timer-idle-list))
nil)
(setq timer-event-last-1 timer-event-last)
(setq timer-event-last timer)
(let ((inhibit-quit t))
- (if (timerp timer)
- (let (retrigger cell)
- ;; Delete from queue. Record the cons cell that was used.
- (setq cell (cancel-timer-internal timer))
- ;; Re-schedule if requested.
- (if (timer--repeat-delay timer)
- (if (timer--idle-delay timer)
- (timer-activate-when-idle timer nil cell)
- (timer-inc-time timer (timer--repeat-delay timer) 0)
- ;; If real time has jumped forward,
- ;; perhaps because Emacs was suspended for a long time,
- ;; limit how many times things get repeated.
- (if (and (numberp timer-max-repeats)
- (< 0 (timer-until timer (current-time))))
- (let ((repeats (/ (timer-until timer (current-time))
- (timer--repeat-delay timer))))
- (if (> repeats timer-max-repeats)
- (timer-inc-time timer (* (timer--repeat-delay timer)
- repeats)))))
- (timer-activate timer t cell)
- (setq retrigger t)))
- ;; Run handler.
- ;; We do this after rescheduling so that the handler function
- ;; can cancel its own timer successfully with cancel-timer.
- (condition-case-unless-debug err
- ;; Timer functions should not change the current buffer.
- ;; If they do, all kinds of nasty surprises can happen,
- ;; and it can be hellish to track down their source.
- (save-current-buffer
- (apply (timer--function timer) (timer--args timer)))
- (error (message "Error in timer: %S" err)))
- (when (and retrigger
- ;; If the timer's been canceled, don't "retrigger" it
- ;; since it might still be in the copy of timer-list kept
- ;; by keyboard.c:timer_check (bug#14156).
- (memq timer timer-list))
- (setf (timer--triggered timer) nil)))
- (error "Bogus timer event"))))
+ (timer--check timer)
+ (let ((retrigger nil)
+ (cell
+ ;; Delete from queue. Record the cons cell that was used.
+ (cancel-timer-internal timer)))
+ ;; Re-schedule if requested.
+ (if (timer--repeat-delay timer)
+ (if (timer--idle-delay timer)
+ (timer-activate-when-idle timer nil cell)
+ (timer-inc-time timer (timer--repeat-delay timer) 0)
+ ;; If real time has jumped forward,
+ ;; perhaps because Emacs was suspended for a long time,
+ ;; limit how many times things get repeated.
+ (if (and (numberp timer-max-repeats)
+ (< 0 (timer-until timer (current-time))))
+ (let ((repeats (/ (timer-until timer (current-time))
+ (timer--repeat-delay timer))))
+ (if (> repeats timer-max-repeats)
+ (timer-inc-time timer (* (timer--repeat-delay timer)
+ repeats)))))
+ ;; Place it back on the timer-list before running
+ ;; timer--function, so it can cancel-timer itself.
+ (timer-activate timer t cell)
+ (setq retrigger t)))
+ ;; Run handler.
+ (condition-case-unless-debug err
+ ;; Timer functions should not change the current buffer.
+ ;; If they do, all kinds of nasty surprises can happen,
+ ;; and it can be hellish to track down their source.
+ (save-current-buffer
+ (apply (timer--function timer) (timer--args timer)))
+ (error (message "Error running timer%s: %S"
+ (if (symbolp (timer--function timer))
+ (format " `%s'" (timer--function timer)) "")
+ err)))
+ (when (and retrigger
+ ;; If the timer's been canceled, don't "retrigger" it
+ ;; since it might still be in the copy of timer-list kept
+ ;; by keyboard.c:timer_check (bug#14156).
+ (memq timer timer-list))
+ (setf (timer--triggered timer) nil)))))
;; This function is incompatible with the one in levents.el.
(defun timeout-event-p (event)
secs
(if (string-match-p "\\`[0-9.]+\\'" string)
(string-to-number string)))))
+
+(defun internal-timer-start-idle ()
+ "Mark all idle-time timers as once again candidates for running."
+ (dolist (timer timer-idle-list)
+ (if (timerp timer) ;; FIXME: Why test?
+ (setf (timer--triggered timer) nil))))
\f
(provide 'timer)
(defvar inhibit-trace nil
"If non-nil, all tracing is temporarily inhibited.")
+;;;###autoload
+(defun trace-values (&rest values)
+ "Helper function to get internal values.
+You can call this function to add internal values in the trace buffer."
+ (unless inhibit-trace
+ (with-current-buffer trace-buffer
+ (goto-char (point-max))
+ (insert
+ (trace-entry-message
+ 'trace-values trace-level values "")))))
+
(defun trace-entry-message (function level args context)
"Generate a string that describes that FUNCTION has been entered.
LEVEL is the trace level, ARGS is the list of arguments passed to FUNCTION,
This function makes the variable `buffer-face-mode-face' buffer
local, and sets it to FACE."
- (interactive (list (read-face-name "Set buffer face")))
+ (interactive (list (read-face-name "Set buffer face" (face-at-point t))))
(while (and (consp specs) (null (cdr specs)))
(setq specs (car specs)))
(if (null specs)
if `facemenu-listed-faces' says to do that."
(interactive (list (progn
(barf-if-buffer-read-only)
- (read-face-name "Use face"))
+ (read-face-name "Use face" (face-at-point t)))
(if (and mark-active (not current-prefix-arg))
(region-beginning))
(if (and mark-active (not current-prefix-arg))
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
Use `set-face-attribute' for finer control of the font weight."
- (interactive (list (read-face-name "Make which face bold")))
+ (interactive (list (read-face-name "Make which face bold"
+ (face-at-point t))))
(set-face-attribute face frame :weight 'bold))
"Make the font of FACE be non-bold, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility."
- (interactive (list (read-face-name "Make which face non-bold")))
+ (interactive (list (read-face-name "Make which face non-bold"
+ (face-at-point t))))
(set-face-attribute face frame :weight 'normal))
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
Use `set-face-attribute' for finer control of the font slant."
- (interactive (list (read-face-name "Make which face italic")))
+ (interactive (list (read-face-name "Make which face italic"
+ (face-at-point t))))
(set-face-attribute face frame :slant 'italic))
"Make the font of FACE be non-italic, if possible.
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility."
- (interactive (list (read-face-name "Make which face non-italic")))
+ (interactive (list (read-face-name "Make which face non-italic"
+ (face-at-point t))))
(set-face-attribute face frame :slant 'normal))
FRAME nil or not specified means change face on all frames.
Argument NOERROR is ignored and retained for compatibility.
Use `set-face-attribute' for finer control of font weight and slant."
- (interactive (list (read-face-name "Make which face bold-italic")))
+ (interactive (list (read-face-name "Make which face bold-italic"
+ (face-at-point t))))
(set-face-attribute face frame :weight 'bold :slant 'italic))
If FACE specifies neither foreground nor background color,
set its foreground and background to the background and foreground
of the default face. Value is FACE."
- (interactive (list (read-face-name "Invert face")))
+ (interactive (list (read-face-name "Invert face" (face-at-point t))))
(let ((fg (face-attribute face :foreground frame))
(bg (face-attribute face :background frame)))
(if (not (and (eq fg 'unspecified) (eq bg 'unspecified)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun read-face-name (prompt &optional default multiple)
- "Read one or more face names, defaulting to the face(s) at point.
-PROMPT should be a prompt string; it should not end in a space or
-a colon.
+ "Read one or more face names, prompting with PROMPT.
+PROMPT should not end in a space or a colon.
-The optional argument DEFAULT specifies the default face name(s)
-to return if the user just types RET. If its value is non-nil,
-it should be a list of face names (symbols or strings); in that case,
-the default return value is the `car' of DEFAULT (if the argument
-MULTIPLE is non-nil), or DEFAULT (if MULTIPLE is nil). See below
-for the meaning of MULTIPLE.
-
-If DEFAULT is nil, the list of default face names is taken from
-the symbol at point and the `read-face-name' property of the text at point,
-or, if that is nil, from the `face' property of the text at point.
+Return DEFAULT if the user enters the empty string.
+If DEFAULT is non-nil, it should be a list of face names (symbols or strings).
+In that case, return the `car' of DEFAULT (if MULTIPLE is non-nil),
+or DEFAULT (if MULTIPLE is nil). See below for the meaning of MULTIPLE.
+DEFAULT can also be a single face.
This function uses `completing-read-multiple' with \"[ \\t]*,[ \\t]*\"
-as the separator regexp. Thus, the user may enter multiple face
-names, separated by commas. The optional argument MULTIPLE
-specifies the form of the return value. If MULTIPLE is non-nil,
-return a list of face names; if the user entered just one face
-name, the return value would be a list of one face name.
-Otherwise, return a single face name; if the user entered more
-than one face name, return only the first one."
- ;; Should we better not generate automagically a value for DEFAULT
- ;; when `read-face-name' was called with DEFAULT being nil?
- ;; Such magic is somewhat unusual for a function `read-...'.
- ;; Also, one cannot skip this magic by means of a suitable
- ;; value of DEFAULT. It would be cleaner to use
- ;; (read-face-name prompt (face-at-point)).
- (unless default
- ;; Try to get a default face name from the buffer.
- (let ((thing (intern-soft (thing-at-point 'symbol))))
- (if (memq thing (face-list))
- (setq default (list thing))))
- ;; Add the named faces that the `read-face-name' or `face' property uses.
- (let ((faceprop (or (get-char-property (point) 'read-face-name)
- (get-char-property (point) 'face))))
- (if (and (listp faceprop)
- ;; Don't treat an attribute spec as a list of faces.
- (not (keywordp (car faceprop)))
- (not (memq (car faceprop) '(foreground-color background-color))))
- (dolist (face faceprop)
- (if (symbolp face)
- (push face default)))
- (if (symbolp faceprop)
- (push faceprop default)))
- (delete-dups default)))
-
- ;; If we only want one, and the default is more than one,
- ;; discard the unwanted ones now.
- (if (and default (not multiple))
- (setq default (list (car default))))
-
- (if default
- (setq default (mapconcat (lambda (f)
- (if (symbolp f) (symbol-name f) f))
- default ", ")))
-
- ;; Build up the completion tables.
- (let (aliasfaces nonaliasfaces)
+as the separator regexp. Thus, the user may enter multiple face names,
+separated by commas.
+
+MULTIPLE specifies the form of the return value. If MULTIPLE is non-nil,
+return a list of face names; if the user entered just one face name,
+return a list of one face name. Otherwise, return a single face name;
+if the user entered more than one face name, return only the first one."
+ (if (and default (not (stringp default)))
+ (setq default
+ (cond ((symbolp default)
+ (symbol-name default))
+ (multiple
+ (mapconcat (lambda (f) (if (symbolp f) (symbol-name f) f))
+ default ", "))
+ ;; If we only want one, and the default is more than one,
+ ;; discard the unwanted ones.
+ (t (symbol-name (car default))))))
+
+ (let (aliasfaces nonaliasfaces faces)
+ ;; Build up the completion tables.
(mapatoms (lambda (s)
- (if (custom-facep s)
+ (if (facep s)
(if (get s 'face-alias)
(push (symbol-name s) aliasfaces)
(push (symbol-name s) nonaliasfaces)))))
-
- (let ((faces
- ;; Read the faces.
- (mapcar 'intern
- (completing-read-multiple
- (if default
- (format "%s (default `%s'): " prompt default)
- (format "%s: " prompt))
- (completion-table-in-turn nonaliasfaces aliasfaces)
- nil t nil 'face-name-history default))))
- ;; Return either a list of faces or just one face.
- (if multiple
- faces
- (car faces)))))
+ (dolist (face (completing-read-multiple
+ (if default
+ (format "%s (default `%s'): " prompt default)
+ (format "%s: " prompt))
+ (completion-table-in-turn nonaliasfaces aliasfaces)
+ nil t nil 'face-name-history default))
+ ;; Ignore elements that are not faces
+ ;; (for example, because DEFAULT was "all faces")
+ (if (facep face) (push (intern face) faces)))
+ ;; Return either a list of faces or just one face.
+ (if multiple
+ (nreverse faces)
+ (last faces))))
;; Not defined without X, but behind window-system test.
(defvar x-bitmap-file-path)
:slant (if italic-p 'italic 'normal)
:underline underline
:inverse-video inverse-p)
- (setq face (read-face-name "Modify face"))
+ (setq face (read-face-name "Modify face" (face-at-point t)))
(apply #'set-face-attribute face frame
(read-all-face-attributes face frame))))
\(a symbol), and NEW-VALUE is value read."
(cond ((eq attribute :font)
(let* ((prompt "Set font-related attributes of face")
- (face (read-face-name prompt))
+ (face (read-face-name prompt (face-at-point t)))
(font (read-face-font face frame)))
(list face font)))
(t
(let* ((attribute-name (face-descriptive-attribute-name attribute))
(prompt (format "Set %s of face" attribute-name))
- (face (read-face-name prompt))
+ (face (read-face-name prompt (face-at-point t)))
(new-value (read-face-attribute face attribute frame)))
(list face new-value)))))
If FRAME is t, report on the defaults for face FACE (for new frames).
If FRAME is omitted or nil, use the selected frame."
(interactive (list (read-face-name "Describe face"
- (if (eq 'default (face-at-point))
- '(default))
+ (or (face-at-point t) 'default)
t)))
(let* ((attrs '((:family . "Family")
(:foundry . "Foundry")
(when msg (message "Color: `%s'" color))
color))
-
-(defun face-at-point ()
+(defun face-at-point (&optional thing multiple)
"Return the face of the character after point.
If it has more than one face, return the first one.
-Return nil if it has no specified face."
- (let* ((faceprop (or (get-char-property (point) 'read-face-name)
- (get-char-property (point) 'face)
- 'default))
- (face (cond ((symbolp faceprop) faceprop)
- ;; List of faces (don't treat an attribute spec).
- ;; Just use the first face.
- ((and (consp faceprop) (not (keywordp (car faceprop)))
- (not (memq (car faceprop)
- '(foreground-color background-color))))
- (car faceprop))
- (t nil)))) ; Invalid face value.
- (if (facep face) face nil)))
+If THING is non-nil try first to get a face name from the buffer.
+IF MULTIPLE is non-nil, return a list of all faces.
+Return nil if there is no face."
+ (let (faces)
+ (if thing
+ ;; Try to get a face name from the buffer.
+ (let ((face (intern-soft (thing-at-point 'symbol))))
+ (if (facep face)
+ (push face faces))))
+ ;; Add the named faces that the `read-face-name' or `face' property uses.
+ (let ((faceprop (or (get-char-property (point) 'read-face-name)
+ (get-char-property (point) 'face))))
+ (cond ((facep faceprop)
+ (push faceprop faces))
+ ((and (listp faceprop)
+ ;; Don't treat an attribute spec as a list of faces.
+ (not (keywordp (car faceprop)))
+ (not (memq (car faceprop)
+ '(foreground-color background-color))))
+ (dolist (face faceprop)
+ (if (facep face)
+ (push face faces))))))
+ (setq faces (delete-dups (nreverse faces)))
+ (if multiple faces (car faces))))
(defun foreground-color-at-point ()
"Return the foreground color of the character after point."
(set-buffer-multibyte nil)
(setq buffer-file-coding-system 'no-conversion)
(set-buffer-major-mode buf)
- (make-local-variable 'find-file-literally)
- (setq find-file-literally t))
+ (setq-local find-file-literally t))
(after-find-file error (not nowarn)))
(current-buffer))))
\f
or from Lisp without specifying the optional argument FIND-FILE;
in that case, this function acts as if `enable-local-variables' were t."
(interactive)
- (funcall (or (default-value 'major-mode) 'fundamental-mode))
+ (fundamental-mode)
(let ((enable-local-variables (or (not find-file) enable-local-variables)))
;; FIXME this is less efficient than it could be, since both
;; s-a-m and h-l-v may parse the same regions, looking for "mode:".
("\\.\\(\
arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|\
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
- ("\\.\\(sx[dmicw]\\|od[fgpst]\\|oxt\\)\\'" . archive-mode) ;OpenOffice.org
+ ("\\.oxt\\'" . archive-mode) ;(Open|Libre)Office extensions.
("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages.
;; Mailer puts message to be edited in
;; /tmp/Re.... or Message
(if (functionp re)
(funcall re)
(looking-at re)))))))
- (set-auto-mode-0 done keep-mode-if-same)))))
+ (set-auto-mode-0 done keep-mode-if-same)))
+ (unless done
+ (set-buffer-major-mode (current-buffer)))))
;; When `keep-mode-if-same' is set, we are working on behalf of
;; set-visited-file-name. In that case, if the major mode specified is the
(prog1 (memq char '(?! ?\s ?y))
(quit-window t)))))))
+(defconst hack-local-variable-regexp
+ "[ \t]*\\([^][;\"'?()\\ \t\n]+\\)[ \t]*:[ \t]*")
+
(defun hack-local-variables-prop-line (&optional mode-only)
"Return local variables specified in the -*- line.
Returns an alist of elements (VAR . VAL), where VAR is a variable
;; (last ";" is optional).
;; If MODE-ONLY, just check for `mode'.
;; Otherwise, parse the -*- line into the RESULT alist.
- (while (and (or (not mode-only)
- (not result))
- (< (point) end))
- (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
- (message "Malformed mode-line")
+ (while (not (or (and mode-only result)
+ (>= (point) end)))
+ (unless (looking-at hack-local-variable-regexp)
+ (message "Malformed mode-line: %S"
+ (buffer-substring-no-properties (point) end))
(throw 'malformed-line nil))
(goto-char (match-end 0))
;; There used to be a downcase here,
(prefix
(concat "^" (regexp-quote
(buffer-substring (line-beginning-position)
- (match-beginning 0)))))
- beg)
+ (match-beginning 0))))))
(forward-line 1)
(let ((startpos (point))
(forward-line 1))
(goto-char (point-min))
- (while (and (not (eobp))
- (or (not mode-only)
- (not result)))
- ;; Find the variable name; strip whitespace.
- (skip-chars-forward " \t")
- (setq beg (point))
- (skip-chars-forward "^:\n")
- (if (eolp) (error "Missing colon in local variables entry"))
- (skip-chars-backward " \t")
- (let* ((str (buffer-substring beg (point)))
- (var (let ((read-circle nil))
- (read str)))
+ (while (not (or (eobp)
+ (and mode-only result)))
+ ;; Find the variable name;
+ (unless (looking-at hack-local-variable-regexp)
+ (error "Malformed local variable line: %S"
+ (buffer-substring-no-properties
+ (point) (line-end-position))))
+ (goto-char (match-end 1))
+ (let* ((str (match-string 1))
+ (var (intern str))
val val2)
(and (equal (downcase (symbol-name var)) "mode")
(setq var 'mode))
`small-temporary-file-directory', and /tmp."
(let ((temporary-file-directory temporary-file-directory)
caseless)
- ;; On MS-Windows, file-truename will convert short 8+3 alises to
+ ;; On MS-Windows, file-truename will convert short 8+3 aliases to
;; their long file-name equivalents, so compare-strings does TRT.
(if (memq system-type '(ms-dos windows-nt))
(setq temporary-file-directory (file-truename temporary-file-directory)
+2013-04-16 David Edmondson <dme@dme.org>
+
+ Support <img src="data:...">.
+
+ * shr.el (shr-image-from-data): New function.
+ (shr-tag-img): Use it.
+
+2013-04-14 Andrew Cohen <cohen@bu.edu>
+
+ * nnir.el (nnir-request-set-mark): Make sure we are in the right
+ group.
+
+2013-04-12 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (gnus-msg-mail): Make it avoid using posting styles
+ corresponding to any existing group (Bug#14166).
+
+2013-04-10 Andrew Cohen <cohen@bu.edu>
+
+ * nnir.el (number-sequence): No longer used.
+ (nnir-request-set-mark): New function.
+ (nnir-request-update-info): Improve marks updating.
+ (nnir-request-scan): Don't duplicate marks updating.
+ (gnus-group-make-nnir-group, nnir-run-imap, nnir-request-create-group):
+ Use 'assq rather than 'assoc. Quote anonymous function.
+ (nnir-request-group, nnir-close-group, gnus-summary-create-nnir-group):
+ Use 'gnus-group-prefixed-p.
+ (gnus-summary-create-nnir-group): Make sure server for method is open.
+
2013-04-04 Andrew Cohen <cohen@bu.edu>
* nnir.el (gnus-nnir-group-p): New function.
(message-mail to subject other-headers continue
nil yank-action send-actions return-action))
(let ((buf (current-buffer))
- (gnus-newsgroup-name (or gnus-newsgroup-name ""))
+ ;; Don't use posting styles corresponding to any existing group.
+ (gnus-newsgroup-name "")
mail-buf)
(gnus-setup-message 'message
(message-mail to subject other-headers continue
;; For Emacs <22.2 and XEmacs.
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
- (unless (fboundp 'number-sequence)
- (defun number-sequence (from to)
- (let (seq (n 0) (next from))
- (while (<= next to)
- (setq seq (cons next seq)
- n (1+ n)
- next (+ from n )))
- (nreverse seq)))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(require 'nnoo)
(require 'gnus-group)
skips all prompting."
(interactive "P")
(let* ((group-spec
- (or (cdr (assoc 'nnir-group-spec specs))
+ (or (cdr (assq 'nnir-group-spec specs))
(if (gnus-server-server-name)
(list (list (gnus-server-server-name)))
(nnir-categorize
(cdr (assoc (gnus-group-topic-name) gnus-topic-alist))))
gnus-group-server))))
(query-spec
- (or (cdr (assoc 'nnir-query-spec specs))
+ (or (cdr (assq 'nnir-query-spec specs))
(apply
'append
(list (cons 'query
(deffoo nnir-request-group (group &optional server dont-check info)
(nnir-possibly-change-group group server)
- (let ((pgroup (if (gnus-group-prefixed-p group)
- group
- (gnus-group-prefixed-name group '(nnir "nnir"))))
+ (let ((pgroup (gnus-group-guess-full-name-from-command-method group))
length)
;; Check for cached search result or run the query and cache the
;; result.
(artnumber (nnir-article-number article)))
(gnus-request-update-mark artgroup artnumber mark)))
+(deffoo nnir-request-set-mark (group actions &optional server)
+ (nnir-possibly-change-group group server)
+ (let (mlist)
+ (dolist (action actions)
+ (destructuring-bind (range action marks) action
+ (let ((articles-by-group (nnir-categorize
+ (gnus-uncompress-range range)
+ nnir-article-group nnir-article-number)))
+ (dolist (artgroup articles-by-group)
+ (push (list
+ (car artgroup)
+ (list (gnus-compress-sequence
+ (sort (cadr artgroup) '<)) action marks)) mlist)))))
+ (dolist (request (nnir-categorize mlist car cadr))
+ (gnus-request-set-mark (car request) (cadr request)))))
+
(deffoo nnir-request-update-info (group info &optional server)
- (let ((articles-by-group
+ (nnir-possibly-change-group group server)
+ ;; clear out all existing marks.
+ (gnus-info-set-marks info nil)
+ (gnus-info-set-read info nil)
+ (let ((group (gnus-group-guess-full-name-from-command-method group))
+ (articles-by-group
(nnir-categorize
- (number-sequence 1 (nnir-artlist-length nnir-artlist))
+ (gnus-uncompress-range (cons 1 (nnir-artlist-length nnir-artlist)))
nnir-article-group nnir-article-ids)))
(gnus-set-active group
(cons 1 (nnir-artlist-length nnir-artlist)))
info
(gnus-add-to-range
(gnus-info-read info)
- (remove nil (mapcar (lambda (art)
- (let ((num (cdr art)))
- (when (gnus-member-of-range num read)
- (car art)))) articleids))))
- (mapc (lambda (mark)
- (let ((type (car mark))
- (range (cdr mark)))
- (gnus-add-marked-articles
- group
- type
- (remove nil
- (mapcar
- (lambda (art)
- (let ((num (cdr art)))
- (when (gnus-member-of-range num range)
- (car art))))
- articleids))))) marks)))))
+ (delq nil
+ (mapcar
+ #'(lambda (art)
+ (when (gnus-member-of-range (cdr art) read) (car art)))
+ articleids))))
+ (dolist (mark marks)
+ (destructuring-bind (type . range) mark
+ (gnus-add-marked-articles
+ group type
+ (delq nil
+ (mapcar
+ #'(lambda (art)
+ (when (gnus-member-of-range (cdr art) range) (car art)))
+ articleids)))))))))
(deffoo nnir-close-group (group &optional server)
- (let ((pgroup (if (gnus-group-prefixed-p group)
- group
- (gnus-group-prefixed-name group '(nnir "nnir")))))
+ (let ((pgroup (gnus-group-guess-full-name-from-command-method group)))
(when (and nnir-artlist (not (gnus-ephemeral-group-p pgroup)))
(gnus-group-set-parameter pgroup 'nnir-artlist nnir-artlist))
(setq nnir-artlist nil)
'vconcat
(catch 'found
(mapcar
- (lambda (group)
+ #'(lambda (group)
(let (artlist)
(condition-case ()
(when (nnimap-possibly-change-group
(defun gnus-summary-create-nnir-group ()
(interactive)
+ (or (nnir-server-opened "") (nnir-open-server "nnir"))
(let ((name (gnus-read-group "Group name: "))
- (method "nnir")
- (pgroup (if (gnus-group-prefixed-p gnus-newsgroup-name)
- gnus-newsgroup-name
- (gnus-group-prefixed-name
- gnus-newsgroup-name '(nnir "nnir")))))
+ (method '(nnir ""))
+ (pgroup
+ (gnus-group-guess-full-name-from-command-method gnus-newsgroup-name)))
(with-current-buffer gnus-group-buffer
(gnus-group-make-group
name method nil
(deffoo nnir-request-create-group (group &optional server args)
(message "Creating nnir group %s" group)
(let* ((group (gnus-group-prefixed-name group '(nnir "nnir")))
- (specs (assoc 'nnir-specs args))
+ (specs (assq 'nnir-specs args))
(query-spec
- (or (cdr (assoc 'nnir-query-spec specs))
+ (or (cdr (assq 'nnir-query-spec specs))
(list (cons 'query
(read-string "Query: " nil 'nnir-search-history)))))
(group-spec
- (or (cdr (assoc 'nnir-group-spec specs))
+ (or (cdr (assq 'nnir-group-spec specs))
(list (list (read-string "Server: " nil nil)))))
(nnir-specs (list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec))))
(gnus-group-set-parameter group 'nnir-specs nnir-specs)
(gnus-group-set-parameter
group 'nnir-artlist
- (or (cdr (assoc 'nnir-artlist args))
+ (or (cdr (assq 'nnir-artlist args))
(nnir-run-query nnir-specs)))
(nnir-request-update-info group (gnus-get-info group)))
t)
t)
(deffoo nnir-request-scan (group method)
- (if group
- (let ((pgroup (if (gnus-group-prefixed-p group)
- group
- (gnus-group-prefixed-name group '(nnir "nnir")))))
- (gnus-group-set-parameter
- pgroup 'nnir-artlist
- (setq nnir-artlist
- (nnir-run-query
- (gnus-group-get-parameter pgroup 'nnir-specs t))))
- (nnir-request-update-info pgroup (gnus-get-info pgroup)))
- t))
+ t)
(deffoo nnir-request-close ()
t)
-
(nnoo-define-skeleton nnir)
;; The end.
(put-text-property start (point) type value))))))))))
(kill-buffer image-buffer)))
+(defun shr-image-from-data (data)
+ "Return an image from the data: URI content DATA."
+ (when (string-match
+ "\\(\\([^/;,]+\\(/[^;,]+\\)?\\)\\(;[^;,]+\\)*\\)?,\\(.*\\)"
+ data)
+ (let ((param (match-string 4 data))
+ (payload (url-unhex-string (match-string 5 data))))
+ (when (string-match "^.*\\(;[ \t]*base64\\)$" param)
+ (setq payload (base64-decode-string payload)))
+ payload)))
+
(defun shr-put-image (data alt &optional flags)
"Put image DATA with a string ALT. Return image."
(if (display-graphic-p)
(member (cdr (assq :width cont)) '("0" "1")))
;; Ignore zero-sized or single-pixel images.
)
+ ((and (not shr-inhibit-images)
+ (string-match "\\`data:" url))
+ (let ((image (shr-image-from-data (substring url (match-end 0)))))
+ (if image
+ (funcall shr-put-image-function image alt)
+ (insert alt))))
((and (not shr-inhibit-images)
(string-match "\\`cid:" url))
(let ((url (substring url (match-end 0)))
("ietf-drums" . "emacs-mime") ("quoted-printable" . "emacs-mime")
("binhex" . "emacs-mime") ("uudecode" . "emacs-mime")
("mailcap" . "emacs-mime") ("mm" . "emacs-mime")
- ("mml" . "emacs-mime"))
+ ("mml" . "emacs-mime")
+ "tramp" "dbus")
"List of Info files that describe Emacs commands.
An element can be a file name, or a list of the form (PREFIX . FILE)
where PREFIX is a name prefix and FILE is the file to look in.
(nth 5 (file-attributes mail-personal-alias-file)))
(build-mail-abbrevs)))
(mail-abbrevs-sync-aliases)
- (add-hook 'abbrev-expand-functions 'mail-abbrev-expand-wrapper nil t)
+ (add-function :around (local 'abbrev-expand-function)
+ #'mail-abbrev-expand-wrapper)
(abbrev-mode 1))
(defun mail-abbrevs-enable ()
(eq t (compare-strings s1 nil nil s2 nil nil 'ignore-case)))
(defun completion--twq-all (string ustring completions boundary
- unquote requote)
+ _unquote requote)
(when completions
(pcase-let*
((prefix
(defun minibuffer-completion-contents ()
"Return the user input in a minibuffer before point as a string.
-That is what completion commands operate on."
+That used to be what completion commands operate on."
+ (declare (obsolete minibuffer-contents "24.4"))
(buffer-substring (field-beginning) (point)))
(defun delete-minibuffer-contents ()
(cond
;; If there's a fresh completion window with a live buffer,
;; and this command is repeated, scroll that window.
- ((window-live-p minibuffer-scroll-window)
+ ((and (window-live-p minibuffer-scroll-window)
+ (eq t (frame-visible-p (window-frame minibuffer-scroll-window))))
(let ((window minibuffer-scroll-window))
(with-current-buffer (window-buffer window)
(if (pos-visible-in-window-p (point-max) window)
"Complete the minibuffer to an exact match.
Repeated uses step through the possible completions."
(interactive)
+ (setq minibuffer-scroll-window nil)
;; FIXME: Need to deal with the extra-size issue here as well.
;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to
;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
(completion--done (buffer-substring-no-properties start (point)) 'sole)
;; Set cycling after modifying the buffer since the flush hook resets it.
(setq completion-cycling t)
+ (setq this-command 'completion-at-point) ;For minibuffer-complete.
;; If completing file names, (car all) may be a directory, so we'd now
;; have a new set of possible completions and might want to reset
;; completion-all-sorted-completions to nil, but we prefer not to,
(exit-minibuffer))
(defvar completion-in-region-functions nil
- "Wrapper hook around `completion-in-region'.
-The functions on this special hook are called with 5 arguments:
- NEXT-FUN START END COLLECTION PREDICATE.
-NEXT-FUN is a function of four arguments (START END COLLECTION PREDICATE)
-that performs the default operation. The other four arguments are like
-the ones passed to `completion-in-region'. The functions on this hook
-are expected to perform completion on START..END using COLLECTION
-and PREDICATE, either by calling NEXT-FUN or by doing it themselves.")
+ "Wrapper hook around `completion-in-region'.")
+(make-obsolete-variable 'completion-in-region-functions
+ 'completion-in-region-function "24.4")
+
+(defvar completion-in-region-function #'completion--in-region
+ "Function to perform the job of `completion-in-region'.
+The function is called with 4 arguments: START END COLLECTION PREDICATE.
+The arguments and expected return value are like the ones of
+`completion-in-region'.")
(defvar completion-in-region--data nil)
PREDICATE (a function called with no arguments) says when to
exit."
(cl-assert (<= start (point)) (<= (point) end))
+ (funcall completion-in-region-function start end collection predicate))
+
+(defun completion--in-region (start end collection &optional predicate)
(with-wrapper-hook
;; FIXME: Maybe we should use this hook to provide a "display
;; completions" operation as well.
(if tmp (push (nreverse tmp) alists))
(nreverse alists)))
-(defun mpc-proc ()
+(defun mpc-proc (&optional restart)
(unless (and mpc-proc
(buffer-live-p (process-buffer mpc-proc))
- (not (memq (process-status mpc-proc) '(closed))))
+ (not (and restart
+ (memq (process-status mpc-proc) '(closed)))))
(mpc--proc-connect mpc-host))
mpc-proc)
when the command terminates.
CMD can be a string which is passed as-is to MPD or a list of strings
which will be concatenated with proper quoting before passing them to MPD."
- (let ((proc (mpc-proc)))
+ (let ((proc (mpc-proc 'restart)))
(if (and callback (not (process-get proc 'ready)))
(let ((old (process-get proc 'callback)))
(process-put proc 'callback
(cancel-timer mpc--status-timer)
(setq mpc--status-timer nil)))
(defun mpc--status-timer-run ()
- (when (process-get (mpc-proc) 'ready)
(condition-case err
- (with-local-quit (mpc-status-refresh))
- (error (message "MPC: %s" err)))))
+ (when (process-get (mpc-proc) 'ready)
+ (with-local-quit (mpc-status-refresh)))
+ (error (message "MPC: %s" err))))
(defvar mpc--status-idle-timer nil)
(defun mpc--status-idle-timer-start ()
(defun mpc-status-buffer-show ()
(interactive)
- (let* ((buf (mpc-proc-buffer (mpc-proc) 'status))
- (songs-buf (mpc-proc-buffer (mpc-proc) 'songs))
+ (let* ((proc (mpc-proc))
+ (buf (mpc-proc-buffer proc 'status))
+ (songs-buf (mpc-proc-buffer proc 'songs))
(songs-win (if songs-buf (get-buffer-window songs-buf 0))))
(unless (buffer-live-p buf)
(setq buf (get-buffer-create "*MPC-Status*"))
(with-current-buffer buf
(mpc-status-mode))
- (mpc-proc-buffer (mpc-proc) 'status buf))
+ (mpc-proc-buffer proc 'status buf))
(if (null songs-win) (pop-to-buffer buf)
(let ((_win (split-window songs-win 20 t)))
(set-window-dedicated-p songs-win nil)
(mpc-event-set-point event)
(let ((name (buffer-substring (line-beginning-position)
(line-end-position)))
- (prop (intern mpc-tag)))
- (if (not (member name (process-get (mpc-proc) prop)))
- (process-put (mpc-proc) prop
- (cons name (process-get (mpc-proc) prop)))
- (let ((new (delete name (process-get (mpc-proc) prop))))
+ (prop (intern mpc-tag))
+ (proc (mpc-proc)))
+ (if (not (member name (process-get proc prop)))
+ (process-put proc prop
+ (cons name (process-get proc prop)))
+ (let ((new (delete name (process-get proc prop))))
(setq name (concat name "/"))
- (process-put (mpc-proc) prop
+ (process-put proc prop
(delq nil
(mapcar (lambda (x)
(if (string-prefix-p name x)
;;; Define ways of getting at unmodified Emacs primitives,
;;; turning off our handler.
-;(defun ange-ftp-run-real-handler (operation args)
-; (let ((inhibit-file-name-handlers
-; (cons 'ange-ftp-hook-function
-; (cons 'ange-ftp-completion-hook-function
-; (and (eq inhibit-file-name-operation operation)
-; inhibit-file-name-handlers))))
-; (inhibit-file-name-operation operation))
-; (apply operation args)))
-
-(defalias 'ange-ftp-run-real-handler 'tramp-run-real-handler)
+(defun ange-ftp-run-real-handler-orig (operation args)
+ (let ((inhibit-file-name-handlers
+ (cons 'ange-ftp-hook-function
+ (cons 'ange-ftp-completion-hook-function
+ (and (eq inhibit-file-name-operation operation)
+ inhibit-file-name-handlers))))
+ (inhibit-file-name-operation operation))
+ (apply operation args)))
+
+(defalias 'ange-ftp-run-real-handler
+ (if (fboundp 'tramp-run-real-handler)
+ 'tramp-run-real-handler 'ange-ftp-run-real-handler-orig))
(defun ange-ftp-real-file-name-directory (&rest args)
(ange-ftp-run-real-handler 'file-name-directory args))
;;;###tramp-autoload
(defcustom tramp-remote-process-environment
- `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_ALL=C"
+ `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_ALL=C"
,(format "TERM=%s" tramp-terminal-type)
"EMACS=t" ;; Deprecated.
,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version)
+2013-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * org-agenda.el (org-agenda-mode):
+ * org-indent.el (org-indent-mode): Use the `local' arg of
+ add-hook/remove-hook.
+
2013-03-08 Bastien Guerry <bzg@gnu.org>
* org-exp.el (org-export-normalize-links): Fix critical bug: do
(org-agenda-get-blocks): Don't use
`org-agenda-no-heading-message', skip the entry.
- * org.el (org-agenda-inhibit-startup-visibility-cycling): New
- option.
+ * org.el (org-agenda-inhibit-startup-visibility-cycling):
+ New option.
(org-agenda-prepare-buffers): Use it to speed up the agenda
generation.
* org-compat.el (org-condition-case-unless-debug): Delete.
- * org-odt.el (org-odt-cleanup-xml-buffers): Use
- `condition-case' instead of `org-condition-case-unless-debug',
+ * org-odt.el (org-odt-cleanup-xml-buffers):
+ Use `condition-case' instead of `org-condition-case-unless-debug',
which is now deleted.
* org-capture.el (org-capture-templates-contexts):
2013-01-13 Michael Albinus <michael.albinus@gmx.de>
- * ob-eval.el (org-babel-shell-command-on-region): Use
- `executable-find' for local `shell-file-name'.
+ * ob-eval.el (org-babel-shell-command-on-region):
+ Use `executable-find' for local `shell-file-name'.
2013-01-09 Achim Gratz <Stromeko@Stromeko.de>
* ob.el (org-babel-temp-file): Fix setting of
`temporary-file-directory' on remote hosts.
- * ob-eval.el (org-babel-shell-command-on-region): Use
- `process-file' instead of `call-process-region'. The latter one
+ * ob-eval.el (org-babel-shell-command-on-region):
+ Use `process-file' instead of `call-process-region'. The latter one
does not work on remote hosts.
2012-12-13 Bastien Guerry <bzg@gnu.org>
* org-element.el (org-element-context): When point is between two
objects, be sure to return the second one.
- * org-list.el (org-list-separating-blank-lines-number): When
- computing number of blank lines separating items, also count those
+ * org-list.el (org-list-separating-blank-lines-number):
+ When computing number of blank lines separating items, also count those
in unparsed blocks, like example blocks.
* org.el (org-end-of-line): When visual line mode is on, really
when the current buffer is not a file.
(org-check-agenda-file): Enhance the message.
(org-element-type): Autoload.
- (org-element-context, org-element-paragraph-parser): Don't
- declare as these two functions are not used in org.el.
+ (org-element-context, org-element-paragraph-parser):
+ Don't declare as these two functions are not used in org.el.
* org-lparse.el (browse-url-file-url): Declare.
functions.
(org-clock-update-time-maybe): Move to org-clock.el.
- * org-exp.el (org-insert-export-options-template): Remove
- autoload cookie.
+ * org-exp.el (org-insert-export-options-template):
+ Remove autoload cookie.
* org-clock.el (org-resolve-clocks, org-clock-in)
(org-clock-out, org-clock-cancel, org-clock-goto)
(org-clock-sum, org-clock-display, org-clock-report)
(org-dblock-write:clocktable): Add autoload cookie.
- (org-clock-update-time-maybe): Moved from org.el.
+ (org-clock-update-time-maybe): Move from org.el.
* org-beamer.el (org-beamer-sectioning, org-beamer-mode): Ditto.
* org-ascii.el (org-export-ascii-preprocess): Ditto.
* org-archive.el (org-archive-subtree)
- (org-archive-to-archive-sibling, org-toggle-archive-tag): Add
- autoload cookie.
+ (org-archive-to-archive-sibling, org-toggle-archive-tag):
+ Add autoload cookie.
* org-colview.el (org-columns, org-dblock-write:columnview)
(org-insert-columns-dblock, org-agenda-columns): Ditto.
(orgtbl-to-tsv, orgtbl-to-csv, orgtbl-to-latex)
(orgtbl-to-html, orgtbl-to-texinfo, orgtbl-to-orgtbl): Ditto.
- * org.el (turn-on-orgtbl): Moved here from org-table.el.
- (org-clock-persistence-insinuate): Moved here from org-clock.el.
+ * org.el (turn-on-orgtbl): Move here from org-table.el.
+ (org-clock-persistence-insinuate): Move here from org-clock.el.
(org-update-all-dblocks, org-map-entries)
(org-require-autoloaded-modules, org-forward-element)
(org-backward-element, org-up-element)
* org-capture.el: Do no set `generated-autoload-file' locally.
Minor code clean up.
- * org-agenda.el (org-agenda-list): Use
- `org-clock-get-clocktable'. Do no set
+ * org-agenda.el (org-agenda-list):
+ Use `org-clock-get-clocktable'. Do no set
`generated-autoload-file' locally.
- * org-table.el (org-table-iterate-buffer-tables): Minor
- reformatting.
+ * org-table.el (org-table-iterate-buffer-tables):
+ Minor reformatting.
(turn-on-orgtbl): Move to org.el.
* org-html.el (org-export-htmlize-generate-css): Don't autoload.
2012-10-26 Myles English <mylesenglish@gmail.com> (tiny change)
- * org-clock.el (org-clock-in): Moved the call to
+ * org-clock.el (org-clock-in): Move the call to
org-clock-in-prepare-hook until the task's properties
can be accessed.
* org.el (org-sparse-tree): Allow to call `org-show-todo-tree'
with an argument.
- * org-element.el (org-element--get-next-object-candidates): Fix
- parsing of objects of the same type in a single paragraph.
+ * org-element.el (org-element--get-next-object-candidates):
+ Fix parsing of objects of the same type in a single paragraph.
- * org-element.el (org-element-sub/superscript-successor): Fix
- parsing of sub/superscript at beginning of item.
+ * org-element.el (org-element-sub/superscript-successor):
+ Fix parsing of sub/superscript at beginning of item.
(org-element-latex-or-entity-successor): Fix parsing of latex
fragments at beginning of item.
(org-unescape-code-in-region): New functions.
(org-edit-src-code, org-edit-src-exit): Use new functions.
- * org.el (org-strip-protective-commas): Removed function.
+ * org.el (org-strip-protective-commas): Remove function.
* org-exp.el (org-export-select-backend-specific-text): Use new
function.
2012-09-30 Abdó Roig-Maranges <abdo.roig@gmail.com>
* org-html.el (org-export-html-preprocess)
- (org-export-html-format-image): Use
- `org-latex-preview-ltxpng-directory'.
+ (org-export-html-format-image):
+ Use `org-latex-preview-ltxpng-directory'.
* org-odt.el (org-export-odt-do-preprocess-latex-fragments):
Ditto.
variable is true, so act accordingly if it is found unbound.
* ob-R.el: Remove initialization with `nil´ from
- `ess-ask-for-ess-directory´ and `ess-local-process-name´. Remove
- second declaration for `ess-local-process-name´.
+ `ess-ask-for-ess-directory´ and `ess-local-process-name´.
+ Remove second declaration for `ess-local-process-name´.
* org-gnus.el: Add a missing require for gnus-util.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
- (org-metadown): Fall back on `org-element-drag-forward'. Also
- move chunks of declarations and require statements to get rid of
+ (org-metadown): Fall back on `org-element-drag-forward'.
+ Also move chunks of declarations and require statements to get rid of
compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org.el: Use org-check-version.
* org.el: Fix a subtle error resulting in version functions
- sometimes not being defined and byte-compiling failing. Always
- compile in fallback definitions into org.elc -- org-fixup either
+ sometimes not being defined and byte-compiling failing.
+ Always compile in fallback definitions into org.elc -- org-fixup either
provides re-definitions at compile-time or checks org-version.el
and then the git work tree when run uncompiled. So the fallback
definitions will only come into effect when org-fixup is not
* org.el: Add with-not-warnings around call of (org-fixup).
- * org-compat.el (org-find-library-dir): Rename
- org-find-library-name (misleading) and implement with a function
+ * org-compat.el (org-find-library-dir):
+ Rename org-find-library-name (misleading) and implement with a function
that exists identically in Emacs/XEmacs.
* org-exp-blocks.el: Change calls to org-find-library-dir.
base-dir argument and use (file-name-directory file) to get the
file's directory.
(org-publish-update-timestamp)
- (org-publish-cache-file-needs-publishing): Call
- `org-publish-cache-ctime-of-src' with only one argument.
+ (org-publish-cache-file-needs-publishing):
+ Call `org-publish-cache-ctime-of-src' with only one argument.
* org.el (org-follow-timestamp-link): Fix bug when using sticky
agenda. Add a docstring.
hook twice.
* org-agenda.el (org-agenda-menu-two-column)
- (org-finalize-agenda-hook, org-agenda-ndays): Use
- `define-obsolete-variable-alias' instead of
+ (org-finalize-agenda-hook, org-agenda-ndays):
+ Use `define-obsolete-variable-alias' instead of
`make-obsolete-variable'.
* org.el (org-link-to-org-use-id): Move to org-id.el.
(org-tags-view, org-diary, org-agenda-finalize-entries)
(org-agenda-change-all-lines): Use the new names.
- * org-agenda.el (org-agenda-local-vars): Remove
- ̀org-agenda-last-arguments' from the list of local variables.
+ * org-agenda.el (org-agenda-local-vars):
+ Remove ̀org-agenda-last-arguments' from the list of local variables.
(org-agenda-mode-map): `g' does the same than `r' in buffers with
only one agenda view, but its behavior differs when there are
several views. In manually appended agendas (with `A'), `g'
value.
(org-agenda-multi-back-to-pos): New variable.
(org-agenda-later): Retrieve `org-agenda-current-span' and
- `org-agenda-overriding-arguments' from text properties. Also
- handle numeric span.
- (org-agenda-later, org-agenda-change-time-span): Set
- `org-agenda-overriding-cmd' so that we to take overriding
+ `org-agenda-overriding-arguments' from text properties.
+ Also handle numeric span.
+ (org-agenda-later, org-agenda-change-time-span):
+ Set `org-agenda-overriding-cmd' so that we to take overriding
arguments into account for this command only.
- * org-agenda.el (org-agenda-kill, org-agenda-archive-with): Fix
- bug when called with a non-nil value of `org-agenda-stick'.
+ * org-agenda.el (org-agenda-kill, org-agenda-archive-with):
+ Fix bug when called with a non-nil value of `org-agenda-stick'.
* org-agenda.el (org-agenda-refile): Fix bug when refiling an
entry from a sticky agenda.
- * org-agenda.el (org-prepare-agenda-window): Use
- `org-pre-agenda-window-conf' if already set.
+ * org-agenda.el (org-prepare-agenda-window):
+ Use `org-pre-agenda-window-conf' if already set.
(org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil when
quitting.
(org-agenda-quit): Ditto.
* org-capture.el (org-capture-templates-contexts): Ditto.
- * org.el (org-contextualize-agenda-or-capture): Normalize
- contexts.
+ * org.el (org-contextualize-agenda-or-capture):
+ Normalize contexts.
* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.
`org-icalendar-use-plain-timestamp' is nil, scheduled and deadline
items should not be ignored.
- * org.el (org-ds-keyword-length, org-make-tags-matcher): Docstring
- clean-up.
+ * org.el (org-ds-keyword-length, org-make-tags-matcher):
+ Docstring clean-up.
* org-freemind.el (org-freemind-convert-links-from-org): Replace
literally to prevent errors when replacing with string containing
* org-pcomplete.el (org-thing-at-point): Allow to match (and then
complete) a "thing" containing dashes.
- * org-table.el (org-table-toggle-coordinate-overlays): Better
- message when interactively toggling.
+ * org-table.el (org-table-toggle-coordinate-overlays):
+ Better message when interactively toggling.
* org-table.el (org-table-number-regexp): Update the docstring to
show an example of a decimal number using the comma as a
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
- (org-agenda-get-scheduled, org-agenda-get-blocks): Use
- `category-pos' instead of `org-category-pos'.
+ (org-agenda-get-scheduled, org-agenda-get-blocks):
+ Use `category-pos' instead of `org-category-pos'.
* ob-fortran.el (org-babel-fortran-transform-list): Rename from
`ob-fortran-transform-list'.
and don't allow whitespaces between the hashtag and the plus sign.
* org.el (org-refresh-category-properties)
- (org-find-dblock, org-dblock-start-re, org-dblock-end-re): Allow
- lowercase "#+category" and "#+begin:" dynamic blocks.
+ (org-find-dblock, org-dblock-start-re, org-dblock-end-re):
+ Allow lowercase "#+category" and "#+begin:" dynamic blocks.
* org.el (org-context): Use case-folding when trying to match
clocktables and source blocks contexts.
* org-agenda.el (org-agenda-menu-two-column): Rename to
`org-agenda-menu-two-columns'.
- * ob.el (org-babel-sha1-hash, org-babel-noweb-p): Replace
- `org-labels' by `let*'.
+ * ob.el (org-babel-sha1-hash, org-babel-noweb-p):
+ Replace `org-labels' by `let*'.
* org-bibtex.el (org-bibtex-headline): Ditto.
* ob.el (org-babel-get-src-block-info)
(org-babel-check-src-block, org-babel-current-result-hash)
(org-babel-parse-src-block-match, org-babel-read-link)
- (org-babel-insert-result, org-babel-clean-text-properties): Use
- ̀org-no-properties' instead of `org-babel-clean-text-properties'.
+ (org-babel-insert-result, org-babel-clean-text-properties):
+ Use ̀org-no-properties' instead of `org-babel-clean-text-properties'.
(org-babel-clean-text-properties): Delete redundant function
`org-babel-clean-text-properties'.
removal of text properties.
(org-capture-fill-template): Use `org-no-properties'.
- * org-gnus.el (org-gnus-open, org-gnus-follow-link): Use
- `org-no-properties'.
+ * org-gnus.el (org-gnus-open, org-gnus-follow-link):
+ Use `org-no-properties'.
* org-colview.el (org-columns-display-here): Ditto.
* ob.el (org-babel-edit-distance, org-babel-sha1-hash)
(org-babel-get-rownames, org-babel-insert-result)
(org-babel-merge-params)
- (org-babel-expand-noweb-references): Don't use `org-flet'. Also
- indent some functions correctly.
+ (org-babel-expand-noweb-references): Don't use `org-flet'.
+ Also indent some functions correctly.
* ob.el (org-babel-execute-src-block)
(org-babel-join-splits-near-ch, org-babel-format-result)
* ob-sh.el (org-babel-sh-var-to-string): Ditto.
- * ob-tangle.el (org-babel-tangle, org-babel-spec-to-string): Don't
- use `org-flet'.
+ * ob-tangle.el (org-babel-tangle, org-babel-spec-to-string):
+ Don't use `org-flet'.
* org-pcomplete.el (org-compat): Require.
* org.el (org-forward-same-level): Fix typo in docstring.
- * org-agenda.el (org-agenda-mode-map): Bind
- `org-agenda-show-priority' to `C-c,' instead of `P'.
+ * org-agenda.el (org-agenda-mode-map):
+ Bind `org-agenda-show-priority' to `C-c,' instead of `P'.
(org-agenda-next-item, org-agenda-previous-item): New commands to
move by one item down/up in the agenda.
(org-agenda-mode-map): Bind `org-agenda-next-item' and
(org-element-transpose, org-element-unindent-buffer): Autoload.
Require 'org and remove all declarations.
- * org.el (org-outline-regexp-bol, org-heading-regexp): Use
- variables instead of constants.
+ * org.el (org-outline-regexp-bol, org-heading-regexp):
+ Use variables instead of constants.
* org-archive.el (org-datetree-find-date-create): Declare.
`clean-buffer-list-kill-buffer-names' when the feature 'midnight
has been loaded.
- * org-icalendar.el (org-print-icalendar-entries): Let
- APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
+ * org-icalendar.el (org-print-icalendar-entries):
+ Let APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
* org.el (org-special-properties): New special property
CLOCKSUM_T.
creating a new output buffer for each shell process. The new
buffer is added to `clean-buffer-list-kill-buffer-names'.
- * org-mobile.el (org-mobile-create-index-file): Use
- `org-global-tags-completion-table' instead of
+ * org-mobile.el (org-mobile-create-index-file):
+ Use `org-global-tags-completion-table' instead of
`org-tag-alist-for-agenda' to get the tags for the index file.
* org.el (org-global-tags-completion-table): Fix typo in
(org-mode-flyspell-verify): Exclude keywords from the new
constant.
- * org-pcomplete.el (pcomplete/org-mode/file-option): Use
- `org-options-keywords'.
+ * org-pcomplete.el (pcomplete/org-mode/file-option):
+ Use `org-options-keywords'.
* org.el (org-toggle-heading): Bugfix: use
`org-element-mark-element' instead of `org-mark-list'.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
- (org-metadown): Fall back on `org-element-drag-forward'. Also
- move chunks of declarations and require statements to get rid of
+ (org-metadown): Fall back on `org-element-drag-forward'.
+ Also move chunks of declarations and require statements to get rid of
compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org.el (org-timestamp-change): Don't use the `position'.
- * org.el (org-clock-history, org-clock-adjust-closest): New
- variables.
+ * org.el (org-clock-history, org-clock-adjust-closest):
+ New variables.
(org-timestamp-change): Maybe adjust the next or previous clock in
`org-clock-history'.
(org-shiftmetaup, org-shiftmetadown): On clock logs, update the
(org-edit-src-code, org-edit-src-continue)
(org-edit-fixed-width-region)
(org-src-do-key-sequence-at-code-block)
- (org-src-font-lock-fontify-block, org-src-fontify-buffer): Fix
- typos in docstrings.
+ (org-src-font-lock-fontify-block, org-src-fontify-buffer):
+ Fix typos in docstrings.
* org-docbook.el (org-export-docbook-emphasis-alist): Fix typo:
use "format string" instead of "formatting string".
* org-html.el (org-export-html-postamble): Ditto.
- * org-latex.el (org-export-latex-hyperref-options-format): New
- option.
+ * org-latex.el (org-export-latex-hyperref-options-format):
+ New option.
(org-export-latex-make-header): Use it.
* ob.el (org-babel-confirm-evaluate): Prevent errors when
* org-capture.el (org-capture-bookmark): New option.
(org-capture-finalize): Use it.
- * org-publish.el (org-publish-cache-file-needs-publishing): Make
- the column mandatory after #+include:.
+ * org-publish.el (org-publish-cache-file-needs-publishing):
+ Make the column mandatory after #+include:.
* org-exp.el (org-export-handle-include-files): Ditto.
* org-exp.el (org-export-handle-include-files): Allow to use
#+include with no column.
- * org-publish.el (org-publish-cache-file-needs-publishing): Make
- quotes mandatory around the file name and allow spaces in it.
+ * org-publish.el (org-publish-cache-file-needs-publishing):
+ Make quotes mandatory around the file name and allow spaces in it.
* org-html.el (org-export-as-html): Add link to Org's and Emacs's
websites.
(org-clock-frame-title-format): New option.
(org-frame-title-string): Delete.
(org-clock-update-mode-line): Minor code reformatting.
- (org-clock-in, org-clock-out, org-clock-cancel): Use
- `org-clock-frame-title-format'.
+ (org-clock-in, org-clock-out, org-clock-cancel):
+ Use `org-clock-frame-title-format'.
* org-clock.el (org-clock-get-clock-string): Add a space.
`org-agenda-bulk-unmark-all'. Check against
`org-agenda-bulk-marked-entries' before trying to unmark entries.
Minor docstring fix.
- (org-agenda-bulk-unmark-all): Renamed from
+ (org-agenda-bulk-unmark-all): Rename from
̀org-agenda-bulk-remove-all-marks'.
* org-agenda.el (org-agenda-bulk-mark-char): New option.
(org-set-property): Fix the check against
`org-properties-postprocess-alist'.
- * org-macs.el (orgstruct++-ignore-org-filling): Set
- `def-edebug-spec' correctly.
+ * org-macs.el (orgstruct++-ignore-org-filling):
+ Set `def-edebug-spec' correctly.
* org-colview.el (org-columns-string-to-number): When computing
the values for the colview, match durations and convert them to
active region when exporting a subtree/region.
* org-clock.el (org-program-exists): Remove.
- (org-show-notification, org-clock-play-sound): Use
- `executable-find' instead of `org-program-exists'.
+ (org-show-notification, org-clock-play-sound):
+ Use `executable-find' instead of `org-program-exists'.
* org-agenda.el (org-diary): Prevent failure from
`org-compile-prefix-format' when there is no agenda buffer.
* org.el (org-goto): Fix docstring and document what C-u does.
- * org-publish.el (org-publish-cache-file-needs-publishing): Use
- (case-fold-search t) when looking for #+INCLUDE:.
+ * org-publish.el (org-publish-cache-file-needs-publishing):
+ Use (case-fold-search t) when looking for #+INCLUDE:.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.
* org-agenda.el (org-toggle-sticky-agenda): Only shout a message
when called interactively.
- (org-agenda-get-restriction-and-command): Call
- `org-toggle-sticky-agenda' interactively.
+ (org-agenda-get-restriction-and-command):
+ Call `org-toggle-sticky-agenda' interactively.
* org-agenda.el (org-agenda-top-category-filter): New variable for
storing the current top-category filter.
(org-agenda-redo): Apply a top-category filter, if any.
(org-agenda-filter-by-top-category)
- (org-agenda-filter-top-category-apply): Set
- `org-agenda-top-category-filter' to the right value.
+ (org-agenda-filter-top-category-apply):
+ Set `org-agenda-top-category-filter' to the right value.
* org-clock.el (org-clock-out, org-clock-cancel)
(org-clock-in): Don't modify `frame-title-format' if it is a
* org.el (org-read-date): Set cursor-type to nil in the calendar.
- * org-faces.el (org-date-selected): Use inverse video. Don't
- explicitely set bold to nil as it causes `customize-face' to show
+ * org-faces.el (org-date-selected): Use inverse video.
+ Don't explicitely set bold to nil as it causes `customize-face' to show
the weight property and thus encourage the user to change it.
Warn in the docstring that using bold might cause problems when
displaying the calendar.
(org-time-stamp, org-read-date, org-read-date-get-relative)
(org-display-custom-time, org-get-wdays)
(org-time-string-to-absolute, org-closest-date)
- (org-timestamp-change): Allow to set hourly repeat cookie. Send
- an error when an hourly repeat cookie is set and no hour is
+ (org-timestamp-change): Allow to set hourly repeat cookie.
+ Send an error when an hourly repeat cookie is set and no hour is
specified in the timestamp.
* org-icalendar.el (org-print-icalendar-entries): Handle hourly
`org-agenda-filter-by-top-category'.
* org-ascii.el (org-export-ascii-underline): Change the default
- underlining characters for headlines of level 1 and 2. Also
- introduce \. as the underline character for headlines of level 5.
+ underlining characters for headlines of level 1 and 2.
+ Also introduce \. as the underline character for headlines of level 5.
* org-table.el (org-table-recalculate-buffer-tables)
(org-table-iterate-buffer-tables): Add autoload cookie.
2012-09-30 Christoph Dittmann <github@christoph-d.de> (tiny change)
- * org-beamer.el (org-beamer-auto-fragile-frames): Make
- [fragile] work with overlay specifications.
+ * org-beamer.el (org-beamer-auto-fragile-frames):
+ Make [fragile] work with overlay specifications.
2012-09-30 Christophe Junke <christophe.junke@inria.fr> (tiny change)
* ob.el (org-babel-result-to-file): New optional description
argument.
- (org-babel-insert-result): Moved description logic to another
+ (org-babel-insert-result): Move description logic to another
function.
* ob.el (org-babel-insert-result): Change name of filelinkdescr to
2012-09-30 Feng Shu <tumashu@gmail.com>
- * org.el (org-create-formula-image-with-imagemagick): Use
- 'call-process to launch latex so that no shell output buffer will
+ * org.el (org-create-formula-image-with-imagemagick):
+ Use 'call-process to launch latex so that no shell output buffer will
be shown when previewing formulas.
* org.el (org-create-formula-image-with-imagemagick): Fix typo.
2012-09-30 Henning Weiss <hdweiss@gmail.com>
- * org-mobile.el (org-mobile-edit): Added handling of addheading,
+ * org-mobile.el (org-mobile-edit): Add handling of addheading,
refile, archive, archive-sibling and delete edit nodes.
(org-mobile-locate-entry): Olp links containing only a file are
now be located correctly.
* org-colview.el (org-columns): New argument `columns-fmt-string'.
- * org-colview.el (org-columns-get-format-end-top-level): Split
- into `org-columns-get-format' and `org-columns-goto-top-level'.
+ * org-colview.el (org-columns-get-format-end-top-level):
+ Split into `org-columns-get-format' and `org-columns-goto-top-level'.
* org-colview.el (org-dblock-write:columnview): Add a new
parameter :format which specifies the column view format for the
* org-odt.el (org-odt-do-image-size): Replace `flet' with
equivalent construct.
- * org-odt.el (org-odt-cleanup-xml-buffers): Use
- `condition-case-no-debug' instead of
+ * org-odt.el (org-odt-cleanup-xml-buffers):
+ Use `condition-case-no-debug' instead of
`condition-case-unless-debug'. This ensures backward
compatibility with Emacs versions < 24.1.
(org-odt-cleanup-xml-buffers): New.
(org-export-as-odt-and-open, org-export-as-odt)
(org-odt-init-outfile, org-odt-save-as-outfile)
- (org-export-as-odf, org-export-as-odf-and-open): Use
- `org-odt-cleanup-xml-buffers'.
+ (org-export-as-odf, org-export-as-odf-and-open):
+ Use `org-odt-cleanup-xml-buffers'.
- * org-odt.el (org-export-odt-default-org-styles-alist): Add
- default character style.
+ * org-odt.el (org-export-odt-default-org-styles-alist):
+ Add default character style.
- * org-odt.el (org-export-odt-default-org-styles-alist): Add
- default character style.
+ * org-odt.el (org-export-odt-default-org-styles-alist):
+ Add default character style.
* org-lparse.el (org-do-lparse): Remove stray call to
`org-export-html-after-blockquotes-hook'.
* org-entities.el (org-entities): Add new entities for characters
which could cause formatting changes if typed directly.
- * org-entities.el (org-entities): Added \asciicirc entity for ^;
+ * org-entities.el (org-entities): Add \asciicirc entity for ^;
also fixed \circ expansion in latex.
* org.el (org-fontify-entities): Fix bug: The entities \sup[123]
2012-09-30 Mats Lidell <matsl@xemacs.org> (tiny change)
- * org-element.el (org-element-paragraph-separate): Remove
- redundant and misplaced t clause in case.
+ * org-element.el (org-element-paragraph-separate):
+ Remove redundant and misplaced t clause in case.
2012-09-30 Matt Lundin <mdl@imapmail.org>
* org-datetree.el: Fix regexp to allow datetree to find headings
with trailing whitespace. This fixes a bug in which an existing
datetree heading (e.g., "* 2012 ") would not be found by
- org-datetree-find-year-create if it had trailing whitespace. This
- can cause problems, for instance, if one is using column view on
+ org-datetree-find-year-create if it had trailing whitespace.
+ This can cause problems, for instance, if one is using column view on
the date tree, since editing subheadings with column view adds
whitespace at the end of the top heading.
(org-bbdb-make-anniv-hash): Fix org-bbdb anniversary functionality
to accommodate BBDB 3.x. There are two major changes in BBDB 3.x
that need to be taken into account. The first is that
- `bbdb-split' reverses the order of its parameters in 3.x. The
- second is that `bbdb-record-getprop' is replaced by
+ `bbdb-split' reverses the order of its parameters in 3.x.
+ The second is that `bbdb-record-getprop' is replaced by
bbdb-record-note in 3.x.
2012-09-30 Max Mikhanosha <max@openchat.com>
* ob-tangle.el (org-babel-tangle-collect-blocks): Use dummy string
when heading has no text.
- * org-capture.el (org-capture-inside-embedded-elisp-p): Improve
- parsing.
+ * org-capture.el (org-capture-inside-embedded-elisp-p):
+ Improve parsing.
* org-feed.el (org-feed-format-entry): Require `org-capture'.
Expand Elisp %(...) templates.
(org-feed-default-template): Update docstring.
- * org-capture.el (org-capture-expand-embedded-elisp): New
- function.
+ * org-capture.el (org-capture-expand-embedded-elisp):
+ New function.
(org-capture-fill-template): Use it.
(org-capture-inside-embedded-elisp-p): New function to tell if we
are within an Elisp %(...) template.
* org.el (org-fill-paragraph): Pass optional argument to
`fill-paragraph' to fix compatibility with XEmacs.
- * org.el (org-self-insert-cluster-for-undo): Default
- `org-self-insert-cluster-for-undo' also on XEmacs.
+ * org.el (org-self-insert-cluster-for-undo):
+ Default `org-self-insert-cluster-for-undo' also on XEmacs.
* org.el (org-kill-line): Access `visual-line-mode' only if it's
bound.
2012-09-30 Muchenxuan Tong <demon386@gmail.com> (tiny change)
- * org-timer.el (org-timer-set-mode-line): Check
- `org-timer-display' when value is 'off.
+ * org-timer.el (org-timer-set-mode-line):
+ Check `org-timer-display' when value is 'off.
2012-09-30 Nicolas Calderon Asselin <nicolas.calderon.asselin@gmail.com> (tiny change)
* ob-org.el (org-babel-default-header-args:org): By default,
export code from Org src blocks.
- * org-element.el (org-element-inline-src-block-successor): Fix
- inline-src-block parsing at the beginning of an item.
+ * org-element.el (org-element-inline-src-block-successor):
+ Fix inline-src-block parsing at the beginning of an item.
- * org-element.el (org-element--collect-affiliated-keywords): Fix
- caption parsing.
+ * org-element.el (org-element--collect-affiliated-keywords):
+ Fix caption parsing.
* org-element.el (org-element--current-element): At the very
beginning of a footnote definition or an item, next element is
always a paragraph.
* org-element.el (org-element-headline-parser): Handle nil titles.
- (org-element-inlinetask-parser): Add :raw-value property. Also
- handle nil titles.
+ (org-element-inlinetask-parser): Add :raw-value property.
+ Also handle nil titles.
* org.el (org-set-regexps-and-options): Don't consider tags as a
replacement for a missing title in an headline.
* org.el (org-mode): Call external initalizers. Now both filling
code and comments code have their own independant part in org.el.
- (org-setup-filling): Renamed from `org-set-autofill-regexps'.
+ (org-setup-filling): Rename from `org-set-autofill-regexps'.
(org-setup-comments-handling): New function.
* org.el (org-fill-paragraph): Refine filling in comments and in
* org-element.el (org-element-set-element): Rewrite function.
(org-element-adopt-elements): New function.
- (org-element-adopt-element): Removed function.
+ (org-element-adopt-element): Remove function.
(org-element--parse-elements, org-element--parse-objects): Use new
function.
very end of a paragraph.
* org.el (org-mode): Set comments related variables.
- (org-insert-comment, org-comment-or-uncomment-region): New
- functions.
+ (org-insert-comment, org-comment-or-uncomment-region):
+ New functions.
* org.el (org-fill-context-prefix): Small refactoring.
(org-fill-paragraph): Add code comments.
* org-element.el (org-element-at-point): Add :parent property to
output.
- (org-element-context): Add :parent property to output. Also
- return a single element or object instead of a list of parents.
+ (org-element-context): Add :parent property to output.
+ Also return a single element or object instead of a list of parents.
(org-element-forward, org-element-up): Apply changes.
* org.el (org-fill-context-prefix): New function.
* org-footnote.el (org-footnote-normalize): Fix positionning in
HTML export without a footnote section.
- * org-list.el (org-list-struct-indent): Follow
- `org-list-demote-modify-bullet' specifications for ordered
+ * org-list.el (org-list-struct-indent):
+ Follow `org-list-demote-modify-bullet' specifications for ordered
bullets.
(org-list-indent-item-generic, org-indent-item-tree)
(org-outdent-item-tree): Fix bug when operating on a region.
2012-09-30 T.F. Torrey <tftorrey@tftorrey.com> (tiny change)
- * org-exp.el (org-export-remember-html-container-classes): Allow
- exporting a single subtree with HTML_CONTAINER_CLASS property.
+ * org-exp.el (org-export-remember-html-container-classes):
+ Allow exporting a single subtree with HTML_CONTAINER_CLASS property.
* org-rmail.el (org-rmail-follow-link): Use `rmail-widen' instead
of `widen' and don't toggle header as `rmail-widen' already takes
* org-capture.el (org-capture-fill-template): Expand %<num> escape
sequences into text entered for <num>'th %^{PROMPT} escape.
- * org-capture.el (org-capture-fill-template): Fixed regexp for
+ * org-capture.el (org-capture-fill-template): Fix regexp for
%<n> expandos to match any positive integer.
- (org-capture-templates): Updated docstring accordingly.
+ (org-capture-templates): Update docstring accordingly.
* org-agenda.el (org-agenda-skip-timestamp-if-deadline-is-shown):
Skip timestamp items in agenda view if item is already shown as a
property override :empty-lines when inserting empty lines after
captured captured entry.
- * org-agenda.el (org-agenda-skip-if, org-agenda-skip-if-todo): Add
- new todo-unblocked and nottodo-unblocked skip conditions. These
- match as for todo and nottodo, but only for unblocked todo items.
+ * org-agenda.el (org-agenda-skip-if, org-agenda-skip-if-todo):
+ Add new todo-unblocked and nottodo-unblocked skip conditions.
+ These match as for todo and nottodo, but only for unblocked todo items.
2012-09-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
2012-09-30 Niels Giesen <niels.giesen@gmail.com>
* org-table.el (orgtbl-to-generic): Add check for :skipheadrule.
- When present, the :hline following the head will be skipped. This
- is necessary to avoid doubling of horizontal rules in LaTeX
+ When present, the :hline following the head will be skipped.
+ This is necessary to avoid doubling of horizontal rules in LaTeX
longtable environments and consequent width problems.
* org-latex.el (org-export-latex-tables-tstart)
2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-struct-indent): Follow
- `org-list-demote-modify-bullet' specifications for ordered
+ * org-list.el (org-list-struct-indent):
+ Follow `org-list-demote-modify-bullet' specifications for ordered
bullets.
(org-list-indent-item-generic, org-indent-item-tree)
(org-outdent-item-tree): Fix bug when operating on a region.
2012-04-01 Ilya Shlyakhter <ilya_shl@alum.mit.edu> (tiny change)
- * org.el (org-delete-property-globally): Fixed a bug that left
+ * org.el (org-delete-property-globally): Fix a bug that left
blank line in place of the property, instead of removing the line.
2012-04-01 Bastien Guerry <bzg@gnu.org>
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-table.el (orgtbl-self-insert-command): Use
- `backward-delete-char' instead of `delete-backward-char' as this
+ * org-table.el (orgtbl-self-insert-command):
+ Use `backward-delete-char' instead of `delete-backward-char' as this
last command gets caught by the compiler which says to not use it
in programs. `backward-delete-char' is just an alias for
`delete-backward-char' which is internally remapped to
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-mime.el (org-mime-htmlize): Set
- `org-export-with-LaTeX-fragments' correctly.
+ * org-mime.el (org-mime-htmlize):
+ Set `org-export-with-LaTeX-fragments' correctly.
2012-04-01 Bastien Guerry <bzg@gnu.org>
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
- * ob-lob.el (org-babel-lob-get-info): Removed extra []s when
+ * ob-lob.el (org-babel-lob-get-info): Remove extra []s when
parsing inline call_foo lines.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
2012-04-01 Thomas Morgan <tlm@ziiuu.com> (tiny change)
- * org-habit.el (org-habit-insert-consistency-graphs): Fix
- alignment of consistency graph in filtered agenda view.
+ * org-habit.el (org-habit-insert-consistency-graphs):
+ Fix alignment of consistency graph in filtered agenda view.
2012-04-01 Bastien Guerry <bzg@gnu.org>
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-agenda.el (org-agenda-custom-commands-local-options): Fix
- incorrect custom option definition.
+ * org-agenda.el (org-agenda-custom-commands-local-options):
+ Fix incorrect custom option definition.
2012-04-01 Bastien Guerry <bzg@gnu.org>
* org-odt.el (org-export-odt-category-strings): New custom
variable.
- (org-odt-category-map-alist): Modify interpretation. Don't
- use the same field to double up as both a OpenDocument
+ (org-odt-category-map-alist): Modify interpretation.
+ Don't use the same field to double up as both a OpenDocument
variable and a category string. Entries in this list now
specify only the OpenDocument variable. Category strings are
obtained through an indirect lookup of
`org-export-odt-category-strings'. Use same OpenDocument
- variables as what LibreOffice uses for various entities. Fix
- docstring.
+ variables as what LibreOffice uses for various entities.
+ Fix docstring.
(org-odt-add-label-definition)
(org-odt-format-label-definition)
(org-odt-format-label-reference): Propagate above changes.
2012-04-01 Jambunathan K <kjambunathan@gmail.com>
* org-lparse.el (org-do-lparse): Make effective setting of
- `org-export-headline-levels' available to the ODT exporter. Also
- remove some stale comments.
+ `org-export-headline-levels' available to the ODT exporter.
+ Also remove some stale comments.
2012-04-01 Jambunathan K <kjambunathan@gmail.com>
2012-04-01 Ilya Shlyakhter <ilya_shl@alum.mit.edu> (tiny change)
- * ob-lilypond.el (ly-compile-lilyfile): Fixed misplaced comma in a
+ * ob-lilypond.el (ly-compile-lilyfile): Fix misplaced comma in a
quoting expression.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
- * ob.el (org-babel-examplize-region): Fixed bug in examplization.
+ * ob.el (org-babel-examplize-region): Fix bug in examplization.
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-ending-method, org-list-end-regexp):
- Removed variables.
+ Remove variables.
(org-in-item-p, org-list-separating-blank-lines-number)
(org-list-parse-list, org-list-struct): Apply changes.
2012-04-01 David Maus <dmaus@ictsoc.de>
- * org-clock.el (org-in-clocktable-p): Moved to org.el.
+ * org-clock.el (org-in-clocktable-p): Move to org.el.
* org.el (org-in-clocktable-p): New function. Moved from
org-clock.el.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
- * ob.el (org-babel-strip-protective-commas): Use
- `org-strip-protective-commas'.
+ * ob.el (org-babel-strip-protective-commas):
+ Use `org-strip-protective-commas'.
- * org-exp.el (org-export-select-backend-specific-text): Use
- `org-strip-protective-commas'.
+ * org-exp.el (org-export-select-backend-specific-text):
+ Use `org-strip-protective-commas'.
- * org-src.el (org-edit-src-code): Use
- `org-strip-protective-commas'.
+ * org-src.el (org-edit-src-code):
+ Use `org-strip-protective-commas'.
* org.el (org-strip-protective-commas): Single definition for this
functionality.
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-ending-method, org-list-end-regexp):
- Removed variables.
+ Remove variables.
(org-in-item-p, org-list-separating-blank-lines-number)
(org-list-parse-list, org-list-struct): Apply changes.
2012-04-01 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-as-odt-to-buffer)
- (org-replace-region-by-odt, org-export-region-as-odt): Remove
- these interactive functions. They are of questionable value.
+ (org-replace-region-by-odt, org-export-region-as-odt):
+ Remove these interactive functions. They are of questionable value.
2012-04-01 Toby S. Cubitt <tsc25@cantab.net> (tiny change)
2012-04-01 David Maus <dmaus@ictsoc.de>
- * org-clock.el (org-in-clocktable-p): Moved to org.el.
+ * org-clock.el (org-in-clocktable-p): Move to org.el.
* org.el (org-in-clocktable-p): New function. Moved from org-clock.el.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
- * org-exp-blocks.el (org-export-blocks): Changed the name of
+ * org-exp-blocks.el (org-export-blocks): Change the name of
exporting comment blocks given that it seems regular comment
blocks no longer export.
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
* ob-exp.el (org-babel-exp-in-export-file)
- (org-babel-exp-src-block, org-babel-exp-inline-src-blocks): Allow
- org-current-export-file to contain a buffer.
+ (org-babel-exp-src-block, org-babel-exp-inline-src-blocks):
+ Allow org-current-export-file to contain a buffer.
2012-04-01 Jambunathan K <kjambunathan@gmail.com>
* org-inlinetask.el (org-inlinetask-show-first-star): New option.
(org-inlinetask-fontify): Honor `org-inlinetask-show-first-star'.
- * org-indent.el (org-indent-set-line-properties): Honor
- `org-inlinetask-show-first-star'.
+ * org-indent.el (org-indent-set-line-properties):
+ Honor `org-inlinetask-show-first-star'.
2012-04-01 Bastien Guerry <bzg@gnu.org>
* org.el (org-at-drawer-p): Normalize the docstring to match other
`org-at-*-p' docstrings.
- (org-indent-block, org-indent-drawer, org-at-block-p): New
- functions.
+ (org-indent-block, org-indent-drawer, org-at-block-p):
+ New functions.
(org-metaright): Use the new functions to indent a drawer or a
block depending on the context. Also update the docstring.
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-inlinetask.el (org-inlinetask-toggle-visibility): Use
- `org-show-entry' instead of `outline-flag-region' to keep the
+ * org-inlinetask.el (org-inlinetask-toggle-visibility):
+ Use `org-show-entry' instead of `outline-flag-region' to keep the
drawers folded when unfolding an inline task.
2012-04-01 Torsten Anders <torsten.anders@beds.ac.uk> (tiny change)
* org-odt.el (org-odt-table-style-format): New. Template for
auto-generated table styles.
- (org-odt-automatic-styles, org-odt-object-counters): New
- variables.
+ (org-odt-automatic-styles, org-odt-object-counters):
+ New variables.
(org-odt-add-automatic-style): New function.
- (org-odt-write-automatic-styles): New function. Create
- automatic styles for tables that have custom :rel-width.
+ (org-odt-write-automatic-styles): New function.
+ Create automatic styles for tables that have custom :rel-width.
(org-odt-begin-table): Parse attributes specified with
"#+ATTR_ODT: " option and use it to create an automatic table
style.
- (org-odt-save-as-outfile): Call
- `org-odt-add-write-automatic-styles'.
+ (org-odt-save-as-outfile):
+ Call `org-odt-add-write-automatic-styles'.
(org-odt-init-outfile): Init newly add variables.
(org-odt-section-count): Remove it.
(org-odt-begin-section): Use `org-odt-add-automatic-style' to
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-html.el (org-export-as-html): Initialize
- `html-pre-real-contents' correctly.
+ * org-html.el (org-export-as-html):
+ Initialize `html-pre-real-contents' correctly.
2012-04-01 Bastien Guerry <bzg@gnu.org>
- * org-html.el (org-export-as-html): Initialize
- `html-pre-real-contents' correctly.
+ * org-html.el (org-export-as-html):
+ Initialize `html-pre-real-contents' correctly.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
- * ob-clojure.el (org-babel-execute:clojure): Removed dependency
+ * ob-clojure.el (org-babel-execute:clojure): Remove dependency
on deprecated swank-clojure.
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
* ob-exp.el (org-babel-exp-src-block): Use `org-babel-noweb-p'.
(org-babel-exp-inline-src-blocks): Use `org-babel-noweb-p'.
- * ob-tangle.el (org-babel-tangle-collect-blocks): Use
- `org-babel-noweb-p'.
+ * ob-tangle.el (org-babel-tangle-collect-blocks):
+ Use `org-babel-noweb-p'.
* ob.el (org-babel-execute-src-block): Use `org-babel-noweb-p'.
(org-babel-expand-src-block): Use `org-babel-noweb-p'.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-agenda.el (org-agenda-filter-by-tag): Use
- `read-char-exclusive' instead of `read-char'.
+ * org-agenda.el (org-agenda-filter-by-tag):
+ Use `read-char-exclusive' instead of `read-char'.
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com> (tiny change)
- * org-clock.el (org-clock-in, org-clock-find-position): Remove
- erraneous space in regexp.
+ * org-clock.el (org-clock-in, org-clock-find-position):
+ Remove erraneous space in regexp.
2012-01-03 Eric Schulte <eric.schulte@gmx.com>
* ob.el (org-babel-expand-noweb-references): Rather than using
a pure regexp solution to resolve noweb references, actually
- check the information of every code block in the buffer. This
- will cause a slowdown in noweb reference expansion, but is
+ check the information of every code block in the buffer.
+ This will cause a slowdown in noweb reference expansion, but is
necessary for correct behavior.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Eric Schulte <eric.schulte@gmx.com>
- * ob.el (org-babel-map-call-lines): Moved this file from
+ * ob.el (org-babel-map-call-lines): Move this file from
ob-lob.el into ob.el to ease dependency pains.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-index-generate-theindex): Use
- theindex.inc for storing index entries, and theindex.org for
+ * org-publish.el (org-publish-index-generate-theindex):
+ Use theindex.inc for storing index entries, and theindex.org for
including theindex.inc.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-index-generate-theindex): Create
- proper file target for index entries in subdirectories.
+ * org-publish.el (org-publish-index-generate-theindex):
+ Create proper file target for index entries in subdirectories.
2012-01-03 Bastien Guerry <bzg@gnu.org>
customize what goes before the document body. Currently it
outputs title, author and email, date and toc.
(org-odt-begin-document-body): Use `org-odt-format-preamble'.
- (org-odt-format-date): Renamed from
+ (org-odt-format-date): Rename from
`org-odt-iso-date-from-org-timestamp'. Also added an
additional param for format string.
- (org-odt-begin-annotation, org-odt-update-meta-file): Use
- `org-odt-format-date'.
+ (org-odt-begin-annotation, org-odt-update-meta-file):
+ Use `org-odt-format-date'.
2012-01-03 Bastien Guerry <bzg@gnu.org>
overlays.
(org-agenda-category-filter-preset): New variable.
(org-finalize-agenda, org-agenda-redo)
- (org-agenda-filter-make-matcher, org-agenda-filter-apply): Handle
- both category and tag filters.
+ (org-agenda-filter-make-matcher, org-agenda-filter-apply):
+ Handle both category and tag filters.
(org-agenda-filter-show-all-tag): Rename from
`org-agenda-filter-by-tag-show-all'.
(org-agenda-filter-show-all-cat): New function.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org.el (org-loop-over-headlines-in-active-region): Fix
- docstring.
+ * org.el (org-loop-over-headlines-in-active-region):
+ Fix docstring.
(org-todo, org-deadline, org-schedule): Honor the 'start-level
value of `org-loop-over-headlines-in-active-region'.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-agenda.el (org-agenda-filter-by-tag): Use
- `read-char-exclusive' instead of `read-char'.
+ * org-agenda.el (org-agenda-filter-by-tag):
+ Use `read-char-exclusive' instead of `read-char'.
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com> (tiny change)
- * org-clock.el (org-clock-in, org-clock-find-position): Remove
- erraneous space in regexp.
+ * org-clock.el (org-clock-in, org-clock-find-position):
+ Remove erraneous space in regexp.
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
OpenDocument styles and schema files from. Set this variable
explicitly only if the in-built heuristics for locating the
above files fails.
- (org-odt-styles-dir-list, org-odt-schema-dir-list): New
- variables. Pay specific attention to (eval-when-compile ...)
+ (org-odt-styles-dir-list, org-odt-schema-dir-list):
+ New variables. Pay specific attention to (eval-when-compile ...)
form through which Makefile's $(datadir) - contained in
`org-odt-data-dir' - gets compiled in as a "hard coded"
constant.
* ob.el (org-babel-expand-noweb-references): Rather than using
a pure regexp solution to resolve noweb references, actually
- check the information of every code block in the buffer. This
- will cause a slowdown in noweb reference expansion, but is
+ check the information of every code block in the buffer.
+ This will cause a slowdown in noweb reference expansion, but is
necessary for correct behavior.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Eric Schulte <eric.schulte@gmx.com>
- * ob.el (org-babel-map-call-lines): Moved this file from
+ * ob.el (org-babel-map-call-lines): Move this file from
ob-lob.el into ob.el to ease dependency pains.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-index-generate-theindex): Use
- theindex.inc for storing index entries, and theindex.org for
+ * org-publish.el (org-publish-index-generate-theindex):
+ Use theindex.inc for storing index entries, and theindex.org for
including theindex.inc.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-index-generate-theindex): Create
- proper file target for index entries in subdirectories.
+ * org-publish.el (org-publish-index-generate-theindex):
+ Create proper file target for index entries in subdirectories.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-odt.el (org-export-odt-default-org-styles-alist): Add
- styles for title and subtitle.
+ * org-odt.el (org-export-odt-default-org-styles-alist):
+ Add styles for title and subtitle.
(org-odt-format-toc): New.
(org-odt-format-preamble): New. Users can redefine this to
customize what goes before the document body. Currently it
outputs title, author and email, date and toc.
(org-odt-begin-document-body): Use `org-odt-format-preamble'.
- (org-odt-format-date): Renamed from
+ (org-odt-format-date): Rename from
`org-odt-iso-date-from-org-timestamp'. Also added an
additional param for format string.
- (org-odt-begin-annotation, org-odt-update-meta-file): Use
- `org-odt-format-date'.
+ (org-odt-begin-annotation, org-odt-update-meta-file):
+ Use `org-odt-format-date'.
2012-01-03 Eric Schulte <eric.schulte@gmx.com>
2012-01-03 Dave Abrahams <dave@boostpro.com> (tiny change)
- * org-agenda.el (org-agenda-do-tree-to-indirect-buffer): New
- function.
+ * org-agenda.el (org-agenda-do-tree-to-indirect-buffer):
+ New function.
(org-agenda-tree-to-indirect-buffer): Use the new function.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-odt.el (org-odt-format-source-code-or-example): Try
- loading htmlfontify safely.
+ * org-odt.el (org-odt-format-source-code-or-example):
+ Try loading htmlfontify safely.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Eric Schulte <eric.schulte@gmx.com>
- * ob.el (org-babel-expand-noweb-references): Fixed regexp.
+ * ob.el (org-babel-expand-noweb-references): Fix regexp.
2012-01-03 Michael Brand <michael.ch.brand@gmail.com>
2012-01-03 Christian Moe <mail@christianmoe.com> (tiny change)
- * org-html.el (org-export-as-html): Apply
- `org-export-html-get-todo-kwd-class-name' to the class
+ * org-html.el (org-export-as-html):
+ Apply `org-export-html-get-todo-kwd-class-name' to the class
attribute of the todo-keyword span tag, not to its text
content.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-html.el (org-export-html-headline-anchor-format): New
- option.
+ * org-html.el (org-export-html-headline-anchor-format):
+ New option.
(org-html-level-start): Use the new option.
2012-01-03 Rob Giardina <rob@giardina.us> (tiny change)
- * org-agenda.el (org-agenda-with-point-at-orig-entry): Small
- bugfix.
+ * org-agenda.el (org-agenda-with-point-at-orig-entry):
+ Small bugfix.
2012-01-03 Christian Moe <mail@christianmoe.com> (tiny change)
* org-special-blocks.el
- (org-special-blocks-convert-html-special-cookies): Close
- paragraph before opening or closing the <div>, and open
+ (org-special-blocks-convert-html-special-cookies):
+ Close paragraph before opening or closing the <div>, and open
paragraph after. Also changed newline placement to be the same
as for other blocks.
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-odt.el (org-odt-data-dir): Removed.
- (org-odt-styles-dir, org-export-odt-schema-dir): New
- variables.
+ * org-odt.el (org-odt-data-dir): Remove.
+ (org-odt-styles-dir, org-export-odt-schema-dir):
+ New variables.
* org-odt.el, org-lparse.el: New files.
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org.el (org-link-unescape, org-link-unescape-compound): Fix
- two typos in docstrings.
+ * org.el (org-link-unescape, org-link-unescape-compound):
+ Fix two typos in docstrings.
2012-01-03 Thomas Dye <dk@poto.local>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * org-exp.el (org-export-grab-title-from-buffer): Don't
- license to kill text inside blocks when getting a title.
+ * org-exp.el (org-export-grab-title-from-buffer):
+ Don't license to kill text inside blocks when getting a title.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * org.el (org-reduce): Added a less functional Org-mode copy of
+ * org.el (org-reduce): Add a less functional Org-mode copy of
the cl reduce function.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org.el (org-fontify-meta-lines-and-blocks-1): Recognize
- "name" as a valid keyword that can preceed a block.
+ * org.el (org-fontify-meta-lines-and-blocks-1):
+ Recognize "name" as a valid keyword that can preceed a block.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob.el (org-babel-named-src-block-regexp-for-name): Ensure
- that partial names are not matched.
+ * ob.el (org-babel-named-src-block-regexp-for-name):
+ Ensure that partial names are not matched.
(org-babel-named-data-regexp-for-name): Ensure that partial names
are not matched.
2012-01-03 Milan Zamazal <pdm@zamazal.org>
- * org.el (org-set-outline-overlay-data): Use
- outline-flag-region to make a region invisible. This ensures
+ * org.el (org-set-outline-overlay-data):
+ Use outline-flag-region to make a region invisible. This ensures
all necessary actions, especially adding
isearch-open-invisible property, are applied.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob-lob.el (org-babel-in-example-or-verbatim): Fix
- compilation warning.
+ * ob-lob.el (org-babel-in-example-or-verbatim):
+ Fix compilation warning.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob-lisp.el (org-babel-execute:lisp): Fixed typo.
- (org-babel-lisp-vector-to-list): Fixed typo.
+ * ob-lisp.el (org-babel-execute:lisp): Fix typo.
+ (org-babel-lisp-vector-to-list): Fix typo.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob-exp.el (org-exp-res/src-name-cleanup): Updated Documentation.
+ * ob-exp.el (org-exp-res/src-name-cleanup): Update Documentation.
- * ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
- regular expression.
- (org-babel-inline-lob-one-liner-regexp): Updated regular
+ * ob-lob.el (org-babel-block-lob-one-liner-regexp):
+ Update regular expression.
+ (org-babel-inline-lob-one-liner-regexp): Update regular
expression.
* ob-ref.el (org-babel-ref-resolve): Notice when something that
* ob-table.el: Updated documentation.
- * ob.el (org-babel-src-name-regexp): Simplified regexp.
- (org-babel-get-src-block-info): Updated match strings.
- (org-babel-data-names): Simplified acceptable names.
+ * ob.el (org-babel-src-name-regexp): Simplify regexp.
+ (org-babel-get-src-block-info): Update match strings.
+ (org-babel-data-names): Simplify acceptable names.
(org-babel-find-named-block): Indentation.
- (org-babel-find-named-result): Updated to not return a code block
+ (org-babel-find-named-result): Update to not return a code block
as a result.
- * org.el (org-fontify-meta-lines-and-blocks-1): Removing
- references to old syntactic elements.
+ * org.el (org-fontify-meta-lines-and-blocks-1):
+ Removing references to old syntactic elements.
(org-additional-option-like-keywords): Removing references to
old syntactic elements.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
- (org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
+ (org-nl-done-regexp, org-looking-at-done-regexp): Remove variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text. Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers)
2012-01-03 Kai Tetzlaff <kai.tetzlaff@web.de> (tiny change)
- * org-publish.el (org-publish-file): Added 'eval'ing the value of
+ * org-publish.el (org-publish-file): Add 'eval'ing the value of
the :publishing-directory property before using it as destination
of the publishing project. This allows to construct the publish
destination directory dynamically at run-time using the return
* ob.el: Removing `org-babel-params-from-buffer' and
#+PROPERTIES: entirely.
- * ob-exp.el (org-babel-exp-src-block): Removing
- `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
+ * ob-exp.el (org-babel-exp-src-block):
+ Removing `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
- * ob-lob.el (org-babel-lob-execute): Removing
- `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
+ * ob-lob.el (org-babel-lob-execute):
+ Removing `org-babel-params-from-buffer' and #+PROPERTIES: entirely.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
property for consistency. Renamed local variable `aligns' to
`cookies'.
- * org-html.el (org-format-org-table-html): Use
- `org-col-cookies'. Renamed local variable forced-aligns to
+ * org-html.el (org-format-org-table-html):
+ Use `org-col-cookies'. Renamed local variable forced-aligns to
col-cookies.
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
(org-format-latex-as-mathml): New functions.
(org-format-latex): Add a new local variable block-type that notes
the nature of the equation - inline or display. Associate it's
- value to `org-latex-src-embed-type' property of dvipng links. Add
- mathml as new processing type.
+ value to `org-latex-src-embed-type' property of dvipng links.
+ Add mathml as new processing type.
2012-01-03 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
- * org-latex.el (org-export-latex-tables): Honor
- `org-export-latex-table-caption-above'
+ * org-latex.el (org-export-latex-tables):
+ Honor `org-export-latex-table-caption-above'
(org-export-latex-table-caption-above): New option.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob.el (org-babel-insert-header-arg): Fixed typo.
+ * ob.el (org-babel-insert-header-arg): Fix typo.
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-exp.el (org-export-number-lines): Modified. Add a new
+ * org-exp.el (org-export-number-lines): Modify. Add a new
parameter `preprocess' and use this for backend-agnostic
handling of literal examples.
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el
- (org-agenda-skip-additional-timestamps-same-entry): Change
- default value.
+ (org-agenda-skip-additional-timestamps-same-entry):
+ Change default value.
2012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-parents-alist): When no parent is found
- for an item, set it as the closest less indented item above. If
- none is found, make it a top level item.
+ for an item, set it as the closest less indented item above.
+ If none is found, make it a top level item.
(org-list-write-struct): Externalize code.
(org-list-struct-fix-item-end): New function.
(org-list-struct): Remove a now useless fix.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-footnote.el (org-footnote-at-definition-p): Remove
- useless `org-re'.
+ * org-footnote.el (org-footnote-at-definition-p):
+ Remove useless `org-re'.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * ob-asymptote.el (org-babel-asymptote-define-type): Silence
- byte-compiler.
+ * ob-asymptote.el (org-babel-asymptote-define-type):
+ Silence byte-compiler.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * org-bibtex.el (org-bibtex-type-property-name): Configurable
- property name for bibtex entry types.
+ * org-bibtex.el (org-bibtex-type-property-name):
+ Configurable property name for bibtex entry types.
(org-bibtex-headline): Use new configurable property name.
(org-bibtex-check): Use new configurable property name.
(org-bibtex-create): Use new configurable property name.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob-tangle.el (org-babel-tangle-collect-blocks): Better
- delimiting of Org-mode text preceding a code block.
+ * ob-tangle.el (org-babel-tangle-collect-blocks):
+ Better delimiting of Org-mode text preceding a code block.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob-tangle.el (org-babel-process-comment-text): Customizable
- function to process comment text.
+ * ob-tangle.el (org-babel-process-comment-text):
+ Customizable function to process comment text.
(org-babel-tangle-collect-blocks): Make use of new
customizable processing function.
(org-babel-spec-to-string): Call customizable function rather than
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * org-exp.el (org-export-select-backend-specific-text): Only
- remove commas on the front line of a code block.
+ * org-exp.el (org-export-select-backend-specific-text):
+ Only remove commas on the front line of a code block.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-footnote.el (org-footnote-in-valid-context-p): No
- footnote in latex fragments.
+ * org-footnote.el (org-footnote-in-valid-context-p):
+ No footnote in latex fragments.
2012-01-03 Martin Rudalics <rudalics@gmx.at>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-inlinetask.el (org-inlinetask-goto-end): Small
- refactoring.
+ * org-inlinetask.el (org-inlinetask-goto-end):
+ Small refactoring.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
* ob-asymptote.el (org-babel-asymptote-var-to-asymptote):
refactor code.
- (org-babel-asymptote-table-to-array): Removed function.
+ (org-babel-asymptote-table-to-array): Remove function.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-inlinetask.el (org-inlinetask-goto-end): Correctly
- detect the end of an inlinetask when the next one starts
+ * org-inlinetask.el (org-inlinetask-goto-end):
+ Correctly detect the end of an inlinetask when the next one starts
immediately after the current one. Also, return position of
point.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * ob-asymptote.el (org-babel-asymptote-define-type): Elisp
- floats are asymptote reals.
+ * ob-asymptote.el (org-babel-asymptote-define-type):
+ Elisp floats are asymptote reals.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Bastien Guerry <bzg@gnu.org>
* org-agenda.el (org-search-view, org-agenda-get-todos)
- (org-agenda-get-deadlines, org-agenda-get-scheduled): Add
- `category-pos' in let construct.
+ (org-agenda-get-deadlines, org-agenda-get-scheduled):
+ Add `category-pos' in let construct.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * org-exp-blocks.el (org-export-blocks-preprocess): Explicitly
- cleaning up markers.
+ * org-exp-blocks.el (org-export-blocks-preprocess):
+ Explicitly cleaning up markers.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-separating-blank-lines-number): The
- behaviour of `org-back-over-empty-lines' depends on the
+ * org-list.el (org-list-separating-blank-lines-number):
+ The behaviour of `org-back-over-empty-lines' depends on the
associated value of `headline' in
`org-blank-before-new-entry', which is out of context in a
list.
buffer isn't being watched, resume initialization of other watched
buffers. In that case, give hand to others idle timers or
processes more frequently.
- (org-indent-agent-active-delay): Renamed from
+ (org-indent-agent-active-delay): Rename from
`org-indent-agent-process-duration'.
(org-indent-agent-passive-delay): New variable.
(org-indent-agent-resume-delay): Change value.
* org-agenda.el (org-agenda-include-all-todo): Declare this option
as no longer working.
(org-timeline): Rename the include-all argument to dotodo.
- (org-arg-loc): Renamed from` org-include-all-loc'.
+ (org-arg-loc): Rename from` org-include-all-loc'.
(org-agenda-list): Rename the INCLUDE-ALL argument to ARG,
because its function has changed.
(org-indent-initial-timer, org-indent-initial-resume-timer)
(org-indent-initial-process-duration)
(org-indent-initial-resume-delay)
- (org-indent-initial-lock): Removed variables.
+ (org-indent-initial-lock): Remove variables.
(org-indent-mode): Set up an agent to watch current buffer, or
add it to the list of already watched buffers.
(org-indent-initialize-agent): New function.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-indent.el (org-indent-modified-headline-flag): Renamed from
+ * org-indent.el (org-indent-modified-headline-flag): Rename from
`org-indent-deleted-headline-flag'
- (org-indent-notify-modified-headline): Renamed from
+ (org-indent-notify-modified-headline): Rename from
`org-indent-notify-deleted-headline'. Handle situations when
the stars of an headline are modified.
(org-indent-refresh-maybe): Remove case now handled by
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-indent.el (org-indent-inlinetask-first-star): New
- variable.
+ * org-indent.el (org-indent-inlinetask-first-star):
+ New variable.
(org-indent-add-properties): Set the first star of inline-tasks'
virtual indentation in `org-warning' face.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
* org-indent.el (org-indent-initial-marker)
- (org-indent-initial-timer, org-indent-initial-lock): New
- variables.
+ (org-indent-initial-timer, org-indent-initial-lock):
+ New variables.
(org-indent-mode): At initialization, start an idle timer to indent
the whole buffer. When the user is asking for control, interrupt the
process, and resume at the same point when idle again.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-indent.el (org-indent-fix-section-after-idle-time): Remove
- variable.
+ * org-indent.el (org-indent-fix-section-after-idle-time):
+ Remove variable.
(org-indent-initialize): Remove timer.
(org-indent-add-properties): Refactor code.
(org-indent-refresh-subtree, org-indent-refresh-section)
- (org-indent-refresh-buffer,org-indent-set-initial-properties): Remove
- functions.
+ (org-indent-refresh-buffer,org-indent-set-initial-properties):
+ Remove functions.
(org-indent-deleted-headline): New variable.
- (org-indent-notify-deleted-headline,org-indent-refresh-maybe): New
- functions.
+ (org-indent-notify-deleted-headline,org-indent-refresh-maybe):
+ New functions.
(org-indent-mode): Insert new functions into a hook.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
line, as required by `wrap-prefix' specificity.
(org-indent-refresh-section,org-indent-refresh-subtree): Refactor.
(org-indent-refresh-view): New function.
- (org-indent-refresh-to, org-indent-refresh-section): Removed
- functions.
+ (org-indent-refresh-to, org-indent-refresh-section):
+ Remove functions.
* org.el (org-unfontify-region): Do not remove prefix
properties when unfontifying a region.
2012-01-03 Bastien Guerry <bzg@gnu.org>
* org-clock.el (org-duration-string-to-minutes)
- (org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes): Move
- from org.el.
+ (org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
+ Move from org.el.
2012-01-03 Bastien Guerry <bzg@gnu.org>
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-archive.el (org-archive-to-archive-sibling): Use
- `org-outline-regexp' instead of `outline-regexp'.
+ * org-archive.el (org-archive-to-archive-sibling):
+ Use `org-outline-regexp' instead of `outline-regexp'.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-inlinetask.el (org-inlinetask-export-templates): Fixed
- template for html so that the exported file is valid
+ * org-inlinetask.el (org-inlinetask-export-templates):
+ Fix template for html so that the exported file is valid
xhtml. Added template for odt.
(org-inlinetask-export-handler): Fix typo in the regexp that
trims content. Make sure that the content is flanked by
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-inlinetask.el (org-inlinetask-export-templates): Fix
- docstring.
+ * org-inlinetask.el (org-inlinetask-export-templates):
+ Fix docstring.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Jambunathan K <kjambunathan@gmail.com>
- * org-inlinetask.el (org-inlinetask-export-handler): Don't
- export inline tasks if the current backend has provided no
+ * org-inlinetask.el (org-inlinetask-export-handler):
+ Don't export inline tasks if the current backend has provided no
entries in `org-inlinetask-export-templates'.
2012-01-03 Valentin Wüstholz <wuestholz@gmail.com> (tiny change)
2012-01-03 David Maus <dmaus@ictsoc.de>
- * org-agenda.el (org-batch-agenda, org-batch-agenda-csv): Use
- `org-eval-in-environment.
+ * org-agenda.el (org-batch-agenda, org-batch-agenda-csv):
+ Use `org-eval-in-environment.
2012-01-03 David Maus <dmaus@ictsoc.de>
- * org-macs.el (org-make-parameter-alist): New function. Turn
- flat list of alternating symbol names and values into an alist
+ * org-macs.el (org-make-parameter-alist): New function.
+ Turn flat list of alternating symbol names and values into an alist
with symbol name in car and value in cdr.
2012-01-03 David Maus <dmaus@ictsoc.de>
- * org-agenda.el (org-agenda-with-point-at-orig-entry): Use
- macro `org-with-gensyms'.
+ * org-agenda.el (org-agenda-with-point-at-orig-entry):
+ Use macro `org-with-gensyms'.
2012-01-03 David Maus <dmaus@ictsoc.de>
- * org-macs.el (org-substitute-posix-classes): New
- function. Substitute posix classes in regular expression.
+ * org-macs.el (org-substitute-posix-classes):
+ New function. Substitute posix classes in regular expression.
(org-re): Use new function.
2012-01-03 David Maus <dmaus@ictsoc.de>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-footnote.el (org-footnote-label-history): Removed
- variable
+ * org-footnote.el (org-footnote-label-history):
+ Remove variable
(org-footnote-new): Remove call to that variable.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
- * ob.el (org-babel-sha1-hash): Removed use of `copy-seq'.
+ * ob.el (org-babel-sha1-hash): Remove use of `copy-seq'.
2012-01-03 Eric Schulte <schulte.eric@gmail.com>
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-footnote.el (org-footnote-in-valid-context-p): Check
- `org-protected' property before allowing to match a footnote.
+ * org-footnote.el (org-footnote-in-valid-context-p):
+ Check `org-protected' property before allowing to match a footnote.
(org-footnote-at-reference-p): Remove an obsolete test. It is now
done in the previous function.
(org-narrow-to-block, org-in-block-p)
(org-indent-line-function): Applied the rename.
- * ob-exp.el (org-babel-in-example-or-verbatim): Applied
- rename. Also removed a white space.
+ * ob-exp.el (org-babel-in-example-or-verbatim):
+ Applied rename. Also removed a white space.
2012-01-03 Nicolas Goaziou <n.goaziou@gmail.com>
2011-09-02 Chong Yidong <cyd@stupidchicken.com>
- * org-compat.el (org-pop-to-buffer-same-window): Deleted.
+ * org-compat.el (org-pop-to-buffer-same-window): Delete.
* ob-ref.el (org-babel-ref-goto-headline-id):
* org.el (org-get-location, org-tree-to-indirect-buffer)
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-index-generate-theindex): Rename
- from `org-publish-index-generate-theindex.inc'. Use the file
+ * org-publish.el (org-publish-index-generate-theindex):
+ Rename from `org-publish-index-generate-theindex.inc'. Use the file
theindex.org directly instead of including theindex.inc.
(org-publish-projects): Don't delete .orgx files.
(org-publish-aux-preprocess): Use .file.orgx.
unless they were already visited.
(org-sitemap-sort-files, org-sitemap-sort-folders)
(org-sitemap-ignore-case, org-sitemap-requested)
- (org-sitemap-date-format, org-sitemap-file-entry-format): Use
- a correct prefix.
+ (org-sitemap-date-format, org-sitemap-file-entry-format):
+ Use a correct prefix.
(org-publish-projects): Make sure to delete .orgx files.
(org-publish-index-generate-theindex.inc): Small docstring fix.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org.el (org-paste-subtree, org-kill-is-subtree-p)
- (org-yank-folding-would-swallow-text, org-yank-generic): Use
- `org-with-limited-levels' macro.
+ (org-yank-folding-would-swallow-text, org-yank-generic):
+ Use `org-with-limited-levels' macro.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Matt Lundin <mdl@imapmail.org>
- * org-bibtex.el (org-bibtex-create, org-bibtex-write): Change
- argument of `org-toggle-tag' to 'on. (Other arguments, e.g., t,
+ * org-bibtex.el (org-bibtex-create, org-bibtex-write):
+ Change argument of `org-toggle-tag' to 'on. (Other arguments, e.g., t,
have no effect).
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
- (org-goto-first-child, org-show-entry): Use
- `org-outline-regexp' and `org-outline-regexp-bol'.
+ (org-goto-first-child, org-show-entry):
+ Use `org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-latex.el (org-export-latex-image-default-option): Change
- default value.
+ * org-latex.el (org-export-latex-image-default-option):
+ Change default value.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Jon Anders Skorpen <jonas@ifi.uio.no> (tiny change)
- * org-publish.el (org-publish-cache-file-needs-publishing): Regexp
- did not find includes with double quoted file names.
+ * org-publish.el (org-publish-cache-file-needs-publishing):
+ Regexp did not find includes with double quoted file names.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-latex.el (org-export-latex-list-parameters): Complete
- default value with cbtrans option.
+ * org-latex.el (org-export-latex-list-parameters):
+ Complete default value with cbtrans option.
* org-list.el (org-list-to-latex): Set a more consistent default
value.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-delete-item, org-list-send-item): New
- functions.
+ * org-list.el (org-list-delete-item, org-list-send-item):
+ New functions.
2011-07-28 Bastien Guerry <bzg@gnu.org>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-plain-list-ordered-item-terminator): Remove
- incorrect assumption.
+ * org-list.el (org-plain-list-ordered-item-terminator):
+ Remove incorrect assumption.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-exp.el (org-export-preprocess-string): If the last subtree
- is a task, footnotes may be removed along with the subtree. This
- patch ensures footnotes are put at the end of the buffer after the
+ is a task, footnotes may be removed along with the subtree.
+ This patch ensures footnotes are put at the end of the buffer after the
subtree has been removed.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-python.el (org-babel-python-evaluate-session): Enough
- newlines to ensure a return when ":results output :session".
+ * ob-python.el (org-babel-python-evaluate-session):
+ Enough newlines to ensure a return when ":results output :session".
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-table.el (org-table-time-seconds-to-string): Use
- `org-format-seconds' instead of `format-seconds'.
+ * org-table.el (org-table-time-seconds-to-string):
+ Use `org-format-seconds' instead of `format-seconds'.
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 David Maus <dmaus@ictsoc.de>
- * ob-haskell.el (org-babel-haskell-export-to-lhs): Call
- `kill-buffer' with argument indiciating to kill current
+ * ob-haskell.el (org-babel-haskell-export-to-lhs):
+ Call `kill-buffer' with argument indiciating to kill current
buffer. Emacs 22 compatibility.
2011-07-28 David Maus <dmaus@ictsoc.de>
- * org-macs.el (org-without-partial-completion): Toggle
- partial-completion-mode only if it is turned on.
+ * org-macs.el (org-without-partial-completion):
+ Toggle partial-completion-mode only if it is turned on.
2011-07-28 Bastien Guerry <bzg@gnu.org>
2011-07-28 Eric S Fraga <e.fraga@ucl.ac.uk>
- * org-latex.el (org-export-latex-timestamp-inactive-markup): New
- option to allow different markup for inactive timestamps.
+ * org-latex.el (org-export-latex-timestamp-inactive-markup):
+ New option to allow different markup for inactive timestamps.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-docbook.el (org-export-docbook-footnote-separator): New
- variable.
+ * org-docbook.el (org-export-docbook-footnote-separator):
+ New variable.
(org-export-as-docbook): Add a separator between footnotes.
* org-html.el (org-export-html-footnote-separator): New variable.
(org-export-as-html): Add a separator between footnotes.
- * org-latex.el (org-export-latex-footnote-separator): New
- variable.
+ * org-latex.el (org-export-latex-footnote-separator):
+ New variable.
(org-export-latex-preprocess): Add a separator between footnotes.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-footnote.el (org-footnote-next-reference-or-definition): New
- function.
+ * org-footnote.el (org-footnote-next-reference-or-definition):
+ New function.
* org.el (org-activate-footnote-links): Activate the whole
footnote, but only fontify its label.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-exp.el (org-export-select-backend-specific-text): Strip
- protective commas from literal code blocks.
+ * org-exp.el (org-export-select-backend-specific-text):
+ Strip protective commas from literal code blocks.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-lob.el (org-babel-inline-lob-one-liner-regexp): Updated to
+ * ob-lob.el (org-babel-inline-lob-one-liner-regexp): Update to
successfully match optional trailing header arguments in square
brackets.
- (org-babel-lob-get-info): Updated to match the new regexp.
+ (org-babel-lob-get-info): Update to match the new regexp.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Jambunathan K <kjambunathan@gmail.com>
- * org-exp.el (org-export-format-source-code-or-example): Fix
- signature of org-<backend>-format-source-code-or-example function.
+ * org-exp.el (org-export-format-source-code-or-example):
+ Fix signature of org-<backend>-format-source-code-or-example function.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-exp.el (org-babel-exp-lob-one-liners): Appropriate
- replacement of inline call blocks with their results.
+ * ob-exp.el (org-babel-exp-lob-one-liners):
+ Appropriate replacement of inline call blocks with their results.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Jambunathan K <kjambunathan@gmail.com>
- * org-exp.el (org-export-format-source-code-or-example): Add
- support for: - custom formatters for existing backends - seamless
+ * org-exp.el (org-export-format-source-code-or-example):
+ Add support for: - custom formatters for existing backends - seamless
plugging in of new backends.
2011-07-28 Jambunathan K <kjambunathan@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Respects
- ":results verbatim".
+ * ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
+ Respects ":results verbatim".
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-python.el (org-babel-python-evaluate-session): Send
- comint-send-input after every line when interacting with an
+ * ob-python.el (org-babel-python-evaluate-session):
+ Send comint-send-input after every line when interacting with an
interactive python process.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
- * org-html.el (org-export-as-html, org-html-level-start): Only
- convert section number underscores to dashes.
+ * org-html.el (org-export-as-html, org-html-level-start):
+ Only convert section number underscores to dashes.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-exp-blocks.el (org-export-blocks-preprocess): Ensure
- balanced nested begin/end blocks in block bodies.
+ * org-exp-blocks.el (org-export-blocks-preprocess):
+ Ensure balanced nested begin/end blocks in block bodies.
2011-07-28 Dan Davison <dandavison7@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-tangle.el (org-babel-tangle-named-block-combination): Block
- combination can now take a number of values.
+ * ob-tangle.el (org-babel-tangle-named-block-combination):
+ Block combination can now take a number of values.
(org-babel-tangle-combine-named-blocks): More sophisticated block
combination behavior.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-tangle.el (org-babel-tangle-do-combine-named-blocks): Switch
- to turn on the combination of code blocks of the same name.
+ * ob-tangle.el (org-babel-tangle-do-combine-named-blocks):
+ Switch to turn on the combination of code blocks of the same name.
(org-babel-tangle-combine-named-blocks): Combine blocks of the same
name.
* org-exp.el (org-export): Use new compatibility function
`org-activate-mark'.
- * org-compat.el (org-activate-mark): New function. Provide
- `activate-mark' if not present (e.g. Emacs 22).
+ * org-compat.el (org-activate-mark): New function.
+ Provide `activate-mark' if not present (e.g. Emacs 22).
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-latex.el (org-export-latex-preprocess): Add
- `original-indentation' property to footnotes so they cannot
+ * org-latex.el (org-export-latex-preprocess):
+ Add `original-indentation' property to footnotes so they cannot
possibly end a list by being less indented than the item they
belong to.
2011-07-28 Roland Kaufmann <rlndkfmn+orgmode@gmail.com> (tiny change)
- * org-exp.el (org-remove-formatting-on-newlines-in-region): New
- function.
- (org-export-format-source-code-or-example): Call
- `org-remove-formatting-on-newlines-in-region'.
+ * org-exp.el (org-remove-formatting-on-newlines-in-region):
+ New function.
+ (org-export-format-source-code-or-example):
+ Call `org-remove-formatting-on-newlines-in-region'.
2011-07-28 David Maus <dmaus@ictsoc.de>
* org-html.el (org-export-as-html): Don't expand non-data lines of
table.el tables.
- (org-html-expand): Removed the (buggy) test for non-data lines
+ (org-html-expand): Remove the (buggy) test for non-data lines
in table.el tables. The test is now done as part of
org-export-as-html.
(org-format-table-table-html-using-table-generate-source):
- Added test for spanning of cells in table.el tables using
+ Add test for spanning of cells in table.el tables using
table.el's own library routine. Optionally suppress export of
simple table.el tables.
- (org-format-table-html): Removed the (buggy) test for spanned
+ (org-format-table-html): Remove the (buggy) test for spanned
table.el tables. The test is now done as part of
org-format-table-table-html-using-table-generate-source.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-separating-blank-lines-number): Fix
- confusion between point and item beginning. Now, if no
+ * org-list.el (org-list-separating-blank-lines-number):
+ Fix confusion between point and item beginning. Now, if no
information is available, truly follow user preference when it
inserts blank lines manually.
(org-list-insert-item): Send correct argument to the preceding
2011-07-28 Robert P. Goldman <rpgoldman@real-time.com> (tiny change)
- * ob-exp.el (org-babel-exp-in-export-file): Bind
- `org-link-search-inhibit-query' to t to inhibit prompts.
+ * ob-exp.el (org-babel-exp-in-export-file):
+ Bind `org-link-search-inhibit-query' to t to inhibit prompts.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
2011-07-28 Matt Lundin <mdl@imapmail.org>
- * org-bibtex.el (org-bibtex-treat-headline-as-title): New
- defcustom.
+ * org-bibtex.el (org-bibtex-treat-headline-as-title):
+ New defcustom.
(org-bibtex-headline): Only use headline text (not TODO or other
metadata) to generate title field and auto key.
(org-bibtex-fleshout): Allow user to choose whether to treat
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
- * org.el (org-remove-uninherited-tags): Renamed from
+ * org.el (org-remove-uninherited-tags): Rename from
`org-remove-iniherited-tags'.
(org-scan-tags): Fix typo in function call.
(org-get-tags-at): Fix typo in function call.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-bibtex.el (org-bibtex-headline): Renamed flet function `get'
+ * org-bibtex.el (org-bibtex-headline): Rename flet function `get'
which was causing compile problems.
- (org-bibtex-fleshout): Renamed flet function `get' which was causing
+ (org-bibtex-fleshout): Rename flet function `get' which was causing
compile problems.
- (org-bibtex-write): Renamed flet function `get' which was causing
+ (org-bibtex-write): Rename flet function `get' which was causing
compile problems.
2011-07-28 Christian Egli <christian.egli@sbszh.ch>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-ocaml.el (org-babel-ocaml-read-list): Use
- `org-babel-script-escape'.
+ * ob-ocaml.el (org-babel-ocaml-read-list):
+ Use `org-babel-script-escape'.
(org-babel-ocaml-read-array): Use `org-babel-script-escape'.
2011-07-28 Manuel Giraud <manuel.giraud@univ-nantes.fr>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-src.el (org-src-lang-modes): Added a language alias of "C"
+ * org-src.el (org-src-lang-modes): Add a language alias of "C"
to "c".
2011-07-28 Shaun Johnson <shaun@slugfest.demon.co.uk> (tiny change)
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-python.el (org-babel-python-evaluate-external-process): Allow
- parsing as a table in the case of ":results output table".
+ * ob-python.el (org-babel-python-evaluate-external-process):
+ Allow parsing as a table in the case of ":results output table".
(org-babel-python-evaluate-session): Allow parsing as a table in
the case of ":results output table".
2011-07-28 Julien Danjou <julien@danjou.info>
* org.el (org-entry-get, org-entry-delete, org-entry-put)
- (org-property-values, org-delete-property-globally): Use
- `org-re-property'.
+ (org-property-values, org-delete-property-globally):
+ Use `org-re-property'.
(org-re-property): New function allowing to build a regexp to
match a property.
2011-07-28 Julien Danjou <julien@danjou.info>
- * org-table.el (org-table-cleanup-narrow-column-properties): Use
- point-min rather than 1 when moving in the buffer.
+ * org-table.el (org-table-cleanup-narrow-column-properties):
+ Use point-min rather than 1 when moving in the buffer.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-in-valid-context-p): Renamed from
+ * org-list.el (org-list-in-valid-context-p): Rename from
`org-list-in-valid-block-p'.
(org-at-item-p,org-list-search-generic): Use renamed function.
2011-07-28 Lawrence Mitchell <wence@gmx.li>
- * org-latex.el (org-export-latex-convert-table.el-table): Fix
- format-string for insertion of captions.
+ * org-latex.el (org-export-latex-convert-table.el-table):
+ Fix format-string for insertion of captions.
2011-07-28 Nick Dokos <nicholas.dokos@hp.com> (tiny change)
- * org-exp.el (org-export-remove-comment-blocks-and-subtrees): Fix
- regexp.
+ * org-exp.el (org-export-remove-comment-blocks-and-subtrees):
+ Fix regexp.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> (tiny change)
2011-07-28 Lawrence Mitchell <wence@gmx.li>
- * org-html.el (org-export-as-html, org-html-level-start): Fix
- logic for section number printing when NUM is an integer.
+ * org-html.el (org-export-as-html, org-html-level-start):
+ Fix logic for section number printing when NUM is an integer.
2011-07-28 Lawrence Mitchell <wence@gmx.li>
2011-07-28 Lawrence Mitchell <wence@gmx.li>
- * org.el (org-point-at-end-of-empty-headline): Bind
- `case-fold-search' to nil.
+ * org.el (org-point-at-end-of-empty-headline):
+ Bind `case-fold-search' to nil.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
2011-07-28 Lawrence Mitchell <wence@gmx.li>
* org-html.el (org-export-as-html): Get local value of
- org-export-with-section-numbers from the buffer's plist. Deal
- specially with the case the resulting value is an integer.
+ org-export-with-section-numbers from the buffer's plist.
+ Deal specially with the case the resulting value is an integer.
(org-html-level-start): New optional argument of the option plist used
instead of `org-export-with-section-numbers'. Also deal specially
with the case that the value is an integer.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-sh.el (org-babel-sh-var-to-sh): Fixed insertion of tabular
+ * ob-sh.el (org-babel-sh-var-to-sh): Fix insertion of tabular
data into shell variables.
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
- * org-table.el (org-table-formula-handle-first/last-rc): Bind
- `char'.
+ * org-table.el (org-table-formula-handle-first/last-rc):
+ Bind `char'.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-html.el (org-export-as-html): Handle links with
`org-html-handle-links' after we handle special characters
conversions.
- (org-html-make-link, org-export-html-format-image): Don't
- protect html with @ anymore, as links are now handled after
+ (org-html-make-link, org-export-html-format-image):
+ Don't protect html with @ anymore, as links are now handled after
special characters conversions.
2011-07-28 Julien Danjou <julien@danjou.info>
* org-html.el (org-export-html-insert-plist-item): Remove.
(org-export-html-preamble): Default to `t'. Accept functions.
- (org-export-html-postamble): Default to `auto'. Accept
- functions and distinguish between 'auto (no formatting string)
+ (org-export-html-postamble): Default to `auto'.
+ Accept functions and distinguish between 'auto (no formatting string)
and `t' (default formatting string).
(org-export-as-html): Handle org-export-html-preamble and
org-export-html-postamble new defaults/allowed values.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-parse-list): Fixed regexp.
+ * org-list.el (org-list-parse-list): Fix regexp.
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 David Maus <dmaus@ictsoc.de>
- * org-html.el (org-html-make-link, org-html-handle-links): Protect
- generated XHTML elements.
+ * org-html.el (org-html-make-link, org-html-handle-links):
+ Protect generated XHTML elements.
(org-export-as-html): Expand character entities after creating markup
for links and timestamps.
2011-07-28 Jason Dunsmore <emacs-orgmode@deathroller.dunsmor.com> (tiny change)
- * org.el (org-back-over-empty-lines): Bugfix. Honor
- `org-blank-before-new-entry' correctly in various contexts.
+ * org.el (org-back-over-empty-lines): Bugfix.
+ Honor `org-blank-before-new-entry' correctly in various contexts.
2011-07-28 Bastien Guerry <bzg@gnu.org>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-update-checkbox-count): Ensure cookies on an
- heading are correctly updated when checkboxes are hidden. It
- allows, for example, to use C-c C-x C-b on a collapsed tree and
+ heading are correctly updated when checkboxes are hidden.
+ It allows, for example, to use C-c C-x C-b on a collapsed tree and
still get the update.
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org.el (org-demote-subtree,org-promote-subtree): Wrap
- `org-map-tree' into `org-with-limited-levels' macro, so it avoids
+ * org.el (org-demote-subtree,org-promote-subtree):
+ Wrap `org-map-tree' into `org-with-limited-levels' macro, so it avoids
operating on inline tasks.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-exp-bibtex.el (org-export-bibtex-preprocess): Use
- `org-export-current-backend'.
+ * org-exp-bibtex.el (org-export-bibtex-preprocess):
+ Use `org-export-current-backend'.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Bastien Guerry <bzg@gnu.org>
* org-special-blocks.el
- (org-special-blocks-make-special-cookies): Use
- `org-export-current-backend'.
+ (org-special-blocks-make-special-cookies):
+ Use `org-export-current-backend'.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
as an argument.
(org-babel-exp-src-block): Explicitly pass language to
`org-babel-exp-in-export-file'.
- (org-babel-exp-inline-src-blocks): Removed unused code.
+ (org-babel-exp-inline-src-blocks): Remove unused code.
(org-babel-exp-results): Explicitly pass language to
`org-babel-exp-in-export-file'.
* org-table.el (orgtbl-ctrl-c-ctrl-c): Bind local variable
`const-str'.
- * org.el (org-eval): Moved function here from org-agenda.el.
+ * org.el (org-eval): Move function here from org-agenda.el.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-exp-blocks.el (org-export-blocks-format-comment): Explicitly
- append a newline to the body.
+ * org-exp-blocks.el (org-export-blocks-format-comment):
+ Explicitly append a newline to the body.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-cycle-item-indentation): Do not break an
- indentation cycle because visibility cycling is requested. This
- happens when an item becomes a parent, due to indentation change.
+ indentation cycle because visibility cycling is requested.
+ This happens when an item becomes a parent, due to indentation change.
Not considered empty anymore, the function cannot change its
indentation again.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-toggle-checkbox, org-update-checkbox-count): No
- need to wrap `org-entry-get' in `ignore-errors'.
+ * org-list.el (org-toggle-checkbox, org-update-checkbox-count):
+ No need to wrap `org-entry-get' in `ignore-errors'.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-exp.el (org-export-select-backend-specific-text): Add
- `original-indentation' property when replacing #+begin_backend and
+ * org-exp.el (org-export-select-backend-specific-text):
+ Add `original-indentation' property when replacing #+begin_backend and
#+backend blocks with their content. This is needed for lists, as
they must know if the block belonged to them.
* org.el (org-cycle, org-cycle-internal-local): Separate lists and
inline tasks from headlines.
- (org-outline-level): Do not consider lists as headlines. Cycling
- visibility is using different tools.
+ (org-outline-level): Do not consider lists as headlines.
+ Cycling visibility is using different tools.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org.el (org-toggle-item): Now accepts a prefix argument. When
- used without argument on normal text, it will make the whole
+ * org.el (org-toggle-item): Now accepts a prefix argument.
+ When used without argument on normal text, it will make the whole
region one item. With an argument, it defaults to old behavior:
change each line in region into an item.
* org-exp.el (org-export-mark-list-properties): Apply renaming.
- * org-list.el (org-list-prevs-alist): Renamed from
+ * org-list.el (org-list-prevs-alist): Rename from
`org-list-struct-prev-alist'.
- (org-list-parents-alist): Renamed from `org-list-struct-parent-alist'.
- (org-list-write-struct): Renamed from `org-list-struct-fix-struct'.
+ (org-list-parents-alist): Rename from `org-list-struct-parent-alist'.
+ (org-list-write-struct): Rename from `org-list-struct-fix-struct'.
(org-list-parse-list, org-sort-list, org-list-indent-item-generic)
(org-toggle-checkbox, org-update-checkbox-count)
(org-cycle-list-bullet, org-list-repair, org-insert-item)
(org-move-item-up, org-move-item-up, org-move-item-down)
(org-next-item, org-previous-item, org-end-of-item-list)
(org-beginning-of-item-list, org-apply-on-list): Apply renaming.
- (org-get-bullet): Removed function, as it is not needed anymore.
+ (org-get-bullet): Remove function, as it is not needed anymore.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-insert-item-generic): Change arguments.
- The function now accepts structure and previous items alist. This
- allows to insert an item programmatically more easily.
+ The function now accepts structure and previous items alist.
+ This allows to insert an item programmatically more easily.
(org-insert-item): Apply changes to
`org-list-insert-item-generic'. The function now takes care about
repairing structure and updating checkboxes.
* org-list.el (org-list-make-subtree): Function now uses
`org-list-parse-list mechanism'.
- (org-list-make-subtrees): Removed function.
- (org-list-to-generic): Added a parameter and every parameter can
+ (org-list-make-subtrees): Remove function.
+ (org-list-to-generic): Add a parameter and every parameter can
be a sexp returning a string, for finer control.
- (org-list-to-html, org-list-to-latex, org-list-to-texinfo): Slight
- modifications to apply changes to `org-list-to-generic'.
+ (org-list-to-html, org-list-to-latex, org-list-to-texinfo):
+ Slight modifications to apply changes to `org-list-to-generic'.
(org-list-to-subtree): New function.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
(org-list-parse-list): Handle counters and list depth.
(org-list-to-generic): A special string is used when an item has a
counter.
- (org-list-to-latex): Use new special string for counters. This
- fixes the counter bug in LaTeX export, as the enumi counter was
+ (org-list-to-latex): Use new special string for counters.
+ This fixes the counter bug in LaTeX export, as the enumi counter was
the only one modified.
* org-latex.el (org-export-latex-lists): Use new
* org-list.el (org-alphabetical-lists): New variable
(org-item-re, org-list-full-item, org-cycle-list-bullet)
- (org-list-struct-fix-bul, org-list-inc-bullet-maybe): Reflect
- introduction of the new variable.
- (org-item-beginning-re): Changed into a function, so any
+ (org-list-struct-fix-bul, org-list-inc-bullet-maybe):
+ Reflect introduction of the new variable.
+ (org-item-beginning-re): Change into a function, so any
modification of `org-alphabetical-lists' will not require
reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count)
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-end-re): Removed function and made it a
+ * org-list.el (org-list-end-re): Remove function and made it a
variable. There's no need for the overhead of calling the
function every at every line in a list. User will have to reload
Org if he change value of either `org-list-end-regexp' or
* org-exp.el (org-export-mark-list-end)
(org-export-mark-list-properties): Apply change.
- * org-latex.el (org-export-latex-lists): Apply change. Also
- prevent items with org-example property to be considered as real
+ * org-latex.el (org-export-latex-lists): Apply change.
+ Also prevent items with org-example property to be considered as real
items.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-automatic-rules): Removed insert rule.
- (org-list-insert-item-generic): Removed code preventing user to
+ * org-list.el (org-list-automatic-rules): Remove insert rule.
+ (org-list-insert-item-generic): Remove code preventing user to
insert another item in a block within a list. It is because new
list context make it impossible to see if a point in a block is
also in a list.
can easily be included in lists.
(org-export-mark-list-end): New function.
(org-export-mark-list-properties): New function.
- (org-export-mark-lists): Removed function. It was split into the
+ (org-export-mark-lists): Remove function. It was split into the
two preceding functions.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-forbidden-blocks): Renamed from
+ * org-list.el (org-list-forbidden-blocks): Rename from
`org-list-blocks'.
(org-list-export-context): New variable.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-search-generic): Renamed form
+ * org-list.el (org-list-search-generic): Rename form
`org-search-unenclosed-generic' to reflect the new behavior. Now,
match can only be in a valid context for lists, as determined by
`org-list-context'.
- (org-list-search-backward): Renamed from
+ (org-list-search-backward): Rename from
`org-search-backward-unenclosed'.
- (org-list-search-forward): Renamed from
+ (org-list-search-forward): Rename from
`org-search-forward-unenclosed'.
(org-toggle-checkbox,org-update-checkbox-count): Use new
functions.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org.el (org-get-string-indentation): Moved in generally useful
+ * org.el (org-get-string-indentation): Move in generally useful
functions section, as it wasn't specific to plain lists and that
no code was using it in org-list.el.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-apply-on-list): Use new structures. Function
- is now applied in reverse order so modifications do not change
+ * org-list.el (org-apply-on-list): Use new structures.
+ Function is now applied in reverse order so modifications do not change
positions of items in buffer.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-has-child-p): Renamed from
+ * org-list.el (org-list-has-child-p): Rename from
`org-list-get-child'. Returning first child is only useful as a
predicate, as we are allowing an item to have more than one
sub-list.
* org-list.el (org-list-in-item-p): Unify methods for this
predicate.
- (org-list-in-item-p-with-indent): Removed function.
- (org-list-ending-between): Removed function.
- (org-list-maybe-skip-block): Removed function.
- (org-list-in-item-p-with-regexp): Removed function.
- (org-list-top-point-with-regexp): Removed function.
- (org-list-top-point-with-indent): Removed function.
- (org-list-bottom-point-with-indent): Removed function.
- (org-list-bottom-point-with-regexp): Removed function.
- (org-list-get-item-same-level): Removed function.
- (org-list-top-point): Removed function.
- (org-list-bottom-point): Removed function.
- (org-get-item-beginning): Renamed to `org-list-get-item-begin' to
+ (org-list-in-item-p-with-indent): Remove function.
+ (org-list-ending-between): Remove function.
+ (org-list-maybe-skip-block): Remove function.
+ (org-list-in-item-p-with-regexp): Remove function.
+ (org-list-top-point-with-regexp): Remove function.
+ (org-list-top-point-with-indent): Remove function.
+ (org-list-bottom-point-with-indent): Remove function.
+ (org-list-bottom-point-with-regexp): Remove function.
+ (org-list-get-item-same-level): Remove function.
+ (org-list-top-point): Remove function.
+ (org-list-bottom-point): Remove function.
+ (org-get-item-beginning): Rename to `org-list-get-item-begin' to
be consistent with naming policy of non-interactive functions.
- (org-get-beginning-of-list): Removed function.
+ (org-get-beginning-of-list): Remove function.
(org-beginning-of-item-list): Use new accessors.
- (org-get-end-of-list): Removed function.
+ (org-get-end-of-list): Remove function.
(org-end-of-list): Use new accessors.
- (org-get-end-of-item): Removed function.
+ (org-get-end-of-item): Remove function.
(org-end-of-item): Use new accessors.
- (org-get-previous-item): Removed function.
+ (org-get-previous-item): Remove function.
(org-previous-item): Use new accessors.
- (org-get-next-item): Removed function.
+ (org-get-next-item): Remove function.
(org-next-item): Use new accessors.
(org-list-get-item-end-before-blank): Use new accessors.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
- * org-list.el (org-list-repair): Removed optional argument
+ * org-list.el (org-list-repair): Remove optional argument
FORCE-BULLET. The job of this interactive function is to
completely fix a list at point. Changing bullets is a separate
task. Also removed others optional arguments TOP and BOTTOM to
(org-list-insert-item-generic): Reflect changes to `org-list-repair'.
(org-list-exchange-items): Use new accessors. Now modify struct
to avoid re-reading it later.
- (org-move-item-down): Reflect changes to `org-list-repair'. Use
- new accessors.
+ (org-move-item-down): Reflect changes to `org-list-repair'.
+ Use new accessors.
(org-move-item-up): Reflect changes to `org-list-repair'. Use new
accessors.
(org-cycle-list-bullet): Use new structures. Also use a shortcut
new accessors.
(org-list-struct-fix-ind): Make use of new accessors.
(org-list-struct-fix-box): New function.
- (org-list-struct-fix-checkboxes): Removed function.
+ (org-list-struct-fix-checkboxes): Remove function.
(org-list-struct-outdent): Use new accessors. Use the fact that
there is no longer a virtual item at beginning of structure.
(org-list-struct-indent): Use helper functions
first.
(org-list-struct-apply-struct): Comment function. Rewrite using
new accessors. Use new variable `org-list-full-item-re'.
- (org-list-shift-item-indentation): Removed function, now included
+ (org-list-shift-item-indentation): Remove function, now included
in `org-list-struct-apply-struct' because it is too specific.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-list-struct-fix-checkboxes): New function.
- (org-checkbox-blocked-p): Removed function.
+ (org-checkbox-blocked-p): Remove function.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
(org-list-struct-fix-bul): Use new accessors.
(org-list-repair): Use new accessors.
(org-list-indent-item-generic): Make use of accessors.
- (org-list-get-parent): Renamed from `org-list-struct-get-parent'.
- (org-list-get-child): Renamed from `org-list-struct-get-child'.
+ (org-list-get-parent): Rename from `org-list-struct-get-parent'.
+ (org-list-get-child): Rename from `org-list-struct-get-child'.
(org-list-struct-fix-ind): Make use of accessors.
(org-list-get-next-item): New function.
(org-list-get-subtree): New function.
2011-07-28 David Maus <dmaus@ictsoc.de>
* org-protocol.el (org-protocol-unhex-single-byte-sequence)
- (org-protocol-unhex-string, org-protocol-unhex-compound): Change
- date of obsolete declaration to 2011-02-17.
+ (org-protocol-unhex-string, org-protocol-unhex-compound):
+ Change date of obsolete declaration to 2011-02-17.
2011-07-28 David Maus <dmaus@ictsoc.de>
2011-07-28 Sebastian Rose <sebastian_rose@gmx.de>
- * org-protocol.el (org-protocol-unhex-single-byte-sequence): New
- function. Decode hex-encoded singly byte sequences.
+ * org-protocol.el (org-protocol-unhex-single-byte-sequence):
+ New function. Decode hex-encoded singly byte sequences.
(org-protocol-unhex-compound): Use new function if decoding sequence
as Unicode character failed.
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-publish.el (org-publish-cache-ctime-of-src): Improve
- docstring.
+ * org-publish.el (org-publish-cache-ctime-of-src):
+ Improve docstring.
(org-publish-find-title): New option to explicitly reset the title
in the cache.
(org-publish-format-file-entry): Use this new option.
2011-07-28 Dan Davison <dandavison7@gmail.com>
- * org-exp.el (org-export-format-source-code-or-example): Allow
- empty string as second element in minted/listings options.
+ * org-exp.el (org-export-format-source-code-or-example):
+ Allow empty string as second element in minted/listings options.
2011-07-28 Dan Davison <dandavison7@gmail.com>
- * org-exp.el (org-export-format-source-code-or-example): Support
- new user-customizable options.
+ * org-exp.el (org-export-format-source-code-or-example):
+ Support new user-customizable options.
(org-export-latex-custom-lang-environments): Ensure new variable
is defined.
(org-export-latex-listings-options): Ensure new variable is defined.
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-latex.el (org-export-latex-hyperref-format): Update
- docstring.
+ * org-latex.el (org-export-latex-hyperref-format):
+ Update docstring.
2011-07-28 Tom Dye <tsd@tsdye.com>
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * org-exp-blocks.el (org-export-blocks-format-ditaa): This
- function is begin deprecated in favor of begin_src blocks.
+ * org-exp-blocks.el (org-export-blocks-format-ditaa):
+ This function is begin deprecated in favor of begin_src blocks.
(org-export-blocks-format-dot): This function is begin deprecated in
favor of begin_src blocks.
2011-07-28 Julien Danjou <julien@danjou.info>
- * org-agenda.el (org-agenda): Kill all local variables. This
- assures we are not keeping buffer variable from an old agenda view
+ * org-agenda.el (org-agenda): Kill all local variables.
+ This assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.
2011-07-28 Julien Danjou <julien@danjou.info>
2011-07-28 Bastien Guerry <bzg@gnu.org>
* org-agenda.el (org-agenda-repeating-timestamp-show-all): Allow
- to use a list of TODO keywords as the value of this variable. The
- agenda will show repeating stamps for entries matching these TODO
+ to use a list of TODO keywords as the value of this variable.
+ The agenda will show repeating stamps for entries matching these TODO
keywords.
(org-agenda-get-timestamps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Allow the use of a list of keywords in
2011-07-28 Bastien Guerry <bzg@gnu.org>
- * org-latex.el (org-export-latex-emphasis-alist): Use
- \protectedtexttt for the =...= emphasis and \verb for the ~...~
+ * org-latex.el (org-export-latex-emphasis-alist):
+ Use \protectedtexttt for the =...= emphasis and \verb for the ~...~
emphasis.
(org-export-latex-use-verb): Now defaults to t.
(org-export-latex-emph-format): Distinguish between =...= and
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-exp.el (org-babel-exp-do-export): Simplified, no longer need
+ * ob-exp.el (org-babel-exp-do-export): Simplify, no longer need
to do anything to export code.
(org-babel-exp-results): No longer returns a replacement for the
code block.
- (org-babel-exp-inline-src-blocks): Simplified.
- (org-babel-exp-src-block): Removed unnecessary pluralization from
+ (org-babel-exp-inline-src-blocks): Simplify.
+ (org-babel-exp-src-block): Remove unnecessary pluralization from
function name.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob-exp.el (org-babel-exp-inline-src-blocks): Simplified
- exportation of inline code blocks using normal code block
+ * ob-exp.el (org-babel-exp-inline-src-blocks):
+ Simplify exportation of inline code blocks using normal code block
execution mechanism to insert results.
(org-babel-exp-results): Results exportation mechanism is unified
for both inline and regular code blocks.
(org-entry-properties): Remove refresh - this is now done in
org-get-category.
- * org-clock.el (org-clock-insert-selection-line): Let
- `org-get-category' do the property refresh.
+ * org-clock.el (org-clock-insert-selection-line):
+ Let `org-get-category' do the property refresh.
* org-archive.el (org-archive-subtree): Force a refresh of
category properties.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
- * ob.el (org-babel-execute-src-block): Removed unused flet
+ * ob.el (org-babel-execute-src-block): Remove unused flet
function.
2011-07-28 Dan Davison <dandavison7@gmail.com>
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
- * org-capture.el (org-capture-set-target-location): Use
- `current-time'.
+ * org-capture.el (org-capture-set-target-location):
+ Use `current-time'.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
- * org-capture.el (org-capture-set-target-location): Use
- `current-time'.
+ * org-capture.el (org-capture-set-target-location):
+ Use `current-time'.
2011-07-28 Bernt Hansen <bernt@norang.ca>
2011-07-28 Julien Danjou <julien@danjou.info>
- * org-capture.el (org-capture-fill-template): Use
- `org-set-property' directly.
+ * org-capture.el (org-capture-fill-template):
+ Use `org-set-property' directly.
2011-07-28 Julien Danjou <julien@danjou.info>
2011-07-28 Konrad Hinsen <konrad.hinsen@fastmail.net>
- * ob-python.el (org-babel-python-initiate-session-by-key): Make
- sure that py-which-bufname is initialized, as otherwise it will be
+ * ob-python.el (org-babel-python-initiate-session-by-key):
+ Make sure that py-which-bufname is initialized, as otherwise it will be
overwritten the first time a Python buffer is created.
2011-07-28 Eric Schulte <schulte.eric@gmail.com>
2011-07-28 Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>
- * org-html.el (org-export-html-mathjax-template): Displaymath
- environment and MathJax.
+ * org-html.el (org-export-html-mathjax-template):
+ Displaymath environment and MathJax.
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
- * ob.el (org-babel-demarcate-block): Updated to reflect the new
+ * ob.el (org-babel-demarcate-block): Update to reflect the new
info list contents.
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
- * ob-table.el (sbe): Simplified to reflect to var resolution.
+ * ob-table.el (sbe): Simplify to reflect to var resolution.
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
(org-speed-command-default-hook): The default hook for
org-speed-command-hook. Factored out from org-self-insert-command
and mimics existing behavior.
- (org-self-insert-command): Modified to use org-speed-command-hook.
+ (org-self-insert-command): Modify to use org-speed-command-hook.
2010-11-11 Carsten Dominik <carsten.dominik@gmail.com>
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
* org.el (org-fontify-meta-lines-and-blocks): Alter main regexp to
- match code blocks with switches and header args. Call
- `org-src-font-lock-fontify-block' for automatic fontification of
+ match code blocks with switches and header args.
+ Call `org-src-font-lock-fontify-block' for automatic fontification of
code in code blocks, controlled by variable
`org-src-fontify-natively'.
(org-src-fontify-natively): New variable.
change.
* org-list.el (org-indent-item-tree): Prevent whole list from
- being moved when user is not moving subtree. Thus
- `org-cycle-item-indentation' will not allow to move the list.
+ being moved when user is not moving subtree.
+ Thus `org-cycle-item-indentation' will not allow to move the list.
2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com>
`org-toggle-checkbox' is trying to insert a checkbox at a
description item.
- * org-list.el (org-item-re): Modified regexp so it can catch
+ * org-list.el (org-item-re): Modify regexp so it can catch
correct number of white space before item body.
* org-list.el (org-list-at-regexp-after-bullet-p): Take into
2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com>
- * org.el (org-make-link-regexps): Modified regexp of
+ * org.el (org-make-link-regexps): Modify regexp of
org-plain-link-re.
2010-11-11 Noorul Islam <noorul@noorul.com> (tiny change)
* org-feed.el (xml-substitute-special): Declare function for byte
compiler.
- (org-feed-unescape): Removed.
+ (org-feed-unescape): Remove.
(org-feed-parse-rss-entry, org-feed-parse-atom-entry):
Use `xml-substitute-special' to unescape XML entities.
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
- * ob-R.el (org-babel-R-evaluate): Improved prompt-stripping regexp.
+ * ob-R.el (org-babel-R-evaluate): Improve prompt-stripping regexp.
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
2009-08-06 Carsten Dominik <carsten.dominik@gmail.com>
- * org.el (org-cycle-internal-local): Improved version of finding
+ * org.el (org-cycle-internal-local): Improve version of finding
next visible line.
(org-cycle-hide-drawers): Only hide drawers if this is really
necessary.
(org-add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)
(org-add-hook 'pre-command-hook 'org-unhighlight nil 'local)
;; Make sure properties are removed when copying text
- (make-local-variable 'filter-buffer-substring-functions)
(add-hook 'filter-buffer-substring-functions
(lambda (fun start end delete)
- (substring-no-properties (funcall fun start end delete))))
+ (substring-no-properties (funcall fun start end delete)))
+ nil t)
(unless org-agenda-keep-modes
(setq org-agenda-follow-mode org-agenda-start-with-follow-mode
org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode
(org-set-local 'org-hide-leading-stars-before-indent-mode
org-hide-leading-stars)
(org-set-local 'org-hide-leading-stars t))
- (make-local-variable 'filter-buffer-substring-functions)
(add-hook 'filter-buffer-substring-functions
(lambda (fun start end delete)
(org-indent-remove-properties-from-string
- (funcall fun start end delete))))
+ (funcall fun start end delete)))
+ nil t)
(org-add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
(org-add-hook 'before-change-functions
'org-indent-notify-modified-headline nil 'local)
(remove-hook 'filter-buffer-substring-functions
(lambda (fun start end delete)
(org-indent-remove-properties-from-string
- (funcall fun start end delete))))
+ (funcall fun start end delete)))
+ t)
(remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
(remove-hook 'before-change-functions
'org-indent-notify-modified-headline 'local)
(c-lang-defconst c-anchored-cpp-prefix
"Regexp matching the prefix of a cpp directive anchored to BOL,
in the languages that have a macro preprocessor."
- t (if (c-lang-const c-opt-cpp-prefix)
- (concat "^" (c-lang-const c-opt-cpp-prefix))))
+ t "^\\s *\\(#\\)\\s *"
+ (java awk) nil)
(c-lang-defvar c-anchored-cpp-prefix (c-lang-const c-anchored-cpp-prefix))
(c-lang-defconst c-opt-cpp-start
cc-imenu-c++-generic-expression
"Imenu generic expression for C mode. See `imenu-generic-expression'.")
-(defvar cc-imenu-java-generic-expression
+
+;; Auxiliary regexps for Java try to match their trailing whitespace where
+;; appropriate, but _not_ starting whitespace.
+
+(defconst cc-imenu-java-ellipsis-regexp
+ (concat
+ "\\.\\{3\\}"
+ "[ \t\n\r]*"))
+
+(defun cc-imenu-java-build-type-args-regex (depth)
+ "Builds regexp for type arguments list with DEPTH allowed
+nested angle brackets constructs."
+ (if (> depth 0)
+ (concat "<"
+ "[][.," c-alnum "_? \t\n\r]+"
+ (if (> depth 1)
+ "\\(")
+ (cc-imenu-java-build-type-args-regex (1- depth))
+ (if (> depth 1)
+ (concat "[][.," c-alnum "_? \t\n\r]*"
+ "\\)*"))
+ ">")))
+
+(defconst cc-imenu-java-type-spec-regexp
+ (concat
+ ;; zero or more identifiers followed by a dot
+ "\\("
+ "[" c-alpha "_][" c-alnum "_]*\\."
+ "\\)*"
+ ;; a single mandatory identifier without a dot
+ "[" c-alpha "_][" c-alnum "_]*"
+ ;; then choice:
+ "\\("
+ ;; (option 1) type arguments list which _may_ be followed with brackets
+ ;; and/or spaces, then optional variable arity
+ "[ \t\n\r]*"
+ (cc-imenu-java-build-type-args-regex 3)
+ "[][ \t\n\r]*"
+ "\\(" cc-imenu-java-ellipsis-regexp "\\)?"
+ "\\|"
+ ;; (option 2) just brackets and/or spaces (there should be at least one),
+ ;; then optional variable arity
+ "[][ \t\n\r]+"
+ "\\(" cc-imenu-java-ellipsis-regexp "\\)?"
+ "\\|"
+ ;; (option 3) just variable arity
+ cc-imenu-java-ellipsis-regexp
+ "\\)"))
+
+(defconst cc-imenu-java-comment-regexp
+ (concat
+ "/"
+ "\\("
+ ;; a traditional comment
+ "\\*"
+ "\\("
+ "[^*]"
+ "\\|"
+ "\\*+[^/*]"
+ "\\)*"
+ "\\*+/"
+ "\\|"
+ ;; an end-of-line comment
+ "/[^\n\r]*[\n\r]"
+ "\\)"
+ "[ \t\n\r]*"
+ ))
+
+;; Comments are allowed before the argument, after any of the
+;; modifiers and after the identifier.
+(defconst cc-imenu-java-method-arg-regexp
+ (concat
+ "\\(" cc-imenu-java-comment-regexp "\\)*"
+ ;; optional modifiers
+ "\\("
+ ;; a modifier is either an annotation or "final"
+ "\\("
+ "@[" c-alpha "_]"
+ "[" c-alnum "._]*"
+ ;; TODO support element-value pairs!
+ "\\|"
+ "final"
+ "\\)"
+ ;; a modifier ends with comments and/or ws
+ "\\("
+ "\\(" cc-imenu-java-comment-regexp "\\)+"
+ "\\|"
+ "[ \t\n\r]+"
+ "\\(" cc-imenu-java-comment-regexp "\\)*"
+ "\\)"
+ "\\)*"
+ ;; type spec
+ cc-imenu-java-type-spec-regexp
+ ;; identifier
+ "[" c-alpha "_]"
+ "[" c-alnum "_]*"
+ ;; optional comments and/or ws
+ "[ \t\n\r]*"
+ "\\(" cc-imenu-java-comment-regexp "\\)*"
+ ))
+
+(defconst cc-imenu-java-generic-expression
`((nil
,(concat
- "[" c-alpha "_][\]\[." c-alnum "_<> ]+[ \t\n\r]+" ; type spec
- "\\([" c-alpha "_][" c-alnum "_]*\\)" ; method name
+ cc-imenu-java-type-spec-regexp
+ "\\(" ; method name which gets captured
+ ; into index
+ "[" c-alpha "_]"
+ "[" c-alnum "_]*"
+ "\\)"
"[ \t\n\r]*"
- ;; An argument list htat is either empty or contains any number
- ;; of arguments. An argument is any number of annotations
- ;; followed by a type spec followed by a word. A word is an
- ;; identifier. A type spec is an identifier, possibly followed
- ;; by < typespec > possibly followed by [].
- (concat "("
- "\\("
- "[ \t\n\r]*"
- "\\("
- "@"
- "[" c-alpha "_]"
- "[" c-alnum "._]""*"
- "[ \t\n\r]+"
- "\\)*"
- "\\("
- "[" c-alpha "_]"
- "[\]\[" c-alnum "_.]*"
- "\\("
-
- "<"
- "[ \t\n\r]*"
- "[\]\[.," c-alnum "_<> \t\n\r]*"
- ">"
- "\\)?"
- "\\(\\[\\]\\)?"
- "[ \t\n\r]+"
- "\\)"
- "[" c-alpha "_]"
- "[" c-alnum "_]*"
- "[ \t\n\r,]*"
- "\\)*"
- ")"
- "[.," c-alnum " \t\n\r]*"
- "{"
- )) 1))
+ ;; An argument list that contains zero or more arguments.
+ (concat
+ "("
+ "[ \t\n\r]*"
+ "\\("
+ "\\(" cc-imenu-java-method-arg-regexp ",[ \t\n\r]*\\)*"
+ cc-imenu-java-method-arg-regexp
+ "\\)?"
+ ")"
+ "[.,_" c-alnum " \t\n\r]*" ; throws etc.
+ "{"
+ )) 7))
"Imenu generic expression for Java mode. See `imenu-generic-expression'.")
+
;; Internal variables
(defvar cc-imenu-objc-generic-expression-noreturn-index nil)
(defvar cc-imenu-objc-generic-expression-general-func-index nil)
;; Add needed properties to each CPP construct in the region.
(goto-char c-new-BEG)
- (let ((pps-position c-new-BEG) pps-state mbeg)
+ (skip-chars-backward " \t")
+ (let ((pps-position (point)) pps-state mbeg)
(while (and (< (point) c-new-END)
(search-forward-regexp c-anchored-cpp-prefix c-new-END t))
;; If we've found a "#" inside a string/comment, ignore it.
pps-position (point))
(unless (or (nth 3 pps-state) ; in a string?
(nth 4 pps-state)) ; in a comment?
- (goto-char (match-beginning 0))
+ (goto-char (match-beginning 1))
(setq mbeg (point))
(if (> (c-syntactic-end-of-macro) mbeg)
(progn
(c-neutralize-CPP-line mbeg (point))
- (c-set-cpp-delimiters mbeg (point))
- ;(setq pps-position (point))
- )
+ (c-set-cpp-delimiters mbeg (point)))
(forward-line)) ; no infinite loop with, e.g., "#//"
)))))
;; 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)
+ (is-complete (not (null newline-pos)))
+ result-str)
+
+ (when gdbmi-debug-mode
+ (message "gdbmi-bnf-incomplete-record-result: %s"
+ (substring gud-marker-acc gdbmi-bnf-offset newline-pos)))
;; 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
+ (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)))
+ ;; Move gdbmi-bnf-offset past the end of the chunk.
+ (setq gdbmi-bnf-offset (+ gdbmi-bnf-offset (length result-str)))
+ (when newline-pos
+ (setq gdbmi-bnf-offset (1+ gdbmi-bnf-offset))))
;; 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
(let ((output ""))
;; Process all the complete markers in this chunk.
- (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n"
- gud-marker-acc)
+ ;;
+ ;; Here I match the string coming out of perldb.
+ ;; The strings can look like any of
+ ;;
+ ;; "\032\032/tmp/tst.pl:6:0\n"
+ ;; "\032\032(eval 5)[/tmp/tst.pl:6]:3:0\n"
+ ;; "\032\032(eval 17)[Basic/Core/Core.pm.PL (i.e. PDL::Core.pm):2931]:1:0\n"
+ ;;
+ ;; From those I want the filename and the line number. First I look for
+ ;; the eval case. If that doesn't match, I look for the "normal" case.
+ (while
+ (string-match
+ (eval-when-compile
+ (let ((file-re "\\(?:[a-zA-Z]:\\)?[^:\n]*"))
+ (concat "\032\032\\(?:"
+ (concat
+ "(eval [0-9]+)\\["
+ "\\(" file-re "\\)" ; Filename.
+ "\\(?: (i\\.e\\. [^)]*)\\)?"
+ ":\\([0-9]*\\)\\]") ; Line number.
+ "\\|"
+ (concat
+ "\\(?1:" file-re "\\)" ; Filename.
+ ":\\(?2:[0-9]*\\)") ; Line number.
+ "\\):.*\n")))
+ gud-marker-acc)
(setq
;; Extract the frame position from the marker.
gud-last-frame
(cons (match-string 1 gud-marker-acc)
- (string-to-number (match-string 3 gud-marker-acc)))
+ (string-to-number (match-string 2 gud-marker-acc)))
;; Append any text before the marker to the output we're going
;; to return - we don't include the marker in this text.
(define-key map "\C-c]" 'smie-close-block)
(define-key map "\C-c/" 'smie-close-block)
(define-key map "\C-c\C-f" 'octave-insert-defun)
- ;; FIXME: free C-h so it can do the describe-prefix-bindings.
- (define-key map "\C-c\C-h" 'info-lookup-symbol)
(define-key map "\C-c\C-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block)
(define-key map "\C-c\C-if" 'octave-send-defun)
(define-key map "\C-c\C-ir" 'octave-send-region)
(define-key map "\C-c\C-is" 'octave-show-process-buffer)
- (define-key map "\C-c\C-ih" 'octave-hide-process-buffer)
+ (define-key map "\C-c\C-iq" 'octave-hide-process-buffer)
(define-key map "\C-c\C-ik" 'octave-kill-process)
(define-key map "\C-c\C-i\C-l" 'octave-send-line)
(define-key map "\C-c\C-i\C-b" 'octave-send-block)
(define-key map "\C-c\C-i\C-f" 'octave-send-defun)
(define-key map "\C-c\C-i\C-r" 'octave-send-region)
(define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer)
- ;; FIXME: free C-h so it can do the describe-prefix-bindings.
- (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer)
+ (define-key map "\C-c\C-i\C-q" 'octave-hide-process-buffer)
(define-key map "\C-c\C-i\C-k" 'octave-kill-process)
map)
"Keymap used in Octave mode.")
;; might guessed you should run `python-shell-send-buffer' from time
;; to time to get better results too.
-;; Imenu: This mode supports Imenu in its most basic form, letting it
-;; build the necessary alist via `imenu-default-create-index-function'
-;; by having set `imenu-extract-index-name-function' to
-;; `python-info-current-defun' and
-;; `imenu-prev-index-position-function' to
-;; `python-imenu-prev-index-position'.
+;; Imenu: There are two index building functions to be used as
+;; `imenu-create-index-function': `python-imenu-create-index' (the
+;; default one, builds the alist in form of a tree) and
+;; `python-imenu-create-flat-index'. See also
+;; `python-imenu-format-item-label-function',
+;; `python-imenu-format-parent-item-label-function',
+;; `python-imenu-format-parent-item-jump-label-function' variables for
+;; changing the way labels are formatted in the tree version.
;; If you used python-mode.el you probably will miss auto-indentation
;; when inserting newlines. To achieve the same behavior you have
\f
;;; Font-lock and syntax
+(eval-when-compile
+ (defun python-syntax--context-compiler-macro (form type &optional syntax-ppss)
+ (pcase type
+ (`'comment
+ `(let ((ppss (or ,syntax-ppss (syntax-ppss))))
+ (and (nth 4 ppss) (nth 8 ppss))))
+ (`'string
+ `(let ((ppss (or ,syntax-ppss (syntax-ppss))))
+ (and (nth 3 ppss) (nth 8 ppss))))
+ (`'paren
+ `(nth 1 (or ,syntax-ppss (syntax-ppss))))
+ (_ form))))
+
(defun python-syntax-context (type &optional syntax-ppss)
"Return non-nil if point is on TYPE using SYNTAX-PPSS.
TYPE can be `comment', `string' or `paren'. It returns the start
character address of the specified TYPE."
- (declare (compiler-macro
- (lambda (form)
- (pcase type
- (`'comment
- `(let ((ppss (or ,syntax-ppss (syntax-ppss))))
- (and (nth 4 ppss) (nth 8 ppss))))
- (`'string
- `(let ((ppss (or ,syntax-ppss (syntax-ppss))))
- (and (nth 3 ppss) (nth 8 ppss))))
- (`'paren
- `(nth 1 (or ,syntax-ppss (syntax-ppss))))
- (_ form)))))
+ (declare (compiler-macro python-syntax--context-compiler-macro))
(let ((ppss (or syntax-ppss (syntax-ppss))))
(pcase type
(`comment (and (nth 4 ppss) (nth 8 ppss)))
;; Ensure point moves forward.
(and (> beg-pos (point)) (goto-char beg-pos)))))
+(defun python-nav--syntactically (fn poscompfn &optional contextfn)
+ "Move point using FN avoiding places with specific context.
+FN must take no arguments. POSCOMPFN is a two arguments function
+used to compare current and previous point after it is moved
+using FN, this is normally a less-than or greater-than
+comparison. Optional argument CONTEXTFN defaults to
+`python-syntax-context-type' and is used for checking current
+point context, it must return a non-nil value if this point must
+be skipped."
+ (let ((contextfn (or contextfn 'python-syntax-context-type))
+ (start-pos (point-marker))
+ (prev-pos))
+ (catch 'found
+ (while t
+ (let* ((newpos
+ (and (funcall fn) (point-marker)))
+ (context (funcall contextfn)))
+ (cond ((and (not context) newpos
+ (or (and (not prev-pos) newpos)
+ (and prev-pos newpos
+ (funcall poscompfn newpos prev-pos))))
+ (throw 'found (point-marker)))
+ ((and newpos context)
+ (setq prev-pos (point)))
+ (t (when (not newpos) (goto-char start-pos))
+ (throw 'found nil))))))))
+
+(defun python-nav--forward-defun (arg)
+ "Internal implementation of python-nav-{backward,forward}-defun.
+Uses ARG to define which function to call, and how many times
+repeat it."
+ (let ((found))
+ (while (and (> arg 0)
+ (setq found
+ (python-nav--syntactically
+ (lambda ()
+ (re-search-forward
+ python-nav-beginning-of-defun-regexp nil t))
+ '>)))
+ (setq arg (1- arg)))
+ (while (and (< arg 0)
+ (setq found
+ (python-nav--syntactically
+ (lambda ()
+ (re-search-backward
+ python-nav-beginning-of-defun-regexp nil t))
+ '<)))
+ (setq arg (1+ arg)))
+ found))
+
+(defun python-nav-backward-defun (&optional arg)
+ "Navigate to closer defun backward ARG times.
+Unlikely `python-nav-beginning-of-defun' this doesn't care about
+nested definitions."
+ (interactive "^p")
+ (python-nav--forward-defun (- (or arg 1))))
+
+(defun python-nav-forward-defun (&optional arg)
+ "Navigate to closer defun forward ARG times.
+Unlikely `python-nav-beginning-of-defun' this doesn't care about
+nested definitions."
+ (interactive "^p")
+ (python-nav--forward-defun (or arg 1)))
+
(defun python-nav-beginning-of-statement ()
"Move to start of current statement."
(interactive "^")
(defvar python-skeleton-available '()
"Internal list of available skeletons.")
-(define-abbrev-table 'python-mode-abbrev-table ()
- "Abbrev table for Python mode."
+(define-abbrev-table 'python-mode-skeleton-abbrev-table ()
+ "Abbrev table for Python mode skeletons."
:case-fixed t
;; Allow / inside abbrevs.
:regexp "\\(?:^\\|[^/]\\)\\<\\([[:word:]/]+\\)\\W*"
(defmacro python-skeleton-define (name doc &rest skel)
"Define a `python-mode' skeleton using NAME DOC and SKEL.
The skeleton will be bound to python-skeleton-NAME and will
-be added to `python-mode-abbrev-table'."
+be added to `python-mode-skeleton-abbrev-table'."
(declare (indent 2))
(let* ((name (symbol-name name))
(function-name (intern (concat "python-skeleton-" name))))
`(progn
- (define-abbrev python-mode-abbrev-table ,name "" ',function-name
- :system t)
+ (define-abbrev python-mode-skeleton-abbrev-table
+ ,name "" ',function-name :system t)
(setq python-skeleton-available
(cons ',function-name python-skeleton-available))
(define-skeleton ,function-name
(format "Insert %s statement." name))
,@skel))))
+(define-abbrev-table 'python-mode-abbrev-table ()
+ "Abbrev table for Python mode."
+ :parents (list python-mode-skeleton-abbrev-table))
+
(defmacro python-define-auxiliary-skeleton (name doc &optional &rest skel)
"Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL.
The skeleton will be bound to python-skeleton-NAME."
\f
;;; Imenu
-(defun python-imenu-prev-index-position ()
- "Python mode's `imenu-prev-index-position-function'."
- (let ((found))
- (while (and (setq found
- (re-search-backward python-nav-beginning-of-defun-regexp nil t))
- (not (python-info-looking-at-beginning-of-defun))))
- (and found
- (python-info-looking-at-beginning-of-defun)
- (python-info-current-defun))))
+(defvar python-imenu-format-item-label-function
+ 'python-imenu-format-item-label
+ "Imenu function used to format an item label.
+It must be a function with two arguments: TYPE and NAME.")
+
+(defvar python-imenu-format-parent-item-label-function
+ 'python-imenu-format-parent-item-label
+ "Imenu function used to format a parent item label.
+It must be a function with two arguments: TYPE and NAME.")
+
+(defvar python-imenu-format-parent-item-jump-label-function
+ 'python-imenu-format-parent-item-jump-label
+ "Imenu function used to format a parent jump item label.
+It must be a function with two arguments: TYPE and NAME.")
+
+(defun python-imenu-format-item-label (type name)
+ "Return imenu label for single node using TYPE and NAME."
+ (format "%s (%s)" name type))
+
+(defun python-imenu-format-parent-item-label (type name)
+ "Return imenu label for parent node using TYPE and NAME."
+ (format "%s..." (python-imenu-format-item-label type name)))
+
+(defun python-imenu-format-parent-item-jump-label (type name)
+ "Return imenu label for parent node jump using TYPE and NAME."
+ (if (string= type "class")
+ "*class definition*"
+ "*function definition*"))
+
+(defun python-imenu--put-parent (type name pos num-children tree &optional root)
+ "Add the parent with TYPE, NAME, POS and NUM-CHILDREN to TREE.
+Optional Argument ROOT must be non-nil when the node being
+processed is the root of the TREE."
+ (let ((label
+ (funcall python-imenu-format-item-label-function type name))
+ (jump-label
+ (funcall python-imenu-format-parent-item-jump-label-function type name)))
+ (if root
+ ;; This is the root, everything is a children.
+ (cons label (cons (cons jump-label pos) tree))
+ ;; This is node a which may contain some children.
+ (cons
+ (cons label (cons (cons jump-label pos)
+ ;; Append all the children
+ (python-util-popn tree num-children)))
+ ;; All previous non-children nodes.
+ (nthcdr num-children tree)))))
+
+(defun python-imenu--build-tree (&optional min-indent prev-indent num-children tree)
+ "Recursively build the tree of nested definitions of a node.
+Arguments MIN-INDENT PREV-INDENT NUM-CHILDREN and TREE are
+internal and should not be passed explicitly unless you know what
+you are doing."
+ (setq num-children (or num-children 0)
+ min-indent (or min-indent 0))
+ (let* ((pos (python-nav-backward-defun))
+ (type)
+ (name (when (and pos (looking-at python-nav-beginning-of-defun-regexp))
+ (let ((split (split-string (match-string-no-properties 0))))
+ (setq type (car split))
+ (cadr split))))
+ (label (when name
+ (funcall python-imenu-format-item-label-function type name)))
+ (indent (current-indentation)))
+ (cond ((not pos)
+ ;; No defun found, nothing to add.
+ tree)
+ ((equal indent 0)
+ (if (> num-children 0)
+ ;; Append it as the parent of everything collected to
+ ;; this point.
+ (python-imenu--put-parent type name pos num-children tree t)
+ ;; There are no children, this is a lonely defun.
+ (cons label pos)))
+ ((equal min-indent indent)
+ ;; Stop collecting nodes after moving to a position with
+ ;; indentation equaling min-indent. This is specially
+ ;; useful for navigating nested definitions recursively.
+ tree)
+ (t
+ (python-imenu--build-tree
+ min-indent
+ indent
+ ;; Add another children, either when this is the
+ ;; first call or when indentation is
+ ;; less-or-equal than previous. And do not
+ ;; discard the number of children, because the
+ ;; way code is scanned, all children are
+ ;; collected until a root node yet to be found
+ ;; appears.
+ (if (or (not prev-indent)
+ (and
+ (> indent min-indent)
+ (<= indent prev-indent)))
+ (1+ num-children)
+ num-children)
+ (cond ((not prev-indent)
+ ;; First call to the function: append this
+ ;; defun to the index.
+ (list (cons label pos)))
+ ((= indent prev-indent)
+ ;; Add another defun with the same depth
+ ;; as the previous.
+ (cons (cons label pos) tree))
+ ((and (< indent prev-indent)
+ (< 0 num-children))
+ ;; There are children to be appended and
+ ;; the previous defun had more
+ ;; indentation, the current one must be a
+ ;; parent.
+ (python-imenu--put-parent type name pos num-children tree))
+ ((> indent prev-indent)
+ ;; There are children defuns deeper than
+ ;; current depth. Fear not, we already
+ ;; know how to treat them.
+ (cons
+ (prog1
+ (python-imenu--build-tree
+ prev-indent indent 1 (list (cons label pos)))
+ ;; Adjustment: after scanning backwards
+ ;; for all deeper children, we need to
+ ;; continue our scan for a parent from
+ ;; the current defun we are looking at.
+ (python-nav-forward-defun))
+ tree))))))))
+
+(defun python-imenu-create-index ()
+ "Return tree Imenu alist for the current python buffer.
+Change `python-imenu-format-item-label-function',
+`python-imenu-format-parent-item-label-function',
+`python-imenu-format-parent-item-jump-label-function' to
+customize how labels are formatted."
+ (goto-char (point-max))
+ (let ((index)
+ (tree))
+ (while (setq tree (python-imenu--build-tree))
+ (setq index (cons tree index)))
+ index))
+
+(defun python-imenu-create-flat-index (&optional alist prefix)
+ "Return flat outline of the current python buffer for Imenu.
+Optional Argument ALIST is the tree to be flattened, when nil
+`python-imenu-build-index' is used with
+`python-imenu-format-parent-item-jump-label-function'
+`python-imenu-format-parent-item-label-function'
+`python-imenu-format-item-label-function' set to (lambda (type
+name) name). Optional Argument PREFIX is used in recursive calls
+and should not be passed explicitly.
+
+Converts this:
+
+ \((\"Foo\" . 103)
+ (\"Bar\" . 138)
+ (\"decorator\"
+ (\"decorator\" . 173)
+ (\"wrap\"
+ (\"wrap\" . 353)
+ (\"wrapped_f\" . 393))))
+
+To this:
+
+ \((\"Foo\" . 103)
+ (\"Bar\" . 138)
+ (\"decorator\" . 173)
+ (\"decorator.wrap\" . 353)
+ (\"decorator.wrapped_f\" . 393))"
+ ;; Inspired by imenu--flatten-index-alist removed in revno 21853.
+ (apply
+ 'nconc
+ (mapcar
+ (lambda (item)
+ (let ((name (if prefix
+ (concat prefix "." (car item))
+ (car item)))
+ (pos (cdr item)))
+ (cond ((or (numberp pos) (markerp pos))
+ (list (cons name pos)))
+ ((listp pos)
+ (cons
+ (cons name (cdar pos))
+ (python-imenu-create-flat-index (cddr item) name))))))
+ (or alist
+ (let* ((fn (lambda (type name) name))
+ (python-imenu-format-item-label-function fn)
+ (python-imenu-format-parent-item-label-function fn)
+ (python-imenu-format-parent-item-jump-label-function fn))
+ (python-imenu-create-index))))))
\f
;;; Misc helpers
(goto-char comment-start))
(forward-comment factor)))
+(defun python-util-popn (lst n)
+ "Return LST first N elements.
+N should be an integer, when it's a natural negative number its
+opposite is used. When N is bigger than the length of LST, the
+list is returned as is."
+ (let* ((n (min (abs n)))
+ (len (length lst))
+ (acc))
+ (if (> n len)
+ lst
+ (while (< 0 n)
+ (setq acc (cons (car lst) acc)
+ lst (cdr lst)
+ n (1- n)))
+ (reverse acc))))
+
\f
;;;###autoload
(define-derived-mode python-mode prog-mode "Python"
(add-hook 'post-self-insert-hook
'python-indent-post-self-insert-function nil 'local)
- (set (make-local-variable 'imenu-extract-index-name-function)
- #'python-info-current-defun)
-
- (set (make-local-variable 'imenu-prev-index-position-function)
- #'python-imenu-prev-index-position)
+ (set (make-local-variable 'imenu-create-index-function)
+ #'python-imenu-create-index)
(set (make-local-variable 'add-log-current-defun-function)
#'python-info-current-defun)
indent))))
(defun ruby-beginning-of-defun (&optional arg)
- "Move backward to the beginning of the current top-level defun.
+ "Move backward to the beginning of the current defun.
With ARG, move backward multiple defuns. Negative ARG means
move forward."
(interactive "p")
- (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>")
- nil t (or arg 1))
- (beginning-of-line)))
-
-(defun ruby-end-of-defun (&optional arg)
- "Move forward to the end of the current top-level defun.
-With ARG, move forward multiple defuns. Negative ARG means
-move backward."
+ (let (case-fold-search)
+ (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>")
+ nil t (or arg 1))
+ (beginning-of-line))))
+
+(defun ruby-end-of-defun ()
+ "Move point to the end of the current defun.
+The defun begins at or after the point. This function is called
+by `end-of-defun'."
(interactive "p")
(ruby-forward-sexp)
- (when (looking-back (concat "^\\s *" ruby-block-end-re))
- (forward-line 1)))
+ (let (case-fold-search)
+ (when (looking-back (concat "^\\s *" ruby-block-end-re))
+ (forward-line 1))))
(defun ruby-beginning-of-indent ()
"Backtrack to a line which can be used as a reference for
(depth (or (nth 2 (ruby-parse-region (line-beginning-position)
(line-end-position)))
0))
+ case-fold-search
down done)
(when (< (* depth signum) 0)
;; Moving end -> end or beginning -> beginning.
. ((nil
;; function FOO
;; function FOO()
- "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*\\(?:()\\)?"
+ "^\\s-*function\\s-+\\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*\\(?:()\\)?"
1)
;; FOO()
(nil
- "^\\s-*\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()"
+ "^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()"
1)
)))
"Alist of regular expressions for recognizing shell function definitions.
\f
(defvar filter-buffer-substring-functions nil
- "This variable is a wrapper hook around `filter-buffer-substring'.
-Each member of the hook should be a function accepting four arguments:
-\(FUN BEG END DELETE), where FUN is itself a function of three arguments
+ "This variable is a wrapper hook around `filter-buffer-substring'.")
+(make-obsolete-variable 'filter-buffer-substring-functions
+ 'filter-buffer-substring-function "24.4")
+
+(defvar filter-buffer-substring-function #'buffer-substring--filter
+ "Function to perform the filtering in `filter-buffer-substring'.
+The function is called with 3 arguments:
\(BEG END DELETE). The arguments BEG, END, and DELETE are the same
as those of `filter-buffer-substring' in each case.
-
-The first hook function to be called receives a FUN equivalent
-to the default operation of `filter-buffer-substring',
-i.e. one that returns the buffer-substring between BEG and
-END (processed by any `buffer-substring-filters'). Normally,
-the hook function will call FUN and then do its own processing
-of the result. The next hook function receives a FUN equivalent
-to the previous hook function, calls it, and does its own
-processing, and so on. The overall result is that of all hook
-functions acting in sequence.
-
-Any hook may choose not to call FUN though, in which case it
-effectively replaces the default behavior with whatever it chooses.
-Of course, a later hook function may do the same thing.")
+It should return the buffer substring between BEG and END, after filtering.")
(defvar buffer-substring-filters nil
"List of filter functions for `filter-buffer-substring'.
Each function must accept a single argument, a string, and return
a string. The buffer substring is passed to the first function
in the list, and the return value of each function is passed to
-the next. The final result (if `buffer-substring-filters' is
-nil, this is the unfiltered buffer-substring) is passed to the
-first function on `filter-buffer-substring-functions'.
-
+the next.
As a special convention, point is set to the start of the buffer text
being operated on (i.e., the first argument of `filter-buffer-substring')
before these functions are called.")
(make-obsolete-variable 'buffer-substring-filters
- 'filter-buffer-substring-functions "24.1")
+ 'filter-buffer-substring-function "24.1")
(defun filter-buffer-substring (beg end &optional delete)
"Return the buffer substring between BEG and END, after filtering.
-The wrapper hook `filter-buffer-substring-functions' performs
-the actual filtering. The obsolete variable `buffer-substring-filters'
-is also consulted. If both of these are nil, no filtering is done.
+The hook `filter-buffer-substring-function' performs the actual filtering.
+By default, no filtering is done.
If DELETE is non-nil, the text between BEG and END is deleted
from the buffer.
This function should be used instead of `buffer-substring',
`buffer-substring-no-properties', or `delete-and-extract-region'
when you want to allow filtering to take place. For example,
-major or minor modes can use `filter-buffer-substring-functions' to
+major or minor modes can use `filter-buffer-substring-function' to
extract characters that are special to a buffer, and should not
be copied into other buffers."
+ (funcall filter-buffer-substring-function beg end delete))
+
+(defun buffer-substring--filter (beg end &optional delete)
(with-wrapper-hook filter-buffer-substring-functions (beg end delete)
(cond
((or delete buffer-substring-filters)
(marker-position (mark-marker))
(signal 'mark-inactive nil)))
-(defsubst deactivate-mark (&optional force)
+(defun deactivate-mark (&optional force)
"Deactivate the mark.
If Transient Mark mode is disabled, this function normally does
nothing; but if FORCE is non-nil, it deactivates the mark anyway.
Each hook function definition is used to construct the FUN passed
to the next hook function, if any. The last (or \"outermost\")
FUN is then called once."
- (declare (indent 2) (debug (form sexp body)))
+ (declare (indent 2) (debug (form sexp body))
+ (obsolete "use a <foo>-function variable modified by add-function."
+ "24.4"))
;; We need those two gensyms because CL's lexical scoping is not available
;; for function arguments :-(
(let ((funs (make-symbol "funs"))
;; Do the actual Nextstep Windows setup here; the above code just
;; defines functions and variables that we use now.
-(defun ns-initialize-window-system (&optional display)
+(defun ns-initialize-window-system (&optional _display)
"Initialize Emacs for Nextstep (Cocoa / GNUstep) windowing."
(cl-assert (not ns-initialized))
(declare-function x-parse-geometry "frame.c" (string))
(defvar x-command-line-resources)
-(defun w32-initialize-window-system (&optional display)
+(defun w32-initialize-window-system (&optional _display)
"Initialize Emacs for W32 GUI frames."
(cl-assert (not w32-initialized))
Visit the BibTeX files defined by `bibtex-files' and return a list
of corresponding buffers.
Initialize in these buffers `bibtex-reference-keys' if not yet set.
-List of BibTeX buffers includes current buffer if CURRENT is non-nil.
+List of BibTeX buffers includes current buffer if CURRENT is non-nil
+and the current buffer visits a file using `bibtex-mode'.
If FORCE is non-nil, (re)initialize `bibtex-reference-keys' even if
already set. If SELECT is non-nil interactively select a BibTeX buffer.
-When called interactively, FORCE is t, CURRENT is t if current buffer uses
-`bibtex-mode', and SELECT is t if current buffer does not use `bibtex-mode',"
+
+When called interactively, FORCE is t, CURRENT is t if current buffer
+visits a file using `bibtex-mode', and SELECT is t if current buffer
+does not use `bibtex-mode',"
(interactive (list (eq major-mode 'bibtex-mode) t
(not (eq major-mode 'bibtex-mode))))
(let ((file-path (split-string (or bibtex-file-path default-directory) ":+"))
(if (file-readable-p file)
(push (find-file-noselect file) buffer-list)))
;; Include current buffer iff we want it.
- ;; Exclude current buffer if it doesn't use `bibtex-mode'.
- ;; Thus calling `bibtex-initialize' gives meaningful results for
- ;; any current buffer.
- (unless (and current (eq major-mode 'bibtex-mode)) (setq current nil))
+ ;; Exclude current buffer if it does not visit a file using `bibtex-mode'.
+ ;; This way we exclude BibTeX buffers such as `bibtex-search-buffer'
+ ;; that are not visiting a BibTeX file. Also, calling `bibtex-initialize'
+ ;; gives meaningful results for any current buffer.
+ (unless (and current (eq major-mode 'bibtex-mode) buffer-file-name)
+ (setq current nil))
(cond ((and current (not (memq (current-buffer) buffer-list)))
(push (current-buffer) buffer-list))
((and (not current) (memq (current-buffer) buffer-list))
(if (stringp (car scheme))
(setq fmt (pop scheme)))
(dolist (step scheme)
+ ;; In the first STEP, if the field contains multiple
+ ;; matches, we want the match the closest to point.
+ ;; (if (eq step (car scheme))
(setq text (cdr (assoc-string (car step) fields-alist t)))
(if (string-match (nth 1 step) text)
(push (cond ((functionp (nth 2 step))
(if (string= "" field)
;; Unrestricted search.
(while (re-search-forward regexp nil t)
- (let ((beg (bibtex-beginning-of-entry))
- (end (bibtex-end-of-entry))
- key)
- (if (and (<= beg (match-beginning 0))
- (<= (match-end 0) end)
- (save-excursion
- (goto-char beg)
- (and (looking-at bibtex-entry-head)
- (setq key (bibtex-key-in-head))))
- (not (assoc key entries)))
- (push (list key file
- (buffer-substring-no-properties beg end))
- entries))))
+ (save-excursion
+ (let ((mbeg (match-beginning 0))
+ (mend (match-end 0))
+ (beg (bibtex-beginning-of-entry))
+ (end (bibtex-end-of-entry))
+ key)
+ (if (and (<= beg mbeg)
+ (<= mend end)
+ (progn
+ (goto-char beg)
+ (looking-at bibtex-entry-head))
+ (setq key (bibtex-key-in-head))
+ (not (assoc key entries)))
+ (push (list key file
+ (buffer-substring-no-properties beg end))
+ entries)))))
;; The following is slow. But it works reliably even in more
;; complicated cases with BibTeX string constants and crossrefed
;; entries. If you prefer speed over reliability, perform an
(let ((ispell-otherchars (ispell-get-otherchars)))
(cond
((not (and (numberp flyspell-pre-point)
- (buffer-live-p flyspell-pre-buffer)))
+ (eq flyspell-pre-buffer (current-buffer))))
nil)
((and (eq flyspell-pre-pre-point flyspell-pre-point)
(eq flyspell-pre-pre-buffer flyspell-pre-buffer))
;; Prevent anything we do from affecting the mark.
deactivate-mark)
(if (flyspell-check-pre-word-p)
- (with-current-buffer flyspell-pre-buffer
+ (save-excursion
'(flyspell-debug-signal-pre-word-checked)
- (save-excursion
- (goto-char flyspell-pre-point)
- (flyspell-word))))
+ (goto-char flyspell-pre-point)
+ (flyspell-word)))
(if (flyspell-check-word-p)
(progn
'(flyspell-debug-signal-word-checked)
;; FLYSPELL-CHECK-PRE-WORD-P
(setq flyspell-pre-pre-buffer (current-buffer))
(setq flyspell-pre-pre-point (point)))
- (progn
- (setq flyspell-pre-pre-buffer nil)
- (setq flyspell-pre-pre-point nil)
- ;; when a word is not checked because of a delayed command
- ;; we do not disable the ispell cache.
- (if (and (symbolp this-command)
+ (setq flyspell-pre-pre-buffer nil)
+ (setq flyspell-pre-pre-point nil)
+ ;; when a word is not checked because of a delayed command
+ ;; we do not disable the ispell cache.
+ (when (and (symbolp this-command)
(get this-command 'flyspell-delayed))
- (progn
- (setq flyspell-word-cache-end -1)
- (setq flyspell-word-cache-result '_)))))
+ (setq flyspell-word-cache-end -1)
+ (setq flyspell-word-cache-result '_)))
(while (and (not (input-pending-p)) (consp flyspell-changes))
(let ((start (car (car flyspell-changes)))
(stop (cdr (car flyspell-changes))))
((= char ?i) ; accept and insert word into pers dict
(ispell-send-string (concat "*" word "\n"))
(setq ispell-pdict-modified-p '(t)) ; dictionary modified!
+ (and (fboundp 'flyspell-unhighlight-at)
+ (flyspell-unhighlight-at start))
nil)
((or (= char ?a) (= char ?A)) ; accept word without insert
(ispell-send-string (concat "@" word "\n"))
(add-to-list 'ispell-buffer-session-localwords word)
+ (and (fboundp 'flyspell-unhighlight-at)
+ (flyspell-unhighlight-at start))
(or ispell-buffer-local-name ; session localwords might conflict
(setq ispell-buffer-local-name (buffer-name)))
(if (null ispell-pdict-modified-p)
(if (fboundp 'comment-padright)
;; Try and use the proper comment marker,
;; e.g. ";;" rather than ";".
- (comment-padright comment-start
- (comment-add nil))
+ (progn
+ ;; XEmacs: comment-normalize-vars
+ ;; (newcomment.el) only in >= 21.5
+ (and (fboundp 'comment-normalize-vars)
+ (comment-normalize-vars))
+ (comment-padright comment-start
+ (comment-add nil)))
comment-start)
" ")
"")
;; remove extra whitespace
(while (string-match "[\n\t\r]\\|[ \t][ \t]+" field)
(setq field (replace-match " " nil t field)))
- ;; remove leading garbage
- (if (string-match (if raw "^[ \t]+" "^[ \t{]+") field)
- (setq field (replace-match "" nil t field)))
- ;; remove trailing garbage
- (if (string-match (if raw "[ \t]+$" "[ \t}]+$") field)
- (setq field (replace-match "" nil t field)))
(push (cons key field) alist))))
alist))
(string :tag ""))
(option (boolean :tag "Downcase words "))))
+(defcustom reftex-label-regexps
+ '(;; Normal \\label{foo} labels
+ "\\\\label{\\(?1:[^}]*\\)}"
+ ;; keyvals [..., label = {foo}, ...] forms used by ctable,
+ ;; listings, minted, ...
+ "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
+ "List of regexps matching \\label definitions.
+The default value matches usual \\label{...} definitions and
+keyval style [..., label = {...}, ...] label definitions. It is
+assumed that the regexp group 1 matches the label text, so you
+have to define it using \\(?1:...\\) when adding new regexps."
+ :group 'reftex-defining-label-environments
+ :type '(repeat (regexp :tag "Regular Expression")))
+
(defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]"
"Regexp matching characters not valid in labels."
:group 'reftex-making-and-inserting-labels
(wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because
; match numbers are hard coded
(label-re (concat "\\(?:"
- ;; Normal \label{...}
- "\\\\label{\\([^}]*\\)}"
- "\\|"
- ;; keyvals [..., label = {foo}, ...]
- ;; forms used by ctable, listings,
- ;; minted, ...
- "\\[[^]]*label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?"
+ (mapconcat 'identity reftex-label-regexps "\\|")
"\\)"))
(include-re (concat wbol
"\\\\\\("
command squeezed))))
(when vc-command-messages
(message "Running %s in background..." full-command))
- ;;(set-process-sentinel proc (lambda (p msg) (delete-process p)))
+ ;; Get rid of the default message insertion, in case we don't
+ ;; set a sentinel explicitly.
+ (set-process-sentinel proc #'ignore)
(set-process-filter proc 'vc-process-filter)
(setq status proc)
(when vc-command-messages
;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS
;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS
(defconst vc-hg-annotate-re
- "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\(.+\\): \\)\\)")
+ "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\([^:\n]+\\(?::\\(?:[^: \n][^:\n]*\\)?\\)*\\): \\)\\)")
(defun vc-hg-annotate-time ()
(when (looking-at vc-hg-annotate-re)
absolute value can be less than `window-min-height' or
`window-min-width'; so this command can make a new window as
small as one line or two columns. SIZE defaults to half of
-WINDOW's size. Interactively, SIZE is the prefix argument.
+WINDOW's size.
Optional third argument SIDE nil (or `below') specifies that the
new window shall be located below WINDOW. SIDE `above' means the
window, these properties as well as the buffer displayed in the
new window are inherited from the window selected on WINDOW's
frame. The selected window is not changed by this function."
- (interactive "i")
(setq window (window-normalize-window window))
(let* ((side (cond
((not side) 'below)
(if (featurep 'xemacs)
`(if ,store (zmacs-activate-region)
(zmacs-deactivate-region))
- `(setq mark-active ,store)))))
- (if (boundp 'mark-active)
- mark-active
- (region-active-p)))
+ `(if ,store (activate-mark) (deactivate-mark))))))
+ (region-active-p))
(defalias 'winner-edges
(if (featurep 'xemacs) 'window-pixel-edges 'window-edges))
+2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
+
+ * w32fns.c (w32_fullscreen_rect): New function to compute the
+ window rectangle for the given fullscreen mode.
+ (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
+ longer tunes the window size. This keeps the window's edges flush
+ with the screen and allows the taskbar to hide itself in fullboth.
+
+ * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
+ window decorations and uses the entire screen.
+
+ * w32term.h (w32_fullscreen_rect) Add prototype.
+ (struct w32_output): Replace normal_width, normal_height,
+ normal_top, and normal_left members with a single normal_placement
+ struct.
+ (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
+ Remove macros.
+ (FRAME_NORMAL_PLACEMENT): New macro.
+
+2013-04-16 Juanma Barranquero <lekktu@gmail.com>
+
+ * minibuf.c (Ftest_completion): Silence compiler warning.
+
+2013-04-15 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (w32_wnd_proc): Add more assertions to investigate
+ bug#14062.
+
+ * frame.h (WINDOW_FRAME): Protect macro and its argument with
+ parentheses.
+
+ * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
+ (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
+ (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
+ parentheses where appropriate.
+
+2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * keyboard.c (timer_start_idle): Remove no-longer-used local.
+
+2013-04-14 Eli Zaretskii <eliz@gnu.org>
+
+ * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
+ <left-fringe-width, right-fringe-width, fringes-outside-margins>:
+ Mention in the doc string that setting these variables takes
+ effect only after a call to set-window-buffer. (Bug#14200)
+
+2013-04-13 Eli Zaretskii <eliz@gnu.org>
+
+ * indent.c (Fvertical_motion): Don't consider display strings on
+ overlay strings as display strings on the buffer position we
+ started from. This prevents vertical cursor motion from jumping
+ more than one line when there's an overlay string with a display
+ property at end of line.
+ Reported by Karl Chen <Karl.Chen@quarl.org> in
+ http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
+
+2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * window.c (select_window): `record_buffer' even if window is
+ already selected (bug#14191).
+
+2013-04-11 Eli Zaretskii <eliz@gnu.org>
+
+ * window.c (Fwindow_end): Test more flags, including the buffer's
+ last_overlay_modified flag, to determine whether the window's
+ display is really up-to-date. Prevents the function from
+ returning a stale value. (Bug#14170)
+ (Fwindow_line_height): Fix the test for up-to-date-ness of the
+ current matrix.
+
+2013-04-10 Eli Zaretskii <eliz@gnu.org>
+
+ * frame.c (do_switch_frame): Mark the TTY frame we switch to as
+ garbaged only if it is not already the top frame on its TTY.
+ This prevents flickering due to constant redrawing of TTY frames when
+ there are GUI frames open in the same session. (Bug#13864)
+
+2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
+ of marking the idle timers directly.
+
2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
The following changes is to optimize the code for reading UTF-8
files.
- * coding.c (check_ascii): Renamed from detect_ascii. Return value
+ * coding.c (check_ascii): Rename from detect_ascii. Return value
changed. Check EOL format. Do not call adjust_coding_eol_type
here.
(check_utf_8): New function.
* xdisp.c (with_echo_area_buffer_unwind_data): Save window
start marker...
- (unwind_with_echo_area_buffer): ...to restore it here. This
- is needed to ensure that...
+ (unwind_with_echo_area_buffer): ...to restore it here.
+ This is needed to ensure that...
(redisplay_window): ...both window markers are valid here,
which is verified by eassert.
* editfns.c (save_excursion_save): Do not assume that
* w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
- variables, to save and restore frame dimensions. Use
- FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
- after returning from a 'fullscreen' configuration. use
- SendMessage instead of PostMessage to send the SC_RESTORE message,
+ variables, to save and restore frame dimensions.
+ Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
+ after returning from a 'fullscreen' configuration.
+ use SendMessage instead of PostMessage to send the SC_RESTORE message,
to avoid races between the main thread and the input thread.
* w32term.h (struct w32_output): New members normal_width,
* frame.h (struct frame): Drop resx and resy because the same data is
available from window system-specific output context. Adjust users.
- (default_pixels_per_inch_x, default_pixels_per_inch_y): New
- functions to provide defaults when no window system available.
+ (default_pixels_per_inch_x, default_pixels_per_inch_y):
+ New functions to provide defaults when no window system available.
(FRAME_RES_X, FRAME_RES_Y): New macros.
- (NUMVAL): Moved from xdisp.c.
+ (NUMVAL): Move from xdisp.c.
* font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
(Ffont_face_attributes, Fopen_font):
* image.c (gs_load):
(Fcommand_execute): Remove, replace by an Elisp implementation.
(syms_of_keyboard): Adjust accordingly.
-2013-02-19 Daniel Colascione <dancol@dancol.org>
+2013-02-19 Daniel Colascione <dancol@dancol.org>
* sheap.c (report_sheap_usage): Use message, not message1, so
that we don't try to create a buffer while we're in the middle
to denote vector blocks. Adjust users (live_vector_p,
mark_maybe_pointer, valid_lisp_object_p) accordingly.
(COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
- (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
- (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
- (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
+ (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES)
+ (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX)
+ (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST)
(VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
(roundup_size): New constant.
(struct vector_block): New data type.
DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
Qintegerp,
doc: /* Width of left marginal area for display of a buffer.
-A value of nil means no marginal area. */);
+A value of nil means no marginal area.
+
+Setting this variable does not take effect until a new buffer is displayed
+in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
Qintegerp,
doc: /* Width of right marginal area for display of a buffer.
-A value of nil means no marginal area. */);
+A value of nil means no marginal area.
+
+Setting this variable does not take effect until a new buffer is displayed
+in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width),
Qintegerp,
doc: /* Width of this buffer's left fringe (in pixels).
A value of 0 means no left fringe is shown in this buffer's window.
-A value of nil means to use the left fringe width from the window's frame. */);
+A value of nil means to use the left fringe width from the window's frame.
+
+Setting this variable does not take effect until a new buffer is displayed
+in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width),
Qintegerp,
doc: /* Width of this buffer's right fringe (in pixels).
A value of 0 means no right fringe is shown in this buffer's window.
-A value of nil means to use the right fringe width from the window's frame. */);
+A value of nil means to use the right fringe width from the window's frame.
+
+Setting this variable does not take effect until a new buffer is displayed
+in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins),
Qnil,
doc: /* Non-nil means to display fringes outside display margins.
-A value of nil means to display fringes between margins and buffer text. */);
+A value of nil means to display fringes between margins and buffer text.
+
+Setting this variable does not take effect until a new buffer is displayed
+in a window. To make the change take effect, call `set-window-buffer'. */);
DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
Qintegerp,
? current_mode_line_height \
: (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame), \
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
CURRENT_MODE_LINE_FACE_ID (W))))
/* Return the current height of the header line of window W. If not
? current_header_line_height \
: (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME (W->frame),\
+ : estimate_mode_line_height (XFRAME ((W)->frame), \
HEADER_LINE_FACE_ID)))
/* Return the height of the desired mode line of window W. */
(!MINI_WINDOW_P ((W)) \
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->contents) \
- && !NILP (BVAR (XBUFFER (W->contents), mode_line_format)) \
+ && BUFFERP ((W)->contents) \
+ && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is true if window W wants a header line. */
-#define WINDOW_WANTS_HEADER_LINE_P(W) \
- (!MINI_WINDOW_P ((W)) \
- && !(W)->pseudo_window_p \
- && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
- && BUFFERP (W->contents) \
- && !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \
- && WINDOW_TOTAL_LINES (W) > 1 \
- + !NILP (BVAR (XBUFFER (W->contents), mode_line_format)))
+#define WINDOW_WANTS_HEADER_LINE_P(W) \
+ (!MINI_WINDOW_P ((W)) \
+ && !(W)->pseudo_window_p \
+ && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
+ && BUFFERP ((W)->contents) \
+ && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \
+ && WINDOW_TOTAL_LINES (W) > 1 \
+ + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has
ASCENT and DESCENT to draw characters by the font at the vertical
if (FRAME_TERMCAP_P (XFRAME (frame)) || FRAME_MSDOS_P (XFRAME (frame)))
{
- if (FRAMEP (FRAME_TTY (XFRAME (frame))->top_frame))
- /* Mark previously displayed frame as now obscured. */
- SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (XFRAME (frame))->top_frame), 2);
- SET_FRAME_VISIBLE (XFRAME (frame), 1);
+ Lisp_Object top_frame = FRAME_TTY (XFRAME (frame))->top_frame;
+
+ /* Don't mark the frame garbaged and/or obscured if we are
+ switching to the frame that is already the top frame of that
+ TTY. */
+ if (!EQ (frame, top_frame))
+ {
+ if (FRAMEP (top_frame))
+ /* Mark previously displayed frame as now obscured. */
+ SET_FRAME_VISIBLE (XFRAME (top_frame), 2);
+ SET_FRAME_VISIBLE (XFRAME (frame), 1);
+ }
FRAME_TTY (XFRAME (frame))->top_frame = frame;
}
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
-#define WINDOW_FRAME(w) w->frame
+#define WINDOW_FRAME(w) ((w)->frame)
/* Test a frame for particular kinds of display methods. */
#define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)
const char *s = SSDATA (it.string);
const char *e = s + SBYTES (it.string);
+ disp_string_at_start_p =
/* If it.area is anything but TEXT_AREA, we need not bother
about the display string, as it doesn't affect cursor
positioning. */
- disp_string_at_start_p =
- it.string_from_display_prop_p && it.area == TEXT_AREA;
+ it.area == TEXT_AREA
+ && it.string_from_display_prop_p
+ /* A display string on anything but buffer text (e.g., on
+ an overlay string) doesn't affect cursor positioning. */
+ && (it.sp > 0 && it.stack[it.sp - 1].method == GET_FROM_BUFFER);
while (s < e)
{
if (*s++ == '\n')
static void
timer_start_idle (void)
{
- Lisp_Object timers;
-
/* If we are already in the idle state, do nothing. */
if (EMACS_TIME_VALID_P (timer_idleness_start_time))
return;
timer_last_idleness_start_time = timer_idleness_start_time;
/* Mark all idle-time timers as once again candidates for running. */
- for (timers = Vtimer_idle_list; CONSP (timers); timers = XCDR (timers))
- {
- Lisp_Object timer;
-
- timer = XCAR (timers);
-
- if (!VECTORP (timer) || ASIZE (timer) != 9)
- continue;
- ASET (timer, 0, Qnil);
- }
+ call0 (intern ("internal-timer-start-idle"));
}
/* Record that Emacs is no longer idle, so stop running idle-time timers. */
else if (HASH_TABLE_P (collection))
{
struct Lisp_Hash_Table *h = XHASH_TABLE (collection);
- i = hash_lookup (h, string, NULL);
Lisp_Object key = Qnil;
+ i = hash_lookup (h, string, NULL);
if (i >= 0)
tem = HASH_KEY (h, i);
else
#ifdef ENABLE_CHECKING
/* Temporary code to catch crashes in computing form.rcArea.top. */
+ eassert (FRAMEP (w->frame));
+ eassert (BUFFERP (w->contents));
{
int wmbp = WINDOW_MENU_BAR_P (w);
int wtbp = WINDOW_TOOL_BAR_P (w);
Fset_buffer (w->contents);
if (EQ (window, selected_window) && !inhibit_point_swap)
- return window;
+ /* `switch-to-buffer' uses (select-window (selected-window)) as a "clever"
+ way to call record_buffer from Elisp, so it's important that we call
+ record_buffer before returning here. */
+ goto record_and_return;
sf = SELECTED_FRAME ();
if (XFRAME (WINDOW_FRAME (w)) != sf)
fset_selected_window (sf, window);
select_window_1 (window, inhibit_point_swap);
+ bset_last_selected_window (XBUFFER (w->contents), window);
+ windows_or_buffers_changed++;
+ record_and_return:
/* record_buffer can run QUIT, so make sure it is run only after we have
re-established the invariant between selected_window and selected_frame,
otherwise the temporary broken invariant might "escape" (bug#14161). */
record_buffer (w->contents);
}
- bset_last_selected_window (XBUFFER (w->contents), window);
- windows_or_buffers_changed++;
return window;
}
b = XBUFFER (buf);
if (! NILP (update)
- && (windows_or_buffers_changed || !w->window_end_valid)
+ && (windows_or_buffers_changed
+ || !w->window_end_valid
+ || b->clip_changed
+ || b->prevent_redisplay_optimizations_p
+ || w->last_modified < BUF_MODIFF (b)
+ || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
&& !noninteractive)
{
struct text_pos startp;
/* Fail if current matrix is not up-to-date. */
if (!w->window_end_valid
- || current_buffer->clip_changed
- || current_buffer->prevent_redisplay_optimizations_p
+ || windows_or_buffers_changed
+ || b->clip_changed
+ || b->prevent_redisplay_optimizations_p
|| w->last_modified < BUF_MODIFF (b)
|| w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
return Qnil;
+2013-04-01 Masatake YAMATO <yamato@redhat.com>
+
+ * automated/imenu-tests.el: New file. (Bug#14112)
+
+2013-04-19 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * automated/python-tests.el (python-imenu-prev-index-position-1):
+ Removed test.
+ (python-imenu-create-index-1, python-imenu-create-flat-index-1):
+ New tests.
+
+2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * automated/python-tests.el (python-nav-backward-defun-2)
+ (python-nav-backward-defun-3, python-nav-forward-defun-2)
+ (python-nav-forward-defun-3): New tests.
+
+2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * automated/python-tests.el (python-nav-backward-defun-1)
+ (python-nav-forward-defun-1): New tests.
+
2013-04-09 Masatake YAMATO <yamato@redhat.com>
* automated/add-log-tests.el: New file. (Bug#14112)
(add-log-current-defun-deftest
sh-var
- "Test sh-current-defun-name can find variabe definition."
+ "Test sh-current-defun-name can find variable definition."
sh-mode "
PATH=a:/ab:/usr/abc
DIR=/pr><oc"
--- /dev/null
+;;; imenu-tests.el --- Test suite for imenu.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Masatake YAMATO <yamato@redhat.com>
+;; Keywords: tools convenience
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'imenu)
+
+;; (imenu-simple-scan-deftest-gather-strings-from-list
+;; '(nil t 'a (0 . "x") ("c" . "d") ("a" 0 "b") ))
+;; => ("b" "a" "d" "c" "x")
+(defun imenu-simple-scan-deftest-gather-strings-from-list(input)
+ "Gather strings from INPUT, a list."
+ (let ((result ()))
+ (while input
+ (cond
+ ((stringp input)
+ (setq result (cons input result)
+ input nil))
+ ((atom input)
+ (setq input nil))
+ ((listp (car input))
+ (setq result (append
+ (imenu-simple-scan-deftest-gather-strings-from-list (car input))
+ result)
+ input (cdr input)))
+ ((stringp (car input))
+ (setq result (cons (car input) result)
+ input (cdr input)))
+ (t
+ (setq input (cdr input)))))
+ result))
+
+(defmacro imenu-simple-scan-deftest (name doc major-mode content expected-items)
+ "Generate an ert test for mode-own imenu expression.
+Run `imenu-create-index-function' at the buffer which content is
+CONTENT with MAJOR-MODE. A generated test runs `imenu-create-index-function'
+at the buffer which content is CONTENT with MAJOR-MODE. Then it compares a list
+of strings which are picked up from the result with EXPECTED-ITEMS."
+ (let ((xname (intern (concat "imenu-simple-scan-deftest-" (symbol-name name)))))
+ `(ert-deftest ,xname ()
+ ,doc
+ (with-temp-buffer
+ (insert ,content)
+ (funcall ',major-mode)
+ (let ((result-items (sort (imenu-simple-scan-deftest-gather-strings-from-list
+ (funcall imenu-create-index-function))
+ #'string-lessp))
+ (expected-items (sort (copy-sequence ,expected-items) #'string-lessp)))
+ (should (equal result-items expected-items))
+ )))))
+
+(imenu-simple-scan-deftest sh "Test imenu expression for sh-mode." sh-mode "a()
+{
+}
+function b
+{
+}
+function c()
+{
+}
+function ABC_D()
+{
+}
+" '("a" "b" "c" "ABC_D"))
+
+(provide 'imenu-tests)
+
+;;; imenu-tests.el ends here
(python-tests-look-at "return wrapped_f")
(line-beginning-position))))))
+(ert-deftest python-nav-backward-defun-1 ()
+ (python-tests-with-temp-buffer
+ "
+class A(object): # A
+
+ def a(self): # a
+ pass
+
+ def b(self): # b
+ pass
+
+ class B(object): # B
+
+ class C(object): # C
+
+ def d(self): # d
+ pass
+
+ # def e(self): # e
+ # pass
+
+ def c(self): # c
+ pass
+
+ # def d(self): # d
+ # pass
+"
+ (goto-char (point-max))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def c(self): # c" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def d(self): # d" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " class C(object): # C" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " class B(object): # B" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def b(self): # b" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def a(self): # a" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at "class A(object): # A" -1)))
+ (should (not (python-nav-backward-defun)))))
+
+(ert-deftest python-nav-backward-defun-2 ()
+ (python-tests-with-temp-buffer
+ "
+def decoratorFunctionWithArguments(arg1, arg2, arg3):
+ '''print decorated function call data to stdout.
+
+ Usage:
+
+ @decoratorFunctionWithArguments('arg1', 'arg2')
+ def func(a, b, c=True):
+ pass
+ '''
+
+ def wwrap(f):
+ print 'Inside wwrap()'
+ def wrapped_f(*args):
+ print 'Inside wrapped_f()'
+ print 'Decorator arguments:', arg1, arg2, arg3
+ f(*args)
+ print 'After f(*args)'
+ return wrapped_f
+ return wwrap
+"
+ (goto-char (point-max))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def wrapped_f(*args):" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at " def wwrap(f):" -1)))
+ (should (= (save-excursion (python-nav-backward-defun))
+ (python-tests-look-at "def decoratorFunctionWithArguments(arg1, arg2, arg3):" -1)))
+ (should (not (python-nav-backward-defun)))))
+
+(ert-deftest python-nav-backward-defun-3 ()
+ (python-tests-with-temp-buffer
+ "
+'''
+ def u(self):
+ pass
+
+ def v(self):
+ pass
+
+ def w(self):
+ pass
+'''
+
+class A(object):
+ pass
+"
+ (goto-char (point-min))
+ (let ((point (python-tests-look-at "class A(object):")))
+ (should (not (python-nav-backward-defun)))
+ (should (= point (point))))))
+
+(ert-deftest python-nav-forward-defun-1 ()
+ (python-tests-with-temp-buffer
+ "
+class A(object): # A
+
+ def a(self): # a
+ pass
+
+ def b(self): # b
+ pass
+
+ class B(object): # B
+
+ class C(object): # C
+
+ def d(self): # d
+ pass
+
+ # def e(self): # e
+ # pass
+
+ def c(self): # c
+ pass
+
+ # def d(self): # d
+ # pass
+"
+ (goto-char (point-min))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(object): # A")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(self): # a")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(self): # b")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(object): # B")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(object): # C")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(self): # d")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(self): # c")))
+ (should (not (python-nav-forward-defun)))))
+
+(ert-deftest python-nav-forward-defun-2 ()
+ (python-tests-with-temp-buffer
+ "
+def decoratorFunctionWithArguments(arg1, arg2, arg3):
+ '''print decorated function call data to stdout.
+
+ Usage:
+
+ @decoratorFunctionWithArguments('arg1', 'arg2')
+ def func(a, b, c=True):
+ pass
+ '''
+
+ def wwrap(f):
+ print 'Inside wwrap()'
+ def wrapped_f(*args):
+ print 'Inside wrapped_f()'
+ print 'Decorator arguments:', arg1, arg2, arg3
+ f(*args)
+ print 'After f(*args)'
+ return wrapped_f
+ return wwrap
+"
+ (goto-char (point-min))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(arg1, arg2, arg3):")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(f):")))
+ (should (= (save-excursion (python-nav-forward-defun))
+ (python-tests-look-at "(*args):")))
+ (should (not (python-nav-forward-defun)))))
+
+(ert-deftest python-nav-forward-defun-3 ()
+ (python-tests-with-temp-buffer
+ "
+class A(object):
+ pass
+
+'''
+ def u(self):
+ pass
+
+ def v(self):
+ pass
+
+ def w(self):
+ pass
+'''
+"
+ (goto-char (point-min))
+ (let ((point (python-tests-look-at "(object):")))
+ (should (not (python-nav-forward-defun)))
+ (should (= point (point))))))
(ert-deftest python-nav-beginning-of-statement-1 ()
(python-tests-with-temp-buffer
\f
;;; Imenu
-(ert-deftest python-imenu-prev-index-position-1 ()
- (require 'imenu)
+
+(ert-deftest python-imenu-create-index-1 ()
(python-tests-with-temp-buffer
"
-def decoratorFunctionWithArguments(arg1, arg2, arg3):
+class Foo(models.Model):
+ pass
+
+
+class Bar(models.Model):
+ pass
+
+
+def decorator(arg1, arg2, arg3):
'''print decorated function call data to stdout.
Usage:
- @decoratorFunctionWithArguments('arg1', 'arg2')
+ @decorator('arg1', 'arg2')
def func(a, b, c=True):
pass
'''
- def wwrap(f):
- print 'Inside wwrap()'
+ def wrap(f):
+ print ('wrap')
def wrapped_f(*args):
- print 'Inside wrapped_f()'
- print 'Decorator arguments:', arg1, arg2, arg3
+ print ('wrapped_f')
+ print ('Decorator arguments:', arg1, arg2, arg3)
f(*args)
- print 'After f(*args)'
+ print ('called f(*args)')
return wrapped_f
- return wwrap
+ return wrap
-def test(): # Some comment
- 'This is a test function'
- print 'test'
-class C(object):
+class Baz(object):
- def m(self):
- self.c()
+ def a(self):
+ pass
- def b():
- pass
+ def b(self):
+ pass
- def a():
+ class Frob(object):
+
+ def c(self):
pass
+"
+ (goto-char (point-max))
+ (should (equal
+ (list
+ (cons "Foo (class)" (copy-marker 2))
+ (cons "Bar (class)" (copy-marker 38))
+ (list
+ "decorator (def)"
+ (cons "*function definition*" (copy-marker 74))
+ (list
+ "wrap (def)"
+ (cons "*function definition*" (copy-marker 254))
+ (cons "wrapped_f (def)" (copy-marker 294))))
+ (list
+ "Baz (class)"
+ (cons "*class definition*" (copy-marker 519))
+ (cons "a (def)" (copy-marker 539))
+ (cons "b (def)" (copy-marker 570))
+ (list
+ "Frob (class)"
+ (cons "*class definition*" (copy-marker 601))
+ (cons "c (def)" (copy-marker 626)))))
+ (python-imenu-create-index)))))
+
+(ert-deftest python-imenu-create-flat-index-1 ()
+ (python-tests-with-temp-buffer
+ "
+class Foo(models.Model):
+ pass
- def c(self):
+
+class Bar(models.Model):
+ pass
+
+
+def decorator(arg1, arg2, arg3):
+ '''print decorated function call data to stdout.
+
+ Usage:
+
+ @decorator('arg1', 'arg2')
+ def func(a, b, c=True):
+ pass
+ '''
+
+ def wrap(f):
+ print ('wrap')
+ def wrapped_f(*args):
+ print ('wrapped_f')
+ print ('Decorator arguments:', arg1, arg2, arg3)
+ f(*args)
+ print ('called f(*args)')
+ return wrapped_f
+ return wrap
+
+
+class Baz(object):
+
+ def a(self):
pass
+
+ def b(self):
+ pass
+
+ class Frob(object):
+
+ def c(self):
+ pass
"
- (let ((expected
- '(("*Rescan*" . -99)
- ("decoratorFunctionWithArguments" . 2)
- ("decoratorFunctionWithArguments.wwrap" . 224)
- ("decoratorFunctionWithArguments.wwrap.wrapped_f" . 273)
- ("test" . 500)
- ("C" . 575)
- ("C.m" . 593)
- ("C.m.b" . 628)
- ("C.m.a" . 663)
- ("C.c" . 698))))
- (mapc
- (lambda (elt)
- (should (= (cdr (assoc-string (car elt) expected))
- (if (markerp (cdr elt))
- (marker-position (cdr elt))
- (cdr elt)))))
- (imenu--make-index-alist)))))
+ (goto-char (point-max))
+ (should (equal
+ (list (cons "Foo" (copy-marker 2))
+ (cons "Bar" (copy-marker 38))
+ (cons "decorator" (copy-marker 74))
+ (cons "decorator.wrap" (copy-marker 254))
+ (cons "decorator.wrap.wrapped_f" (copy-marker 294))
+ (cons "Baz" (copy-marker 519))
+ (cons "Baz.a" (copy-marker 539))
+ (cons "Baz.b" (copy-marker 570))
+ (cons "Baz.Frob" (copy-marker 601))
+ (cons "Baz.Frob.c" (copy-marker 626)))
+ (python-imenu-create-flat-index)))))
\f
;;; Misc helpers
(ruby-beginning-of-block)
(should (= 1 (line-number-at-pos)))))
+(ert-deftest ruby-move-to-block-does-not-fold-case ()
+ (ruby-with-temp-buffer
+ (ruby-test-string
+ "foo do
+ | Module.to_s
+ |end")
+ (end-of-buffer)
+ (let ((case-fold-search t))
+ (ruby-beginning-of-block))
+ (should (= 1 (line-number-at-pos)))))
+
+(ert-deftest ruby-beginning-of-defun-does-not-fold-case ()
+ (ruby-with-temp-buffer
+ (ruby-test-string
+ "class C
+ | def bar
+ | Class.to_s
+ | end
+ |end")
+ (goto-line 4)
+ (let ((case-fold-search t))
+ (beginning-of-defun))
+ (should (= 2 (line-number-at-pos)))))
+
+(ert-deftest ruby-end-of-defun-skips-to-next-line-after-the-method ()
+ (ruby-with-temp-buffer
+ (ruby-test-string
+ "class D
+ | def tee
+ | 'ho hum'
+ | end
+ |end")
+ (goto-line 2)
+ (end-of-defun)
+ (should (= 5 (line-number-at-pos)))))
+
(provide 'ruby-mode-tests)
;;; ruby-mode-tests.el ends here