------------------------------------------------------------ revno: 114722 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2013-10-19 18:17:56 -0400 message: * lisp/simple.el (newline): Only run post-self-insert-hook when called interactively. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-19 15:22:57 +0000 +++ lisp/ChangeLog 2013-10-19 22:17:56 +0000 @@ -1,3 +1,8 @@ +2013-10-19 Stefan Monnier + + * simple.el (newline): Only run post-self-insert-hook when + called interactively. + 2013-10-19 Johan Bockgård * icomplete.el (icomplete-with-completion-tables): Add :version. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-09-19 20:31:26 +0000 +++ lisp/simple.el 2013-10-19 22:17:56 +0000 @@ -377,14 +377,15 @@ (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) "Propertized string representing a hard newline character.") -(defun newline (&optional arg) +(defun newline (&optional arg interactive) "Insert a newline, and move to left margin of the new line if it's blank. If option `use-hard-newlines' is non-nil, the newline is marked with the text-property `hard'. With ARG, insert that many newlines. Call `auto-fill-function' if the current column number is greater -than the value of `fill-column' and ARG is nil." - (interactive "*P") +than the value of `fill-column' and ARG is nil. +A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'." + (interactive "*P\np") (barf-if-buffer-read-only) ;; Call self-insert so that auto-fill, abbrev expansion etc. happens. ;; Set last-command-event to tell self-insert what to insert. @@ -415,14 +416,20 @@ ;; starts a page. (or was-page-start (move-to-left-margin nil t))))) - (unwind-protect - (progn - (add-hook 'post-self-insert-hook postproc) + (if (not interactive) + ;; FIXME: For non-interactive uses, many calls actually just want + ;; (insert "\n"), so maybe we should do just that, so as to avoid + ;; the risk of filling or running abbrevs unexpectedly. + (let ((post-self-insert-hook (list postproc))) (self-insert-command (prefix-numeric-value arg))) - ;; We first used let-binding to protect the hook, but that was naive - ;; since add-hook affects the symbol-default value of the variable, - ;; whereas the let-binding might only protect the buffer-local value. - (remove-hook 'post-self-insert-hook postproc))) + (unwind-protect + (progn + (add-hook 'post-self-insert-hook postproc) + (self-insert-command (prefix-numeric-value arg))) + ;; We first used let-binding to protect the hook, but that was naive + ;; since add-hook affects the symbol-default value of the variable, + ;; whereas the let-binding might only protect the buffer-local value. + (remove-hook 'post-self-insert-hook postproc)))) nil) (defun set-hard-newline-properties (from to) ------------------------------------------------------------ revno: 114721 committer: Johan Bockgård branch nick: trunk timestamp: Sat 2013-10-19 17:30:39 +0200 message: NEWS fix. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-10-18 04:27:34 +0000 +++ etc/NEWS 2013-10-19 15:30:39 +0000 @@ -242,7 +242,7 @@ See `remember-data-directory' and `remember-directory-file-name-format' for new options related to this function. -* More packages look for ~/.emacs.d/ additionally to ~/.. +** More packages look for ~/.emacs.d/ additionally to ~/.. Affected files: ~/.emacs.d/timelog replaces ~/.timelog ~/.emacs.d/vip replaces ~/.vip ------------------------------------------------------------ revno: 114720 committer: Johan Bockgård branch nick: trunk timestamp: Sat 2013-10-19 17:22:57 +0200 message: * lisp/icomplete.el (icomplete-with-completion-tables): Add :version. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-19 15:11:07 +0000 +++ lisp/ChangeLog 2013-10-19 15:22:57 +0000 @@ -1,3 +1,7 @@ +2013-10-19 Johan Bockgård + + * icomplete.el (icomplete-with-completion-tables): Add :version. + 2013-10-19 Alan Mackenzie Fix fontification bugs with constructors and const. === modified file 'lisp/icomplete.el' --- lisp/icomplete.el 2013-09-16 19:09:24 +0000 +++ lisp/icomplete.el 2013-10-19 15:22:57 +0000 @@ -157,6 +157,7 @@ Icomplete does not operate with any specialized completion tables except those on this list." + :version "24.4" :type '(choice (const :tag "All" t) (repeat function))) ------------------------------------------------------------ revno: 114719 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2013-10-19 15:11:07 +0000 message: Fix fontification bugs with constructors and const. * progmodes/cc-engine.el (c-forward-decl-or-cast-1): (Just after CASE 2) Remove the check for the absence of a suffix construct after a function declaration with only types (no identifiers) in the parentheses. Also, accept a function declaration with just a type inside the parentheses, if this type can be positively recognised as such, or if a prefix keyword like "explicit" nails down the construct as a declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-19 08:35:51 +0000 +++ lisp/ChangeLog 2013-10-19 15:11:07 +0000 @@ -1,3 +1,15 @@ +2013-10-19 Alan Mackenzie + + Fix fontification bugs with constructors and const. + + * progmodes/cc-engine.el (c-forward-decl-or-cast-1): (Just after + CASE 2) Remove the check for the absence of a suffix construct + after a function declaration with only types (no identifiers) in + the parentheses. Also, accept a function declaration with just a + type inside the parentheses, if this type can be positively + recognised as such, or if a prefix keyword like "explicit" nails + down the construct as a declaration. + 2013-10-19 Eli Zaretskii * menu-bar.el (tty-menu-navigation-map): Bind mouse-N to perform === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-10-13 19:54:46 +0000 +++ lisp/progmodes/cc-engine.el 2013-10-19 15:11:07 +0000 @@ -6917,7 +6917,9 @@ ;; can happen since we don't know if ;; `c-restricted-<>-arglists' will be correct inside the ;; arglist paren that gets entered. - c-parse-and-markup-<>-arglists) + c-parse-and-markup-<>-arglists + ;; Start of the identifier for which `got-identifier' was set. + name-start) (goto-char id-start) @@ -6935,7 +6937,9 @@ ;; If the third submatch matches in C++ then ;; we're looking at an identifier that's a ;; prefix only if it specifies a member pointer. - (when (setq got-identifier (c-forward-name)) + (when (progn (setq pos (point)) + (setq got-identifier (c-forward-name))) + (setq name-start pos) (if (looking-at "\\(::\\)") ;; We only check for a trailing "::" and ;; let the "*" that should follow be @@ -6961,7 +6965,9 @@ ;; Skip over an identifier. (or got-identifier (and (looking-at c-identifier-start) - (setq got-identifier (c-forward-name)))) + (setq pos (point)) + (setq got-identifier (c-forward-name)) + (setq name-start pos))) ;; Skip over type decl suffix operators. (while (if (looking-at c-type-decl-suffix-key) @@ -7052,23 +7058,27 @@ ;; declaration. (throw 'at-decl-or-cast t)) - (when (and got-parens - (not got-prefix) - (not got-suffix-after-parens) - (or backup-at-type - maybe-typeless - backup-maybe-typeless)) - ;; Got a declaration of the form "foo bar (gnu);" where we've - ;; recognized "bar" as the type and "gnu" as the declarator. - ;; In this case it's however more likely that "bar" is the - ;; declarator and "gnu" a function argument or initializer (if - ;; `c-recognize-paren-inits' is set), since the parens around - ;; "gnu" would be superfluous if it's a declarator. Shift the - ;; type one step backward. - (c-fdoc-shift-type-backward))) - - ;; Found no identifier. - + + (when (and got-parens + (not got-prefix) + ;; (not got-suffix-after-parens) + (or backup-at-type + maybe-typeless + backup-maybe-typeless + (eq at-decl-or-cast t) + (save-excursion + (goto-char name-start) + (not (memq (c-forward-type) '(nil maybe)))))) + ;; Got a declaration of the form "foo bar (gnu);" or "bar + ;; (gnu);" where we've recognized "bar" as the type and "gnu" + ;; as the declarator. In this case it's however more likely + ;; that "bar" is the declarator and "gnu" a function argument + ;; or initializer (if `c-recognize-paren-inits' is set), + ;; since the parens around "gnu" would be superfluous if it's + ;; a declarator. Shift the type one step backward. + (c-fdoc-shift-type-backward))) + + ;; Found no identifier. (if backup-at-type (progn ------------------------------------------------------------ revno: 114718 committer: Xue Fuqiao branch nick: trunk timestamp: Sat 2013-10-19 21:53:01 +0800 message: Add indexes for the ‘:box’ face attribute. * doc/lispref/display.texi (Face Attributes): Add indexes for the ‘:box’ face attribute. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-18 14:27:44 +0000 +++ doc/lispref/ChangeLog 2013-10-19 13:53:01 +0000 @@ -1,3 +1,7 @@ +2013-10-19 Xue Fuqiao + + * display.texi (Face Attributes): Add indexes for the ‘:box’ face attribute. + 2013-10-18 Xue Fuqiao * display.texi (Line Height): Add indexes for line height. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-18 14:27:44 +0000 +++ doc/lispref/display.texi 2013-10-19 13:53:01 +0000 @@ -2077,6 +2077,8 @@ Whether or not characters should be strike-through, and in what color. The value is used like that of @code{:overline}. +@cindex 2D box +@cindex 3D box @item :box Whether or not a box should be drawn around characters, its color, the width of the box lines, and 3D appearance. Here are the possible ------------------------------------------------------------ revno: 114717 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-10-19 11:35:51 +0300 message: Fix TTY menus when they lead to a minibuffer prompt. lisp/menu-bar.el (tty-menu-navigation-map): Bind mouse-N to perform TTY menu actions and down-mouse-N to tty-menu-ignore. This solves the problem whereby selecting a menu item that leads to a minibuffer prompt moves the cursor out of the minibuffer window, making it hard to type at the prompt. Suggested by Stefan Monnier . diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-19 08:23:43 +0000 +++ lisp/ChangeLog 2013-10-19 08:35:51 +0000 @@ -1,3 +1,12 @@ +2013-10-19 Eli Zaretskii + + * menu-bar.el (tty-menu-navigation-map): Bind mouse-N to perform + TTY menu actions and down-mouse-N to tty-menu-ignore. This solves + the problem whereby selecting a menu item that leads to a + minibuffer prompt moves the cursor out of the minibuffer window, + making it hard to type at the prompt. Suggested by Stefan Monnier + . + 2013-10-19 Jan Djärv * menu-bar.el: Don't make Services menu. === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-10-19 08:23:43 +0000 +++ lisp/menu-bar.el 2013-10-19 08:35:51 +0000 @@ -2337,36 +2337,38 @@ (define-key map [?\C-j] 'tty-menu-select) (define-key map [return] 'tty-menu-select) (define-key map [linefeed] 'tty-menu-select) - (define-key map [down-mouse-1] 'tty-menu-select) + (define-key map [mouse-1] 'tty-menu-select) (define-key map [drag-mouse-1] 'tty-menu-select) + (define-key map [mouse-2] 'tty-menu-select) + (define-key map [drag-mouse-2] 'tty-menu-select) + (define-key map [mouse-3] 'tty-menu-select) + (define-key map [drag-mouse-3] 'tty-menu-select) (define-key map [wheel-down] 'tty-menu-next-item) (define-key map [wheel-up] 'tty-menu-prev-item) (define-key map [wheel-left] 'tty-menu-prev-menu) (define-key map [wheel-right] 'tty-menu-next-menu) ;; The following 4 bindings are for those whose text-mode mouse ;; lack the wheel. - (define-key map [S-down-mouse-1] 'tty-menu-next-item) + (define-key map [S-mouse-1] 'tty-menu-next-item) (define-key map [S-drag-mouse-1] 'tty-menu-next-item) - (define-key map [S-down-mouse-2] 'tty-menu-prev-item) + (define-key map [S-mouse-2] 'tty-menu-prev-item) (define-key map [S-drag-mouse-2] 'tty-menu-prev-item) - (define-key map [mode-line drag-mouse-1] 'tty-menu-select) - (define-key map [mode-line down-mouse-1] 'tty-menu-select) + (define-key map [S-mouse-3] 'tty-menu-prev-item) + (define-key map [S-drag-mouse-3] 'tty-menu-prev-item) (define-key map [header-line mouse-1] 'tty-menu-select) (define-key map [header-line drag-mouse-1] 'tty-menu-select) - (define-key map [header-line down-mouse-1] 'tty-menu-select) - ;; The mouse events must be bound to tty-menu-ignore, otherwise - ;; the initial mouse click will select and immediately pop down - ;; the menu. - (define-key map [mode-line mouse-1] 'tty-menu-ignore) - (define-key map [mode-line mouse-2] 'tty-menu-ignore) - (define-key map [mode-line mouse-3] 'tty-menu-ignore) - (define-key map [mode-line C-mouse-1] 'tty-menu-ignore) - (define-key map [mode-line C-mouse-2] 'tty-menu-ignore) - (define-key map [mode-line C-mouse-3] 'tty-menu-ignore) - (define-key map [mouse-1] 'tty-menu-ignore) - (define-key map [C-mouse-1] 'tty-menu-ignore) - (define-key map [C-mouse-2] 'tty-menu-ignore) - (define-key map [C-mouse-3] 'tty-menu-ignore) + ;; The down-mouse events must be bound to tty-menu-ignore, so that + ;; only releasing the mouse button pops up the menu. + (define-key map [mode-line down-mouse-1] 'tty-menu-ignore) + (define-key map [mode-line down-mouse-2] 'tty-menu-ignore) + (define-key map [mode-line down-mouse-3] 'tty-menu-ignore) + (define-key map [mode-line C-down-mouse-1] 'tty-menu-ignore) + (define-key map [mode-line C-down-mouse-2] 'tty-menu-ignore) + (define-key map [mode-line C-down-mouse-3] 'tty-menu-ignore) + (define-key map [down-mouse-1] 'tty-menu-ignore) + (define-key map [C-down-mouse-1] 'tty-menu-ignore) + (define-key map [C-down-mouse-2] 'tty-menu-ignore) + (define-key map [C-down-mouse-3] 'tty-menu-ignore) (define-key map [mouse-movement] 'tty-menu-mouse-movement) map) "Keymap used while processing TTY menus.") ------------------------------------------------------------ revno: 114716 committer: Jan D. branch nick: trunk timestamp: Sat 2013-10-19 10:23:43 +0200 message: * menu-bar.el: Don't make Services menu. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-19 02:35:20 +0000 +++ lisp/ChangeLog 2013-10-19 08:23:43 +0000 @@ -1,3 +1,7 @@ +2013-10-19 Jan Djärv + + * menu-bar.el: Don't make Services menu. + 2013-10-19 Rüdiger Sonderfeld * ffap.el: Handle "/usr/include/c++/" directories. === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-10-15 18:40:22 +0000 +++ lisp/menu-bar.el 2013-10-19 08:23:43 +0000 @@ -54,9 +54,7 @@ :help "Save unsaved buffers, then exit")) (bindings--define-key global-map [menu-bar hide-app] '(menu-item "Hide" ns-do-hide-emacs - :help "Hide Emacs"))) - (bindings--define-key global-map [menu-bar services] ; Set-up in ns-win. - (cons "Services" (make-sparse-keymap "Services")))) + :help "Hide Emacs")))) ;; This definition is just to show what this looks like. ;; It gets modified in place when menu-bar-update-buffers is called.