diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 19 | ||||
| -rw-r--r-- | src/intervals.c | 1 | ||||
| -rw-r--r-- | src/keyboard.c | 13 | ||||
| -rw-r--r-- | src/keymap.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 45 |
5 files changed, 51 insertions, 29 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 818ff2784be..1e8684c4ddb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2013-12-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it | ||
| 4 | is a file name. (Bug#16252) | ||
| 5 | |||
| 6 | 2013-12-25 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * keyboard.c (Voverriding_terminal_local_map): | ||
| 9 | (Voverriding_local_map): Doc fix. | ||
| 10 | |||
| 11 | * keymap.c (Vemulation_mode_map_alists): Doc fix. | ||
| 12 | |||
| 13 | 2013-12-24 Eli Zaretskii <eliz@gnu.org> | ||
| 14 | |||
| 15 | * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute | ||
| 16 | file name when it is submitted to ShellExecute. Simplify code. | ||
| 17 | Don't test DOCUMENT for being a string, as that is enforced by | ||
| 18 | CHECK_STRING. Doc fix. | ||
| 19 | |||
| 1 | 2013-12-23 Eli Zaretskii <eliz@gnu.org> | 20 | 2013-12-23 Eli Zaretskii <eliz@gnu.org> |
| 2 | 21 | ||
| 3 | * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the | 22 | * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the |
diff --git a/src/intervals.c b/src/intervals.c index 0e3b684f570..f2a2a16f4ad 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -676,6 +676,7 @@ find_interval (register INTERVAL tree, register ptrdiff_t position) | |||
| 676 | 676 | ||
| 677 | while (1) | 677 | while (1) |
| 678 | { | 678 | { |
| 679 | eassert (tree); | ||
| 679 | if (relative_position < LEFT_TOTAL_LENGTH (tree)) | 680 | if (relative_position < LEFT_TOTAL_LENGTH (tree)) |
| 680 | { | 681 | { |
| 681 | tree = tree->left; | 682 | tree = tree->left; |
diff --git a/src/keyboard.c b/src/keyboard.c index 915ce9dcf23..8ccbf77871c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11415,18 +11415,19 @@ tool-bar separators natively. Otherwise it is unused (e.g. on GTK). */); | |||
| 11415 | DEFVAR_KBOARD ("overriding-terminal-local-map", | 11415 | DEFVAR_KBOARD ("overriding-terminal-local-map", |
| 11416 | Voverriding_terminal_local_map, | 11416 | Voverriding_terminal_local_map, |
| 11417 | doc: /* Per-terminal keymap that takes precedence over all other keymaps. | 11417 | doc: /* Per-terminal keymap that takes precedence over all other keymaps. |
| 11418 | |||
| 11419 | This variable is intended to let commands such as `universal-argument' | 11418 | This variable is intended to let commands such as `universal-argument' |
| 11420 | set up a different keymap for reading the next command. | 11419 | set up a different keymap for reading the next command. |
| 11421 | 11420 | ||
| 11422 | `overriding-terminal-local-map' has a separate binding for each | 11421 | `overriding-terminal-local-map' has a separate binding for each |
| 11423 | terminal device. | 11422 | terminal device. See Info node `(elisp)Multiple Terminals'. */); |
| 11424 | See Info node `(elisp)Multiple Terminals'. */); | ||
| 11425 | 11423 | ||
| 11426 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, | 11424 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, |
| 11427 | doc: /* Keymap that overrides almost all other local keymaps. | 11425 | doc: /* Keymap that replaces (overrides) local keymaps. |
| 11428 | If this variable is non-nil, it is used as a keymap--replacing the | 11426 | If this variable is non-nil, Emacs looks up key bindings in this |
| 11429 | buffer's local map, the minor mode keymaps, and char property keymaps. */); | 11427 | keymap INSTEAD OF the keymap char property, minor mode maps, and the |
| 11428 | buffer's local map. Hence, the only active keymaps would be | ||
| 11429 | `overriding-terminal-local-map', this keymap, and `global-keymap', in | ||
| 11430 | order of precedence. */); | ||
| 11430 | Voverriding_local_map = Qnil; | 11431 | Voverriding_local_map = Qnil; |
| 11431 | 11432 | ||
| 11432 | DEFVAR_LISP ("overriding-local-map-menu-flag", Voverriding_local_map_menu_flag, | 11433 | DEFVAR_LISP ("overriding-local-map-menu-flag", Voverriding_local_map_menu_flag, |
diff --git a/src/keymap.c b/src/keymap.c index 562787ee8a5..9ef5a0b294f 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3753,7 +3753,7 @@ it is provided for major modes to bind locally. */); | |||
| 3753 | Vminor_mode_overriding_map_alist = Qnil; | 3753 | Vminor_mode_overriding_map_alist = Qnil; |
| 3754 | 3754 | ||
| 3755 | DEFVAR_LISP ("emulation-mode-map-alists", Vemulation_mode_map_alists, | 3755 | DEFVAR_LISP ("emulation-mode-map-alists", Vemulation_mode_map_alists, |
| 3756 | doc: /* List of keymap alists to use for emulations modes. | 3756 | doc: /* List of keymap alists to use for emulation modes. |
| 3757 | It is intended for modes or packages using multiple minor-mode keymaps. | 3757 | It is intended for modes or packages using multiple minor-mode keymaps. |
| 3758 | Each element is a keymap alist just like `minor-mode-map-alist', or a | 3758 | Each element is a keymap alist just like `minor-mode-map-alist', or a |
| 3759 | symbol with a variable binding which is a keymap alist, and it is used | 3759 | symbol with a variable binding which is a keymap alist, and it is used |
diff --git a/src/w32fns.c b/src/w32fns.c index 59526936afe..02850d8954d 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -6844,12 +6844,15 @@ operations: | |||
| 6844 | specified DOCUMENT | 6844 | specified DOCUMENT |
| 6845 | \"find\" - initiate search starting from DOCUMENT which must specify | 6845 | \"find\" - initiate search starting from DOCUMENT which must specify |
| 6846 | a directory | 6846 | a directory |
| 6847 | \"runas\" - run DOCUMENT, which must be an excutable file, with | ||
| 6848 | elevated privileges (a.k.a. \"as Administrator\"). | ||
| 6847 | nil - invoke the default OPERATION, or \"open\" if default is | 6849 | nil - invoke the default OPERATION, or \"open\" if default is |
| 6848 | not defined or unavailable | 6850 | not defined or unavailable |
| 6849 | 6851 | ||
| 6850 | DOCUMENT is typically the name of a document file or a URL, but can | 6852 | DOCUMENT is typically the name of a document file or a URL, but can |
| 6851 | also be a program executable to run, or a directory to open in the | 6853 | also be a program executable to run, or a directory to open in the |
| 6852 | Windows Explorer. | 6854 | Windows Explorer. If it is a file, it must be a local one; this |
| 6855 | function does not support remote file names. | ||
| 6853 | 6856 | ||
| 6854 | If DOCUMENT is a program executable, the optional third arg PARAMETERS | 6857 | If DOCUMENT is a program executable, the optional third arg PARAMETERS |
| 6855 | can be a string containing command line parameters that will be passed | 6858 | can be a string containing command line parameters that will be passed |
| @@ -6873,22 +6876,19 @@ an integer representing a ShowWindow flag: | |||
| 6873 | #ifndef CYGWIN | 6876 | #ifndef CYGWIN |
| 6874 | int use_unicode = w32_unicode_filenames; | 6877 | int use_unicode = w32_unicode_filenames; |
| 6875 | char *doc_a = NULL, *params_a = NULL, *ops_a = NULL; | 6878 | char *doc_a = NULL, *params_a = NULL, *ops_a = NULL; |
| 6879 | Lisp_Object absdoc; | ||
| 6876 | #endif | 6880 | #endif |
| 6877 | 6881 | ||
| 6878 | CHECK_STRING (document); | 6882 | CHECK_STRING (document); |
| 6879 | 6883 | ||
| 6880 | #ifdef CYGWIN | 6884 | #ifdef CYGWIN |
| 6881 | current_dir = Fcygwin_convert_file_name_to_windows (current_dir, Qt); | 6885 | current_dir = Fcygwin_convert_file_name_to_windows (current_dir, Qt); |
| 6882 | if (STRINGP (document)) | 6886 | document = Fcygwin_convert_file_name_to_windows (document, Qt); |
| 6883 | document = Fcygwin_convert_file_name_to_windows (document, Qt); | ||
| 6884 | 6887 | ||
| 6885 | /* Encode filename, current directory and parameters. */ | 6888 | /* Encode filename, current directory and parameters. */ |
| 6886 | current_dir = GUI_ENCODE_FILE (current_dir); | 6889 | current_dir = GUI_ENCODE_FILE (current_dir); |
| 6887 | if (STRINGP (document)) | 6890 | document = GUI_ENCODE_FILE (document); |
| 6888 | { | 6891 | doc_w = GUI_SDATA (document); |
| 6889 | document = GUI_ENCODE_FILE (document); | ||
| 6890 | doc_w = GUI_SDATA (document); | ||
| 6891 | } | ||
| 6892 | if (STRINGP (parameters)) | 6892 | if (STRINGP (parameters)) |
| 6893 | { | 6893 | { |
| 6894 | parameters = GUI_ENCODE_SYSTEM (parameters); | 6894 | parameters = GUI_ENCODE_SYSTEM (parameters); |
| @@ -6904,20 +6904,26 @@ an integer representing a ShowWindow flag: | |||
| 6904 | (INTEGERP (show_flag) | 6904 | (INTEGERP (show_flag) |
| 6905 | ? XINT (show_flag) : SW_SHOWDEFAULT)); | 6905 | ? XINT (show_flag) : SW_SHOWDEFAULT)); |
| 6906 | #else /* !CYGWIN */ | 6906 | #else /* !CYGWIN */ |
| 6907 | current_dir = ENCODE_FILE (current_dir); | ||
| 6908 | /* We have a situation here. If DOCUMENT is a relative file name, | ||
| 6909 | and is not in CURRENT_DIR, ShellExecute below will fail to find | ||
| 6910 | it. So we need to make the file name absolute. But DOCUMENT | ||
| 6911 | does not have to be a file, it can be a URL, for example. So we | ||
| 6912 | make it absolute only if it is an existing file; if it is a file | ||
| 6913 | that does not exist, tough. */ | ||
| 6914 | absdoc = Fexpand_file_name (document, Qnil); | ||
| 6915 | if (!NILP (Ffile_exists_p (absdoc))) | ||
| 6916 | document = absdoc; | ||
| 6917 | document = ENCODE_FILE (document); | ||
| 6907 | if (use_unicode) | 6918 | if (use_unicode) |
| 6908 | { | 6919 | { |
| 6909 | wchar_t document_w[MAX_PATH], current_dir_w[MAX_PATH]; | 6920 | wchar_t document_w[MAX_PATH], current_dir_w[MAX_PATH]; |
| 6910 | 6921 | ||
| 6911 | /* Encode filename, current directory and parameters, and | 6922 | /* Encode filename, current directory and parameters, and |
| 6912 | convert operation to UTF-16. */ | 6923 | convert operation to UTF-16. */ |
| 6913 | current_dir = ENCODE_FILE (current_dir); | ||
| 6914 | filename_to_utf16 (SSDATA (current_dir), current_dir_w); | 6924 | filename_to_utf16 (SSDATA (current_dir), current_dir_w); |
| 6915 | if (STRINGP (document)) | 6925 | filename_to_utf16 (SSDATA (document), document_w); |
| 6916 | { | 6926 | doc_w = document_w; |
| 6917 | document = ENCODE_FILE (document); | ||
| 6918 | filename_to_utf16 (SSDATA (document), document_w); | ||
| 6919 | doc_w = document_w; | ||
| 6920 | } | ||
| 6921 | if (STRINGP (parameters)) | 6927 | if (STRINGP (parameters)) |
| 6922 | { | 6928 | { |
| 6923 | int len; | 6929 | int len; |
| @@ -6954,14 +6960,9 @@ an integer representing a ShowWindow flag: | |||
| 6954 | { | 6960 | { |
| 6955 | char document_a[MAX_PATH], current_dir_a[MAX_PATH]; | 6961 | char document_a[MAX_PATH], current_dir_a[MAX_PATH]; |
| 6956 | 6962 | ||
| 6957 | current_dir = ENCODE_FILE (current_dir); | ||
| 6958 | filename_to_ansi (SSDATA (current_dir), current_dir_a); | 6963 | filename_to_ansi (SSDATA (current_dir), current_dir_a); |
| 6959 | if (STRINGP (document)) | 6964 | filename_to_ansi (SSDATA (document), document_a); |
| 6960 | { | 6965 | doc_a = document_a; |
| 6961 | ENCODE_FILE (document); | ||
| 6962 | filename_to_ansi (SSDATA (document), document_a); | ||
| 6963 | doc_a = document_a; | ||
| 6964 | } | ||
| 6965 | if (STRINGP (parameters)) | 6966 | if (STRINGP (parameters)) |
| 6966 | { | 6967 | { |
| 6967 | parameters = ENCODE_SYSTEM (parameters); | 6968 | parameters = ENCODE_SYSTEM (parameters); |