David Engster [Sun, 14 Oct 2012 19:20:28 +0000 (21:20 +0200)]
Merge changes from CEDET upstream.
* semantic.el (semantic-error-if-unparsed): New function. Raise
error if buffer was not parsed by Semantic (bug #12045).
(navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items
only if buffer was parsed. Also, replace ':active' with ':enable'
where necessary.
* semantic/wisent/python.el
(semantic-python-get-system-include-path): Use
`python-shell-internal-send-string' if available to query Python
for system paths.
* semantic/senator.el (senator-next-tag):
(senator-previous-tag):
(senator-go-to-up-reference): Use `semantic-error-if-unparsed'.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions): Check if buffer was
parsed. Only raise an error if function was called interactively,
otherwise silently return nil.
* cedet.el (cedet-menu-map): Fix copy&paste typo in menu creation.
David Engster [Sun, 7 Oct 2012 18:23:50 +0000 (20:23 +0200)]
* semantic/wisent/python.el (semantic-ctxt-current-function)
(semantic-ctxt-current-assignment): New overrides, simply returning
nil. The defaults do not work correctly and can send the parser in
an inifinite loop (bug#12458).
Glenn Morris [Sun, 7 Oct 2012 07:49:16 +0000 (00:49 -0700)]
Fix infloop in rmailmm on multipart messages with epilogues
* lisp/mail/rmailmm.el (rmail-mime-process-multipart):
Do not confuse a multipart message with an epilogue
with a "truncated" one; fixes 2011-06-27 change.
Fix shell output retrieval and comint-prompt-regexp init.
* progmodes/python.el (inferior-python-mode):
(python-shell-make-comint): Fix initialization of
comint-prompt-regexp from copied file local variables.
(python-shell-fetched-lines): Remove var.
(python-shell-output-filter-in-progress): Rename from
python-shell-fetch-lines-in-progress.
(python-shell-output-filter-buffer): Rename from
python-shell-fetch-lines-string.
(python-shell-fetch-lines-filter): Delete function.
(python-shell-output-filter): New function.
(python-shell-send-string-no-output): Use them.
Paul Eggert [Sun, 7 Oct 2012 02:26:03 +0000 (19:26 -0700)]
Improve sys_siglist detection.
* configure.ac (sys_siglist): Look for its decl in <signal.h>.
Otherwise, it's not found in either Fedora 17 or Solaris 11.
* src/sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
defined as a macro, as is done in Solaris.
(sys_siglist_entries): New macro.
(save_strsignal): Use it.
* src/syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
Glenn Morris [Sat, 6 Oct 2012 19:55:47 +0000 (12:55 -0700)]
Aliases to defcustoms must come before the defcustom.
* strokes.el (strokes-modeline-string):
* emulation/crisp.el (crisp-mode-modeline-string):
* eshell/esh-mode.el (eshell-status-in-modeline):
Aliases to defcustoms must come before the defcustom.
Jan Djärv [Sat, 6 Oct 2012 17:31:11 +0000 (19:31 +0200)]
Handle fullscreen parameter in initial/defult-frame-alist for NS.
* nsfns.m (Fx_create_frame): Call x_default_parameter with
fullscreen/Fullscreen.
* nsterm.h (EmacsView): Rename tbar_height to tibar_height.
tobar_height is new.
* nsterm.m (x_make_frame_visible): Check for fullscreen.
(ns_fullscreen_hook): Activate old style fullscreen with a timer.
(ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
(windowDidResize:): Check for correct window if old style fullscreen.
Capitalize word in comment. Remove incorrect comment.
(initFrameFromEmacs:): tbar_height renamed tibar_height.
(windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
error in drawing background.
(toggleFullScreen:): Remove comment. Rearrange calls.
Set toolbar values to zero, save old height in tobar_height.
Restore tool bar height when leaving fullscreen.
(canBecomeMainWindow): New function.
Stefan Monnier [Sat, 6 Oct 2012 17:29:15 +0000 (13:29 -0400)]
* lisp/subr.el (read-passwd-map): New var.
(read-passwd): Use `read-string' again.
* lisp/minibuffer.el (delete-minibuffer-contents): Make it interactive.
Chong Yidong [Sat, 6 Oct 2012 14:18:35 +0000 (22:18 +0800)]
Move bovine-grammar and wisent-grammar into lisp/ directory.
* lisp/files.el (auto-mode-alist): Add .by and .wy (Semantic grammars).
* cedet/semantic/bovine/grammar.el:
* cedet/semantic/wisent/grammar.el: Move from admin/grammars. Add
autoloads for bovine-grammar-mode and wisent-grammar-mode.
Glenn Morris [Sat, 6 Oct 2012 01:42:02 +0000 (21:42 -0400)]
Remove outdated information from ERC manual
* doc/misc/erc.texi: Include emacsver.texi, and use EMACSVER rather than
ERC version.
(Introduction): ERC is distributed with Emacs.
(Obtaining ERC, Installation): Remove chapters, no longer relevant.
(Getting Started): Simplify.
(Getting Help and Reporting Bugs): Refer to general Emacs lists.
(History): Mention ERC maintained as part of Emacs now.
* doc/misc/Makefile.in ($(buildinfodir)/erc$(INFO_EXT), erc.dvi, erc.pdf):
Add dependency on emacsver.texi.
Enhancements to docstring formatting when filling paragraphs.
* progmodes/python.el (python-fill-docstring-style): Rename from
python-fill-string-style. Added new style.
(python-fill-string): Use new style. Better checks for
docstrings.
Eli Zaretskii [Fri, 5 Oct 2012 09:17:17 +0000 (11:17 +0200)]
Support setting file times of directories on MS-Windows.
src/w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
that time stamps of directories could also be changed. Don't
request the too broad GENERIC_WRITE, only the more restrictive
FILE_WRITE_ATTRIBUTES access rights.
src/fileio.c (Fset_file_times): Special-case ignoring errors for
directories only on MSDOS, not on MS-Windows.
Juri Linkov [Thu, 4 Oct 2012 19:28:11 +0000 (22:28 +0300)]
* lisp/replace.el (query-replace-interactive): Declare obsolete.
(query-replace-read-from): Add the last incremental search string
to the list of default values accessible via M-n.
(map-query-replace-regexp): Use `read-regexp'.
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(map-query-replace-regexp, replace-string, replace-regexp):
Fix docstrings to replace mentions of `query-replace-interactive'
with alternatives.
Allow user to set docstring style for fill-paragraph.
* progmodes/python.el
(python-fill-comment-function, python-fill-string-function)
(python-fill-decorator-function, python-fill-paren-function):
Remove :safe for defcustoms.
(python-fill-string-style): New defcustom
(python-fill-paragraph-function): Enhanced context detection.
(python-fill-string): Honor python-fill-string-style settings.
Paul Eggert [Thu, 4 Oct 2012 00:10:47 +0000 (17:10 -0700)]
Port timers to OpenBSD, plus check for timer failures.
OpenBSD problem reported by Han Boetes.
* profiler.c (setup_cpu_timer): Check for failure of timer_settime
and/or setitimer.
(Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
* syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
like OpenBSD, which has timer_settime but does not declare it.
OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
whether to use itimerspec-related primitives. All uses of
HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
Fix cornercase for string syntax.
* progmodes/python.el (python-syntax-propertize-function):
Simplify and enhance the regexp for unescaped quotes. Now it also
matches quotes in weird situations like the single quote in
"something\"'".
(python-syntax-stringify): Simplify num-quotes detecting code.
Paul Eggert [Tue, 2 Oct 2012 06:30:40 +0000 (23:30 -0700)]
Count overruns when profiling; change units to ns.
* lisp/profiler.el (profiler-sampling-interval): Change units
from ms to ns, multiplying the default by 1000000 so that
it remains 1 ms.
(profiler-report-cpu-line-format): Give enough room for
the maximum counters on 64-bit hosts.
(profiler-report-render-calltree-1): Call them "CPU samples",
not "Time (ms)", since they are not milliseconds now (and
never really were).
* src/profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
Give extra weight to samples after overruns, to attempt to count
the time more accurately.
(setup_cpu_timer): Change sampling interval units from ms to ns, since
the underlying primitives nominally do ns.
(Fprofiler_cpu_start): Document the change. Mention that
the sampling intervals are only approximate.
Stefan Monnier [Tue, 2 Oct 2012 03:49:28 +0000 (23:49 -0400)]
* lisp/vc/diff-mode.el (diff--auto-refine-data): New var.
(diff-hunk): Use it to delay refinement.
(diff-mode): Remove overlays when we turn off font-lock.
Stefan Monnier [Tue, 2 Oct 2012 02:47:12 +0000 (22:47 -0400)]
* lisp/bookmark.el (bookmark-search-pattern): Remove var.
(bookmark-read-search-input): Remove function.
(bookmark-bmenu-search): Reimplement using a minibuffer.