diff options
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 36 | ||||
| -rw-r--r-- | lisp/comint.el | 29 | ||||
| -rw-r--r-- | lisp/dirtrack.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/mml1991.el | 17 | ||||
| -rw-r--r-- | lisp/gnus/mml2015.el | 17 | ||||
| -rw-r--r-- | lisp/ido.el | 6 | ||||
| -rw-r--r-- | lisp/json.el | 21 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 24 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 6 | ||||
| -rw-r--r-- | lisp/xwidget.el | 28 | ||||
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/xdisp.c | 8 |
14 files changed, 151 insertions, 71 deletions
| @@ -5,7 +5,7 @@ | |||
| 5 | 2011-10-12 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2011-10-12 Paul Eggert <eggert@cs.ucla.edu> |
| 6 | 6 | ||
| 7 | * configure.in: Remove check for -lintl (Bug#9713). | 7 | * configure.in: Remove check for -lintl (Bug#9713). |
| 8 | The check breaks 'configure' in some CentOS 5.7 x86 configurations. | 8 | The check could break 'configure' on GNU/Linux with a (broken) libintl. |
| 9 | The check was helpful but not essential in Solaris 2.6 (1997), | 9 | The check was helpful but not essential in Solaris 2.6 (1997), |
| 10 | and is no longer needed in Solaris 8 (2000). Solaris 2.6 is | 10 | and is no longer needed in Solaris 8 (2000). Solaris 2.6 is |
| 11 | obsolete -- Sun dropped support for it in 2006 -- and without | 11 | obsolete -- Sun dropped support for it in 2006 -- and without |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index abae693d0c8..471b1219c19 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,35 @@ | |||
| 1 | 2011-10-17 Ryan Barrett <emacs@ryanb.org> (tiny change) | ||
| 2 | |||
| 3 | * dirtrack.el (dirtrack): Support shell buffers with path | ||
| 4 | prefixes, e.g. tramp-based remote shells. (Bug#9647) | ||
| 5 | |||
| 6 | 2011-10-17 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 7 | |||
| 8 | * json.el: Bump version to 1.3 and note change in History. | ||
| 9 | (json-alist-p, json-plist-p): Rewrite to avoid recursion. | ||
| 10 | |||
| 11 | 2011-10-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 12 | |||
| 13 | * comint.el (comint-insert-input, comint-send-input) | ||
| 14 | (comint-get-old-input-default, comint-backward-matching-input) | ||
| 15 | (comint-next-prompt): Use nil instead of `input' for field property of | ||
| 16 | past user input (bug#114). | ||
| 17 | |||
| 18 | * minibuffer.el (completion--replace): Inherit surrounding properties | ||
| 19 | (bug#114). | ||
| 20 | (minibuffer-complete-and-exit): Use it. | ||
| 21 | |||
| 22 | * comint.el (comint--table-subvert): Quote the all-completions output | ||
| 23 | (bug#9160). | ||
| 24 | |||
| 25 | 2011-10-17 Martin Rudalics <rudalics@gmx.at> | ||
| 26 | |||
| 27 | * ido.el (ido-default-buffer-method): Remove redundant :type entry. | ||
| 28 | |||
| 29 | * menu-bar.el (menu-bar-file-menu): Add entry for making new | ||
| 30 | window on right of selected. (Bug#9350) Reword other window | ||
| 31 | entries and separate them from frame entries. | ||
| 32 | |||
| 1 | 2011-10-15 Glenn Morris <rgm@gnu.org> | 33 | 2011-10-15 Glenn Morris <rgm@gnu.org> |
| 2 | 34 | ||
| 3 | * emacs-lisp/ert.el (ert--explain-equal-rec, ert-select-tests): | 35 | * emacs-lisp/ert.el (ert--explain-equal-rec, ert-select-tests): |
| @@ -5,8 +37,8 @@ | |||
| 5 | 37 | ||
| 6 | 2011-10-15 Chong Yidong <cyd@stupidchicken.com> | 38 | 2011-10-15 Chong Yidong <cyd@stupidchicken.com> |
| 7 | 39 | ||
| 8 | * net/network-stream.el (network-stream-open-starttls): Improve | 40 | * net/network-stream.el (network-stream-open-starttls): |
| 9 | detection of failure due to lack of TLS support. | 41 | Improve detection of failure due to lack of TLS support. |
| 10 | 42 | ||
| 11 | * mail/sendmail.el (sendmail-query-once): Tweak prompt message, | 43 | * mail/sendmail.el (sendmail-query-once): Tweak prompt message, |
| 12 | putting the input text in front and in bold. | 44 | putting the input text in front and in bold. |
diff --git a/lisp/comint.el b/lisp/comint.el index 52580db6186..591be5e2d9d 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -847,10 +847,10 @@ by the global keymap (usually `mouse-yank-at-click')." | |||
| 847 | ;; If pos is at the very end of a field, the mouse-click was | 847 | ;; If pos is at the very end of a field, the mouse-click was |
| 848 | ;; probably outside (to the right) of the field. | 848 | ;; probably outside (to the right) of the field. |
| 849 | (and (< pos (field-end pos)) | 849 | (and (< pos (field-end pos)) |
| 850 | (setq field (field-at-pos pos)) | 850 | (< (field-end pos) (point-max)) |
| 851 | (setq input (field-string-no-properties pos)))) | 851 | (progn (setq field (field-at-pos pos)) |
| 852 | (if (or (null comint-accum-marker) | 852 | (setq input (field-string-no-properties pos))))) |
| 853 | (not (eq field 'input))) | 853 | (if (or (null input) (null comint-accum-marker) field) |
| 854 | ;; Fall back to the global definition if (i) the selected | 854 | ;; Fall back to the global definition if (i) the selected |
| 855 | ;; buffer is not a comint buffer (which can happen if a | 855 | ;; buffer is not a comint buffer (which can happen if a |
| 856 | ;; non-comint window was selected and we clicked in a comint | 856 | ;; non-comint window was selected and we clicked in a comint |
| @@ -1803,8 +1803,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1803 | (add-text-properties | 1803 | (add-text-properties |
| 1804 | beg end | 1804 | beg end |
| 1805 | '(mouse-face highlight | 1805 | '(mouse-face highlight |
| 1806 | help-echo "mouse-2: insert after prompt as new input" | 1806 | help-echo "mouse-2: insert after prompt as new input")))) |
| 1807 | field input)))) | ||
| 1808 | (unless (or no-newline comint-use-prompt-regexp) | 1807 | (unless (or no-newline comint-use-prompt-regexp) |
| 1809 | ;; Cover the terminating newline | 1808 | ;; Cover the terminating newline |
| 1810 | (add-text-properties end (1+ end) | 1809 | (add-text-properties end (1+ end) |
| @@ -2153,7 +2152,7 @@ If `comint-use-prompt-regexp' is non-nil, then return | |||
| 2153 | the current line with any initial string matching the regexp | 2152 | the current line with any initial string matching the regexp |
| 2154 | `comint-prompt-regexp' removed." | 2153 | `comint-prompt-regexp' removed." |
| 2155 | (let ((bof (field-beginning))) | 2154 | (let ((bof (field-beginning))) |
| 2156 | (if (eq (get-char-property bof 'field) 'input) | 2155 | (if (null (get-char-property bof 'field)) ;Not `output'. |
| 2157 | (field-string-no-properties bof) | 2156 | (field-string-no-properties bof) |
| 2158 | (comint-bol) | 2157 | (comint-bol) |
| 2159 | (buffer-substring-no-properties (point) (line-end-position))))) | 2158 | (buffer-substring-no-properties (point) (line-end-position))))) |
| @@ -2473,7 +2472,7 @@ If N is negative, find the next or Nth next match." | |||
| 2473 | (while (/= n 0) | 2472 | (while (/= n 0) |
| 2474 | (unless (re-search-backward regexp nil t dir) | 2473 | (unless (re-search-backward regexp nil t dir) |
| 2475 | (error "Not found")) | 2474 | (error "Not found")) |
| 2476 | (when (eq (get-char-property (point) 'field) 'input) | 2475 | (unless (get-char-property (point) 'field) |
| 2477 | (setq n (- n dir)))) | 2476 | (setq n (- n dir)))) |
| 2478 | (field-beginning)))) | 2477 | (field-beginning)))) |
| 2479 | (goto-char pos)))) | 2478 | (goto-char pos)))) |
| @@ -2520,7 +2519,7 @@ text matching `comint-prompt-regexp'." | |||
| 2520 | (setq input-pos (point-max))) | 2519 | (setq input-pos (point-max))) |
| 2521 | ;; stop iterating | 2520 | ;; stop iterating |
| 2522 | (setq n 0)) | 2521 | (setq n 0)) |
| 2523 | ((eq (get-char-property pos 'field) 'input) | 2522 | ((null (get-char-property pos 'field)) |
| 2524 | (setq n (if (< n 0) (1+ n) (1- n))) | 2523 | (setq n (if (< n 0) (1+ n) (1- n))) |
| 2525 | (setq input-pos pos)))) | 2524 | (setq input-pos pos)))) |
| 2526 | (when input-pos | 2525 | (when input-pos |
| @@ -3079,9 +3078,9 @@ SS1 = (unquote SS2)." | |||
| 3079 | 3078 | ||
| 3080 | (defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun) | 3079 | (defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun) |
| 3081 | "Completion table that replaces the prefix S1 with S2 in STRING. | 3080 | "Completion table that replaces the prefix S1 with S2 in STRING. |
| 3082 | When TABLE, S1 and S2 are provided by `apply-partially', the result | 3081 | The result is a completion table which completes strings of the |
| 3083 | is a completion table which completes strings of the form (concat S1 S) | 3082 | form (concat S1 S) in the same way as TABLE completes strings of |
| 3084 | in the same way as TABLE completes strings of the form (concat S2 S)." | 3083 | the form (concat S2 S)." |
| 3085 | (lambda (string pred action) | 3084 | (lambda (string pred action) |
| 3086 | (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil | 3085 | (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil |
| 3087 | completion-ignore-case)) | 3086 | completion-ignore-case)) |
| @@ -3106,13 +3105,15 @@ in the same way as TABLE completes strings of the form (concat S2 S)." | |||
| 3106 | ((eq action t) | 3105 | ((eq action t) |
| 3107 | (let ((bounds (completion-boundaries str table pred ""))) | 3106 | (let ((bounds (completion-boundaries str table pred ""))) |
| 3108 | (if (>= (car bounds) (length s2)) | 3107 | (if (>= (car bounds) (length s2)) |
| 3109 | res | 3108 | (if quote-fun (mapcar quote-fun res) res) |
| 3110 | (let ((re (concat "\\`" | 3109 | (let ((re (concat "\\`" |
| 3111 | (regexp-quote (substring s2 (car bounds)))))) | 3110 | (regexp-quote (substring s2 (car bounds)))))) |
| 3112 | (delq nil | 3111 | (delq nil |
| 3113 | (mapcar (lambda (c) | 3112 | (mapcar (lambda (c) |
| 3114 | (if (string-match re c) | 3113 | (if (string-match re c) |
| 3115 | (substring c (match-end 0)))) | 3114 | (let ((str (substring c (match-end 0)))) |
| 3115 | (if quote-fun | ||
| 3116 | (funcall quote-fun str) str)))) | ||
| 3116 | res)))))) | 3117 | res)))))) |
| 3117 | ;; E.g. action=nil and it's the only completion. | 3118 | ;; E.g. action=nil and it's the only completion. |
| 3118 | (res)))))) | 3119 | (res)))))) |
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index c3dfc747772..23a05816a2d 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el | |||
| @@ -227,7 +227,7 @@ If directory tracking does not seem to be working, you can use the | |||
| 227 | function `dirtrack-debug-mode' to turn on debugging output." | 227 | function `dirtrack-debug-mode' to turn on debugging output." |
| 228 | (unless (or (null dirtrack-mode) | 228 | (unless (or (null dirtrack-mode) |
| 229 | (eq (point) (point-min))) ; no output? | 229 | (eq (point) (point-min))) ; no output? |
| 230 | (let (prompt-path | 230 | (let (prompt-path orig-prompt-path |
| 231 | (current-dir default-directory) | 231 | (current-dir default-directory) |
| 232 | (dirtrack-regexp (nth 0 dirtrack-list)) | 232 | (dirtrack-regexp (nth 0 dirtrack-list)) |
| 233 | (match-num (nth 1 dirtrack-list))) | 233 | (match-num (nth 1 dirtrack-list))) |
| @@ -243,8 +243,9 @@ function `dirtrack-debug-mode' to turn on debugging output." | |||
| 243 | (if (not (> (length prompt-path) 0)) | 243 | (if (not (> (length prompt-path) 0)) |
| 244 | (dirtrack-debug-message "Match is empty string") | 244 | (dirtrack-debug-message "Match is empty string") |
| 245 | ;; Transform prompts into canonical forms | 245 | ;; Transform prompts into canonical forms |
| 246 | (setq prompt-path (funcall dirtrack-directory-function | 246 | (setq orig-prompt-path (funcall dirtrack-directory-function |
| 247 | prompt-path) | 247 | prompt-path) |
| 248 | prompt-path (shell-prefixed-directory-name orig-prompt-path) | ||
| 248 | current-dir (funcall dirtrack-canonicalize-function | 249 | current-dir (funcall dirtrack-canonicalize-function |
| 249 | current-dir)) | 250 | current-dir)) |
| 250 | (dirtrack-debug-message | 251 | (dirtrack-debug-message |
| @@ -257,8 +258,9 @@ function `dirtrack-debug-mode' to turn on debugging output." | |||
| 257 | ;; It's possible that Emacs will think the directory | 258 | ;; It's possible that Emacs will think the directory |
| 258 | ;; won't exist (eg, rlogin buffers) | 259 | ;; won't exist (eg, rlogin buffers) |
| 259 | (if (file-accessible-directory-p prompt-path) | 260 | (if (file-accessible-directory-p prompt-path) |
| 260 | ;; Change directory | 261 | ;; Change directory. shell-process-cd adds the prefix, so we |
| 261 | (and (shell-process-cd prompt-path) | 262 | ;; need to give it the original (un-prefixed) path. |
| 263 | (and (shell-process-cd orig-prompt-path) | ||
| 262 | (run-hooks 'dirtrack-directory-change-hook) | 264 | (run-hooks 'dirtrack-directory-change-hook) |
| 263 | (dirtrack-debug-message | 265 | (dirtrack-debug-message |
| 264 | (format "Changing directory to %s" prompt-path))) | 266 | (format "Changing directory to %s" prompt-path))) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2fd624e819b..cc2568a3647 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-10-17 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * mml2015.el (mml2015-epg-find-usable-key): Skip the whole key if the | ||
| 4 | primary key is marked as disabled. | ||
| 5 | * mml1991.el (mml1991-epg-find-usable-key): Ditto. | ||
| 6 | Thanks to Christian von Roques <roques@mti.ag>. | ||
| 7 | |||
| 1 | 2011-10-11 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2011-10-11 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * html2text.el (html2text-clean-anchor): Check for quotes around | 10 | * html2text.el (html2text-clean-anchor): Check for quotes around |
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index ad9f95796fe..1777a660319 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el | |||
| @@ -282,13 +282,16 @@ Whether the passphrase is cached at all is controlled by | |||
| 282 | (catch 'found | 282 | (catch 'found |
| 283 | (while keys | 283 | (while keys |
| 284 | (let ((pointer (epg-key-sub-key-list (car keys)))) | 284 | (let ((pointer (epg-key-sub-key-list (car keys)))) |
| 285 | (while pointer | 285 | ;; The primary key will be marked as disabled, when the entire |
| 286 | (if (and (memq usage (epg-sub-key-capability (car pointer))) | 286 | ;; key is disabled (see 12 Field, Format of colon listings, in |
| 287 | (not (memq 'disabled (epg-sub-key-capability (car pointer)))) | 287 | ;; gnupg/doc/DETAILS) |
| 288 | (not (memq (epg-sub-key-validity (car pointer)) | 288 | (unless (memq 'disabled (epg-sub-key-capability (car pointer))) |
| 289 | '(revoked expired)))) | 289 | (while pointer |
| 290 | (throw 'found (car keys))) | 290 | (if (and (memq usage (epg-sub-key-capability (car pointer))) |
| 291 | (setq pointer (cdr pointer)))) | 291 | (not (memq (epg-sub-key-validity (car pointer)) |
| 292 | '(revoked expired)))) | ||
| 293 | (throw 'found (car keys))) | ||
| 294 | (setq pointer (cdr pointer))))) | ||
| 292 | (setq keys (cdr keys))))) | 295 | (setq keys (cdr keys))))) |
| 293 | 296 | ||
| 294 | ;; XXX: since gpg --list-secret-keys does not return validity of each | 297 | ;; XXX: since gpg --list-secret-keys does not return validity of each |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index b9310beed58..028955a8c33 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -788,13 +788,16 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." | |||
| 788 | (catch 'found | 788 | (catch 'found |
| 789 | (while keys | 789 | (while keys |
| 790 | (let ((pointer (epg-key-sub-key-list (car keys)))) | 790 | (let ((pointer (epg-key-sub-key-list (car keys)))) |
| 791 | (while pointer | 791 | ;; The primary key will be marked as disabled, when the entire |
| 792 | (if (and (memq usage (epg-sub-key-capability (car pointer))) | 792 | ;; key is disabled (see 12 Field, Format of colon listings, in |
| 793 | (not (memq 'disabled (epg-sub-key-capability (car pointer)))) | 793 | ;; gnupg/doc/DETAILS) |
| 794 | (not (memq (epg-sub-key-validity (car pointer)) | 794 | (unless (memq 'disabled (epg-sub-key-capability (car pointer))) |
| 795 | '(revoked expired)))) | 795 | (while pointer |
| 796 | (throw 'found (car keys))) | 796 | (if (and (memq usage (epg-sub-key-capability (car pointer))) |
| 797 | (setq pointer (cdr pointer)))) | 797 | (not (memq (epg-sub-key-validity (car pointer)) |
| 798 | '(revoked expired)))) | ||
| 799 | (throw 'found (car keys))) | ||
| 800 | (setq pointer (cdr pointer))))) | ||
| 798 | (setq keys (cdr keys))))) | 801 | (setq keys (cdr keys))))) |
| 799 | 802 | ||
| 800 | ;; XXX: since gpg --list-secret-keys does not return validity of each | 803 | ;; XXX: since gpg --list-secret-keys does not return validity of each |
diff --git a/lisp/ido.el b/lisp/ido.el index 46ac5784d0e..0844c2c50c6 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -461,12 +461,6 @@ See `ido-default-file-method' for details." | |||
| 461 | (const :tag "Show in other frame" other-frame) | 461 | (const :tag "Show in other frame" other-frame) |
| 462 | (const :tag "Ask to show in other frame" maybe-frame) | 462 | (const :tag "Ask to show in other frame" maybe-frame) |
| 463 | (const :tag "Raise frame if already shown" raise-frame)) | 463 | (const :tag "Raise frame if already shown" raise-frame)) |
| 464 | :type '(choice (const selected-window) | ||
| 465 | (const other-window) | ||
| 466 | (const display) | ||
| 467 | (const other-frame) | ||
| 468 | (const maybe-frame) | ||
| 469 | (const raise-frame)) | ||
| 470 | :group 'ido) | 464 | :group 'ido) |
| 471 | 465 | ||
| 472 | (defcustom ido-enable-flex-matching nil | 466 | (defcustom ido-enable-flex-matching nil |
diff --git a/lisp/json.el b/lisp/json.el index 47448f4702a..33e985abbee 100644 --- a/lisp/json.el +++ b/lisp/json.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2006-2011 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2006-2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Edward O'Connor <ted@oconnor.cx> | 5 | ;; Author: Edward O'Connor <ted@oconnor.cx> |
| 6 | ;; Version: 1.2 | 6 | ;; Version: 1.3 |
| 7 | ;; Keywords: convenience | 7 | ;; Keywords: convenience |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -47,6 +47,7 @@ | |||
| 47 | ;; other cleanups, bugfixes, and improvements. | 47 | ;; other cleanups, bugfixes, and improvements. |
| 48 | ;; 2006-12-29 - XEmacs support, from Aidan Kehoe <kehoea@parhasard.net>. | 48 | ;; 2006-12-29 - XEmacs support, from Aidan Kehoe <kehoea@parhasard.net>. |
| 49 | ;; 2008-02-21 - Installed in GNU Emacs. | 49 | ;; 2008-02-21 - Installed in GNU Emacs. |
| 50 | ;; 2011-10-17 - Patch `json-alist-p' and `json-plist-p' to avoid recursion -tzz | ||
| 50 | 51 | ||
| 51 | ;;; Code: | 52 | ;;; Code: |
| 52 | 53 | ||
| @@ -108,16 +109,20 @@ this around your call to `json-read' instead of `setq'ing it.") | |||
| 108 | 109 | ||
| 109 | (defun json-alist-p (list) | 110 | (defun json-alist-p (list) |
| 110 | "Non-null if and only if LIST is an alist." | 111 | "Non-null if and only if LIST is an alist." |
| 111 | (or (null list) | 112 | (while (consp list) |
| 112 | (and (consp (car list)) | 113 | (setq list (if (consp (car list)) |
| 113 | (json-alist-p (cdr list))))) | 114 | (cdr list) |
| 115 | 'not-alist))) | ||
| 116 | (null list)) | ||
| 114 | 117 | ||
| 115 | (defun json-plist-p (list) | 118 | (defun json-plist-p (list) |
| 116 | "Non-null if and only if LIST is a plist." | 119 | "Non-null if and only if LIST is a plist." |
| 117 | (or (null list) | 120 | (while (consp list) |
| 118 | (and (keywordp (car list)) | 121 | (setq list (if (and (keywordp (car list)) |
| 119 | (consp (cdr list)) | 122 | (consp (cdr list))) |
| 120 | (json-plist-p (cddr list))))) | 123 | (cddr list) |
| 124 | 'not-plist))) | ||
| 125 | (null list)) | ||
| 121 | 126 | ||
| 122 | ;; Reader utilities | 127 | ;; Reader utilities |
| 123 | 128 | ||
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index eceb3afc147..d75a768e2d4 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -92,17 +92,25 @@ | |||
| 92 | :visible (fboundp 'make-frame-command) | 92 | :visible (fboundp 'make-frame-command) |
| 93 | :help ,(purecopy "Open a new frame"))) | 93 | :help ,(purecopy "Open a new frame"))) |
| 94 | 94 | ||
| 95 | (define-key menu [separator-frame] | ||
| 96 | menu-bar-separator) | ||
| 97 | |||
| 95 | (define-key menu [one-window] | 98 | (define-key menu [one-window] |
| 96 | `(menu-item ,(purecopy "Remove Splits") delete-other-windows | 99 | `(menu-item ,(purecopy "Remove Other Windows") delete-other-windows |
| 97 | :enable (not (one-window-p t nil)) | 100 | :enable (not (one-window-p t nil)) |
| 98 | :help ,(purecopy | 101 | :help ,(purecopy "Make selected window fill whole frame"))) |
| 99 | "Selected window grows to fill the whole frame"))) | 102 | |
| 103 | (define-key menu [new-window-on-right] | ||
| 104 | `(menu-item ,(purecopy "New Window on Right") split-window-side-by-side | ||
| 105 | :enable (and (menu-bar-menu-frame-live-and-visible-p) | ||
| 106 | (menu-bar-non-minibuffer-window-p)) | ||
| 107 | :help ,(purecopy "Make new window on right of selected one"))) | ||
| 100 | 108 | ||
| 101 | (define-key menu [split-window] | 109 | (define-key menu [new-window-below] |
| 102 | `(menu-item ,(purecopy "Split Window") split-window-vertically | 110 | `(menu-item ,(purecopy "New Window Below") split-window-above-each-other |
| 103 | :enable (and (menu-bar-menu-frame-live-and-visible-p) | 111 | :enable (and (menu-bar-menu-frame-live-and-visible-p) |
| 104 | (menu-bar-non-minibuffer-window-p)) | 112 | (menu-bar-non-minibuffer-window-p)) |
| 105 | :help ,(purecopy "Split selected window in two windows"))) | 113 | :help ,(purecopy "Make new window below selected one"))) |
| 106 | 114 | ||
| 107 | (define-key menu [separator-window] | 115 | (define-key menu [separator-window] |
| 108 | menu-bar-separator) | 116 | menu-bar-separator) |
| @@ -433,7 +441,7 @@ | |||
| 433 | 441 | ||
| 434 | (defvar menu-bar-edit-menu | 442 | (defvar menu-bar-edit-menu |
| 435 | (let ((menu (make-sparse-keymap "Edit"))) | 443 | (let ((menu (make-sparse-keymap "Edit"))) |
| 436 | 444 | ||
| 437 | (define-key menu [props] | 445 | (define-key menu [props] |
| 438 | `(menu-item ,(purecopy "Text Properties") facemenu-menu)) | 446 | `(menu-item ,(purecopy "Text Properties") facemenu-menu)) |
| 439 | 447 | ||
| @@ -1645,7 +1653,7 @@ key, a click, or a menu-item"))) | |||
| 1645 | 1653 | ||
| 1646 | (defvar menu-bar-search-documentation-menu | 1654 | (defvar menu-bar-search-documentation-menu |
| 1647 | (let ((menu (make-sparse-keymap "Search Documentation"))) | 1655 | (let ((menu (make-sparse-keymap "Search Documentation"))) |
| 1648 | 1656 | ||
| 1649 | (define-key menu [search-documentation-strings] | 1657 | (define-key menu [search-documentation-strings] |
| 1650 | `(menu-item ,(purecopy "Search Documentation Strings...") apropos-documentation | 1658 | `(menu-item ,(purecopy "Search Documentation Strings...") apropos-documentation |
| 1651 | :help | 1659 | :help |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index acb71d115d1..38785fc48e8 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -596,7 +596,7 @@ Moves point to the end of the new text." | |||
| 596 | (setq end (- end suffix-len)) | 596 | (setq end (- end suffix-len)) |
| 597 | (setq newtext (substring newtext 0 (- suffix-len)))) | 597 | (setq newtext (substring newtext 0 (- suffix-len)))) |
| 598 | (goto-char beg) | 598 | (goto-char beg) |
| 599 | (insert newtext) | 599 | (insert-and-inherit newtext) |
| 600 | (delete-region (point) (+ (point) (- end beg))) | 600 | (delete-region (point) (+ (point) (- end beg))) |
| 601 | (forward-char suffix-len))) | 601 | (forward-char suffix-len))) |
| 602 | 602 | ||
| @@ -927,9 +927,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion', | |||
| 927 | ;; file, so `try-completion' actually completes to | 927 | ;; file, so `try-completion' actually completes to |
| 928 | ;; that file. | 928 | ;; that file. |
| 929 | (= (length string) (length compl))) | 929 | (= (length string) (length compl))) |
| 930 | (goto-char end) | 930 | (completion--replace beg end compl)))) |
| 931 | (insert compl) | ||
| 932 | (delete-region beg end)))) | ||
| 933 | (exit-minibuffer)) | 931 | (exit-minibuffer)) |
| 934 | 932 | ||
| 935 | ((memq minibuffer-completion-confirm '(confirm confirm-after-completion)) | 933 | ((memq minibuffer-completion-confirm '(confirm confirm-after-completion)) |
diff --git a/lisp/xwidget.el b/lisp/xwidget.el index ed6739cf98e..33ed66334ff 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el | |||
| @@ -217,7 +217,7 @@ if(document.activeElement.value != undefined) | |||
| 217 | ;; - there is aparently no way to find the active frame other than recursion | 217 | ;; - there is aparently no way to find the active frame other than recursion |
| 218 | ;; - the js "for each" construct missbehaved on the "frames" collection | 218 | ;; - the js "for each" construct missbehaved on the "frames" collection |
| 219 | ;; - a window with no frameset still has frames.length == 1, but frames[0].document.activeElement != document.activeElement | 219 | ;; - a window with no frameset still has frames.length == 1, but frames[0].document.activeElement != document.activeElement |
| 220 | 220 | ;;TODO the activeelement type needs to be examined, for iframe, etc. sucks. | |
| 221 | ) | 221 | ) |
| 222 | 222 | ||
| 223 | (defun xwidget-webkit-insert-string (xw str) | 223 | (defun xwidget-webkit-insert-string (xw str) |
| @@ -230,14 +230,23 @@ Argument STR string." | |||
| 230 | (field-value | 230 | (field-value |
| 231 | (progn | 231 | (progn |
| 232 | (xwidget-webkit-execute-script xww xwidget-webkit-activeelement-js) | 232 | (xwidget-webkit-execute-script xww xwidget-webkit-activeelement-js) |
| 233 | (xwidget-webkit-execute-script xww "document.title=findactiveelement(frames).value") | 233 | (xwidget-webkit-execute-script-rv xww "findactiveelement(frames).value" "")))) |
| 234 | (xwidget-webkit-get-title xww)))) | ||
| 235 | (list xww | 234 | (list xww |
| 236 | (read-string "string:" field-value)))) | 235 | (read-string "string:" field-value)))) |
| 237 | (xwidget-webkit-execute-script xw (format "findactiveelement(frames).value='%s'" str))) | 236 | (xwidget-webkit-execute-script xw (format "findactiveelement(frames).value='%s'" str))) |
| 238 | 237 | ||
| 239 | 238 | ||
| 240 | 239 | (defun xwidget-webkit-show-named-element (xw element-name) | |
| 240 | "make named-element show. for instance an anchor." | ||
| 241 | ;;TODO | ||
| 242 | ;;this part figures out the Y coordinate of the element | ||
| 243 | (let ((y | ||
| 244 | (string-to-number (xwidget-webkit-execute-script-rv xw (format "document.getElementsByName('%s')[0].getBoundingClientRect().top" element-name) 0)))) | ||
| 245 | ;;now we need to tell emacs to scroll it into view. | ||
| 246 | ;;hmm. the "y" seems not to be in screen coords? | ||
| 247 | (message "scroll: %d" y) | ||
| 248 | (set-window-vscroll (selected-window) y t)) | ||
| 249 | ) | ||
| 241 | 250 | ||
| 242 | (defun xwidget-webkit-adjust-size-to-content () | 251 | (defun xwidget-webkit-adjust-size-to-content () |
| 243 | "Adjust webkit to content size." | 252 | "Adjust webkit to content size." |
| @@ -286,12 +295,17 @@ Argument H height." | |||
| 286 | (defun xwidget-webkit-current-url () | 295 | (defun xwidget-webkit-current-url () |
| 287 | "Get the webkit url. place it on kill ring." | 296 | "Get the webkit url. place it on kill ring." |
| 288 | (interactive) | 297 | (interactive) |
| 298 | (message "url: %s" (kill-new (xwidget-webkit-execute-script-rv (xwidget-webkit-current-session) "document.URL")))) | ||
| 299 | |||
| 300 | (defun xwidget-webkit-execute-script-rv (xw script &optional default) | ||
| 301 | "same as xwidget-webkit-execute-script but also wraps an ugly hack to return a value" | ||
| 289 | ;;notice the fugly "title" hack. it is needed because the webkit api doesnt support returning values. | 302 | ;;notice the fugly "title" hack. it is needed because the webkit api doesnt support returning values. |
| 290 | ;;TODO make a wrapper for the title hack so its easy to remove should webkit someday support JS return values | 303 | ;;this is a wrapper for the title hack so its easy to remove should webkit someday support JS return values |
| 291 | ;;or we find some other way to access the DOM | 304 | ;;or we find some other way to access the DOM |
| 292 | (xwidget-webkit-execute-script (xwidget-webkit-current-session) "document.title=document.URL;") | ||
| 293 | (message "url: %s" (kill-new (xwidget-webkit-get-title (xwidget-webkit-current-session))))) | ||
| 294 | 305 | ||
| 306 | (xwidget-webkit-execute-script xw (format "document.title='%s';" (if default default ""))) | ||
| 307 | (xwidget-webkit-execute-script xw (format "document.title=%s;" script)) | ||
| 308 | (xwidget-webkit-get-title xw)) | ||
| 295 | 309 | ||
| 296 | 310 | ||
| 297 | ;; use declare here? | 311 | ;; use declare here? |
diff --git a/src/ChangeLog b/src/ChangeLog index 2c72e97b7f7..07b0418b399 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-10-17 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (push_display_prop): Determine whether to record string | ||
| 4 | or buffer position by IT->string, not by IT->method. Allow | ||
| 5 | GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4) | ||
| 6 | (move_it_vertically_backward): Don't look for character position | ||
| 7 | immediately after the newline when in a continuation line. | ||
| 8 | (Bug#9771, part 1) | ||
| 9 | |||
| 1 | 2011-10-15 Martin Rudalics <rudalics@gmx.at> | 10 | 2011-10-15 Martin Rudalics <rudalics@gmx.at> |
| 2 | 11 | ||
| 3 | * window.c (coordinates_in_window): Rewrite and delabelize | 12 | * window.c (coordinates_in_window): Rewrite and delabelize |
diff --git a/src/xdisp.c b/src/xdisp.c index 09de9e4b539..1f4c98f8388 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8822,7 +8822,10 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8822 | reordering. We want to get to the character position | 8822 | reordering. We want to get to the character position |
| 8823 | that is immediately after the newline of the previous | 8823 | that is immediately after the newline of the previous |
| 8824 | line. */ | 8824 | line. */ |
| 8825 | if (it->bidi_p && IT_CHARPOS (*it) > BEGV | 8825 | if (it->bidi_p |
| 8826 | && !it->continuation_lines_width | ||
| 8827 | && !STRINGP (it->string) | ||
| 8828 | && IT_CHARPOS (*it) > BEGV | ||
| 8826 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') | 8829 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') |
| 8827 | { | 8830 | { |
| 8828 | EMACS_INT nl_pos = | 8831 | EMACS_INT nl_pos = |
| @@ -18532,9 +18535,10 @@ static int | |||
| 18532 | push_display_prop (struct it *it, Lisp_Object prop) | 18535 | push_display_prop (struct it *it, Lisp_Object prop) |
| 18533 | { | 18536 | { |
| 18534 | struct text_pos pos = | 18537 | struct text_pos pos = |
| 18535 | (it->method == GET_FROM_STRING) ? it->current.string_pos : it->current.pos; | 18538 | STRINGP (it->string) ? it->current.string_pos : it->current.pos; |
| 18536 | 18539 | ||
| 18537 | xassert (it->method == GET_FROM_BUFFER | 18540 | xassert (it->method == GET_FROM_BUFFER |
| 18541 | || it->method == GET_FROM_DISPLAY_VECTOR | ||
| 18538 | || it->method == GET_FROM_STRING); | 18542 | || it->method == GET_FROM_STRING); |
| 18539 | 18543 | ||
| 18540 | /* We need to save the current buffer/string position, so it will be | 18544 | /* We need to save the current buffer/string position, so it will be |