bpt/emacs.git
13 years ago* image.c (tiff_error_handler, tiff_warning_handler): Mark as
Paul Eggert [Tue, 5 Apr 2011 20:06:52 +0000 (13:06 -0700)]
* image.c (tiff_error_handler, tiff_warning_handler): Mark as

printf-like functions.
(tiff_load): Add casts to remove these marks before passing them
to system-supplied API.

13 years ago* eval.c (Fsignal): Remove excess argument to 'fatal'.
Paul Eggert [Tue, 5 Apr 2011 20:01:08 +0000 (13:01 -0700)]
* eval.c (Fsignal): Remove excess argument to 'fatal'.

13 years ago* emacsclient.c (message): Mark it as a printf-like function.
Paul Eggert [Tue, 5 Apr 2011 19:59:58 +0000 (12:59 -0700)]
* emacsclient.c (message): Mark it as a printf-like function.

13 years ago* configure.in (ATTRIBUTE_FORMAT, ATTRIBUTE_FORMAT_PRINTF): New macros.
Paul Eggert [Tue, 5 Apr 2011 19:59:08 +0000 (12:59 -0700)]
* configure.in (ATTRIBUTE_FORMAT, ATTRIBUTE_FORMAT_PRINTF): New macros.

13 years agoMerge changes from gnulib.
Paul Eggert [Tue, 5 Apr 2011 18:19:19 +0000 (11:19 -0700)]
Merge changes from gnulib.

13 years agoMerge from mainline.
Paul Eggert [Tue, 5 Apr 2011 06:45:27 +0000 (23:45 -0700)]
Merge from mainline.

13 years ago* coding.c (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
Paul Eggert [Tue, 5 Apr 2011 06:41:53 +0000 (23:41 -0700)]
* coding.c (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code

directly, rather than having caller test rule sign.  This avoids
some unnecessary tests.
* composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
(COMPOSITION_ENCODE_RULE): Arguments now must be valid.  This
affects only one use, in DECODE_COMPOSITION_RULE, which is changed.

13 years ago* coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
Paul Eggert [Tue, 5 Apr 2011 06:24:54 +0000 (23:24 -0700)]
* coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.

This avoids several warnings with gcc -Wstrict-overflow.

13 years ago* xfont.c (xfont_open): Avoid unnecessary tests.
Paul Eggert [Tue, 5 Apr 2011 05:14:06 +0000 (22:14 -0700)]
* xfont.c (xfont_open): Avoid unnecessary tests.

13 years ago* xfont.c (xfont_text_extents): Remove var that was set but not used.
Paul Eggert [Tue, 5 Apr 2011 05:12:02 +0000 (22:12 -0700)]
* xfont.c (xfont_text_extents): Remove var that was set but not used.

13 years ago* composite.c (composition_gstring_put_cache): Use unsigned integer.
Paul Eggert [Tue, 5 Apr 2011 05:11:14 +0000 (22:11 -0700)]
* composite.c (composition_gstring_put_cache): Use unsigned integer.

13 years ago* lisp/net/rcirc.el: Update my e-mail address.
Deniz Dogan [Tue, 5 Apr 2011 04:33:38 +0000 (06:33 +0200)]
* lisp/net/rcirc.el: Update my e-mail address.

13 years ago* lisp/net/rcirc.el (rcirc-mode-map): Remove M-o binding.
Deniz Dogan [Tue, 5 Apr 2011 04:31:24 +0000 (06:31 +0200)]
* lisp/net/rcirc.el (rcirc-mode-map): Remove M-o binding.

13 years agoFix theme and X-resource interactions for the cursor face.
Chong Yidong [Tue, 5 Apr 2011 01:21:52 +0000 (21:21 -0400)]
Fix theme and X-resource interactions for the cursor face.

* lisp/startup.el (command-line): Save the cursor's theme-face
directly, instead of using face-override-spec.

* lisp/custom.el (load-theme): Minor optimization in assigning faces.

13 years agolisp/help-fns.el: Fix mistake in previous change.
Juanma Barranquero [Mon, 4 Apr 2011 22:33:12 +0000 (00:33 +0200)]
lisp/help-fns.el: Fix mistake in previous change.

13 years agolisp/help-fns.el (describe-variable): Fix completion.
Juanma Barranquero [Mon, 4 Apr 2011 22:08:01 +0000 (00:08 +0200)]
lisp/help-fns.el (describe-variable): Fix completion.

http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00112.html

13 years ago* composite.h, composite.c (composition_gstring_put_cache):
Paul Eggert [Mon, 4 Apr 2011 19:53:59 +0000 (12:53 -0700)]
* composite.h, composite.c (composition_gstring_put_cache):

Use EMACS_INT, not int, for length.

13 years ago* composite.h (COMPOSITION_DECODE_REFS): New macro,
Paul Eggert [Mon, 4 Apr 2011 19:46:32 +0000 (12:46 -0700)]
* composite.h (COMPOSITION_DECODE_REFS): New macro,

breaking out part of COMPOSITION_DECODE_RULE.
(COMPOSITION_DECODE_RULE): Use it.
* composite.c (get_composition_id): Remove unused local vars,
by using the new macro.

13 years ago* textprop.c (set_text_properties_1): Change while to do-while,
Paul Eggert [Mon, 4 Apr 2011 19:30:48 +0000 (12:30 -0700)]
* textprop.c (set_text_properties_1): Change while to do-while,

since the condition is always true at first.

13 years ago* intervals.c (interval_deletion_adjustment): Return unsigned value.
Paul Eggert [Mon, 4 Apr 2011 16:47:31 +0000 (09:47 -0700)]
* intervals.c (interval_deletion_adjustment): Return unsigned value.

All uses changed.

13 years agognus-sum.el (gnus-update-marks): Reinstate the code to not alter marks on non-selecte...
Lars Magne Ingebrigtsen [Mon, 4 Apr 2011 14:03:08 +0000 (14:03 +0000)]
gnus-sum.el (gnus-update-marks): Reinstate the code to not alter marks on non-selected articles.
gnus-start.el (gnus-get-unread-articles): Don't try to contact denied servers.

13 years agoConvert some .el files to lexical scoping.
Juanma Barranquero [Mon, 4 Apr 2011 09:35:16 +0000 (11:35 +0200)]
Convert some .el files to lexical scoping.

* bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
  (bs--get-marked-string, bs--get-modified-string)
  (bs--get-readonly-string, bs--get-size-string, bs--get-name)
  (bs--get-mode-name, bs--get-file-name): Mark unused arguments.
  (bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.

* ehelp.el (electric-help-execute-extended)
  (electric-help-ctrl-x-prefix):
* hexl.el (hexl-revert-buffer-function):
* linum.el (linum-after-change, linum-after-scroll):
* emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.

* help-fns.el (help-describe-category-set): Remove unused ERR variable.

13 years agolisp/dired.el: Update autoloads.
Juanma Barranquero [Mon, 4 Apr 2011 09:28:26 +0000 (11:28 +0200)]
lisp/dired.el: Update autoloads.

13 years ago* intervals.c (graft_intervals_into_buffer): Mark var as used.
Paul Eggert [Mon, 4 Apr 2011 09:08:31 +0000 (02:08 -0700)]
* intervals.c (graft_intervals_into_buffer): Mark var as used.

13 years ago* process.c (read_process_output): Simplify nbytes computation if buffered.
Paul Eggert [Mon, 4 Apr 2011 09:06:52 +0000 (02:06 -0700)]
* process.c (read_process_output): Simplify nbytes computation if buffered.

13 years ago* process.c (read_process_output): Do adaptive read buffering even if carryover.
Paul Eggert [Mon, 4 Apr 2011 09:04:33 +0000 (02:04 -0700)]
* process.c (read_process_output): Do adaptive read buffering even if carryover.

13 years ago* process.c (Fnetwork_interface_info): Avoid possibility of int overflow.
Paul Eggert [Mon, 4 Apr 2011 08:13:45 +0000 (01:13 -0700)]
* process.c (Fnetwork_interface_info): Avoid possibility of int overflow.

13 years ago* process.c (create_pty): Remove unnecessary "volatile"s.
Paul Eggert [Mon, 4 Apr 2011 08:11:21 +0000 (01:11 -0700)]
* process.c (create_pty): Remove unnecessary "volatile"s.

13 years ago* process.c (list_processes_1, create_pty, read_process_output):
Paul Eggert [Mon, 4 Apr 2011 08:09:01 +0000 (01:09 -0700)]
* process.c (list_processes_1, create_pty, read_process_output):

(exec_sentinel): Remove vars that were set but not used.

13 years ago* bytecode.c (exec_byte_code): Rename local to avoid shadowing.
Paul Eggert [Mon, 4 Apr 2011 07:55:46 +0000 (00:55 -0700)]
* bytecode.c (exec_byte_code): Rename local to avoid shadowing.

13 years ago* syntax.c (update_syntax_table): Use unsigned instead of int.
Paul Eggert [Mon, 4 Apr 2011 07:53:20 +0000 (00:53 -0700)]
* syntax.c (update_syntax_table): Use unsigned instead of int.

13 years ago* syntax.c (scan_words): Remove var that was set but not used.
Paul Eggert [Mon, 4 Apr 2011 07:50:49 +0000 (00:50 -0700)]
* syntax.c (scan_words): Remove var that was set but not used.

13 years ago* lread.c (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
Paul Eggert [Mon, 4 Apr 2011 07:48:36 +0000 (00:48 -0700)]
* lread.c (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.

13 years ago* lread.c (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
Paul Eggert [Mon, 4 Apr 2011 07:48:08 +0000 (00:48 -0700)]
* lread.c (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.

13 years ago* lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
Paul Eggert [Mon, 4 Apr 2011 07:33:02 +0000 (00:33 -0700)]
* lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.

13 years ago* print.c (print_error_message): Avoid int overflow.
Paul Eggert [Mon, 4 Apr 2011 06:52:29 +0000 (23:52 -0700)]
* print.c (print_error_message): Avoid int overflow.

13 years ago* font.c (font_list_entities): Redo for clarity,
Paul Eggert [Mon, 4 Apr 2011 06:29:11 +0000 (23:29 -0700)]
* font.c (font_list_entities): Redo for clarity,

so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.

13 years agoUse lexical binding in ep[ga]*.el.
Daiki Ueno [Mon, 4 Apr 2011 06:16:23 +0000 (15:16 +0900)]
Use lexical binding in ep[ga]*.el.

* epa-dired.el:
* epa-mail.el:
* epa-hook.el:
* epa-file.el:
* epa.el:
* epg.el: Use lexical binding.

13 years ago* src/keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
Stefan Monnier [Mon, 4 Apr 2011 01:10:13 +0000 (21:10 -0400)]
* src/keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
first non-nil return value).

13 years ago* lisp/dired-aux.el (dired-create-files): Add docstring (Bug#7970).
Chong Yidong [Sun, 3 Apr 2011 21:23:23 +0000 (17:23 -0400)]
* lisp/dired-aux.el (dired-create-files): Add docstring (Bug#7970).

13 years agoAdd changes to lisp/url/ChangeLog omitted from 2011-04-02T23:41:03Z!cyd@stupidchicken...
Chong Yidong [Sun, 3 Apr 2011 21:06:47 +0000 (17:06 -0400)]
Add changes to lisp/url/ChangeLog omitted from 2011-04-02T23:41:03Z!cyd@stupidchicken.com.

13 years agoImprovements to flyspell-mark-duplications-exceptions.
Chong Yidong [Sun, 3 Apr 2011 20:59:45 +0000 (16:59 -0400)]
Improvements to flyspell-mark-duplications-exceptions.

* lisp/textmodes/flyspell.el (flyspell-word): Recognize default
dictionary case for flyspell-mark-duplications-exceptions.  Use
regexp matching for languages.
(flyspell-mark-duplications-exceptions): Add "that" and "had" for
default dictionary (Bug#7926).

13 years ago* nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
Jan Djärv [Sun, 3 Apr 2011 08:30:57 +0000 (10:30 +0200)]
* nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
if not defined.

Fixes: debbugs:8403

13 years ago* font.c (font_score): Avoid potential overflow in diff calculation.
Paul Eggert [Sun, 3 Apr 2011 07:05:43 +0000 (00:05 -0700)]
* font.c (font_score): Avoid potential overflow in diff calculation.

13 years ago* font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
Paul Eggert [Sun, 3 Apr 2011 06:01:50 +0000 (23:01 -0700)]
* font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.

13 years ago* fns.c (sxhash): Redo loop for clarity and to avoid wraparound warning.
Paul Eggert [Sun, 3 Apr 2011 05:56:37 +0000 (22:56 -0700)]
* fns.c (sxhash): Redo loop for clarity and to avoid wraparound warning.

13 years ago* fns.c (substring_both): Remove var that is set but not used.
Paul Eggert [Sun, 3 Apr 2011 05:46:57 +0000 (22:46 -0700)]
* fns.c (substring_both): Remove var that is set but not used.

13 years ago* eval.c (funcall_lambda): Rename local to avoid shadowing.
Paul Eggert [Sun, 3 Apr 2011 05:44:38 +0000 (22:44 -0700)]
* eval.c (funcall_lambda): Rename local to avoid shadowing.

13 years ago* alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
Paul Eggert [Sun, 3 Apr 2011 05:41:46 +0000 (22:41 -0700)]
* alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.

Otherwise, GCC 4.6.0 optimizes the loop check away since the check
can always succeed if overflow has undefined behavior.

13 years ago* search.c (wordify): Omit three unnecessary tests.
Paul Eggert [Sun, 3 Apr 2011 04:21:50 +0000 (21:21 -0700)]
* search.c (wordify): Omit three unnecessary tests.

13 years ago* search.c (boyer_moore, wordify): Remove vars set but not used.
Paul Eggert [Sun, 3 Apr 2011 01:52:02 +0000 (18:52 -0700)]
* search.c (boyer_moore, wordify): Remove vars set but not used.

13 years ago* indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
Paul Eggert [Sun, 3 Apr 2011 01:00:03 +0000 (18:00 -0700)]
* indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.

All callers changed.  This avoids the need for an unused var.

13 years agoFix missing NEWS subentry (Bug#8400).
Chong Yidong [Sun, 3 Apr 2011 00:40:35 +0000 (20:40 -0400)]
Fix missing NEWS subentry (Bug#8400).

13 years ago* casefiddle.c (casify_region): Remove var that is set but not used.
Paul Eggert [Sun, 3 Apr 2011 00:33:43 +0000 (17:33 -0700)]
* casefiddle.c (casify_region): Remove var that is set but not used.

13 years ago* dired.c (file_name_completion): Remove var that is set but not used.
Paul Eggert [Sun, 3 Apr 2011 00:32:58 +0000 (17:32 -0700)]
* dired.c (file_name_completion): Remove var that is set but not used.

13 years ago* fileio.c (Finsert_file_contents): Make EOF condition clearer.
Paul Eggert [Sun, 3 Apr 2011 00:32:10 +0000 (17:32 -0700)]
* fileio.c (Finsert_file_contents): Make EOF condition clearer.

13 years agosrc/xdisp.c: Remove some unused parameters.
Juanma Barranquero [Sat, 2 Apr 2011 23:53:55 +0000 (01:53 +0200)]
src/xdisp.c: Remove some unused parameters.

* xdisp.c (display_count_lines): Remove parameter `start',
  unused since 1998-01-01T02:27:27Z!rms@gnu.org.  All callers changed.
  (get_char_face_and_encoding): Remove parameter `multibyte_p',
  unused since 2008-05-14T01:40:23Z!handa@m17n.org.  All callers changed.
  (fill_stretch_glyph_string): Remove parameters `row' and `area',
  unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
  and thereabouts.  All callers changed.
  (get_per_char_metric): Remove parameter `f', unused since
  2008-05-14T01:40:23Z!handa@m17n.org.  All callers changed.

13 years agoMerge open-protocol-stream into open-network-stream.
Chong Yidong [Sat, 2 Apr 2011 23:41:03 +0000 (19:41 -0400)]
Merge open-protocol-stream into open-network-stream.

* lisp/subr.el (open-network-stream): Move to net/network-stream.el.

* lisp/gnus/proto-stream.el: Move to net/network-stream.el.

* lisp/net/network-stream.el: Move from gnus/proto-stream.el.
Change prefix to network-stream throughout.
(open-protocol-stream): Merge into open-network-stream, leaving
open-protocol-stream as an alias.  Handle nil BUFFER args.

* lisp/gnus/nnimap.el (nnimap-open-connection-1): Pass explicit :end-of-command
parameter to open-protocol-stream.

* lisp/emacs-lisp/package.el (package--with-work-buffer): Recognize
https URLs.

* lisp/url/url-gw.el (url-open-stream): Use new open-network-stream
functionality to perform encryption.

13 years agofind-dired improvements for bug#4403.
Glenn Morris [Sat, 2 Apr 2011 20:36:47 +0000 (13:36 -0700)]
find-dired improvements for bug#4403.

* lisp/find-dired.el (find-exec-terminator): New option.
(find-ls-option): Test for -ls support.
(find-ls-subdir-switches): Test for -b in find-ls-option.
(find-dired, find-grep-dired): Doc fixes.
(find-dired): Use find-exec-terminator.

13 years agoRemove some unnecessary purecopy's from find-dired.
Glenn Morris [Sat, 2 Apr 2011 19:01:52 +0000 (12:01 -0700)]
Remove some unnecessary purecopy's from find-dired.

* lisp/find-dired.el (find-ls-option, find-ls-subdir-switches)
(find-grep-options, find-name-arg): Remove purecopy.

13 years agoRemove some autoload cookies on defcustoms in find-dired.
Glenn Morris [Sat, 2 Apr 2011 18:56:29 +0000 (11:56 -0700)]
Remove some autoload cookies on defcustoms in find-dired.

* lisp/find-dired.el (find-ls-option, find-ls-subdir-switches)
(find-grep-options): Do not autoload these defcustoms.

13 years agoChangeLog fix.
Glenn Morris [Sat, 2 Apr 2011 18:53:37 +0000 (11:53 -0700)]
ChangeLog fix.

13 years agoUse find -exec with '+' for grep-find if supported.
Glenn Morris [Sat, 2 Apr 2011 18:52:08 +0000 (11:52 -0700)]
Use find -exec with '+' for grep-find if supported.

* lisp/progmodes/grep.el (grep-find-use-xargs): Doc fix.
(grep-compute-defaults): Check for `-exec COMMAND +' support.
Set grep-find-use-xargs, grep-find-command, and grep-find-template
accordingly.  Don't add the null-device if not needed.

13 years ago* lisp/files.el (save-some-buffers): Doc fix.
Glenn Morris [Sat, 2 Apr 2011 18:12:21 +0000 (11:12 -0700)]
* lisp/files.el (save-some-buffers): Doc fix.

13 years agodo not dereference NULL upon failed strdup
Jim Meyering [Sat, 2 Apr 2011 13:52:34 +0000 (15:52 +0200)]
do not dereference NULL upon failed strdup

* nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
(ns_get_family): Likewise.

13 years agosrc/eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
Juanma Barranquero [Sat, 2 Apr 2011 13:11:16 +0000 (15:11 +0200)]
src/eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.

13 years agoA better default for $(EMACS) in lisp/makefile.w32-in.
Eli Zaretskii [Sat, 2 Apr 2011 08:55:47 +0000 (11:55 +0300)]
A better default for $(EMACS) in lisp/makefile.w32-in.

 lisp/makefile.w32-in (EMACS): Default to ../src/$(BLD)/emacs.exe.

13 years ago* fileio.c (Finsert_file_contents): Remove unnecessary code checking fd.
Paul Eggert [Sat, 2 Apr 2011 08:43:04 +0000 (01:43 -0700)]
* fileio.c (Finsert_file_contents): Remove unnecessary code checking fd.

13 years ago* fileio.c (Finsert_file_contents): Avoid signed integer overflow.
Paul Eggert [Sat, 2 Apr 2011 08:00:56 +0000 (01:00 -0700)]
* fileio.c (Finsert_file_contents): Avoid signed integer overflow.

13 years ago* minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
Paul Eggert [Sat, 2 Apr 2011 07:40:13 +0000 (00:40 -0700)]
* minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.

Check for integer overflow on size calculations.

13 years ago* buffer.c (Fprevious_overlay_change): Remove var that is set
Paul Eggert [Sat, 2 Apr 2011 07:36:27 +0000 (00:36 -0700)]
* buffer.c (Fprevious_overlay_change): Remove var that is set

but not used.

13 years ago* keyboard.c (timer_check_2): Mark vars as initialized.
Paul Eggert [Sat, 2 Apr 2011 07:34:01 +0000 (00:34 -0700)]
* keyboard.c (timer_check_2): Mark vars as initialized.

13 years ago* keyboard.c (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
Paul Eggert [Sat, 2 Apr 2011 07:21:52 +0000 (00:21 -0700)]
* keyboard.c (timer_check_2): Don't assume timer-list and idle-timer-list are lists.

13 years ago* nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or later.
Jan Djärv [Sat, 2 Apr 2011 07:11:00 +0000 (09:11 +0200)]
* nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or later.

Fixes: debbugs:8403

13 years agoAdd Bug#.
Paul Eggert [Sat, 2 Apr 2011 07:06:05 +0000 (00:06 -0700)]
Add Bug#.

13 years ago* keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
Paul Eggert [Sat, 2 Apr 2011 02:42:05 +0000 (19:42 -0700)]
* keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):

Remove vars that are set but not used.

13 years ago* gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
Paul Eggert [Sat, 2 Apr 2011 02:39:52 +0000 (19:39 -0700)]
* gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.

13 years ago* image.c (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
Paul Eggert [Sat, 2 Apr 2011 02:38:27 +0000 (19:38 -0700)]
* image.c (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.

13 years ago* image.c (lookup_image): Remove var that is set but not used.
Paul Eggert [Sat, 2 Apr 2011 02:36:48 +0000 (19:36 -0700)]
* image.c (lookup_image): Remove var that is set but not used.

13 years ago* fontset.c (Finternal_char_font, Ffontset_info): Remove vars
Paul Eggert [Sat, 2 Apr 2011 02:25:18 +0000 (19:25 -0700)]
* fontset.c (Finternal_char_font, Ffontset_info): Remove vars

that are set but not used.

13 years ago* xfns.c (make_invisible_cursor): Don't return garbage
Paul Eggert [Sat, 2 Apr 2011 02:06:43 +0000 (19:06 -0700)]
* xfns.c (make_invisible_cursor): Don't return garbage

if XCreateBitmapFromData fails.

13 years ago* xselect.c (x_get_local_selection, x_handle_property_notify):
Paul Eggert [Sat, 2 Apr 2011 02:02:18 +0000 (19:02 -0700)]
* xselect.c (x_get_local_selection, x_handle_property_notify):

Remove vars that are set but not used.

(make_invisible_cursor): Initialize a possibly-uninitialized variable.

13 years agolisp/url/url-cookie.el: Use `dolist' rather than `mapcar'.
Juanma Barranquero [Fri, 1 Apr 2011 23:24:21 +0000 (01:24 +0200)]
lisp/url/url-cookie.el: Use `dolist' rather than `mapcar'.

13 years agolisp/progmodes/idlwave.el: Use `dolist' rather than `mapcar'.
Juanma Barranquero [Fri, 1 Apr 2011 22:33:37 +0000 (00:33 +0200)]
lisp/progmodes/idlwave.el: Use `dolist' rather than `mapcar'.

13 years ago* xfns.c (x_create_tip_frame): Remove var that is set but not used.
Paul Eggert [Fri, 1 Apr 2011 20:30:45 +0000 (13:30 -0700)]
* xfns.c (x_create_tip_frame): Remove var that is set but not used.

13 years ago* make-docfile.c (IF_LINT): New macro, copied from emacsclient.c.
Paul Eggert [Fri, 1 Apr 2011 20:28:50 +0000 (13:28 -0700)]
* make-docfile.c (IF_LINT): New macro, copied from emacsclient.c.

(write_c_args): Use it to suppress GCC warning.

13 years agoMerge from mainline.
Paul Eggert [Fri, 1 Apr 2011 20:19:36 +0000 (13:19 -0700)]
Merge from mainline.

13 years ago* xterm.c (scroll_bar_windows_size): Now size_t, not int.
Paul Eggert [Fri, 1 Apr 2011 20:14:03 +0000 (13:14 -0700)]
* xterm.c (scroll_bar_windows_size): Now size_t, not int.

(x_send_scroll_bar_event): Use size_t, not int, for sizes.
Check for overflow.

13 years ago* xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
Paul Eggert [Fri, 1 Apr 2011 17:44:26 +0000 (10:44 -0700)]
* xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:

Remove var that is set but not used.

13 years ago* xfaces.c (realize_named_face): Remove vars that are set but not used.
Paul Eggert [Fri, 1 Apr 2011 17:41:46 +0000 (10:41 -0700)]
* xfaces.c (realize_named_face): Remove vars that are set but not used.

(map_tty_color) [!defined MSDOS]: Likewise.

13 years ago* term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
Paul Eggert [Fri, 1 Apr 2011 17:34:25 +0000 (10:34 -0700)]
* term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.

13 years ago* coding.c: Remove vars that are set but not used.
Paul Eggert [Fri, 1 Apr 2011 17:20:24 +0000 (10:20 -0700)]
* coding.c: Remove vars that are set but not used.

(DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
All callers changed.
(decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
(decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
(decode_coding_charset): Remove vars that are set but not used.

13 years agoMerge from lexical-binding branch.
Stefan Monnier [Fri, 1 Apr 2011 17:19:52 +0000 (13:19 -0400)]
Merge from lexical-binding branch.
* doc/lispref/eval.texi (Eval): Discourage the use of `eval'.
Document its new `lexical' argument.

* doc/lispref/variables.texi (Defining Variables): Mention the new meaning of `defvar'.
(Lexical Binding): New sub-section.

* lisp/Makefile.in (BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS):
New variables.
(compile-onefile, .el.elc, compile-calc, recompile): Use them.
(COMPILE_FIRST): Add macroexp and cconv.
* lisp/makefile.w32-in: Mirror changes in Makefile.in.

* lisp/vc/cvs-status.el:
* lisp/vc/diff-mode.el:
* lisp/vc/log-edit.el:
* lisp/vc/log-view.el:
* lisp/vc/smerge-mode.el:
* lisp/textmodes/bibtex-style.el:
* textmodes/css.el:
* lisp/startup.el:
* lisp/uniquify.el:
* lisp/minibuffer.el:
* lisp/newcomment.el:
* lisp/reveal.el:
* lisp/server.el:
* lisp/mpc.el:
* lisp/emacs-lisp/smie.el:
* lisp/doc-view.el:
* lisp/dired.el:
* lisp/abbrev.el: Use lexical binding.

* lisp/custom.el (custom-initialize-default, custom-declare-variable):
Use `defvar'.

* lisp/files.el (lexical-binding): Declare safe.

* lisp/help-fns.el (help-split-fundoc): Return nil if there's nothing else
than the arglist.
(help-add-fundoc-usage): Don't add `Not documented'.
(help-function-arglist): Handle closures, subroutines, and new
byte-code-functions.
(help-make-usage): Remove leading underscores.
(describe-function-1): Handle closures.
(describe-variable): Use special-variable-p for completion.

* lisp/simple.el (with-wrapper-hook, apply-partially): Move to subr.el.

* lisp/subr.el (apply-partially): Use new closures rather than CL.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamic.
(dolist, dotimes): Use slightly different expansion for lexical code.
(functionp): Move to C.
(letrec): New macro.
(with-wrapper-hook): Use it and apply-partially instead of CL.
(eval-after-load): Preserve lexical-binding.
(save-window-excursion, with-output-to-temp-buffer): Turn them
into macros.

* lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist.

* lisp/emacs-lisp/autoload.el (make-autoload): Don't burp on trivial macros.

* lisp/emacs-lisp/byte-opt.el: Use lexical binding.
(byte-inline-lapcode): Remove (to bytecomp).
(byte-compile-inline-expand): Pay attention to inlining to/from
lexically bound code.
(byte-compile-unfold-lambda): Don't handle byte-code-functions
any more.
(byte-optimize-form-code-walker): Don't handle save-window-excursion
any more and don't call compiler-macros.
(byte-compile-splice-in-already-compiled-code): Remove.
(byte-code): Don't inline any more.
(disassemble-offset): Receive `bytes' as argument rather than via
dynamic scoping.
(byte-compile-tag-number): Declare before first use.
(byte-decompile-bytecode-1): Handle new byte-codes, don't change
`return' even if make-spliceable.
(byte-compile-side-effect-and-error-free-ops): Add stack-ref, remove
obsolete interactive-p.
(byte-optimize-lapcode): Optimize new lap-codes.
Don't trip up on new form of `byte-constant' lap code.

* lisp/emacs-lisp/byte-run.el (make-obsolete): Don't set the `byte-compile'
handler any more.

* lisp/emacs-lisp/bytecomp.el: Use lexical binding instead of
a "bytecomp-" prefix.  Macroexpand everything as a separate phase.
(byte-compile-initial-macro-environment):
Handle declare-function here.
(byte-compile--lexical-environment): New var.
(byte-stack-ref, byte-stack-set, byte-discardN)
(byte-discardN-preserve-tos): New lap codes.
(byte-interactive-p): Don't use any more.
(byte-compile-push-bytecodes, byte-compile-push-bytecode-const2):
New macros.
(byte-compile-lapcode): Use them and handle new lap codes.
(byte-compile-obsolete): Remove.
(byte-compile-arglist-signature): Handle new byte-code arg"lists".
(byte-compile-arglist-warn): Check late def of inlinable funs.
(byte-compile-cl-warn): Don't silence warnings for compiler-macros
since they should have been expanded by now.
(byte-compile--outbuffer): Rename from bytecomp-outbuffer.
(byte-compile-from-buffer): Remove unused second arg.
(byte-compile-preprocess): New function.
(byte-compile-toplevel-file-form): New function to distinguish
file-form calls from outside from file-form calls from hunk-handlers.
(byte-compile-file-form): Simplify.
(byte-compile-file-form-defsubst): Remove.
(byte-compile-file-form-defmumble): Simplify now that
byte-compile-lambda always returns a byte-code-function.
(byte-compile): Preprocess.
(byte-compile-byte-code-maker, byte-compile-byte-code-unmake):
Remove, not used any more.
(byte-compile-arglist-vars, byte-compile-make-lambda-lexenv)
(byte-compile-make-args-desc): New funs.
(byte-compile-lambda): Handle lexical functions.  Always return
a byte-code-function.
(byte-compile-reserved-constants): New var, to make up room for
closed-over variables.
(byte-compile-constants-vector): Obey it.
(byte-compile-top-level): New args `lexenv' and `reserved-csts'.
(byte-compile-macroexpand-declare-function): New function.
(byte-compile-form): Call byte-compile-unfold-bcf to inline immediate
byte-code-functions.
(byte-compile-form): Check obsolescence here.
(byte-compile-inline-lapcode, byte-compile-unfold-bcf): New functions.
(byte-compile-variable-ref): Remove.
(byte-compile-dynamic-variable-op): New fun.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): New funs.
(byte-compile-discard): Add 2 args.
(byte-compile-stack-ref, byte-compile-stack-set)
(byte-compile-make-closure, byte-compile-get-closed-var): New funs.
(byte-compile-funarg, byte-compile-funarg-2): Remove, handled in
macroexpand-all instead.
(byte-compile-quote-form): Remove.
(byte-compile-push-binding-init, byte-compile-not-lexical-var-p)
(byte-compile-bind, byte-compile-unbind): New funs.
(byte-compile-let): Handle let* and lexical binding.
(byte-compile-let*): Remove.
(byte-compile-catch, byte-compile-unwind-protect)
(byte-compile-track-mouse, byte-compile-condition-case):
Handle a new :fun-body form, used for lexical scoping.
(byte-compile-save-window-excursion)
(byte-compile-with-output-to-temp-buffer): Remove.
(byte-compile-defun): Simplify.
(byte-compile-stack-adjustment): New fun.
(byte-compile-out): Use it.
(byte-compile-refresh-preloaded): Don't reload byte-compiler files.

* lisp/emacs-lisp/cconv.el: New file.

* lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Properly quote CL
closures.

* lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block)
(cl-byte-compile-throw): Remove.
(cl-block-wrapper, cl-block-throw): Use compiler-macros instead.

* lisp/emacs-lisp/cl.el (pushnew): Silence warning.

* lisp/emacs-lisp/disass.el (disassemble-internal): Handle new
`closure' objects.
(disassemble-1): Handle new byte codes.

* lisp/emacs-lisp/edebug.el (edebug-eval-defun)
(edebug-eval-top-level-form): Use eval-sexp-add-defvars.
(edebug-toggle): Avoid `eval'.

* lisp/emacs-lisp/eieio-comp.el: Remove.

* lisp/emacs-lisp/eieio.el (byte-compile-file-form-defmethod):
Don't autoload.
(eieio-defgeneric-form-primary-only-one): Use `byte-compile' rather
than the internal `byte-compile-lambda'.
(defmethod): Don't hide code under quotes.
(eieio-defmethod): New `code' argument.

* lisp/emacs-lisp/float-sup.el (pi): Don't declare as dynamically bound.

* lisp/emacs-lisp/lisp-mode.el (eval-last-sexp-1):
Use eval-sexp-add-defvars.
(eval-sexp-add-defvars): New fun.

* lisp/emacs-lisp/macroexp.el: Use lexical binding.
(macroexpand-all-1): Check obsolete macros.  Expand compiler-macros.
Don't convert ' to #' without checking that it's indeed quoting
a lambda.

* lisp/emacs-lisp/pcase.el: Don't use destructuring-bind.
(pcase--memoize): Rename from pcase-memoize.  Change weakness.
(pcase): Add `let' pattern.
Change memoization so it actually works.
(pcase-mutually-exclusive-predicates): Add byte-code-function-p.
(pcase--u1) <guard, pred>: Fix possible shadowing problem.
<let>: New case.

* src/alloc.c (Fmake_symbol): Init new `declared_special' field.

* src/buffer.c (defvar_per_buffer): Set new `declared_special' field.

* src/bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
New byte-codes.
(exec_byte_code): New function extracted from Fbyte_code to handle new
calling convention for byte-code-functions.  Add new byte-codes.

* src/callint.c (Fcall_interactively): Preserve lexical-binding mode for
interactive spec.

* src/doc.c (Fdocumentation, store_function_docstring):
* src/data.c (Finteractive_form): Handle closures.

* src/eval.c (Fsetq): Handle lexical vars.
(Fdefun, Fdefmacro, Ffunction): Make closures when needed.
(Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
(FletX, Flet): Obey lexical binding.
(Fcommandp): Handle closures.
(Feval): New `lexical' arg.
(eval_sub): New function extracted from Feval.  Use it almost
everywhere where Feval was used.  Look up vars in lexical env.
Handle closures.
(Ffunctionp): Move from subr.el.
(Ffuncall): Handle closures.
(apply_lambda): Remove `eval_flags'.
(funcall_lambda): Handle closures and new byte-code-functions.
(Fspecial_variable_p): New function.
(syms_of_eval): Initialize the Vinternal_interpreter_environment var,
but without exporting it to Lisp.

* src/fns.c (concat, mapcar1): Accept byte-code-functions.

* src/image.c (parse_image_spec): Use Ffunctionp.

* src/keyboard.c (eval_dyn): New fun.
(menu_item_eval_property): Use it.

* src/lisp.h (struct Lisp_Symbol): New field `declared_special'.

* src/lread.c (lisp_file_lexically_bound_p): New function.
(Fload): Bind Qlexical_binding.
(readevalloop): Remove `evalfun' arg.
Bind Qinternal_interpreter_environment.
(Feval_buffer): Bind Qlexical_binding.
(defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
Mark as dynamic.
(syms_of_lread): Declare `lexical-binding'.

* src/window.c (Ftemp_output_buffer_show): New fun.
(Fsave_window_excursion):
* src/print.c (Fwith_output_to_temp_buffer): Move to subr.el.

13 years agoMiscellanous cleanups in preparation for the merge.
Stefan Monnier [Fri, 1 Apr 2011 15:16:50 +0000 (11:16 -0400)]
Miscellanous cleanups in preparation for the merge.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Remove debug statement.
* lisp/emacs-lisp/bytecomp.el (byte-compile-single-version)
(byte-compile-version-cond, byte-compile-delay-out)
(byte-compile-delayed-out): Remove, unused.
* src/bytecode.c (Fbyte_code): Revert to old calling convention.
* src/lisp.h (COMPILED_PUSH_ARGS): Remove, unused.

13 years agomm-view.el (mm-display-inline-fontify): Do not fontify with fundamental-mode.
Julien Danjou [Fri, 1 Apr 2011 14:24:22 +0000 (14:24 +0000)]
mm-view.el (mm-display-inline-fontify): Do not fontify with fundamental-mode.

13 years agoAdd a new command `info-display-manual'.
Eli Zaretskii [Fri, 1 Apr 2011 10:10:47 +0000 (13:10 +0300)]
Add a new command `info-display-manual'.

 lisp/info.el (info-display-manual): New function.

13 years ago* bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
Paul Eggert [Fri, 1 Apr 2011 07:18:17 +0000 (00:18 -0700)]
* bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var

that is set but not used.

13 years agoAdd Bug#.
Paul Eggert [Fri, 1 Apr 2011 07:15:34 +0000 (00:15 -0700)]
Add Bug#.

13 years ago* print.c (print_object): Remove var that is set but not used.
Paul Eggert [Fri, 1 Apr 2011 07:13:23 +0000 (00:13 -0700)]
* print.c (print_object): Remove var that is set but not used.

13 years agoFix dependencies.
Paul Eggert [Fri, 1 Apr 2011 06:38:52 +0000 (23:38 -0700)]
Fix dependencies.