mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-12 22:40:46 -08:00
upstream
This commit is contained in:
commit
f8012bc3ef
9 changed files with 105 additions and 37 deletions
|
|
@ -1,3 +1,22 @@
|
|||
2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* shell.el (shell-completion-vars): Set pcomplete-arg-quote-list.
|
||||
* pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161).
|
||||
|
||||
* pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop.
|
||||
Mark obsolete.
|
||||
* shell.el (shell-parse-pcomplete-arguments): New function.
|
||||
(shell-completion-vars): Use it instead (bug#9160).
|
||||
|
||||
2011-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/sh-script.el (sh-maybe-here-document): Disable magic in
|
||||
strings and comments (bug#9333).
|
||||
|
||||
* emacs-lisp/debug.el (debug-arglist): New function.
|
||||
(debug-convert-byte-code): Use it. Handle lexical byte-codes.
|
||||
(debug-on-entry-1): Handle interpreted closures (bug#9120).
|
||||
|
||||
2011-08-22 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* progmodes/compile.el (compilation-mode-font-lock-keywords):
|
||||
|
|
@ -45,8 +64,8 @@
|
|||
(font-lock-default-fontify-region)
|
||||
(font-lock-default-unfontify-region): Add docstrings (Bug#8624).
|
||||
|
||||
* progmodes/compile.el (compilation-error-properties): Fix
|
||||
confusion between file struct and message struct (Bug#9319).
|
||||
* progmodes/compile.el (compilation-error-properties):
|
||||
Fix confusion between file struct and message struct (Bug#9319).
|
||||
(compilation-error-regexp-alist-alist): Fix 2011-05-09 change to
|
||||
`ant' regexp.
|
||||
|
||||
|
|
@ -140,8 +159,8 @@
|
|||
binding variables (bug#9298). Also clean up some unused
|
||||
autoloads.
|
||||
|
||||
* net/network-stream.el (network-stream-open-starttls): Support
|
||||
using starttls.el without using gnutls-cli.
|
||||
* net/network-stream.el (network-stream-open-starttls):
|
||||
Support using starttls.el without using gnutls-cli.
|
||||
|
||||
2011-08-17 Juri Linkov <juri@jurta.org>
|
||||
|
||||
|
|
|
|||
|
|
@ -778,6 +778,7 @@ Redefining FUNCTION also cancels it."
|
|||
(not (debugger-special-form-p symbol))))
|
||||
t nil nil (symbol-name fn)))
|
||||
(list (if (equal val "") fn (intern val)))))
|
||||
;; FIXME: Use advice.el.
|
||||
(when (debugger-special-form-p function)
|
||||
(error "Function %s is a special form" function))
|
||||
(if (or (symbolp (symbol-function function))
|
||||
|
|
@ -835,24 +836,30 @@ To specify a nil argument interactively, exit with an empty minibuffer."
|
|||
(message "Cancelling debug-on-entry for all functions")
|
||||
(mapcar 'cancel-debug-on-entry debug-function-list)))
|
||||
|
||||
(defun debug-arglist (definition)
|
||||
;; FIXME: copied from ad-arglist.
|
||||
"Return the argument list of DEFINITION."
|
||||
(require 'help-fns)
|
||||
(help-function-arglist definition 'preserve-names))
|
||||
|
||||
(defun debug-convert-byte-code (function)
|
||||
(let* ((defn (symbol-function function))
|
||||
(macro (eq (car-safe defn) 'macro)))
|
||||
(when macro (setq defn (cdr defn)))
|
||||
(unless (consp defn)
|
||||
;; Assume a compiled code object.
|
||||
(let* ((contents (append defn nil))
|
||||
(when (byte-code-function-p defn)
|
||||
(let* ((args (debug-arglist defn))
|
||||
(body
|
||||
(list (list 'byte-code (nth 1 contents)
|
||||
(nth 2 contents) (nth 3 contents)))))
|
||||
(if (nthcdr 5 contents)
|
||||
(setq body (cons (list 'interactive (nth 5 contents)) body)))
|
||||
(if (nth 4 contents)
|
||||
`((,(if (memq '&rest args) #'apply #'funcall)
|
||||
,defn
|
||||
,@(remq '&rest (remq '&optional args))))))
|
||||
(if (> (length defn) 5)
|
||||
(push `(interactive ,(aref defn 5)) body))
|
||||
(if (aref defn 4)
|
||||
;; Use `documentation' here, to get the actual string,
|
||||
;; in case the compiled function has a reference
|
||||
;; to the .elc file.
|
||||
(setq body (cons (documentation function) body)))
|
||||
(setq defn (cons 'lambda (cons (car contents) body))))
|
||||
(setq defn `(closure (t) ,args ,@body)))
|
||||
(when macro (setq defn (cons 'macro defn)))
|
||||
(fset function defn))))
|
||||
|
||||
|
|
@ -861,11 +868,12 @@ To specify a nil argument interactively, exit with an empty minibuffer."
|
|||
(tail defn))
|
||||
(when (eq (car-safe tail) 'macro)
|
||||
(setq tail (cdr tail)))
|
||||
(if (not (eq (car-safe tail) 'lambda))
|
||||
(if (not (memq (car-safe tail) '(closure lambda)))
|
||||
;; Only signal an error when we try to set debug-on-entry.
|
||||
;; When we try to clear debug-on-entry, we are now done.
|
||||
(when flag
|
||||
(error "%s is not a user-defined Lisp function" function))
|
||||
(if (eq (car tail) 'closure) (setq tail (cdr tail)))
|
||||
(setq tail (cdr tail))
|
||||
;; Skip the docstring.
|
||||
(when (and (stringp (cadr tail)) (cddr tail))
|
||||
|
|
@ -875,9 +883,9 @@ To specify a nil argument interactively, exit with an empty minibuffer."
|
|||
(setq tail (cdr tail)))
|
||||
(unless (eq flag (equal (cadr tail) '(implement-debug-on-entry)))
|
||||
;; Add/remove debug statement as needed.
|
||||
(if flag
|
||||
(setcdr tail (cons '(implement-debug-on-entry) (cdr tail)))
|
||||
(setcdr tail (cddr tail)))))
|
||||
(setcdr tail (if flag
|
||||
(cons '(implement-debug-on-entry) (cdr tail))
|
||||
(cddr tail)))))
|
||||
defn))
|
||||
|
||||
(defun debugger-list-functions ()
|
||||
|
|
|
|||
|
|
@ -811,15 +811,19 @@ this is `comint-dynamic-complete-functions'."
|
|||
(while (< (point) end)
|
||||
(skip-chars-forward " \t\n")
|
||||
(push (point) begins)
|
||||
(let ((skip t))
|
||||
(while skip
|
||||
(skip-chars-forward "^ \t\n")
|
||||
(if (eq (char-before) ?\\)
|
||||
(skip-chars-forward " \t\n")
|
||||
(setq skip nil))))
|
||||
(while
|
||||
(progn
|
||||
(skip-chars-forward "^ \t\n\\")
|
||||
(when (eq (char-after) ?\\)
|
||||
(forward-char 1)
|
||||
(unless (eolp)
|
||||
(forward-char 1)
|
||||
t))))
|
||||
(push (buffer-substring-no-properties (car begins) (point))
|
||||
args))
|
||||
(cons (nreverse args) (nreverse begins)))))
|
||||
(make-obsolete 'pcomplete-parse-comint-arguments
|
||||
'comint-parse-pcomplete-arguments "24.1")
|
||||
|
||||
(defun pcomplete-parse-arguments (&optional expand-p)
|
||||
"Parse the command line arguments. Most completions need this info."
|
||||
|
|
@ -879,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'."
|
|||
(or (run-hook-with-args-until-success
|
||||
'pcomplete-quote-arg-hook filename index)
|
||||
(when (memq c pcomplete-arg-quote-list)
|
||||
(string "\\" c))
|
||||
(string ?\\ c))
|
||||
(char-to-string c))
|
||||
(setq index (1+ index))))
|
||||
filename
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ This is buffer-local in every such buffer.")
|
|||
(define-key map "\C-c+" 'sh-add)
|
||||
(define-key map "\C-\M-x" 'sh-execute-region)
|
||||
(define-key map "\C-c\C-x" 'executable-interpret)
|
||||
;; FIXME: Use post-self-insert-hook.
|
||||
(define-key map "<" 'sh-maybe-here-document)
|
||||
(define-key map "(" 'skeleton-pair-insert-maybe)
|
||||
(define-key map "{" 'skeleton-pair-insert-maybe)
|
||||
|
|
@ -3659,6 +3660,7 @@ The document is bounded by `sh-here-document-word'."
|
|||
(save-excursion
|
||||
(backward-char 2)
|
||||
(sh-quoted-p))
|
||||
(nth 8 (syntax-ppss))
|
||||
(let ((tabs (if (string-match "\\`-" sh-here-document-word)
|
||||
(make-string (/ (current-indentation) tab-width) ?\t)
|
||||
""))
|
||||
|
|
|
|||
|
|
@ -383,6 +383,21 @@ to `dirtrack-mode'."
|
|||
:group 'shell
|
||||
:type '(choice (const nil) regexp))
|
||||
|
||||
(defun shell-parse-pcomplete-arguments ()
|
||||
"Parse whitespace separated arguments in the current region."
|
||||
(let ((begin (save-excursion (shell-backward-command 1) (point)))
|
||||
(end (point))
|
||||
begins args)
|
||||
(save-excursion
|
||||
(goto-char begin)
|
||||
(while (< (point) end)
|
||||
(skip-chars-forward " \t\n")
|
||||
(push (point) begins)
|
||||
(looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?")
|
||||
(goto-char (match-end 0))
|
||||
(push (buffer-substring-no-properties (car begins) (point))
|
||||
args))
|
||||
(cons (nreverse args) (nreverse begins)))))
|
||||
|
||||
(defun shell-completion-vars ()
|
||||
"Setup completion vars for `shell-mode' and `read-shell-command'."
|
||||
|
|
@ -396,8 +411,9 @@ to `dirtrack-mode'."
|
|||
(set (make-local-variable 'comint-dynamic-complete-functions)
|
||||
shell-dynamic-complete-functions)
|
||||
(set (make-local-variable 'pcomplete-parse-arguments-function)
|
||||
;; FIXME: This function should be moved to shell.el.
|
||||
#'pcomplete-parse-comint-arguments)
|
||||
#'shell-parse-pcomplete-arguments)
|
||||
(set (make-local-variable 'pcomplete-arg-quote-list)
|
||||
(append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil))
|
||||
(set (make-local-variable 'pcomplete-termination-string)
|
||||
(cond ((not comint-completion-addsuffix) "")
|
||||
((stringp comint-completion-addsuffix)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,18 @@
|
|||
2011-08-23 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
|
||||
instead of CHAR_TO_BYTE. Fixes a crash when a completion
|
||||
candidate is selected by the mouse, and that candidate has a
|
||||
composed character under the mouse.
|
||||
|
||||
* xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
|
||||
coordinates reported by pos-visible-in-window-p for a composed
|
||||
character in column zero.
|
||||
|
||||
2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* cmds.c (Fself_insert_command): Mention post-self-insert-hook.
|
||||
|
||||
2011-08-22 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
|
||||
|
|
@ -45,8 +60,8 @@
|
|||
2011-08-17 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* eval.c (internal_condition_case, internal_condition_case_1)
|
||||
(internal_condition_case_2, internal_condition_case_n): Remove
|
||||
unnecessary aborts (Bug#9081).
|
||||
(internal_condition_case_2, internal_condition_case_n):
|
||||
Remove unnecessary aborts (Bug#9081).
|
||||
|
||||
2011-08-17 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
|
|
@ -69,8 +84,8 @@
|
|||
* unexcw.c ( __malloc_initialized): Declare external variable.
|
||||
(fixup_executable): Force the dumped emacs to reinitialize malloc.
|
||||
|
||||
* gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New
|
||||
variables.
|
||||
* gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
|
||||
New variables.
|
||||
(malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
|
||||
dumped emacs.
|
||||
(_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
|
||||
|
|
@ -172,8 +187,8 @@
|
|||
* xdisp.c (iterate_out_of_display_property): xassert that
|
||||
IT->position is set to within IT->object's boundaries. Break from
|
||||
the loop as soon as EOB is reached; avoids infloops in redisplay
|
||||
when IT->position is set up wrongly due to some bug. Set
|
||||
IT->current to match the bidi iterator unconditionally.
|
||||
when IT->position is set up wrongly due to some bug.
|
||||
Set IT->current to match the bidi iterator unconditionally.
|
||||
(push_display_prop): Allow GET_FROM_STRING as IT->method on
|
||||
entry. Force push_it to save on the stack the current
|
||||
buffer/string position, to be restored by pop_it. Fix flags in
|
||||
|
|
@ -196,8 +211,8 @@
|
|||
2011-08-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (forward_to_next_line_start): Allow to use the
|
||||
no-display-properties-and-no-overlays under bidi display. Set
|
||||
disp_pos in the bidi iterator to avoid searches for display
|
||||
no-display-properties-and-no-overlays under bidi display.
|
||||
Set disp_pos in the bidi iterator to avoid searches for display
|
||||
properties and overlays.
|
||||
|
||||
2011-08-08 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
|
@ -235,7 +250,7 @@
|
|||
* bidi.c <bidi_cache_total_alloc>: Now static.
|
||||
(bidi_initialize): Initialize bidi_cache_total_alloc.
|
||||
|
||||
*xdisp.c (display_line): Release buffer allocated for shelved bidi
|
||||
* xdisp.c (display_line): Release buffer allocated for shelved bidi
|
||||
cache. (Bug#9221)
|
||||
|
||||
* bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
|
||||
|
|
|
|||
|
|
@ -271,7 +271,8 @@ Whichever character you type to run this command is inserted.
|
|||
Before insertion, `expand-abbrev' is executed if the inserted character does
|
||||
not have word syntax and the previous character in the buffer does.
|
||||
After insertion, the value of `auto-fill-function' is called if the
|
||||
`auto-fill-chars' table has a non-nil value for the inserted character. */)
|
||||
`auto-fill-chars' table has a non-nil value for the inserted character.
|
||||
At the end, it runs `post-self-insert-hook'. */)
|
||||
(Lisp_Object n)
|
||||
{
|
||||
int remove_boundary = 1;
|
||||
|
|
|
|||
|
|
@ -5314,7 +5314,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
|
|||
if (STRINGP (it.string))
|
||||
BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos));
|
||||
else
|
||||
BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos));
|
||||
BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer),
|
||||
CHARPOS (pos->pos));
|
||||
}
|
||||
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
|
|
|
|||
|
|
@ -24292,6 +24292,8 @@ x_produce_glyphs (struct it *it)
|
|||
Lisp_Object gstring;
|
||||
struct font_metrics metrics;
|
||||
|
||||
it->nglyphs = 1;
|
||||
|
||||
gstring = composition_gstring_from_id (it->cmp_it.id);
|
||||
it->pixel_width
|
||||
= composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue