Now on revision 110436. ------------------------------------------------------------ revno: 110436 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-10-07 23:58:36 -0700 message: Fix ChangeLog typo diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-07 18:23:50 +0000 +++ lisp/cedet/ChangeLog 2012-10-08 06:58:36 +0000 @@ -3,15 +3,11 @@ * semantic/wisent/python.el (semantic-ctxt-current-function) (semantic-ctxt-current-assignment): New overrides, simply returning nil. The defaults do not work correctly and can send - the parser in an inifinite loop (bug#12458). - -2012-10-07 David Engster + the parser in an infinite loop (bug#12458). * semantic/ede-grammar.el (project-compile-target): Fix grammar compilation after introduction of %provide statement. -2012-10-07 David Engster - * semantic.el (semantic-new-buffer-setup-functions): Remove setup function for `f90-mode', since the parser only exists upstream. ------------------------------------------------------------ revno: 110435 committer: martin rudalics branch nick: trunk timestamp: Mon 2012-10-08 08:42:29 +0200 message: In edebug-pop-to-buffer don't try to split the minibuffer window (Bug#10851). * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't try to split the minibuffer window (Bug#10851). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-08 05:19:15 +0000 +++ lisp/ChangeLog 2012-10-08 06:42:29 +0000 @@ -1,3 +1,8 @@ +2012-10-08 Martin Rudalics + + * emacs-lisp/edebug.el (edebug-pop-to-buffer): Don't try to split + the minibuffer window (Bug#10851). + 2012-10-08 Fabián Ezequiel Gallina Enhancements on forward-sexp movement. === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2012-10-04 12:56:14 +0000 +++ lisp/emacs-lisp/edebug.el 2012-10-08 06:42:29 +0000 @@ -371,7 +371,7 @@ ((get-buffer-window buffer 0)) ((one-window-p 'nomini) ;; When there's one window only, split it. - (split-window)) + (split-window (minibuffer-selected-window))) ((let ((trace-window (get-buffer-window edebug-trace-buffer))) (catch 'found (dolist (elt (window-list nil 'nomini)) @@ -382,7 +382,7 @@ (throw 'found elt)))))) ;; All windows are dedicated or show `edebug-trace-buffer', split ;; selected one. - (t (split-window)))) + (t (split-window (minibuffer-selected-window))))) (set-window-buffer window buffer) (select-window window) (set-window-hscroll window 0)) ;; should this be?? ------------------------------------------------------------ revno: 110434 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Mon 2012-10-08 02:19:15 -0300 message: Enhancements on forward-sexp movement. * progmodes/python.el (python-nav-beginning-of-statement) (python-nav-end-of-statement): Return point-marker. (python-nav-forward-sexp): lisp-like forward-sexp behavior. (python-info-current-symbol) (python-info-statement-starts-block-p): Rename from python-info-beginning-of-block-p. (python-info-statement-ends-block-p): Rename from python-info-end-of-block-p. (python-info-beginning-of-statement-p) (python-info-end-of-statement-p) (python-info-beginning-of-block-p, python-info-end-of-block-p): New functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-08 00:12:26 +0000 +++ lisp/ChangeLog 2012-10-08 05:19:15 +0000 @@ -1,3 +1,19 @@ +2012-10-08 Fabián Ezequiel Gallina + + Enhancements on forward-sexp movement. + * progmodes/python.el (python-nav-beginning-of-statement) + (python-nav-end-of-statement): Return point-marker. + (python-nav-forward-sexp): lisp-like forward-sexp behavior. + (python-info-current-symbol) + (python-info-statement-starts-block-p): Rename from + python-info-beginning-of-block-p. + (python-info-statement-ends-block-p): Rename from + python-info-end-of-block-p. + (python-info-beginning-of-statement-p) + (python-info-end-of-statement-p) + (python-info-beginning-of-block-p, python-info-end-of-block-p): + New functions. + 2012-10-08 Stefan Monnier * comint.el (comint-preinput-scroll-to-bottom): Preserve the === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-10-07 19:37:37 +0000 +++ lisp/progmodes/python.el 2012-10-08 05:19:15 +0000 @@ -1169,7 +1169,8 @@ (python-info-line-ends-backslash-p)) (python-syntax-context 'string) (python-syntax-context 'paren)) - (forward-line -1))))) + (forward-line -1)))) + (point-marker)) (defun python-nav-end-of-statement () "Move to end of current statement." @@ -1180,7 +1181,8 @@ (python-info-line-ends-backslash-p) (python-syntax-context 'string) (python-syntax-context 'paren)) - (forward-line 1))))) + (forward-line 1)))) + (point-marker)) (defun python-nav-backward-statement (&optional arg) "Move backward to previous statement. @@ -1295,151 +1297,104 @@ (while (and (funcall search-fn paren-regexp nil t) (python-syntax-context 'paren))))))) -(defun python-nav--forward-sexp () - "Move to forward sexp." - (case (python-syntax-context-type) - (string - ;; Inside of a string, get out of it. - (while (and (re-search-forward "[\"']" nil t) - (python-syntax-context 'string)))) - (comment - ;; Inside of a comment, just move forward. - (python-util-forward-comment)) - (paren - (python-nav-lisp-forward-sexp-safe 1)) - (t - (if (and (not (eobp)) - (= (syntax-class (syntax-after (point))) 4)) - ;; Looking an open-paren - (python-nav-lisp-forward-sexp-safe 1) - (let ((block-starting-pos - (save-excursion (python-nav-beginning-of-block))) - (block-ending-pos - (save-excursion (python-nav-end-of-block))) - (next-block-starting-pos - (save-excursion (python-nav-forward-block)))) - (cond - ((not block-starting-pos) - ;; Not inside a block, move to closest one. - (and next-block-starting-pos - (goto-char next-block-starting-pos))) - ((= (point) block-starting-pos) - ;; Point is at beginning of block - (if (and next-block-starting-pos - (< next-block-starting-pos block-ending-pos)) - ;; Beginning of next block is closer than current's - ;; end, move to it. - (goto-char next-block-starting-pos) - (goto-char block-ending-pos))) - ((= block-ending-pos (point)) - ;; Point is at end of current block - (let ((parent-block-end-pos - (save-excursion - (python-util-forward-comment) - (python-nav-beginning-of-block) - (python-nav-end-of-block)))) - (if (and parent-block-end-pos - (or (not next-block-starting-pos) - (> next-block-starting-pos parent-block-end-pos))) - ;; If the parent block ends before next block - ;; starts move to it. - (goto-char parent-block-end-pos) - (and next-block-starting-pos - (goto-char next-block-starting-pos))))) - (t (python-nav-end-of-block)))))))) +(defun python-nav--forward-sexp (&optional dir) + "Move to forward sexp. +With positive Optional argument DIR direction move forward, else +backwards." + (setq dir (or dir 1)) + (unless (= dir 0) + (let* ((forward-p (if (> dir 0) + (and (setq dir 1) t) + (and (setq dir -1) nil))) + (re-search-fn (if forward-p + 're-search-forward + 're-search-backward)) + (context-type (python-syntax-context-type))) + (cond + ((eq context-type 'string) + ;; Inside of a string, get out of it. + (while (and (funcall re-search-fn "[\"']" nil t) + (python-syntax-context 'string)))) + ((eq context-type 'comment) + ;; Inside of a comment, just move forward. + (python-util-forward-comment dir)) + ((or (eq context-type 'paren) + (and forward-p (looking-at (python-rx open-paren))) + (and (not forward-p) + (eq (syntax-class (syntax-after (1- (point)))) + (car (string-to-syntax ")"))))) + ;; Inside a paren or looking at it, lisp knows what to do. + (python-nav-lisp-forward-sexp-safe dir)) + (t + ;; This part handles the lispy feel of + ;; `python-nav-forward-sexp'. Knowing everything about the + ;; current context and the context of the next sexp tries to + ;; follow the lisp sexp motion commands in a symmetric manner. + (let* ((context + (cond + ((python-info-beginning-of-block-p) 'block-start) + ((python-info-end-of-block-p) 'block-end) + ((python-info-beginning-of-statement-p) 'statement-start) + ((python-info-end-of-statement-p) 'statement-end))) + (next-sexp-pos + (save-excursion + (python-nav-lisp-forward-sexp-safe dir) + (point))) + (next-sexp-context + (save-excursion + (goto-char next-sexp-pos) + (cond + ((python-info-beginning-of-block-p) 'block-start) + ((python-info-end-of-block-p) 'block-end) + ((python-info-beginning-of-statement-p) 'statement-start) + ((python-info-end-of-statement-p) 'statement-end) + ((python-info-statement-starts-block-p) 'starts-block) + ((python-info-statement-ends-block-p) 'ends-block))))) + (if forward-p + (cond ((and (not (eobp)) + (python-info-current-line-empty-p)) + (python-util-forward-comment dir) + (python-nav--forward-sexp dir)) + ((eq context 'block-start) + (python-nav-end-of-block)) + ((eq context 'statement-start) + (python-nav-end-of-statement)) + ((and (memq context '(statement-end block-end)) + (eq next-sexp-context 'ends-block)) + (goto-char next-sexp-pos) + (python-nav-end-of-block)) + ((and (memq context '(statement-end block-end)) + (eq next-sexp-context 'starts-block)) + (goto-char next-sexp-pos) + (python-nav-end-of-block)) + ((memq context '(statement-end block-end)) + (goto-char next-sexp-pos) + (python-nav-end-of-statement)) + (t (goto-char next-sexp-pos))) + (cond ((and (not (bobp)) + (python-info-current-line-empty-p)) + (python-util-forward-comment dir) + (python-nav--forward-sexp dir)) + ((eq context 'block-end) + (python-nav-beginning-of-block)) + ((eq context 'statement-end) + (python-nav-beginning-of-statement)) + ((and (memq context '(statement-start block-start)) + (eq next-sexp-context 'starts-block)) + (goto-char next-sexp-pos) + (python-nav-beginning-of-block)) + ((and (memq context '(statement-start block-start)) + (eq next-sexp-context 'ends-block)) + (goto-char next-sexp-pos) + (python-nav-beginning-of-block)) + ((memq context '(statement-start block-start)) + (goto-char next-sexp-pos) + (python-nav-beginning-of-statement)) + (t (goto-char next-sexp-pos)))))))))) (defun python-nav--backward-sexp () "Move to backward sexp." - (case (python-syntax-context-type) - (string - ;; Inside of a string, get out of it. - (while (and (re-search-backward "[\"']" nil t) - (python-syntax-context 'string)))) - (comment - ;; Inside of a comment, just move backward. - (python-util-forward-comment -1)) - (paren - ;; Handle parens like we are lisp. - (python-nav-lisp-forward-sexp-safe -1)) - (t - (let* ((block-starting-pos - (save-excursion (python-nav-beginning-of-block))) - (block-ending-pos - (save-excursion (python-nav-end-of-block))) - (prev-block-ending-pos - (save-excursion (when (python-nav-backward-block) - (python-nav-end-of-block)))) - (prev-block-parent-ending-pos - (save-excursion - (when prev-block-ending-pos - (goto-char prev-block-ending-pos) - (python-util-forward-comment) - (python-nav-beginning-of-block) - (python-nav-end-of-block))))) - (if (and (not (bobp)) - (= (syntax-class (syntax-after (1- (point)))) 5)) - ;; Char before point is a paren closing char, handle it - ;; like we are lisp. - (python-nav-lisp-forward-sexp-safe -1) - (cond - ((not block-ending-pos) - ;; Not in and ending pos, move to end of previous block. - (and (python-nav-backward-block) - (python-nav-end-of-block))) - ((= (point) block-ending-pos) - ;; In ending pos, we need to search backwards for the - ;; closest point looking the list of candidates from here. - (let ((candidates)) - (dolist (name - '(prev-block-parent-ending-pos - prev-block-ending-pos - block-ending-pos - block-starting-pos)) - (when (and (symbol-value name) - (< (symbol-value name) (point))) - (add-to-list 'candidates (symbol-value name)))) - (goto-char (apply 'max candidates)))) - ((> (point) block-ending-pos) - ;; After an ending position, move to it. - (goto-char block-ending-pos)) - ((= (point) block-starting-pos) - ;; On a block starting position. - (if (not (> (point) (or prev-block-ending-pos (point)))) - ;; Point is after the end position of the block that - ;; wraps the current one, just move a block backward. - (python-nav-backward-block) - ;; If we got here we are facing a case like this one: - ;; - ;; try: - ;; return here() - ;; except Exception as e: - ;; - ;; Where point is on the "except" and must move to the - ;; end of "here()". - (goto-char prev-block-ending-pos) - (let ((parent-block-ending-pos - (save-excursion - (python-nav-forward-sexp) - (and (not (looking-at (python-rx block-start))) - (point))))) - (when (and parent-block-ending-pos - (> parent-block-ending-pos prev-block-ending-pos)) - ;; If we got here we are facing a case like this one: - ;; - ;; except ImportError: - ;; if predicate(): - ;; processing() - ;; here() - ;; except AttributeError: - ;; - ;; Where point is on the "except" and must move to - ;; the end of "here()". Without this extra step we'd - ;; just get to the end of processing(). - (goto-char parent-block-ending-pos))))) - (t - (if (and prev-block-ending-pos (< prev-block-ending-pos (point))) - (goto-char prev-block-ending-pos) - (python-nav-beginning-of-block))))))))) + (python-nav--forward-sexp -1)) (defun python-nav-forward-sexp (&optional arg) "Move forward across one block of code. @@ -2891,12 +2846,43 @@ ".") ".") name))))))) -(defsubst python-info-beginning-of-block-statement-p () +(defun python-info-statement-starts-block-p () "Return non-nil if current statement opens a block." (save-excursion (python-nav-beginning-of-statement) (looking-at (python-rx block-start)))) +(defun python-info-statement-ends-block-p () + "Return non-nil if point is at end of block." + (let ((end-of-block-pos (save-excursion + (python-nav-end-of-block))) + (end-of-statement-pos (save-excursion + (python-nav-end-of-statement)))) + (and end-of-block-pos end-of-statement-pos + (= end-of-block-pos end-of-statement-pos)))) + +(defun python-info-beginning-of-statement-p () + "Return non-nil if point is at beginning of statement." + (= (point) (save-excursion + (python-nav-beginning-of-statement) + (point)))) + +(defun python-info-end-of-statement-p () + "Return non-nil if point is at end of statement." + (= (point) (save-excursion + (python-nav-end-of-statement) + (point)))) + +(defun python-info-beginning-of-block-p () + "Return non-nil if point is at beginning of block." + (and (python-info-beginning-of-statement-p) + (python-info-statement-starts-block-p))) + +(defun python-info-end-of-block-p () + "Return non-nil if point is at end of block." + (and (python-info-end-of-statement-p) + (python-info-statement-ends-block-p))) + (defun python-info-closing-block () "Return the point of the block the current line closes." (let ((closing-word (save-excursion ------------------------------------------------------------ revno: 110433 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-10-07 20:12:26 -0400 message: * lisp/comint.el (comint-preinput-scroll-to-bottom): Preserve the frame-selected-windows. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 19:48:02 +0000 +++ lisp/ChangeLog 2012-10-08 00:12:26 +0000 @@ -1,3 +1,8 @@ +2012-10-08 Stefan Monnier + + * comint.el (comint-preinput-scroll-to-bottom): Preserve the + frame-selected-windows. + 2012-10-07 Stefan Monnier * subr.el (read-passwd-map): Don't use `defconst' (bug#12597). === modified file 'lisp/comint.el' --- lisp/comint.el 2012-10-07 15:15:16 +0000 +++ lisp/comint.el 2012-10-08 00:12:26 +0000 @@ -2088,8 +2088,7 @@ (if (and comint-scroll-to-bottom-on-input (memq this-command '(self-insert-command comint-magic-space yank hilit-yank))) - (let* ((selected (selected-window)) - (current (current-buffer)) + (let* ((current (current-buffer)) (process (get-buffer-process current)) (scroll comint-scroll-to-bottom-on-input)) (if (and process (< (point) (process-mark process))) @@ -2099,10 +2098,8 @@ (lambda (window) (if (and (eq (window-buffer window) current) (or (eq scroll t) (eq scroll 'all))) - (progn - (select-window window) - (goto-char (point-max)) - (select-window selected)))) + (with-selected-window window + (goto-char (point-max))))) nil t)))))) (defvar follow-mode) ------------------------------------------------------------ revno: 110432 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12597 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-10-07 15:48:02 -0400 message: * lisp/subr.el (read-passwd-map): Don't use `defconst'. (read-passwd): Remove a few more potential sources of leaks. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 19:37:37 +0000 +++ lisp/ChangeLog 2012-10-07 19:48:02 +0000 @@ -1,7 +1,12 @@ +2012-10-07 Stefan Monnier + + * subr.el (read-passwd-map): Don't use `defconst' (bug#12597). + (read-passwd): Remove a few more potential sources of leaks. + 2012-10-07 Fabián Ezequiel Gallina * progmodes/python.el (inferior-python-mode) - (python-shell-make-comint): Fixed initialization of local + (python-shell-make-comint): Fix initialization of local variables copied from parent buffer. 2012-10-07 Jan Djärv === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2012-08-15 16:29:11 +0000 +++ lisp/newcomment.el 2012-10-07 19:48:02 +0000 @@ -327,8 +327,8 @@ ;;;###autoload (defun comment-normalize-vars (&optional noerror) "Check and setup the variables needed by other commenting functions. -Functions autoloaded from newcomment.el, being entry points, should call -this function before any other, so the rest of the code can assume that +Any command calling functions from newcomment.el, being entry points, should +call this function before any other, so the rest of the code can assume that the variables are properly set." (unless (and (not comment-start) noerror) (unless comment-start === modified file 'lisp/subr.el' --- lisp/subr.el 2012-10-06 17:29:15 +0000 +++ lisp/subr.el 2012-10-07 19:48:02 +0000 @@ -2143,7 +2143,9 @@ (setq first nil)) code)) -(defconst read-passwd-map +(defvar read-passwd-map + ;; BEWARE: `defconst' would purecopy it, breaking the sharing with + ;; minibuffer-local-map along the way! (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570 @@ -2186,7 +2188,9 @@ (lambda () (setq minibuf (current-buffer)) ;; Turn off electricity. - (set (make-local-variable 'post-self-insert-hook) nil) + (setq-local post-self-insert-hook nil) + (setq-local buffer-undo-list t) + (setq-local select-active-regions nil) (use-local-map read-passwd-map) (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect ------------------------------------------------------------ revno: 110431 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sun 2012-10-07 16:37:37 -0300 message: * progmodes/python.el (inferior-python-mode) (python-shell-make-comint): Fixed initialization of local variables copied from parent buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 17:47:41 +0000 +++ lisp/ChangeLog 2012-10-07 19:37:37 +0000 @@ -1,3 +1,9 @@ +2012-10-07 Fabián Ezequiel Gallina + + * progmodes/python.el (inferior-python-mode) + (python-shell-make-comint): Fixed initialization of local + variables copied from parent buffer. + 2012-10-07 Jan Djärv * term/ns-win.el (ns-read-file-name): Update declaration to match === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-10-07 16:13:52 +0000 +++ lisp/progmodes/python.el 2012-10-07 19:37:37 +0000 @@ -1652,6 +1652,8 @@ OUTPUT is a string with the contents of the buffer." (ansi-color-filter-apply output)) +(defvar python-shell--parent-buffer nil) + (define-derived-mode inferior-python-mode comint-mode "Inferior Python" "Major mode for Python inferior process. Runs a Python interpreter as a subprocess of Emacs, with Python @@ -1674,6 +1676,12 @@ variable. \(Type \\[describe-mode] in the process buffer for a list of commands.)" + (and python-shell--parent-buffer + (python-util-clone-local-variables python-shell--parent-buffer)) + (setq comint-prompt-regexp (format "^\\(?:%s\\|%s\\|%s\\)" + python-shell-prompt-regexp + python-shell-prompt-block-regexp + python-shell-prompt-pdb-regexp)) (set-syntax-table python-mode-syntax-table) (setq mode-line-process '(":%s")) (make-local-variable 'comint-output-filter-functions) @@ -1721,15 +1729,10 @@ (let* ((cmdlist (split-string-and-unquote cmd)) (buffer (apply #'make-comint-in-buffer proc-name proc-buffer-name (car cmdlist) nil (cdr cmdlist))) - (current-buffer (current-buffer)) + (python-shell--parent-buffer (current-buffer)) (process (get-buffer-process buffer))) (with-current-buffer buffer - (inferior-python-mode) - (python-util-clone-local-variables current-buffer) - (setq comint-prompt-regexp (format "^\\(?:%s\\|%s\\|%s\\)" - python-shell-prompt-regexp - python-shell-prompt-block-regexp - python-shell-prompt-pdb-regexp))) + (inferior-python-mode)) (accept-process-output process) (and pop (pop-to-buffer buffer t)) (and internal (set-process-query-on-exit-flag process nil)))) ------------------------------------------------------------ revno: 110430 fixes bug: http://debbugs.gnu.org/12402 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-10-07 20:33:10 +0200 message: Don't abort when ralloc.c:relinquish cannot return a heap to the system. src/ralloc.c (relinquish): If a heap is ready to be relinquished, but it still has blocs in it, don't return it to the system, instead of aborting. (Bug#12402) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-07 16:54:43 +0000 +++ src/ChangeLog 2012-10-07 18:33:10 +0000 @@ -1,3 +1,9 @@ +2012-10-07 Eli Zaretskii + + * ralloc.c (relinquish): If a heap is ready to be relinquished, + but it still has blocs in it, don't return it to the system, + instead of aborting. (Bug#12402) + 2012-10-07 Jan Djärv * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506). === modified file 'src/ralloc.c' --- src/ralloc.c 2012-10-01 11:37:37 +0000 +++ src/ralloc.c 2012-10-07 18:33:10 +0000 @@ -327,10 +327,11 @@ if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess) { - /* This heap should have no blocs in it. */ + /* This heap should have no blocs in it. If it does, we + cannot return it to the system. */ if (last_heap->first_bloc != NIL_BLOC || last_heap->last_bloc != NIL_BLOC) - emacs_abort (); + return; /* Return the last heap, with its header, to the system. */ excess = (char *)last_heap->end - (char *)last_heap->start; ------------------------------------------------------------ revno: 110429 [merge] committer: David Engster branch nick: trunk timestamp: Sun 2012-10-07 20:29:07 +0200 message: Merge changes from CEDET upstream. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-06 20:30:26 +0000 +++ lisp/cedet/ChangeLog 2012-10-07 18:23:50 +0000 @@ -1,3 +1,20 @@ +2012-10-07 David Engster + + * semantic/wisent/python.el (semantic-ctxt-current-function) + (semantic-ctxt-current-assignment): New overrides, simply + returning nil. The defaults do not work correctly and can send + the parser in an inifinite loop (bug#12458). + +2012-10-07 David Engster + + * semantic/ede-grammar.el (project-compile-target): Fix grammar + compilation after introduction of %provide statement. + +2012-10-07 David Engster + + * semantic.el (semantic-new-buffer-setup-functions): Remove setup + function for `f90-mode', since the parser only exists upstream. + 2012-10-06 Glenn Morris * semantic/complete.el (semantic-displayor-tooltip-max-tags): Doc fix. === modified file 'lisp/cedet/semantic.el' --- lisp/cedet/semantic.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic.el 2012-10-07 18:12:46 +0000 @@ -273,7 +273,6 @@ (js-mode . wisent-javascript-setup-parser) (python-mode . wisent-python-default-setup) (scheme-mode . semantic-default-scheme-setup) - (f90-mode . semantic-default-f90-setup) (srecode-template-mode . srecode-template-setup-parser) (texinfo-mode . semantic-default-texi-setup) (makefile-automake-mode . semantic-default-make-setup) === modified file 'lisp/cedet/semantic/ede-grammar.el' --- lisp/cedet/semantic/ede-grammar.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/ede-grammar.el 2012-10-07 18:19:58 +0000 @@ -143,12 +143,10 @@ (utd 0)) (mapc (lambda (src) (with-current-buffer (find-file-noselect src) - (save-excursion - (semantic-grammar-create-package)) - ;; After compile, the current buffer is the compiled grammar. - ;; Save and compile it. - (save-buffer) - (let* ((src (buffer-file-name)) + (let* ((package (semantic-grammar-create-package)) + (fname (progn (string-match ".*/\\(.+\\.el\\)" package) + (match-string 1 package))) + (src (with-current-buffer fname (buffer-file-name))) (csrc (concat (file-name-sans-extension src) ".elc"))) (if (< emacs-major-version 24) ;; Does not have `byte-recompile-file' === modified file 'lisp/cedet/semantic/wisent/python.el' --- lisp/cedet/semantic/wisent/python.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/wisent/python.el 2012-10-07 18:23:50 +0000 @@ -478,6 +478,22 @@ (let ((name (semantic-tag-name tag))) (concat (mapconcat 'identity (split-string name "\\.") "/") ".py"))) +;; Override ctxt-current-function/assignment defaults, since they do +;; not work properly with Python code, even leading to endless loops +;; (see bug #xxxxx). +(define-mode-local-override semantic-ctxt-current-function python-mode (&optional point) + "Return the current function call the cursor is in at POINT. +The function returned is the one accepting the arguments that +the cursor is currently in. It will not return function symbol if the +cursor is on the text representing that function." + nil) + +(define-mode-local-override semantic-ctxt-current-assignment python-mode (&optional point) + "Return the current assignment near the cursor at POINT. +Return a list as per `semantic-ctxt-current-symbol'. +Return nil if there is nothing relevant." + nil) + ;;; Enable Semantic in `python-mode'. ;; ------------------------------------------------------------ revno: 110428 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-07 19:47:41 +0200 message: * lisp/term/ns-win.el (ns-read-file-name): Update declaration to match nsfns.m. (ns-respond-to-change-font): Change fontsize separatly so we are sure it is set when font is acted upon. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 16:13:52 +0000 +++ lisp/ChangeLog 2012-10-07 17:47:41 +0000 @@ -1,3 +1,10 @@ +2012-10-07 Jan Djärv + + * term/ns-win.el (ns-read-file-name): Update declaration to match + nsfns.m. + (ns-respond-to-change-font): Change fontsize separatly so we are sure + it is set when font is acted upon. + 2012-10-07 Fabián Ezequiel Gallina Enhancements to indentation. === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2012-09-30 13:43:47 +0000 +++ lisp/term/ns-win.el 2012-10-07 17:47:41 +0000 @@ -448,7 +448,7 @@ ;; nsterm.m (declare-function ns-read-file-name "nsfns.m" - (prompt &optional dir isLoad init)) + (prompt &optional dir mustmatch init dir_only_p)) ;;;; File handling. @@ -633,8 +633,9 @@ `ns-input-fontsize' of new font." (interactive) (modify-frame-parameters (selected-frame) - (list (cons 'font ns-input-font) - (cons 'fontsize ns-input-fontsize))) + (list (cons 'fontsize ns-input-fontsize))) + (modify-frame-parameters (selected-frame) + (list (cons 'font ns-input-font))) (set-frame-font ns-input-font)) ------------------------------------------------------------ revno: 110427 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-07 18:54:43 +0200 message: Reformat last entries to fit 80 columns. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-07 11:09:04 +0000 +++ src/ChangeLog 2012-10-07 16:54:43 +0000 @@ -1,10 +1,11 @@ 2012-10-07 Jan Djärv - * nsterm.m (ns_dumpglyphs_image): Only draw slize of image (Bug#12506). + * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506). * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of MAC_OS_X_VERSION_10_6. - (syms_of_nsterm): Remove comment about Panther and above for ns-antialias-text. + (syms_of_nsterm): Remove comment about Panther and above for + ns-antialias-text. * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3. @@ -12,7 +13,8 @@ * nsselect.m (ns_string_from_pasteboard): Remove check for >= MAC_OS_X_VERSION_10_4. - * nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2. + * nsmenu.m (fillWithWidgetValue:): Remove code for < + MAC_OS_X_VERSION_10_2. * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger. @@ -21,13 +23,13 @@ * nsterm.m (ns_in_resize): Remove (Bug#12479). (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. - (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize - check. + (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove + ns_in_resize check. (ns_clear_frame_area): Remove resize handle code. * nsfns.m (ns_in_resize): Remove. - (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove ns_in_resize - check. + (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove + ns_in_resize check. 2012-10-07 Paul Eggert ------------------------------------------------------------ revno: 110426 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sun 2012-10-07 13:13:52 -0300 message: Enhancements to indentation. * lisp/progmodes/python.el (python-indent-context): Give priority to inside-string context. Make comments indentation markers. (python-indent-region): Do not mess with strings, unless it's the enclosing set of quotes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 15:54:30 +0000 +++ lisp/ChangeLog 2012-10-07 16:13:52 +0000 @@ -1,3 +1,11 @@ +2012-10-07 Fabián Ezequiel Gallina + + Enhancements to indentation. + * progmodes/python.el (python-indent-context): Give priority to + inside-string context. Make comments indentation markers. + (python-indent-region): Do not mess with strings, unless it's the + enclosing set of quotes. + 2012-10-07 Stefan Monnier * window.el (internal--before-save-selected-window) === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-10-07 04:33:16 +0000 +++ lisp/progmodes/python.el 2012-10-07 16:13:52 +0000 @@ -676,12 +676,12 @@ (goto-char (line-beginning-position)) (bobp)) 'no-indent) + ;; Inside string + ((setq start (python-syntax-context 'string ppss)) + 'inside-string) ;; Inside a paren ((setq start (python-syntax-context 'paren ppss)) 'inside-paren) - ;; Inside string - ((setq start (python-syntax-context 'string ppss)) - 'inside-string) ;; After backslash ((setq start (when (not (or (python-syntax-context 'string ppss) (python-syntax-context 'comment ppss))) @@ -710,7 +710,7 @@ ;; After normal line ((setq start (save-excursion (back-to-indentation) - (python-util-forward-comment -1) + (skip-chars-backward (rx (or whitespace ?\n))) (python-nav-beginning-of-statement) (point-marker))) 'after-line) @@ -973,7 +973,16 @@ (back-to-indentation) (setq word (current-word)) (forward-line 1) - (when word + (when (and word + ;; Don't mess with strings, unless it's the + ;; enclosing set of quotes. + (or (not (python-syntax-context 'string)) + (eq + (syntax-after + (+ (1- (point)) + (current-indentation) + (python-syntax-count-quotes (char-after) (point)))) + (string-to-syntax "|")))) (beginning-of-line) (delete-horizontal-space) (indent-to (python-indent-calculate-indentation))))) ------------------------------------------------------------ revno: 110425 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-10-07 11:54:30 -0400 message: * lisp/window.el (internal--before-save-selected-window) (internal--after-save-selected-window): New functions extracted from save-selected-window. Make sure we return the `alist' we construct. (save-selected-window): Use them. * lisp/textmodes/tex-mode.el (tex-recenter-output-buffer): Use with-selected-window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 15:15:16 +0000 +++ lisp/ChangeLog 2012-10-07 15:54:30 +0000 @@ -1,5 +1,13 @@ 2012-10-07 Stefan Monnier + * window.el (internal--before-save-selected-window) + (internal--after-save-selected-window): New functions extracted from + save-selected-window. Make sure we return the `alist' we construct. + (save-selected-window): Use them. + + * textmodes/tex-mode.el (tex-recenter-output-buffer): + Use with-selected-window. + * emacs-lisp/autoload.el (make-autoload): Add `cl-defmacro' to the forms that define macros (bug#12593). === modified file 'lisp/textmodes/tex-mode.el' --- lisp/textmodes/tex-mode.el 2012-09-30 03:10:13 +0000 +++ lisp/textmodes/tex-mode.el 2012-10-07 15:54:30 +0000 @@ -2565,8 +2565,7 @@ (if (null tex-shell) (message "No TeX output buffer") (setq window (display-buffer tex-shell)) - (save-selected-window - (select-window window) + (with-selected-window window (bury-buffer tex-shell) (goto-char (point-max)) (recenter (if linenum === modified file 'lisp/window.el' --- lisp/window.el 2012-10-05 05:57:24 +0000 +++ lisp/window.el 2012-10-07 15:54:30 +0000 @@ -28,6 +28,35 @@ ;;; Code: +(defun internal--before-save-selected-window () + (cons (selected-window) + ;; We save and restore all frames' selected windows, because + ;; `select-window' can change the frame-selected-window of + ;; whatever frame that window is in. Each text terminal's + ;; top-frame is preserved by putting it last in the list. + (apply #'append + (mapcar (lambda (terminal) + (let ((frames (frames-on-display-list terminal)) + (top-frame (tty-top-frame terminal)) + alist) + (if top-frame + (setq frames + (cons top-frame + (delq top-frame frames)))) + (dolist (f frames) + (push (cons f (frame-selected-window f)) + alist)) + alist)) + (terminal-list))))) + +(defun internal--after-save-selected-window (state) + (dolist (elt (cdr state)) + (and (frame-live-p (car elt)) + (window-live-p (cdr elt)) + (set-frame-selected-window (car elt) (cdr elt) 'norecord))) + (when (window-live-p (car state)) + (select-window (car state) 'norecord))) + (defmacro save-selected-window (&rest body) "Execute BODY, then select the previously selected window. The value returned is the value of the last form in BODY. @@ -44,34 +73,11 @@ order of recently selected windows and the buffer list ordering are not altered by this macro (unless they are altered in BODY)." (declare (indent 0) (debug t)) - `(let ((save-selected-window-window (selected-window)) - ;; We save and restore all frames' selected windows, because - ;; `select-window' can change the frame-selected-window of - ;; whatever frame that window is in. Each text terminal's - ;; top-frame is preserved by putting it last in the list. - (save-selected-window-alist - (apply 'append - (mapcar (lambda (terminal) - (let ((frames (frames-on-display-list terminal)) - (top-frame (tty-top-frame terminal)) - alist) - (if top-frame - (setq frames - (cons top-frame - (delq top-frame frames)))) - (dolist (f frames) - (push (cons f (frame-selected-window f)) - alist)))) - (terminal-list))))) + `(let ((save-selected-window--state (internal--before-save-selected-window))) (save-current-buffer (unwind-protect (progn ,@body) - (dolist (elt save-selected-window-alist) - (and (frame-live-p (car elt)) - (window-live-p (cdr elt)) - (set-frame-selected-window (car elt) (cdr elt) 'norecord))) - (when (window-live-p save-selected-window-window) - (select-window save-selected-window-window 'norecord)))))) + (internal--after-save-selected-window save-selected-window--state))))) (defvar temp-buffer-window-setup-hook nil "Normal hook run by `with-temp-buffer-window' before buffer display. ------------------------------------------------------------ revno: 110424 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12593 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-10-07 11:15:16 -0400 message: * lisp/emacs-lisp/autoload.el (make-autoload): Add `cl-defmacro' to the forms that define macros. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 13:09:35 +0000 +++ lisp/ChangeLog 2012-10-07 15:15:16 +0000 @@ -1,7 +1,12 @@ +2012-10-07 Stefan Monnier + + * emacs-lisp/autoload.el (make-autoload): Add `cl-defmacro' to the + forms that define macros (bug#12593). + 2012-10-07 Kenichi Handa - * international/mule-conf.el (compound-text-with-extensions): Add - :mime-charset property as x-ctext. + * international/mule-conf.el (compound-text-with-extensions): + Add :mime-charset property as x-ctext. 2012-10-07 Stefan Merten === modified file 'lisp/comint.el' --- lisp/comint.el 2012-09-25 04:13:02 +0000 +++ lisp/comint.el 2012-10-07 15:15:16 +0000 @@ -2783,11 +2783,8 @@ (if (and buff (buffer-modified-p buff) (y-or-n-p (format "Save buffer %s first? " (buffer-name buff)))) - ;; save BUFF. - (let ((old-buffer (current-buffer))) - (set-buffer buff) - (save-buffer) - (set-buffer old-buffer))))) + (with-current-buffer buff + (save-buffer))))) (defun comint-extract-string () "Return string around point, or nil." === modified file 'lisp/emacs-lisp/autoload.el' --- lisp/emacs-lisp/autoload.el 2012-08-11 02:12:12 +0000 +++ lisp/emacs-lisp/autoload.el 2012-10-07 15:15:16 +0000 @@ -153,7 +153,7 @@ easy-mmode-define-minor-mode define-minor-mode cl-defun defun* cl-defmacro defmacro* define-overloadable-function)) - (let* ((macrop (memq car '(defmacro defmacro*))) + (let* ((macrop (memq car '(defmacro cl-defmacro defmacro*))) (name (nth 1 form)) (args (pcase car ((or `defun `defmacro ------------------------------------------------------------ revno: 110423 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-10-07 16:54:01 +0200 message: Fixa typo in last commit. diff: === modified file 'src/w32fns.c' --- src/w32fns.c 2012-10-07 14:50:29 +0000 +++ src/w32fns.c 2012-10-07 14:54:01 +0000 @@ -2262,10 +2262,10 @@ w32_read_socket runs in the main (a.k.a. "Lisp") thread, and is called synchronously from keyboard.c when it is known or suspected that some input is available. w32_read_socket either handles - messages immediately, or converts them messages into Emacs input - events and stuffs them into kbd_buffer, where kbd_buffer_get_event - can get at them and process them when read_char and its callers - require input. */ + messages immediately, or converts them into Emacs input events and + stuffs them into kbd_buffer, where kbd_buffer_get_event can get at + them and process them when read_char and its callers require + input. */ /* Main message dispatch loop. */ ------------------------------------------------------------ revno: 110422 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-10-07 16:50:29 +0200 message: Add a comment with overview of how Emacs input works on MS-Windows. diff: === modified file 'src/w32fns.c' --- src/w32fns.c 2012-09-30 21:36:42 +0000 +++ src/w32fns.c 2012-10-07 14:50:29 +0000 @@ -2246,6 +2246,27 @@ } } +/* Here's an overview of how Emacs input works on MS-Windows. + + System messages are read and processed by w32_msg_pump below. This + function runs in a separate thread. It handles a small number of + custom WM_EMACS_* messages (posted by the main thread, look for + PostMessage calls), and dispatches the rest to w32_wnd_proc, which + is the main window procedure for the entire Emacs application. + + w32_wnd_proc also runs in the same separate input thread. It + handles some messages, mostly those that need GDI calls, by itself. + For the others, it calls my_post_msg, which inserts the messages + into the input queue serviced by w32_read_socket. + + w32_read_socket runs in the main (a.k.a. "Lisp") thread, and is + called synchronously from keyboard.c when it is known or suspected + that some input is available. w32_read_socket either handles + messages immediately, or converts them messages into Emacs input + events and stuffs them into kbd_buffer, where kbd_buffer_get_event + can get at them and process them when read_char and its callers + require input. */ + /* Main message dispatch loop. */ static void === modified file 'src/w32term.c' --- src/w32term.c 2012-09-30 21:36:42 +0000 +++ src/w32term.c 2012-10-07 14:50:29 +0000 @@ -4138,6 +4138,9 @@ This routine is called by the SIGIO handler. We return as soon as there are no more events to be read. + For an overview of how Emacs input works on MS-Windows, see the + commentary before w32_msg_pump in w32fns.c. + We return the number of characters stored into the buffer, thus pretending to be `read'. ------------------------------------------------------------ revno: 110421 committer: Stefan Merten branch nick: trunk timestamp: Sun 2012-10-07 15:09:35 +0200 message: textmodes/rst.el (rst-official-cvs-rev): Correct version string. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 12:58:14 +0000 +++ lisp/ChangeLog 2012-10-07 13:09:35 +0000 @@ -8,6 +8,7 @@ * textmodes/rst.el (rst-new-adornment-down, rst-indent-field) (rst-indent-literal-normal, rst-indent-literal-minimized) (rst-indent-comment): Correct :version tag. + (rst-official-cvs-rev): Correct version string. 2012-10-07 Glenn Morris === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2012-10-07 12:48:09 +0000 +++ lisp/textmodes/rst.el 2012-10-07 13:09:35 +0000 @@ -218,7 +218,7 @@ ;; Use CVSHeader to really get information from CVS and not other version ;; control systems. (defconst rst-cvs-header - "$CVSHeader: sm/rst_el/rst.el,v 1.327.2.5 2012-10-07 12:44:34 stefan Exp $") + "$CVSHeader: sm/rst_el/rst.el,v 1.327.2.6 2012-10-07 13:05:50 stefan Exp $") (defconst rst-cvs-rev (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" " .*" rst-cvs-header "0.0") @@ -247,7 +247,7 @@ "Official version of the package.") (defconst rst-official-cvs-rev (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " - "$Revision: 1.327.2.5 $") + "%Revision: 1.327 %") "CVS revision of this file in the official version.") (defconst rst-version ------------------------------------------------------------ revno: 110420 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Sun 2012-10-07 21:58:56 +0900 message: international/mule-conf.el (compound-text-with-extensions): Add :mime-charset property as x-ctext. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 12:48:09 +0000 +++ lisp/ChangeLog 2012-10-07 12:58:14 +0000 @@ -1,3 +1,8 @@ +2012-10-07 Kenichi Handa + + * international/mule-conf.el (compound-text-with-extensions): Add + :mime-charset property as x-ctext. + 2012-10-07 Stefan Merten * textmodes/rst.el (rst-new-adornment-down, rst-indent-field) === modified file 'lisp/international/mule-conf.el' --- lisp/international/mule-conf.el 2012-01-19 07:21:25 +0000 +++ lisp/international/mule-conf.el 2012-10-07 12:48:44 +0000 @@ -1458,7 +1458,8 @@ :flags '(ascii-at-eol ascii-at-cntl long-form designation locking-shift single-shift) :post-read-conversion 'ctext-post-read-conversion - :pre-write-conversion 'ctext-pre-write-conversion) + :pre-write-conversion 'ctext-pre-write-conversion + :mime-charset 'x-ctext) (define-coding-system-alias 'x-ctext-with-extensions 'compound-text-with-extensions) ------------------------------------------------------------ revno: 110419 committer: Stefan Merten branch nick: trunk timestamp: Sun 2012-10-07 14:48:09 +0200 message: * textmodes/rst.el (rst-new-adornment-down, rst-indent-field) (rst-indent-literal-normal, rst-indent-literal-minimized) (rst-indent-comment): Correct :version tag. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 07:49:16 +0000 +++ lisp/ChangeLog 2012-10-07 12:48:09 +0000 @@ -1,3 +1,9 @@ +2012-10-07 Stefan Merten + + * textmodes/rst.el (rst-new-adornment-down, rst-indent-field) + (rst-indent-literal-normal, rst-indent-literal-minimized) + (rst-indent-comment): Correct :version tag. + 2012-10-07 Glenn Morris * mail/rmailmm.el (rmail-mime-process-multipart): === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2012-10-06 20:33:23 +0000 +++ lisp/textmodes/rst.el 2012-10-07 12:48:09 +0000 @@ -218,7 +218,7 @@ ;; Use CVSHeader to really get information from CVS and not other version ;; control systems. (defconst rst-cvs-header - "$CVSHeader: sm/rst_el/rst.el,v 1.327.2.2 2012-09-23 14:44:25 stefan Exp $") + "$CVSHeader: sm/rst_el/rst.el,v 1.327.2.5 2012-10-07 12:44:34 stefan Exp $") (defconst rst-cvs-rev (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+" " .*" rst-cvs-header "0.0") @@ -247,7 +247,7 @@ "Official version of the package.") (defconst rst-official-cvs-rev (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " " - "$Revision: 1.327.2.2 $") + "$Revision: 1.327.2.5 $") "CVS revision of this file in the official version.") (defconst rst-version @@ -1545,7 +1545,6 @@ :type '(choice (const :tag "Same level as previous one" nil) (const :tag "One level down relative to the previous one" t)) - :version "24.3" :package-version '(rst . "1.1.0")) (rst-testcover-defcustom) @@ -2846,28 +2845,28 @@ (defcustom rst-indent-field 3 "Indentation for first line after a field or 0 to always indent for content." :group 'rst-indent - :version "24.3" + :package-version '(rst . "1.1.0") :type '(integer)) (rst-testcover-defcustom) (defcustom rst-indent-literal-normal 3 "Default indentation for literal block after a markup on an own line." :group 'rst-indent - :version "24.3" + :package-version '(rst . "1.1.0") :type '(integer)) (rst-testcover-defcustom) (defcustom rst-indent-literal-minimized 2 "Default indentation for literal block after a minimized markup." :group 'rst-indent - :version "24.3" + :package-version '(rst . "1.1.0") :type '(integer)) (rst-testcover-defcustom) (defcustom rst-indent-comment 3 "Default indentation for first line of a comment." :group 'rst-indent - :version "24.3" + :package-version '(rst . "1.1.0") :type '(integer)) (rst-testcover-defcustom) ------------------------------------------------------------ revno: 110418 fixes bug: http://debbugs.gnu.org/12506 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-07 13:09:04 +0200 message: * nsterm.m (ns_dumpglyphs_image): Only draw slize of image (Bug#12506). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-07 10:07:23 +0000 +++ src/ChangeLog 2012-10-07 11:09:04 +0000 @@ -1,9 +1,10 @@ 2012-10-07 Jan Djärv + * nsterm.m (ns_dumpglyphs_image): Only draw slize of image (Bug#12506). + * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of MAC_OS_X_VERSION_10_6. (syms_of_nsterm): Remove comment about Panther and above for ns-antialias-text. - * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3. === modified file 'src/nsterm.m' --- src/nsterm.m 2012-10-07 10:07:23 +0000 +++ src/nsterm.m 2012-10-07 11:09:04 +0000 @@ -2975,8 +2975,10 @@ { #if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 NSRect dr = NSMakeRect (x, y, s->slice.width, s->slice.height); + NSRect ir = NSMakeRect (s->slice.x, s->slice.y, + s->slice.width, s->slice.height); [img drawInRect: dr - fromRect: NSZeroRect + fromRect: ir operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: YES ------------------------------------------------------------ revno: 110417 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-10-07 06:23:48 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2012-09-18 10:17:43 +0000 +++ lisp/mail/rmail.el 2012-10-07 10:23:48 +0000 @@ -4605,7 +4605,7 @@ ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "0c18b83f914803d1216e1a9df7ea5275") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "f1937f85a1258de8880a089fa5ae5621") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ ------------------------------------------------------------ revno: 110416 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-10-07 06:19:00 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-10-04 10:17:29 +0000 +++ autogen/configure 2012-10-07 10:19:00 +0000 @@ -8814,7 +8814,9 @@ fi -ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" +ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include + +" if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : ac_have_decl=1 else @@ -8827,7 +8829,9 @@ if test $ac_cv_have_decl_sys_siglist != yes; then # For Tru64, at least: - ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" + ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include + +" if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : ac_have_decl=1 else @@ -9510,6 +9514,32 @@ fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + +#ifdef MAC_OS_X_VERSION_MAX_ALLOWED +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + ; /* OK */ +#else +#error "OSX 10.4 or newer required" +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ns_osx_have_104=yes +else + ns_osx_have_104=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9527,6 +9557,9 @@ ns_have_nsinteger=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ns_osx_have_104 = no; then + as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5; + fi if test $ns_have_nsinteger = yes; then $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h ------------------------------------------------------------ revno: 110415 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-07 12:07:23 +0200 message: Check for OSX >= 10.4 to match what the maunal says and what we actually support. * configure.ac: Check that OSX is 10.4 or newer. * etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required. * src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4. (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4. * src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger. * src/nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2. * src/nsselect.m (ns_string_from_pasteboard): Remove check for >= MAC_OS_X_VERSION_10_4. * src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3. diff: === modified file 'ChangeLog' --- ChangeLog 2012-10-07 02:26:03 +0000 +++ ChangeLog 2012-10-07 10:07:23 +0000 @@ -1,3 +1,7 @@ +2012-10-07 Jan Djärv + + * configure.ac: Check that OSX is 10.4 or newer. + 2012-10-07 Paul Eggert Improve sys_siglist detection. === modified file 'configure.ac' --- configure.ac 2012-10-07 02:26:03 +0000 +++ configure.ac 2012-10-07 10:07:23 +0000 @@ -1510,10 +1510,26 @@ AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], [AC_MSG_ERROR([`--with-ns' was specified, but the include files are missing or cannot be compiled.])]) + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], + [ +#ifdef MAC_OS_X_VERSION_MAX_ALLOWED +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040 + ; /* OK */ +#else +#error "OSX 10.4 or newer required" +#endif +#endif + ])], + ns_osx_have_104=yes, + ns_osx_have_104=no) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [NSInteger i;])], ns_have_nsinteger=yes, ns_have_nsinteger=no) + if test $ns_osx_have_104 = no; then + AC_MSG_ERROR([`OSX 10.4 or newer is required']); + fi if test $ns_have_nsinteger = yes; then AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) fi === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-10-05 07:38:05 +0000 +++ etc/ChangeLog 2012-10-07 10:07:23 +0000 @@ -1,3 +1,7 @@ +2012-10-07 Jan Djärv + + * NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required. + 2012-10-05 Douglas Lewan (tiny change) * tutorials/TUTORIAL.pt_BR: Fix typo. (Bug#12557) === modified file 'etc/NEWS' --- etc/NEWS 2012-10-06 18:34:23 +0000 +++ etc/NEWS 2012-10-07 10:07:23 +0000 @@ -191,6 +191,8 @@ ** NextStep/OSX port changes. --- +*** OSX 10.4 or newer is required to build Emacs. +--- *** Fullscreen and frame parameter fullscreen is supported. --- *** A file dialog is used when open/saved is done from the menu/toolbar. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-07 09:17:17 +0000 +++ src/ChangeLog 2012-10-07 10:07:23 +0000 @@ -1,5 +1,23 @@ 2012-10-07 Jan Djärv + * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of + MAC_OS_X_VERSION_10_6. + (syms_of_nsterm): Remove comment about Panther and above for ns-antialias-text. + + * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. + (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. + (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3. + + * nsselect.m (ns_string_from_pasteboard): Remove check for >= + MAC_OS_X_VERSION_10_4. + + * nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2. + + * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger. + + * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4. + (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4. + * nsterm.m (ns_in_resize): Remove (Bug#12479). (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize === modified file 'src/nsfns.m' --- src/nsfns.m 2012-10-07 09:17:17 +0000 +++ src/nsfns.m 2012-10-07 10:07:23 +0000 @@ -1949,32 +1949,29 @@ check_ns (); svcs = [[NSMenu alloc] initWithTitle: @"Services"]; - [NSApp setServicesMenu: svcs]; /* this and next rebuild on <10.4 */ + [NSApp setServicesMenu: svcs]; [NSApp registerServicesMenuSendTypes: ns_send_types returnTypes: ns_return_types]; /* On Tiger, services menu updating was made lazier (waits for user to actually click on the menu), so we have to force things along: */ #ifdef NS_IMPL_COCOA - if (NSAppKitVersionNumber >= 744.0) + delegate = [svcs delegate]; + if (delegate != nil) { - delegate = [svcs delegate]; - if (delegate != nil) + if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) + [delegate menuNeedsUpdate: svcs]; + if ([delegate respondsToSelector: + @selector (menu:updateItem:atIndex:shouldCancel:)]) { - if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) - [delegate menuNeedsUpdate: svcs]; - if ([delegate respondsToSelector: - @selector (menu:updateItem:atIndex:shouldCancel:)]) - { - int i, len = [delegate numberOfItemsInMenu: svcs]; - for (i =0; i= MAC_OS_X_VERSION_10_4 +#if defined (NS_IMPL_COCOA) (typeUTF16ExternalRepresentation == [returnDescriptor descriptorType]) || #endif === modified file 'src/nsimage.m' --- src/nsimage.m 2012-09-24 21:38:23 +0000 +++ src/nsimage.m 2012-10-07 10:07:23 +0000 @@ -403,7 +403,6 @@ if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) { bmRep = (NSBitmapImageRep *) rep; - onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)]; if ([bmRep numberOfPlanes] >= 3) [bmRep getBitmapDataPlanes: pixmapData]; @@ -435,7 +434,7 @@ | (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8) | (pixmapData[2][loc]); } - else if (onTiger) + else { NSColor *color = [bmRep colorAtX: x y: y]; CGFloat r, g, b, a; @@ -445,7 +444,6 @@ | ((int)(b * 255.0)); } - return 0; } - (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r @@ -463,7 +461,7 @@ pixmapData[2][loc] = b; pixmapData[3][loc] = a; } - else if (onTiger) + else { [bmRep setColor: [NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0) @@ -483,7 +481,7 @@ pixmapData[3][loc] = a; } - else if (onTiger) + else { NSColor *color = [bmRep colorAtX: x y: y]; color = [color colorWithAlphaComponent: (a / 255.0)]; === modified file 'src/nsmenu.m' --- src/nsmenu.m 2012-09-23 19:36:31 +0000 +++ src/nsmenu.m 2012-10-07 10:07:23 +0000 @@ -722,11 +722,6 @@ #ifdef NS_IMPL_GNUSTEP if ([[self window] isVisible]) [self sizeToFit]; -#else -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 - if ([self supermenu] == nil) - [self sizeToFit]; -#endif #endif } === modified file 'src/nsselect.m' --- src/nsselect.m 2012-09-15 07:06:56 +0000 +++ src/nsselect.m 2012-10-07 10:07:23 +0000 @@ -295,7 +295,7 @@ utfStr = [mstr UTF8String]; length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; -#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 +#if ! defined (NS_IMPL_COCOA) if (!utfStr) { utfStr = [mstr cString]; @@ -306,7 +306,7 @@ NS_HANDLER { message1 ("ns_string_from_pasteboard: UTF8String failed\n"); -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +#if defined (NS_IMPL_COCOA) utfStr = "Conversion failed"; #else utfStr = [str lossyCString]; === modified file 'src/nsterm.h' --- src/nsterm.h 2012-10-06 17:31:11 +0000 +++ src/nsterm.h 2012-10-07 10:07:23 +0000 @@ -26,9 +26,6 @@ #ifdef HAVE_NS #ifdef NS_IMPL_COCOA -#ifndef MAC_OS_X_VERSION_10_3 -#define MAC_OS_X_VERSION_10_3 1030 -#endif #ifndef MAC_OS_X_VERSION_10_4 #define MAC_OS_X_VERSION_10_4 1040 #endif @@ -286,7 +283,6 @@ int refCount; NSBitmapImageRep *bmRep; /* used for accessing pixel data */ unsigned char *pixmapData[5]; /* shortcut to access pixel data */ - BOOL onTiger; NSColor *stippleMask; } + allocInitFromFile: (Lisp_Object)file; @@ -355,7 +351,7 @@ /* ========================================================================== - Rendering on Panther and above + Rendering ========================================================================== */ @@ -380,7 +376,7 @@ extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu; /* Apple removed the declaration, but kept the implementation */ -#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +#if defined (NS_IMPL_COCOA) @interface NSApplication (EmacsApp) - (void)setAppleMenu: (NSMenu *)menu; @end @@ -483,10 +479,9 @@ float size; #ifdef __OBJC__ NSFont *nsfont; - /* cgfont and synthItal are used only on OS X 10.3+ */ -#if defined (NS_IMPL_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) +#if defined (NS_IMPL_COCOA) CGFontRef cgfont; -#else /* GNUstep or OS X < 10.3 */ +#else /* GNUstep */ void *cgfont; #endif #else /* ! OBJC */ === modified file 'src/nsterm.m' --- src/nsterm.m 2012-10-07 09:17:17 +0000 +++ src/nsterm.m 2012-10-07 10:07:23 +0000 @@ -569,9 +569,6 @@ static void ns_update_auto_hide_menu_bar (void) { -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 block_input (); @@ -7087,7 +7084,7 @@ ns_function_modifier = Qnone; DEFVAR_LISP ("ns-antialias-text", ns_antialias_text, - "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); + "Non-nil (the default) means to render text antialiased."); ns_antialias_text = Qt; DEFVAR_LISP ("ns-confirm-quit", ns_confirm_quit, ------------------------------------------------------------ revno: 110414 fixes bug: http://debbugs.gnu.org/12479 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-07 11:17:17 +0200 message: * nsfns.m (ns_in_resize): Remove. (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove ns_in_resize check. * nsterm.m (ns_in_resize): Remove. (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize check. (ns_clear_frame_area): Remove resize handle code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-07 02:26:03 +0000 +++ src/ChangeLog 2012-10-07 09:17:17 +0000 @@ -1,3 +1,15 @@ +2012-10-07 Jan Djärv + + * nsterm.m (ns_in_resize): Remove (Bug#12479). + (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. + (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize + check. + (ns_clear_frame_area): Remove resize handle code. + + * nsfns.m (ns_in_resize): Remove. + (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove ns_in_resize + check. + 2012-10-07 Paul Eggert Improve sys_siglist detection. === modified file 'src/nsfns.m' --- src/nsfns.m 2012-10-06 17:31:11 +0000 +++ src/nsfns.m 2012-10-07 09:17:17 +0000 @@ -93,8 +93,6 @@ /* Need forward declaration here to preserve organizational integrity of file */ Lisp_Object Fx_open_connection (Lisp_Object, Lisp_Object, Lisp_Object); -extern BOOL ns_in_resize; - /* Static variables to handle applescript execution. */ static Lisp_Object as_script, *as_result; static int as_status; @@ -433,9 +431,6 @@ NSView *view = FRAME_NS_VIEW (f); NSTRACE (x_set_icon_name); - if (ns_in_resize) - return; - /* see if it's changed */ if (STRINGP (arg)) { @@ -511,9 +506,6 @@ { NSTRACE (ns_set_name); - if (ns_in_resize) - return; - /* Make sure that requests from lisp code override requests from Emacs redisplay code. */ if (explicit) @@ -612,7 +604,7 @@ NSString *str; NSTRACE (ns_set_name_as_filename); - if (f->explicit_name || ! NILP (f->title) || ns_in_resize) + if (f->explicit_name || ! NILP (f->title)) return; block_input (); === modified file 'src/nsterm.m' --- src/nsterm.m 2012-10-06 17:31:11 +0000 +++ src/nsterm.m 2012-10-07 09:17:17 +0000 @@ -183,7 +183,6 @@ static NSRect uRect; #endif static BOOL gsaved = NO; -BOOL ns_in_resize = NO; static BOOL ns_fake_keydown = NO; int ns_tmp_flags; /* FIXME */ struct nsfont_info *ns_tmp_font; /* FIXME */ @@ -493,17 +492,6 @@ ========================================================================== */ -static NSRect -ns_resize_handle_rect (NSWindow *window) -{ - NSRect r = [window frame]; - r.origin.x = r.size.width - RESIZE_HANDLE_SIZE; - r.origin.y = 0; - r.size.width = r.size.height = RESIZE_HANDLE_SIZE; - return r; -} - - // // Window constraining // ------------------- @@ -1983,8 +1971,6 @@ NSRect r; NSTRACE (ns_clear_frame); - if (ns_in_resize) - return; /* comes on initial frame because we have after-make-frame-functions = select-frame */ @@ -2004,10 +1990,6 @@ NSRectFill (r); ns_unfocus (f); -#ifdef NS_IMPL_COCOA - [[view window] display]; /* redraw resize handle */ -#endif - /* as of 2006/11 or so this is now needed */ ns_redraw_scroll_bars (f); unblock_input (); @@ -2033,35 +2015,8 @@ ns_focus (f, &r, 1); [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; -#ifdef NS_IMPL_COCOA - { - /* clip out the resize handle */ - NSWindow *window = [FRAME_NS_VIEW (f) window]; - NSRect ir - = [view convertRect: ns_resize_handle_rect (window) fromView: nil]; - - ir = NSIntersectionRect (r, ir); - if (NSIsEmptyRect (ir)) - { -#endif - NSRectFill (r); -#ifdef NS_IMPL_COCOA - } - else - { - NSRect r1 = r, r2 = r; /* upper and lower non-intersecting */ - r1.size.height -= ir.size.height; - r2.origin.y += r1.size.height; - r2.size.width -= ir.size.width; - r2.size.height = ir.size.height; - NSRectFill (r1); - NSRectFill (r2); - } - } -#endif - ns_unfocus (f); return; } @@ -4314,34 +4269,6 @@ return; } -#ifdef NS_IMPL_COCOA - /* pass mouse down in resize handle and subsequent drags directly to - EmacsWindow so we can generate continuous redisplays */ - if (ns_in_resize) - { - if (type == NSLeftMouseDragged) - { - [window mouseDragged: theEvent]; - return; - } - else if (type == NSLeftMouseUp) - { - [window mouseUp: theEvent]; - return; - } - } - else if (type == NSLeftMouseDown) - { - NSRect r = ns_resize_handle_rect (window); - if (NSPointInRect ([theEvent locationInWindow], r)) - { - ns_in_resize = YES; - [window mouseDown: theEvent]; - return; - } - } -#endif - if (type == NSApplicationDefined) { /* Events posted by ns_send_appdefined interrupt the run loop here. @@ -5567,12 +5494,7 @@ if (cols > 0 && rows > 0) { - if (ns_in_resize) - x_set_window_size (emacsframe, 0, cols, rows); - else - { - [self updateFrameSize: YES]; - } + [self updateFrameSize: YES]; } ns_send_appdefined (-1); @@ -6198,7 +6120,7 @@ NSTRACE (drawRect); - if (!emacsframe || !emacsframe->output_data.ns || ns_in_resize) + if (!emacsframe || !emacsframe->output_data.ns) return; ns_clear_frame_area (emacsframe, x, y, width, height); @@ -6535,60 +6457,6 @@ return [super constrainFrameRect:frameRect toScreen:screen]; } - -/* called only on resize clicks by special case in EmacsApp-sendEvent */ -- (void)mouseDown: (NSEvent *)theEvent -{ - if (ns_in_resize) - { - NSSize size = [[theEvent window] frame].size; - grabOffset = [theEvent locationInWindow]; - grabOffset.x = size.width - grabOffset.x; - } - else - [super mouseDown: theEvent]; -} - - -/* stop resizing */ -- (void)mouseUp: (NSEvent *)theEvent -{ - if (ns_in_resize) - { - struct frame *f = ((EmacsView *)[self delegate])->emacsframe; - ns_in_resize = NO; - ns_set_name_as_filename (f); - [self display]; - ns_send_appdefined (-1); - } - else - [super mouseUp: theEvent]; -} - - -/* send resize events */ -- (void)mouseDragged: (NSEvent *)theEvent -{ - if (ns_in_resize) - { - NSPoint p = [theEvent locationInWindow]; - NSSize size, vettedSize, origSize = [self frame].size; - - size.width = p.x + grabOffset.x; - size.height = origSize.height - p.y + grabOffset.y; - - if (size.width == origSize.width && size.height == origSize.height) - return; - - vettedSize = [[self delegate] windowWillResize: self toSize: size]; - [[NSNotificationCenter defaultCenter] - postNotificationName: NSWindowDidResizeNotification - object: self]; - } - else - [super mouseDragged: theEvent]; -} - @end /* EmacsWindow */ ------------------------------------------------------------ revno: 110413 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-10-07 00:54:41 -0700 message: Un-mung previous erc-log change (error due to committer, not author) diff: === modified file 'lisp/erc/erc-log.el' --- lisp/erc/erc-log.el 2012-10-07 02:05:04 +0000 +++ lisp/erc/erc-log.el 2012-10-07 07:54:41 +0000 @@ -114,12 +114,12 @@ custom function which returns the directory part and set `erc-log-channels-directory' to its name." :group 'erc-log - :type '(choice (const :tag "#channel!nick server:port.txt" + :type '(choice (const :tag "#channel!nick@server:port.txt" erc-generate-log-file-name-long) - (const :tag "#channel!nick network.txt" + (const :tag "#channel!nick@network.txt" erc-generate-log-file-name-network) (const :tag "#channel.txt" erc-generate-log-file-name-short) - (const :tag "#channel date.txt" + (const :tag "#channel@date.txt" erc-generate-log-file-name-with-date) (function :tag "Other function"))) ------------------------------------------------------------ revno: 110412 fixes bug: http://debbugs.gnu.org/10101 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-10-07 00:49:16 -0700 message: Fix infloop in rmailmm on multipart messages with epilogues * lisp/mail/rmailmm.el (rmail-mime-process-multipart): Do not confuse a multipart message with an epilogue with a "truncated" one; fixes 2011-06-27 change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 04:33:16 +0000 +++ lisp/ChangeLog 2012-10-07 07:49:16 +0000 @@ -1,3 +1,9 @@ +2012-10-07 Glenn Morris + + * mail/rmailmm.el (rmail-mime-process-multipart): + Do not confuse a multipart message with an epilogue + with a "truncated" one; fixes 2011-06-27 change. (Bug#10101) + 2012-10-07 Fabián Ezequiel Gallina Fix shell output retrieval and comint-prompt-regexp init. === modified file 'lisp/mail/rmailmm.el' --- lisp/mail/rmailmm.el 2012-09-17 11:49:10 +0000 +++ lisp/mail/rmailmm.el 2012-10-07 07:49:16 +0000 @@ -832,7 +832,7 @@ (let ((boundary (cdr (assq 'boundary content-type))) (subtype (cadr (split-string (car content-type) "/"))) (index 0) - beg end next entities truncated) + beg end next entities truncated last) (unless boundary (rmail-mm-get-boundary-error-message "No boundary defined" content-type content-disposition @@ -867,7 +867,13 @@ ;; Handle the rest of the truncated message ;; (if it isn't empty) by pretending that the boundary ;; appears at the end of the message. - (and (save-excursion + ;; We use `last' to distinguish this from the more + ;; likely situation of there being an epilogue + ;; after the last boundary, which should be ignored. + ;; See rmailmm-test-multipart-handler for an example, + ;; and also bug#10101. + (and (not last) + (save-excursion (skip-chars-forward "\n") (> (point-max) (point))) (setq truncated t end (point-max)))) @@ -875,7 +881,8 @@ ;; epilogue, else hide the boundary only. Use a marker for ;; `next' because `rmail-mime-show' may change the buffer. (cond ((looking-at "--[ \t]*$") - (setq next (point-max-marker))) + (setq next (point-max-marker) + last t)) ((looking-at "[ \t]*\n") (setq next (copy-marker (match-end 0) t))) (truncated ------------------------------------------------------------ revno: 110411 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Sun 2012-10-07 01:33:16 -0300 message: Fix shell output retrieval and comint-prompt-regexp init. * progmodes/python.el (inferior-python-mode): (python-shell-make-comint): Fix initialization of comint-prompt-regexp from copied file local variables. (python-shell-fetched-lines): Remove var. (python-shell-output-filter-in-progress): Rename from python-shell-fetch-lines-in-progress. (python-shell-output-filter-buffer): Rename from python-shell-fetch-lines-string. (python-shell-fetch-lines-filter): Delete function. (python-shell-output-filter): New function. (python-shell-send-string-no-output): Use them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-07 00:27:31 +0000 +++ lisp/ChangeLog 2012-10-07 04:33:16 +0000 @@ -1,3 +1,18 @@ +2012-10-07 Fabián Ezequiel Gallina + + Fix shell output retrieval and comint-prompt-regexp init. + * progmodes/python.el (inferior-python-mode): + (python-shell-make-comint): Fix initialization of + comint-prompt-regexp from copied file local variables. + (python-shell-fetched-lines): Remove var. + (python-shell-output-filter-in-progress): Rename from + python-shell-fetch-lines-in-progress. + (python-shell-output-filter-buffer): Rename from + python-shell-fetch-lines-string. + (python-shell-fetch-lines-filter): Delete function. + (python-shell-output-filter): New function. + (python-shell-send-string-no-output): Use them. + 2012-10-07 Glenn Morris * hi-lock.el (hi-lock-process-phrase): === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-10-05 13:42:08 +0000 +++ lisp/progmodes/python.el 2012-10-07 04:33:16 +0000 @@ -1667,10 +1667,6 @@ \(Type \\[describe-mode] in the process buffer for a list of commands.)" (set-syntax-table python-mode-syntax-table) (setq mode-line-process '(":%s")) - (setq comint-prompt-regexp (format "^\\(?:%s\\|%s\\|%s\\)" - python-shell-prompt-regexp - python-shell-prompt-block-regexp - python-shell-prompt-pdb-regexp)) (make-local-variable 'comint-output-filter-functions) (add-hook 'comint-output-filter-functions 'python-comint-output-filter-function) @@ -1720,7 +1716,11 @@ (process (get-buffer-process buffer))) (with-current-buffer buffer (inferior-python-mode) - (python-util-clone-local-variables current-buffer)) + (python-util-clone-local-variables current-buffer) + (setq comint-prompt-regexp (format "^\\(?:%s\\|%s\\|%s\\)" + python-shell-prompt-regexp + python-shell-prompt-block-regexp + python-shell-prompt-pdb-regexp))) (accept-process-output process) (and pop (pop-to-buffer buffer t)) (and internal (set-process-query-on-exit-flag process nil)))) @@ -1861,26 +1861,39 @@ (string-match "\n[ \t].*\n?$" string)) (comint-send-string process "\n"))))) -;; Shell output catching stolen from gud-gdb -(defvar python-shell-fetch-lines-in-progress nil) -(defvar python-shell-fetch-lines-string nil) -(defvar python-shell-fetched-lines nil) +(defvar python-shell-output-filter-in-progress nil) +(defvar python-shell-output-filter-buffer nil) -(defun python-shell-fetch-lines-filter (string) - "Filter used to read the list of lines output by a command. -STRING is the output to filter." - (setq string (concat python-shell-fetch-lines-string string)) - (while (string-match "\n" string) - (push (substring string 0 (match-beginning 0)) - python-shell-fetched-lines) - (setq string (substring string (match-end 0)))) - (if (equal (string-match comint-prompt-regexp string) 0) - (progn - (setq python-shell-fetch-lines-in-progress nil) - string) - (progn - (setq python-shell-fetch-lines-string string) - ""))) +(defun python-shell-output-filter (string) + "Filter used in `python-shell-send-string-no-output' to grab output. +STRING is the output received to this point from the process. +This filter saves received output from the process in +`python-shell-output-filter-buffer' and stops receiving it after +detecting a prompt at the end of the buffer." + (setq + string (ansi-color-filter-apply string) + python-shell-output-filter-buffer + (concat python-shell-output-filter-buffer string)) + (when (string-match + (format "\n\\(?:%s\\|%s\\|%s\\)$" + python-shell-prompt-regexp + python-shell-prompt-block-regexp + python-shell-prompt-pdb-regexp) + python-shell-output-filter-buffer) + ;; Output ends when `python-shell-output-filter-buffer' contains + ;; the prompt attached at the end of it. + (setq python-shell-output-filter-in-progress nil + python-shell-output-filter-buffer + (substring python-shell-output-filter-buffer + 0 (match-beginning 0))) + (when (and (> (length python-shell-prompt-output-regexp) 0) + (string-match (concat "^" python-shell-prompt-output-regexp) + python-shell-output-filter-buffer)) + ;; Some shells, like iPython might append a prompt before the + ;; output, clean that. + (setq python-shell-output-filter-buffer + (substring python-shell-output-filter-buffer (match-end 0))))) + "") (defun python-shell-send-string-no-output (string &optional process msg) "Send STRING to PROCESS and inhibit output. @@ -1888,18 +1901,20 @@ the output." (let ((process (or process (python-shell-get-or-create-process))) (comint-preoutput-filter-functions - '(python-shell-fetch-lines-filter)) - (python-shell-fetch-lines-in-progress t) + '(python-shell-output-filter)) + (python-shell-output-filter-in-progress t) (inhibit-quit t)) (or (with-local-quit (python-shell-send-string string process msg) - (while python-shell-fetch-lines-in-progress + (while python-shell-output-filter-in-progress + ;; `python-shell-output-filter' takes care of setting + ;; `python-shell-output-filter-in-progress' to NIL after it + ;; detects end of output. (accept-process-output process)) (prog1 - (mapconcat #'identity - (reverse python-shell-fetched-lines) "\n") - (setq python-shell-fetched-lines nil))) + python-shell-output-filter-buffer + (setq python-shell-output-filter-buffer nil))) (with-current-buffer (process-buffer process) (comint-interrupt-subjob))))) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.