* doc/lispintro/Makefile.in (emacsdir): New variable..
(MAKEINFO_OPTS, ENVADD): Add $emacsdir.
(srcs): Add emacsver.texi.
(dist): Include emacsver.texi. Edit emacsdir.
* doc/lispintro/emacs-lisp-intro.texi (emacsver.texi): Include it.
(copying): For non-printed versions, uses Emacs version rather
than that of the printed book.
(Complications, Lisp macro, defvar and asterisk, defcustom): Copyedits.
* doc/lispintro/emacs-lisp-intro.texi (Writing Defuns, Prevent confusion,
Determining the Element, lambda): Refine the doc about Lisp macros,
reported by Glenn Morris.
"If keys have their default meanings, use precomputed string to save
lots of time" implies substitute-command-keys was slow 20+ years ago
when this was originally written. But we were accidentally using the
"slow" branch for 5 years and no-one complained about speed (bug#13970).
Stefan Monnier [Tue, 23 Apr 2013 12:29:14 +0000 (08:29 -0400)]
* lisp/jit-lock.el: Fix signals in jit-lock-force-redisplay.
Use lexical-binding.
(jit-lock-force-redisplay): Use markers, check buffer's continued
existence and beware narrowed buffers.
(jit-lock-fontify-now): Adjust call accordingly.
Michael Albinus [Mon, 22 Apr 2013 10:26:09 +0000 (12:26 +0200)]
* net/tramp-compat.el (tramp-compat-call-process): Move function ...
* net/tramp.el (tramp-call-process): ... here
(tramp-set-completion-function, tramp-parse-putty):
* net/tramp-adb.el (tramp-adb-execute-adb-command):
* net/tramp-gvfs.el (tramp-gvfs-send-command):
* net/tramp-sh.el (tramp-sh-handle-set-file-times)
(tramp-set-file-uid-gid, tramp-sh-handle-write-region)
(tramp-call-local-coding-command): Use `tramp-call-process'
instead of `tramp-compat-call-process'.
* net/tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst.
(tramp-local-coding-commands, tramp-remote-coding-commands): Use them.
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
(tramp-find-inline-compress):Improve traces.
(tramp-maybe-send-script): Check for Perl binary.
(tramp-get-inline-coding): Do not redirect STDOUT for local decoding.
* epg.el (epg-context-pinentry-mode): New function.
(epg-context-set-pinentry-mode): New function.
(epg--start): Pass --pinentry-mode option to gpg command.
* emacs-lisp-intro.texi (defcustom, defun, simplified-beginning-of-buffer, defvar, Building Robots, Review, save-excursion): `defun' and `defcustom' are now macros rather than special forms. (Bug#13853)
comint.el: (comint-dynamic-complete-functions, comint-mode-map): `comint-dynamic-complete' is obsolete since 24.1, replaced by `completion-at-point'. (Bug#13774)
No longer include timestamp in header of .elc files
This removes needless differences between files compiled at different
times or by different people, or from sources in different locations.
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00187.html
* lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header):
No longer include timestamp etc information.
* lisp/vc/vc-dispatcher.el: Use lexical-binding.
(vc--process-sentinel): Rename from vc-process-sentinel.
Change last arg to be the code to run. Don't use vc-previous-sentinel
and vc-sentinel-commands any more.
(vc-exec-after): Allow code to be a function. Use add/remove-function.
(compilation-error-regexp-alist, view-old-buffer-read-only): Declare.
Erik Charlebois [Sat, 20 Apr 2013 07:32:31 +0000 (10:32 +0300)]
Better full-screen frame support on MS-Windows.
src/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.
src/w32term.c (w32fullscreen_hook): 'fullboth' now shows without
window decorations and uses the entire screen.
src/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.
* 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).
Replace AC_PROG_LN_S by a less strict configure test
* 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.
Stefan Monnier [Thu, 18 Apr 2013 00:12:33 +0000 (20:12 -0400)]
* lisp/subr.el (with-wrapper-hook): Declare obsolete.
* lisp/simple.el (filter-buffer-substring-function): New hook.
(filter-buffer-substring): Use it.
(filter-buffer-substring-functions): Mark obsolete.
* lisp/minibuffer.el (completion-in-region-function): New hook.
(completion-in-region): Use it.
(completion-in-region-functions): Mark obsolete.
* lisp/mail/mailabbrev.el (mail-abbrevs-setup): Use abbrev-expand-function.
* lisp/abbrev.el (abbrev-expand-function): New hook.
(expand-abbrev): Use it.
(abbrev-expand-functions): Mark obsolete.
* lisp/emacs-lisp/nadvice.el (advice--where-alist): Add :filter-args
and :filter-return.
* lisp/org/org-agenda.el (org-agenda-mode):
* lisp/org/org-indent.el (org-indent-mode): Use the `local' arg of
add-hook/remove-hook.
Stefan Monnier [Wed, 17 Apr 2013 20:52:02 +0000 (16:52 -0400)]
* lisp/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.
* lisp/minibuffer.el (minibuffer-completion-contents): Mark as obsolete.
textmodes/flyspell.el: Don't check pre-word if buffer was switched.
If command changed the buffer, the decision may be made based on the
current buffer even though it should based on the previous one. This
may lead to false positives and more importantly to errors since
`flyspell-pre-point' is buffer local so it may have unsanitised value
(such as nil) in previous buffer.
To be honest, I'm not sure how this can happen since
`flyspell-pre-point' is set in previous buffer, but nonetheless, I've
been encountering the error for quite some time and finally decided to
fix it. Interestingly, line making `flyspell-pre-point'
a buffer-local variable has a very revealing "Why?? --Stef" comment.
To avoid the problem, change flyspell-check-pre-word-p so that it does
not allow checking of pre-word if command changed buffer
(ie. `flyspell-pre-buffer' is not current buffer).
* progmodes/python.el (python-syntax--context-compiler-macro): New defun.
(python-syntax-context): Use named compiler-macro for backwards
compatibility with Emacs 24.x.
Stefan Monnier [Tue, 16 Apr 2013 17:28:11 +0000 (13:28 -0400)]
* lisp/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.
* lisp/abbrev.el (abbrev--symbol): New function, extracted from abbrev-symbol.
(abbrev-symbol): Use it.
(abbrev--before-point): Use it since we already handle inheritance.
* lisp/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.
Stefan Monnier [Mon, 15 Apr 2013 19:55:41 +0000 (15:55 -0400)]
* lisp/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.
Alan Mackenzie [Mon, 15 Apr 2013 16:10:24 +0000 (16:10 +0000)]
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.
Stefan Monnier [Mon, 15 Apr 2013 15:06:51 +0000 (11:06 -0400)]
* lisp/emacs-lisp/nadvice.el: Properly test names when adding advice.
(advice--member-p): New arg `name'.
(advice--add-function, advice-member-p): Use it.
Alan Mackenzie [Mon, 15 Apr 2013 14:32:20 +0000 (14:32 +0000)]
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): Fixed, to remove "ambiguous"
handling of spaces in the regexp.
Michael Albinus [Mon, 15 Apr 2013 09:43:20 +0000 (11:43 +0200)]
* 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.
Eli Zaretskii [Mon, 15 Apr 2013 07:27:56 +0000 (10:27 +0300)]
More debugging code to investigate bug #14062.
src/w32fns.c (w32_wnd_proc): Add more assertions to investigate
bug#14062.
src/frame.h (WINDOW_FRAME): Protect macro and its argument with
parentheses.
src/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.
Eli Zaretskii [Sun, 14 Apr 2013 06:51:15 +0000 (09:51 +0300)]
Improve doc strings of left/right-margin/fringe-width.
src/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)