* 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)
Roland Winkler [Sat, 13 Apr 2013 20:38:52 +0000 (15:38 -0500)]
lisp/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
Eli Zaretskii [Sat, 13 Apr 2013 08:54:02 +0000 (11:54 +0300)]
Fix vertical cursor motion when there are overlay strings at EOL.
src/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.
Eli Zaretskii [Thu, 11 Apr 2013 16:06:47 +0000 (19:06 +0300)]
Fix bug #14170 with window-end returning a stale value.
This bug was introduced in 2012-10-15T09:03:56Z!rudalics@gmx.at
while solving bug #12600.
src/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.
(Fwindow_line_height): Fix the test for up-to-date-ness of the
current matrix.
Eli Zaretskii [Wed, 10 Apr 2013 15:38:20 +0000 (18:38 +0300)]
Fix bug #13864 with flickering of TTY frames in an emacslient session.
src/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.
Stefan Monnier [Wed, 10 Apr 2013 13:31:35 +0000 (09:31 -0400)]
* src/keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
of marking the idle timers directly.
* lisp/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.
Stefan Monnier [Wed, 10 Apr 2013 13:17:27 +0000 (09:17 -0400)]
* lisp/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.
* lisp/progmodes/sh-script.el: Implement `sh-mode' own
`add-log-current-defun-function'.
(sh-current-defun-name): New function.
(sh-mode): Use the function.
Paul Eggert [Sun, 7 Apr 2013 06:21:40 +0000 (23:21 -0700)]
Fix --enable-profiling bug introduced by 2013-02-25 change.
This bug was introduced by my 2013-02-25 change that simplified
data_start configuration. Without this change, on GNU/Linux
an Emacs configured with --enable-profiling fails immediately
due to a profiler signal.
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling
and if not on GNU/Linux or FreeBSD.
* lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that
lib/*.o is profiled too.
* src/Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
with these flags. On platforms where special flags are needed
when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
(ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
(.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
Get rid of some platform-specific functions examining window
system and its capabilities. This is a partial rework of the
2013-04-05 change.
* lisp.h (have_menus_p): Remove prototype. This function is
replaced with platform-independent window_system_available.
(check_window_system): Move to...
* frame.h (decode_window_system_frame, window_system_available):
...here, add new prototypes.
* frame.c (window_system_available, decode_window_system_frame):
New functions.
(check_window_system): Platform-independent now.
* xterm.h (x_in_use): Remove declaration.
(check_x_frame):
* w32term.h (check_x_frame):
* nsterm.h (check_x_frame): Remove prototypes. This function
is replaced with platform-independent decode_window_system_frame.
* msdos.c (have_menus_p): Remove.
* nsfns.m (check_window_system, have_menus_p, check_ns_frame):
Remove platform-specific functions. Use check_window_system,
decode_window_system_frame and check_ns_display_info where
appropriate. Minor style and comment tweaks.
* w32fns.c (w32_in_use, check_window_system, have_menus_p)
(check_x_frame): Likewise.
* xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
Likewise.
* fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
* nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
* xmenu.c, xselect.c: All related users changed.
Do not set x-display-name until X connection is established.
This is needed to prevent from weird situation described at
<http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00212.html>.
* frame.el (make-frame): Set x-display-name after call to
window system initialization function, not before.
* term/x-win.el (x-initialize-window-system): Add optional
display argument and use it.
* term/w32-win.el (w32-initialize-window-system):
* term/ns-win.el (ns-initialize-window-system):
* term/pc-win.el (msdos-initialize-window-system):
Add compatible optional display argument.
Eli Zaretskii [Sat, 6 Apr 2013 07:41:09 +0000 (10:41 +0300)]
Fix the non-creation of backup files in temporary-file directory on Windows.
lisp/files.el (normal-backup-enable-predicate): On MS-Windows and
MS-DOS compare truenames of temporary-file-directory and of the
file, so that 8+3 aliases (usually found in $TEMP on Windows)
don't fail comparison by compare-strings. Also, compare file
names case-insensitively on MS-Windows and MS-DOS.
Improve Lisp manual documentation on setting faces.
* display.texi (Faces): Minor clarifications.
(Defining Faces): Clarify default vs custom face specs. Document
face-spec-set.
* display.texi (Overlay Properties):
* text.texi (Special Properties): Use the "anonymous face"
terminology. Describe foreground-color and background-color forms
as compatibility-only.