Paul Eggert [Mon, 6 May 2013 04:52:00 +0000 (21:52 -0700)]
* unexelf.c: Fix some 32-bit integer problems, notably when debugging.
Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
Verify that ElfW (Half) fits in int.
(fatal): Use same signature as lisp.h.
(UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
configure and build with -DUNEXELF_DEBUG without worrying about
other modules that use DEBUG.
(DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
possibly-wide integers now uses it instead of plain fprintf.
(entry_address): New function, which avoids problems with 32-bit
overflow on 64-bit hosts.
(OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
(round_up): Don't assume the remainder fits in int.
(find_section): Use bool for boolean. Simplify debug code.
(unexec): Don't assume file sizes fit in int or size_t.
Omit unnecessary trailing newline in 'fatal' format.
Use strerror rather than outputting decimal error number.
Remove unused code when emacs is not defined;
this file relies on Emacs now.
Don't assume e_phnum and e_shnum are positive.
Paul Eggert [Mon, 6 May 2013 04:31:16 +0000 (21:31 -0700)]
* regex.c: Fix problems when DEBUG is defined.
(extract_number, extract_number_and_incr): Define regardless of
whether DEBUG is defined; that's simpler and makes the code less
likely to go stale in the normal case when DEBUG is not defined.
Return int rather than taking an int * arg. All callers changed.
(DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
Remove, replacing with ...
(DEBUG_PRINT): New macro. All callers changed.
(DEBUG_COMPILES_ARGUMENTS): New macro.
(print_fastmap, print_partial_compiled_pattern) [DEBUG]:
(print_compiled_pattern, print_double_string) [DEBUG]:
Use prototype rather than old-style definition.
(print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
(ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
(POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
(POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
Don't assume ptrdiff_t, size_t, and long are the same width as int.
(POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
This matters only when DEBUG is defined.
Stefan Monnier [Mon, 6 May 2013 02:29:42 +0000 (22:29 -0400)]
* lisp/progmodes/octave.el (octave-texinfo-font-lock-keywords): Remove.
(octave-font-lock-texinfo-comment): Use texinfo-font-lock-keywords with
some tweaks, instead.
Eli Zaretskii [Sun, 5 May 2013 17:41:09 +0000 (20:41 +0300)]
Fix bug #14306 with whitespace mode together with linum-mode.
src/xdisp.c (set_iterator_to_next): Set the
ignore_overlay_strings_at_pos_p flag only if we are _really_
iterating over an overlay string, as indicated by the
current.overlay_string_index member.
Leo Liu [Sun, 5 May 2013 15:29:51 +0000 (23:29 +0800)]
* progmodes/octave.el (octave-font-lock-keywords)
(octave-font-lock-texinfo-comment): Adjust for the byte-compiler.
(inferior-octave-send-list-and-digest): Improve error message.
(octave-mode, inferior-octave-mode): Use setq-local.
(octave-help): Set info-lookup-mode.
Leo Liu [Sun, 5 May 2013 04:49:27 +0000 (12:49 +0800)]
* progmodes/octave.el (inferior-octave-strip-ctrl-g)
(inferior-octave-output-filter): Remove.
(octave-send-region, inferior-octave-startup): Fix callers.
(inferior-octave-mode-map): Don't use comint-dynamic-complete.
(octave-binary-file-extensions): New user variable.
(octave-find-definition): Confirm if opening binary files.
(octave-help-file): Use octave-find-definition to get the binary
confirmation.
(octave-help): Adjust for octave-help-file change.
Stefan Monnier [Sun, 5 May 2013 02:26:38 +0000 (22:26 -0400)]
* lisp/progmodes/pascal.el (pascal--syntax-propertize): New const.
(pascal-mode): Use it. Use setq-local.
(pascal-font-lock-keywords): Use backquotes.
Merge the two entries that handle function definitions.
* test/indent/pascal.pas: Add test for mis-identified comments.
Paul Eggert [Sun, 5 May 2013 00:51:49 +0000 (17:51 -0700)]
`write-region-inhibit-fsync' defaults to noninteractive.
* cmdargs.texi (Initial Options):
* files.texi (Customize Save): Document this.
* etc/NEWS: Document this.
* src/fileio.c (syms_of_fileio): Implement this.
* src/filelock.c (create_lock_file): If symbolic links don't work, so
we use a regular file as a lock file, do not fsync the lock file;
it's not needed.
Eli Zaretskii [Sat, 4 May 2013 10:19:13 +0000 (13:19 +0300)]
Fix bug #14062 with assertion violations on MS-Windows.
src/dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
w->contents is a buffer before computing everything else. Use
parentheses to disambiguate last part of the condition.
src/w32fns.c (w32_wnd_proc): Remove temporary code used to trap
assertion violations.
Leo Liu [Fri, 3 May 2013 07:22:26 +0000 (15:22 +0800)]
* progmodes/octave.el (octave-completing-read)
(octave-goto-function-definition): New helpers.
(octave-help-buffer): New user variable.
(octave-help-file, octave-help-function): New button types.
(octave-help): New command and bind it to C-h ;.
(octave-find-definition): New command and bind it to M-.
Juri Linkov [Wed, 1 May 2013 08:05:05 +0000 (11:05 +0300)]
* lisp/comint.el (comint-previous-matching-input): Don't print message
"History item: %d" when `isearch-mode' is active.
(comint-history-isearch-message): Print message "History item: %d"
when `comint-input-ring-index' is not empty and this function is
called from `isearch-update' with a nil `ellipsis'.
Alan Mackenzie [Tue, 30 Apr 2013 16:19:14 +0000 (16:19 +0000)]
Handle arbitrarily long C++ member initialisation lists.
* progmodes/cc-engine.el (c-back-over-member-initializers): new
function.
(c-guess-basic-syntax): New CASE 5R (extracted from 5B) to handle
(most) member init lists.
Leo Liu [Tue, 30 Apr 2013 14:23:03 +0000 (22:23 +0800)]
* progmodes/octave.el (octave-variables): Remove. No builtin
variables any more. All converted to functions.
(octave-font-lock-keywords, octave-completion-at-point-function):
Fix uses.
(octave-font-lock-texinfo-comment): New user variable.
(octave-texinfo-font-lock-keywords): New variable for texinfo
comment block.
(octave-function-comment-block): New face.
(octave-font-lock-texinfo-comment): New function.
(octave-mode): Font lock texinfo comment block.
Leo Liu [Mon, 29 Apr 2013 20:09:18 +0000 (04:09 +0800)]
* progmodes/octave.el (octave-font-lock-keywords): Handle 'end' in
indexing expression.
(octave-continuation-string): Do not use \.
(inferior-octave-complete-impossible): Remove.
(inferior-octave-completion-table)
(inferior-octave-completion-at-point): Remove its uses.
(inferior-octave-startup): completion_matches was introduced to
Octave in 1996 so safe to assume it.
(octave-function-file-comment): Improve to follow how Octave does it.
(octave-update-function-file-comment): Tweak.
Jan Djärv [Sun, 28 Apr 2013 09:55:20 +0000 (11:55 +0200)]
* nsfns.m (handlePanelKeys): New function.
(EmacsOpenPanel:performKeyEquivalent:)
(EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
arrows/function/control and copy/paste keys.
David Engster [Sat, 27 Apr 2013 21:45:37 +0000 (23:45 +0200)]
* lisp/cedet/semantic/complete.el
(semantic-collector-calculate-completions-raw): If `completionslist'
is not set, refresh the cache if necessary and use it for
completions. This fixes the `semantic-collector-buffer-deep'
collector (bug#14265).
Juri Linkov [Sat, 27 Apr 2013 20:55:00 +0000 (23:55 +0300)]
* lisp/desktop.el (desktop-auto-save-timeout): New option.
(desktop-file-checksum): New variable.
(desktop-save): Add optional arg `auto-save' and don't auto-save
if nothing changed.
(desktop-auto-save-timer): New variable.
(desktop-auto-save, desktop-auto-save-set-timer): New functions.
(after-init-hook): Call `desktop-auto-save-set-timer'.
Suggested by Reuben Thomas <rrt@sc3d.org> in
<http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00327.html>.
Fix Dired when ls-lisp is used and the -a switch is not used.
lisp/ls-lisp.el (ls-lisp-insert-directory): If no files are
displayed, move point to after the totals line. See
http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
for the details.
Stefan Monnier [Sat, 27 Apr 2013 13:32:53 +0000 (09:32 -0400)]
* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Add current dir to the load-path.
(package-generate-autoloads): Don't rely on autoload-ensure-default-file.
Paul Eggert [Fri, 26 Apr 2013 19:31:09 +0000 (12:31 -0700)]
Port better to AIX.
* configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS,
we did not already infer an optimization option, and -O works.
AIX xlc needs -O, otherwise garbage collection doesn't work.
* src/lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
to pacify AIX xlc.
* lisp/emacs-lisp/shadow.el (list-load-path-shadows):
No longer necessary to check for duplicate simple.el, since
2012-07-07 change to init_lread to not include installation lisp
directories in load-path when running uninstalled.
Leo Liu [Thu, 25 Apr 2013 16:23:56 +0000 (00:23 +0800)]
* progmodes/octave.el (octave-completion-at-point-function): Make
use of inferior octave process.
(octave-initialize-completions): Remove.
(inferior-octave-completion-table): New function.
(inferior-octave-completion-at-point): Use it.
(octave-completion-alist): Remove.
Leo Liu [Thu, 25 Apr 2013 14:51:08 +0000 (22:51 +0800)]
Merge octave-mod.el and octave-inf.el into octave.el with some
cleanups.
* progmodes/octave.el: New file renamed from octave-mod.el.
* progmodes/octave-inf.el: Merged into octave.el.
* progmodes/octave-mod.el: Renamed to octave.el.
Stefan Monnier [Thu, 25 Apr 2013 03:25:34 +0000 (23:25 -0400)]
* lisp/progmodes/octave-mod.el (octave-smie-forward-token): Only emit
semi-colons if the line is not otherwise empty.
* lisp/emacs-lisp/smie.el (smie-indent--hanging-p): Don't burp at EOB.
(smie-indent-keyword): Improve the check to ensure that the next
comment is really on the same line.
(smie-indent-comment): Don't align with a subsequent closer (or eob).
Stefan Monnier [Wed, 24 Apr 2013 20:44:45 +0000 (16:44 -0400)]
* lisp/progmodes/opascal.el (opascal-set-token-property): Rename from
opascal-set-text-properties and only set `token'.
(opascal-literal-text-properties): Remove.
(opascal-parse-next-literal, opascal-debug-unparse-buffer):
Adjust callers.