Now on revision 113575. ------------------------------------------------------------ revno: 113575 committer: Xue Fuqiao branch nick: trunk timestamp: Sun 2013-07-28 13:54:24 +0800 message: * doc/emacs/glossary.texi (Glossary): Add some entries. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-07-27 00:23:21 +0000 +++ doc/emacs/ChangeLog 2013-07-28 05:54:24 +0000 @@ -1,3 +1,7 @@ +2013-07-28 Xue Fuqiao + + * glossary.texi (Glossary): Add some entries. + 2013-07-27 Xue Fuqiao * maintaining.texi (VC Directory Commands): Mention `D' and `L' in === modified file 'doc/emacs/glossary.texi' --- doc/emacs/glossary.texi 2013-01-01 09:11:05 +0000 +++ doc/emacs/glossary.texi 2013-07-28 05:54:24 +0000 @@ -4,6 +4,7 @@ @c See file emacs.texi for copying conditions. @node Glossary @unnumbered Glossary +@cindex glossary @table @asis @anchor{Glossary---Abbrev} @@ -18,7 +19,10 @@ commands @kbd{C-]} and @kbd{M-x top-level} are used for this. @xref{Quitting}. -@c FIXME? Active Region +@item Active Region +Setting the mark (q.v.) at a position in the text also activates it. +When the mark is active, we call the region an active region. +@xref{Mark}. @item Alt Alt is the name of a modifier bit that a keyboard input character may @@ -183,6 +187,11 @@ @item Character Terminal @xref{Glossary---Text Terminal}. +@item Chord +A chord is a key sequence (q.v.) in which the keys are pressed at the +same time. For example: @kbd{S-M-C-a}. You can hold down a chord to +repeat its command. + @item Click Event A click event is the kind of input event (q.v.@:) generated when you press a mouse button and release it without moving the mouse. @@ -1365,7 +1374,10 @@ (q.v.), and not in the middle of a command. You can get back to top level by aborting (q.v.@:) and quitting (q.v.). @xref{Quitting}. -@c FIXME? Transient Mark Mode +@item Transient Mark Mode +Transient Mark mode gives you much of the standard +selection-highlighting behavior of other editors. In GNU Emacs 23 and +onwards, it is enabled by default. @xref{Disabled Transient Mark}. @item Transposition Transposing two units of text means putting each one into the place ------------------------------------------------------------ revno: 113574 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-07-28 05:03:45 +0200 message: lisp/desktop.el: Optionally force offscreen frames back onscreen. (desktop-restoring-reuses-frames): New option. (desktop--compute-pos, desktop--move-onscreen): New functions. (desktop--make-frame): Use desktop--move-onscreen. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 17:35:04 +0000 +++ lisp/ChangeLog 2013-07-28 03:03:45 +0000 @@ -1,3 +1,10 @@ +2013-07-28 Juanma Barranquero + + * desktop.el: Optionally force offscreen frames back onscreen. + (desktop-restoring-reuses-frames): New option. + (desktop--compute-pos, desktop--move-onscreen): New functions. + (desktop--make-frame): Use desktop--move-onscreen. + 2013-07-27 Alan Mackenzie Fontify a Java generic method as a function. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-27 01:02:00 +0000 +++ lisp/desktop.el 2013-07-28 03:03:45 +0000 @@ -387,6 +387,18 @@ :group 'desktop :version "24.4") +(defcustom desktop-restore-forces-onscreen t + "If t, offscreen frames are restored onscreen instead. +If `all', frames that are partially offscreen are also forced onscren. +NOTE: Checking of frame boundaries is only approximate and can fail +to reliably detect frames whose onscreen/offscreen state depends on a +few pixels, especially near the right / bottom borders of the screen." + :type '(choice (const :tag "Only fully offscreen frames" t) + (const :tag "Also partially offscreen frames" 'all) + (const :tag "Do not force frames onscreen" nil)) + :group 'desktop + :version "24.4") + (defcustom desktop-restoring-reuses-frames t "If t, restoring frames reuses existing frames. If nil, existing frames are deleted. @@ -1201,6 +1213,68 @@ (defvar desktop--reuse-list nil "Internal use only.") +(defun desktop--compute-pos (value left/top right/bottom) + (pcase value + (`(+ ,val) (+ left/top val)) + (`(- ,val) (+ right/bottom val)) + (val val))) + +(defun desktop--move-onscreen (frame) + "If FRAME is offscreen, move it back onscreen and, if necessary, resize it. +When forced onscreen, frames wider than the monitor's workarea are converted +to fullwidth, and frames taller than the workarea are converted to fullheight. +NOTE: This only works for non-iconified frames." + (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) + (right (+ left width -1)) + (bottom (+ top height -1)) + (fr-left (desktop--compute-pos (frame-parameter frame 'left) left right)) + (fr-top (desktop--compute-pos (frame-parameter frame 'top) top bottom)) + (ch-width (frame-char-width frame)) + (ch-height (frame-char-height frame)) + (fr-width (max (frame-pixel-width frame) (* ch-width (frame-width frame)))) + (fr-height (max (frame-pixel-height frame) (* ch-height (frame-height frame)))) + (fr-right (+ fr-left fr-width -1)) + (fr-bottom (+ fr-top fr-height -1))) + (when (pcase desktop-restore-forces-onscreen + ;; Any corner is outside the screen. + (`all (or (< fr-bottom top) (> fr-bottom bottom) + (< fr-left left) (> fr-left right) + (< fr-right left) (> fr-right right) + (< fr-top top) (> fr-top bottom))) + ;; Displaced to the left, right, above or below the screen. + (`t (or (> fr-left right) + (< fr-right left) + (> fr-top bottom) + (< fr-bottom top))) + (_ nil)) + (let ((fullwidth (> fr-width width)) + (fullheight (> fr-height height)) + (params nil)) + ;; Position frame horizontally. + (cond (fullwidth + (push `(left . ,left) params)) + ((> fr-right right) + (push `(left . ,(+ left (- width fr-width))) params)) + ((< fr-left left) + (push `(left . ,left) params))) + ;; Position frame vertically. + (cond (fullheight + (push `(top . ,top) params)) + ((> fr-bottom bottom) + (push `(top . ,(+ top (- height fr-height))) params)) + ((< fr-top top) + (push `(top . ,top) params))) + ;; Compute fullscreen state, if required. + (when (or fullwidth fullheight) + (push (cons 'fullscreen + (cond ((not fullwidth) 'fullheight) + ((not fullheight) 'fullwidth) + (t 'maximized))) + params)) + ;; Finally, move the frame back onscreen. + (when params + (modify-frame-parameters frame params)))))) + (defun desktop--find-frame (predicate display &rest args) "Find a suitable frame in `desktop--reuse-list'. Look through frames whose display property matches DISPLAY and @@ -1328,6 +1402,13 @@ (assq-delete-all 'fullscreen filtered-cfg) filtered-cfg)) + ;; If requested, force frames to be onscreen. + (when (and desktop-restore-forces-onscreen + ;; FIXME: iconified frames should be checked too, + ;; but it is impossible without deiconifying them. + (not (eq (frame-parameter frame 'visibility) 'icon))) + (desktop--move-onscreen frame)) + ;; Let's give the finishing touches (visibility, tool-bar, maximization). (when lines (push lines alt-cfg)) (when alt-cfg (modify-frame-parameters frame alt-cfg)) ------------------------------------------------------------ revno: 113573 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-07-28 00:14:07 +0200 message: Spelling fixes. diff: === modified file 'doc/misc/ido.texi' --- doc/misc/ido.texi 2013-07-24 22:32:48 +0000 +++ doc/misc/ido.texi 2013-07-27 22:14:07 +0000 @@ -273,7 +273,7 @@ On MS-DOS or Windows, to select the root of another drive, enter @samp{X:/} where @samp{X} is the drive letter. To go to the home directory, enter @samp{~/}. To enter Dired for this directory, use -@kbd{C-d}. +@kbd{C-d}. @c TODO: a new node for ftp hosts @cindex ftp hosts @@ -587,14 +587,14 @@ @c @defvr {User Option} ido-rotate-file-list-default @c @defvr {User Option} ido-enter-matching-directory @c @defvr {User Option} ido-create-new-buffer -@c @defvr {User Option} ido-setup-hook +@c @defvr {User Option} ido-setup-hook @c @defvr {User Option} ido-separator @c @defvr {User Option} ido-decorations @c @defvr {User Option} ido-use-virtual-buffers @c @defvr {User Option} ido-use-faces -@c @defvr {User Option} ido-make-file-list-hook -@c @defvr {User Option} ido-make-dir-list-hook -@c @defvr {User Option} ido-make-buffer-list-hook +@c @defvr {User Option} ido-make-file-list-hook +@c @defvr {User Option} ido-make-dir-list-hook +@c @defvr {User Option} ido-make-buffer-list-hook @c @defvr {User Option} ido-rewrite-file-prompt-functions @c @defvr {User Option} ido-completion-buffer @c @defvr {User Option} ido-completion-buffer-all-completions @@ -689,7 +689,7 @@ @code{ido-read-directory-name} can be used by other packages to read a buffer name, a file name, or a directory name in the @emph{Ido} way. -@c @node Cheetsheet +@c @node Cheatsheet @c * History and Acknowledgments:: How Ido came into being @c @node History and Acknowledgments === modified file 'src/ChangeLog.9' --- src/ChangeLog.9 2013-01-01 09:11:05 +0000 +++ src/ChangeLog.9 2013-07-27 22:14:07 +0000 @@ -10644,7 +10644,7 @@ (syms_of_xfns) [GLYPH_DEBUG]: Don't defsubr removed functions. (syms_of_xfns): Initialize Qcenter. - * eval.c (Fsignal): If lisp_eval_depth or spepdl_size are near + * eval.c (Fsignal): If lisp_eval_depth or specpdl_size are near to the limits, increase the limits. 2000-05-01 Kenichi Handa === modified file 'src/eval.c' --- src/eval.c 2013-07-26 08:39:55 +0000 +++ src/eval.c 2013-07-27 22:14:07 +0000 @@ -3481,7 +3481,7 @@ directly in the pre-existing specpdl elements (i.e. we swap the current value and the old value stored in the specpdl), kind of like the inplace pointer-reversal trick. As it turns out, the rewind does the same as the - unwind, except it starts from the other end of the spepdl stack, so we use + unwind, except it starts from the other end of the specpdl stack, so we use the same function for both unwind and rewind. */ static void backtrace_eval_unrewind (int distance) === modified file 'src/nsterm.m' --- src/nsterm.m 2013-07-21 11:47:07 +0000 +++ src/nsterm.m 2013-07-27 22:14:07 +0000 @@ -4473,9 +4473,9 @@ #ifdef NS_IMPL_COCOA /* If no dialog and none of our frames have focus and it is a move, skip it. - It is a mouse move in an auxillary menu, i.e. on the top right on OSX, + It is a mouse move in an auxiliary menu, i.e. on the top right on OSX, such as Wifi, sound, date or similar. - This prevents "spooky" highlightning in the frame under the menu. */ + This prevents "spooky" highlighting in the frame under the menu. */ if (type == NSMouseMoved && [NSApp modalWindow] == nil) { struct ns_display_info *di; ------------------------------------------------------------ revno: 113572 [merge] committer: David Engster branch nick: trunk timestamp: Sat 2013-07-27 23:13:56 +0200 message: Merge CEDET upstream (rev. 8569) diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-07-11 17:18:48 +0000 +++ lisp/cedet/ChangeLog 2013-07-27 21:09:43 +0000 @@ -1,3 +1,21 @@ +2013-07-27 Eric Ludlam + + * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap + debug message removing middle tag in semantic-edits-verbose-flag + check. + +2013-07-27 David Engster + + * semantic/bovine/el.el (semantic/db-el): New require. + + * semantic/db-el.el (semanticdb-normalize-one-tag): It might be + that a symbol comes from a file but cannot be found in its table. + This happens for instance when a symbol was dynamically created + through a macro like `defstruct'. In this case, return the + original tag. + (semanticdb-elisp-sym->tag): Deal with autoloaded functions, where + the argument list is not available until the file is loaded. + 2013-06-25 Stefan Monnier * data-debug.el, cedet-idutils.el: Neuter the "Version:" header. === modified file 'lisp/cedet/semantic/bovine/el.el' --- lisp/cedet/semantic/bovine/el.el 2013-07-16 04:39:23 +0000 +++ lisp/cedet/semantic/bovine/el.el 2013-07-27 21:09:43 +0000 @@ -25,6 +25,7 @@ (require 'semantic) (require 'semantic/bovine) +(require 'semantic/db-el) (require 'find-func) (require 'semantic/ctxt) === modified file 'lisp/cedet/semantic/db-el.el' --- lisp/cedet/semantic/db-el.el 2013-03-21 22:11:03 +0000 +++ lisp/cedet/semantic/db-el.el 2013-07-27 21:09:43 +0000 @@ -173,13 +173,17 @@ (newtags (when tab (semanticdb-find-tags-by-name-method tab (semantic-tag-name tag)))) (match nil)) - ;; Find the best match. - (dolist (T newtags) - (when (semantic-tag-similar-p T tag) - (setq match T))) - ;; Backup system. - (when (not match) - (setq match (car newtags))) + ;; We might not have a parsed tag in this file, because it + ;; might be generated through a macro like defstruct. + (if (null newtags) + (setq match tag) + ;; Find the best match. + (dolist (T newtags) + (when (semantic-tag-similar-p T tag) + (setq match T))) + ;; Backup system. + (when (not match) + (setq match (car newtags)))) ;; Return it. (when tab (cons tab match)))))) @@ -196,15 +200,18 @@ (when sym (cond ((and (eq toktype 'function) (fboundp sym)) (require 'semantic/bovine/el) - (semantic-tag-new-function - (symbol-name sym) - nil ;; return type - (semantic-elisp-desymbolify - (help-function-arglist sym)) ;; arg-list - :user-visible-flag (condition-case nil - (interactive-form sym) - (error nil)) - )) + (let ((arglist (help-function-arglist sym))) + (when (not (listp arglist)) + ;; Function might be autoloaded, in which case + ;; the arglist is not available yet. + (setq arglist nil)) + (semantic-tag-new-function + (symbol-name sym) + nil ;; return type + (semantic-elisp-desymbolify arglist) + :user-visible-flag (condition-case nil + (interactive-form sym) + (error nil))))) ((and (eq toktype 'variable) (boundp sym)) (semantic-tag-new-variable (symbol-name sym) === modified file 'lisp/cedet/semantic/edit.el' --- lisp/cedet/semantic/edit.el 2013-06-02 13:33:09 +0000 +++ lisp/cedet/semantic/edit.el 2013-07-27 21:09:43 +0000 @@ -882,8 +882,9 @@ ;; reparse (semantic-parse-changes-failed "Splice-remove failed. Empty buffer?") )) - (message "To Remove Middle Tag: (%s)" - (semantic-format-tag-name first))) + (when semantic-edits-verbose-flag + (message "To Remove Middle Tag: (%s)" + (semantic-format-tag-name first)))) ;; Find in the cache the preceding tag (while (and cachestart (not (eq first (car (cdr cachestart))))) (setq cachestart (cdr cachestart))) ------------------------------------------------------------ revno: 113571 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2013-07-27 17:35:04 +0000 message: Fontify a Java generic method as a function. * progmodes/cc-langs.el (c-recognize-<>-arglists): Set the Java value to t. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 15:58:56 +0000 +++ lisp/ChangeLog 2013-07-27 17:35:04 +0000 @@ -1,3 +1,9 @@ +2013-07-27 Alan Mackenzie + + Fontify a Java generic method as a function. + * progmodes/cc-langs.el (c-recognize-<>-arglists): Set the Java + value to t. + 2013-07-27 Stephen Berman * calendar/todo-mode.el: Add command to rename todo files. === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2013-07-27 12:07:43 +0000 +++ lisp/progmodes/cc-langs.el 2013-07-27 17:35:04 +0000 @@ -2950,7 +2950,8 @@ `c-<>-arglist-kwds'. If there's an identifier before then the whole expression is considered to be a type." t (or (consp (c-lang-const c-<>-type-kwds)) - (consp (c-lang-const c-<>-arglist-kwds)))) + (consp (c-lang-const c-<>-arglist-kwds))) + java t) (c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists)) (c-lang-defconst c-enums-contain-decls ------------------------------------------------------------ revno: 113570 committer: Stephen Berman branch nick: trunk timestamp: Sat 2013-07-27 17:58:56 +0200 message: * calendar/todo-mode.el: Add command to rename todo files. (todo-rename-file): New command. (todo-key-bindings-t): Add key binding for it. Change the bindings of todo-filter-regexp-items(-multifile) to use `x' instead of `r', since the latter is better suited to the new renaming command. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 12:07:43 +0000 +++ lisp/ChangeLog 2013-07-27 15:58:56 +0000 @@ -1,3 +1,12 @@ +2013-07-27 Stephen Berman + + * calendar/todo-mode.el: Add command to rename todo files. + (todo-rename-file): New command. + (todo-key-bindings-t): Add key binding for it. Change the + bindings of todo-filter-regexp-items(-multifile) to use `x' + instead of `r', since the latter is better suited to the new + renaming command. + 2013-07-27 Alan Mackenzie Make Java try-with-resources statement parse properly. === modified file 'lisp/calendar/todo-mode.el' --- lisp/calendar/todo-mode.el 2013-07-05 14:03:35 +0000 +++ lisp/calendar/todo-mode.el 2013-07-27 15:58:56 +0000 @@ -1099,6 +1099,44 @@ (todo-show)) file))) +(defun todo-rename-file (&optional arg) + "Rename the current todo file. +With prefix ARG, prompt for a todo file and rename it. +If there are corresponding archive or filtered items files, +rename these accordingly. If there are live buffers visiting +these files, also rename them accordingly." + (interactive "P") + (let* ((oname (or (and arg + (todo-read-file-name "Choose a file to rename: " + nil t)) + (buffer-file-name))) + (soname (todo-short-file-name oname)) + (nname (todo-read-file-name "New name for this file: ")) + (snname (todo-short-file-name nname)) + (files (directory-files todo-directory t + (concat ".*" (regexp-quote soname) + ".*\.tod[aorty]$") t))) + (dolist (f files) + (let ((sfname (todo-short-file-name f)) + (fext (file-name-extension f t)) + (fbuf (find-buffer-visiting f))) + (when (string-match (regexp-quote soname) sfname) + (let* ((snfname (replace-match snname t t sfname)) + (nfname (concat todo-directory snfname fext))) + (rename-file f nfname) + (when fbuf + (with-current-buffer fbuf + (set-visited-file-name nfname t t) + (cond ((member fext '(".todo" ".toda")) + (setq todo-current-todo-file (buffer-file-name)) + (setq mode-line-buffer-identification + (funcall todo-mode-line-function + (todo-current-category)))) + (t + (rename-buffer + (replace-regexp-in-string + (regexp-quote soname) snfname)))))))))))) + (defun todo-delete-file () "Delete the current todo, archive or filtered items file. If the todo file has a corresponding archive file, or vice versa, @@ -6163,6 +6201,7 @@ ("Cey" todo-edit-category-diary-inclusion) ("Cek" todo-edit-category-diary-nonmarking) ("Fa" todo-add-file) + ("Fr" todo-rename-file) ("Ff" todo-find-filtered-items-file) ("FV" todo-toggle-view-done-only) ("V" todo-toggle-view-done-only) @@ -6171,8 +6210,8 @@ ("Fts" todo-set-top-priorities-in-file) ("Fyy" todo-filter-diary-items) ("Fym" todo-filter-diary-items-multifile) - ("Frr" todo-filter-regexp-items) - ("Frm" todo-filter-regexp-items-multifile) + ("Fxx" todo-filter-regexp-items) + ("Fxm" todo-filter-regexp-items-multifile) ("ee" todo-edit-item) ("em" todo-edit-multiline-item) ("edt" todo-edit-item-header) ------------------------------------------------------------ revno: 113569 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-07-27 16:08:03 +0300 message: Fix focus-out events on MS-Windows. src/w32term.c (w32_read_socket) : Call w32_detect_focus_change instead of doing part of its job by hand. This fixes the problem whereby FOCUS_OUT events were not sent to the event queue. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-26 18:48:05 +0000 +++ src/ChangeLog 2013-07-27 13:08:03 +0000 @@ -1,3 +1,10 @@ +2013-07-27 Eli Zaretskii + + * w32term.c (w32_read_socket) : Call + w32_detect_focus_change instead of doing part of its job by hand. + This fixes the problem whereby FOCUS_OUT events were not sent to + the event queue. + 2013-07-26 Eli Zaretskii * process.c (Fprocess_list): Doc fix. === modified file 'src/w32term.c' --- src/w32term.c 2013-07-26 09:59:59 +0000 +++ src/w32term.c 2013-07-27 13:08:03 +0000 @@ -4923,16 +4923,11 @@ break; case WM_KILLFOCUS: + w32_detect_focus_change (dpyinfo, &msg, &inev); f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { - if (f == dpyinfo->w32_focus_event_frame) - dpyinfo->w32_focus_event_frame = 0; - - if (f == dpyinfo->w32_focus_frame) - x_new_focus_frame (dpyinfo, 0); - if (f == hlinfo->mouse_face_mouse_frame) { /* If we move outside the frame, then we're ------------------------------------------------------------ revno: 113568 committer: Alan Mackenzie branch nick: trunk timestamp: Sat 2013-07-27 12:07:43 +0000 message: Make Java try-with-resources statement parse properly. progmodes/cc-langs.el (c-block-stmt-1-2-kwds, c-block-stmt-1-2-key): New language constants/variables. progmodes/cc-engine.el (c-beginning-of-statement-1, c-after-conditional): Adapt to deal with c-block-stmt-1-2-key. progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal with c-block-stmt-1-2-key. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 01:02:00 +0000 +++ lisp/ChangeLog 2013-07-27 12:07:43 +0000 @@ -1,3 +1,13 @@ +2013-07-27 Alan Mackenzie + + Make Java try-with-resources statement parse properly. + * progmodes/cc-langs.el (c-block-stmt-1-2-kwds) + (c-block-stmt-1-2-key): New language constants/variables. + * progmodes/cc-engine.el (c-beginning-of-statement-1) + (c-after-conditional): Adapt to deal with c-block-stmt-1-2-key. + * progmodes/cc-fonts.el (c-font-lock-declarations): Adapt to deal + with c-block-stmet-1-2-key. + 2013-07-27 Juanma Barranquero * desktop.el (desktop--make-frame): Apply most frame parameters after === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-07-14 05:18:48 +0000 +++ lisp/progmodes/cc-engine.el 2013-07-27 12:07:43 +0000 @@ -1135,9 +1135,13 @@ (not (memq sym '(boundary ignore nil)))) ;; Need to investigate closer whether we've crossed ;; between a substatement and its containing statement. - (if (setq saved (if (looking-at c-block-stmt-1-key) - ptok - pptok)) + (if (setq saved + (cond ((and (looking-at c-block-stmt-1-2-key) + (eq (char-after ptok) ?\()) + pptok) + ((looking-at c-block-stmt-1-key) + ptok) + (t pptok))) (cond ((> start saved) (setq pos saved)) ((= start saved) (setq ret 'up))))) @@ -7988,7 +7992,8 @@ (or (looking-at c-block-stmt-1-key) (and (eq (char-after) ?\() (zerop (c-backward-token-2 1 t lim)) - (looking-at c-block-stmt-2-key))) + (or (looking-at c-block-stmt-2-key) + (looking-at c-block-stmt-1-2-key)))) (point)))) (defun c-after-special-operator-id (&optional lim) === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2013-06-01 18:19:29 +0000 +++ lisp/progmodes/cc-fonts.el 2013-07-27 12:07:43 +0000 @@ -1307,7 +1307,8 @@ (goto-char match-pos) (backward-char) (c-backward-token-2) - (looking-at c-block-stmt-2-key))) + (or (looking-at c-block-stmt-2-key) + (looking-at c-block-stmt-1-2-key)))) (setq context nil c-restricted-<>-arglists t)) ;; Near BOB. === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2013-04-15 16:10:24 +0000 +++ lisp/progmodes/cc-langs.el 2013-07-27 12:07:43 +0000 @@ -2187,6 +2187,18 @@ t (c-make-keywords-re t (c-lang-const c-block-stmt-1-kwds))) (c-lang-defvar c-block-stmt-1-key (c-lang-const c-block-stmt-1-key)) +(c-lang-defconst c-block-stmt-1-2-kwds + "Statement keywords optionally followed by a paren sexp. +Keywords here should also be in `c-block-stmt-1-kwds'." + t nil + java '("try")) + +(c-lang-defconst c-block-stmt-1-2-key + ;; Regexp matching the start of a statement which may be followed by a + ;; paren sexp and will then be followed by a substatement. + t (c-make-keywords-re t (c-lang-const c-block-stmt-1-2-kwds))) +(c-lang-defvar c-block-stmt-1-2-key (c-lang-const c-block-stmt-1-2-key)) + (c-lang-defconst c-block-stmt-2-kwds "Statement keywords followed by a paren sexp and then by a substatement." t '("for" "if" "switch" "while") ------------------------------------------------------------ revno: 113567 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-07-27 06:17:30 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-07-24 10:17:36 +0000 +++ autogen/configure 2013-07-27 10:17:30 +0000 @@ -2233,7 +2233,9 @@ --with-mail-unlink unlink, rather than empty, mail spool after reading --with-mailhost=HOSTNAME string giving default POP mail host - --without-sound don't compile with sound support + --with-sound=VALUE compile with sound support (VALUE one of: yes, + ossaudio, alsa, no; default yes). Only for + GNU/Linux, FreeBSD, NetBSD, MinGW. --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no) --with-wide-int prefer wide Emacs integers (typically 62-bit) @@ -4116,9 +4118,16 @@ # Check whether --with-sound was given. if test "${with_sound+set}" = set; then : - withval=$with_sound; + withval=$with_sound; case "${withval}" in + yes|no|ossaudio|alsa) val=$withval ;; + *) as_fn_error "\`--with-sound=$withval' is invalid; +this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5 + ;; + esac + with_sound=$val + else - with_sound=$with_features + with_sound=$with_features fi @@ -8995,6 +9004,7 @@ +HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h @@ -9017,8 +9027,9 @@ done - # Emulation library used on NetBSD. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 + if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then + # Emulation library used on NetBSD. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -9060,10 +9071,14 @@ LIBSOUND= fi - - - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" + test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ + as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5 + fi + + + if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" succeeded=no @@ -9115,12 +9130,12 @@ HAVE_ALSA=no fi - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9137,8 +9152,8 @@ emacs_alsa_normal=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_normal" != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$emacs_alsa_normal" != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9155,27 +9170,30 @@ emacs_alsa_subdir=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_subdir" != yes; then - as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + if test "$emacs_alsa_subdir" != yes; then + as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" - fi - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" $as_echo "#define HAVE_ALSA 1" >>confdefs.h + elif test "${with_sound}" = "alsa"; then + as_fn_error "ALSA sound support requested but not found." "$LINENO" 5 + fi fi - - if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then + if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in - gnu-linux|freebsd|netbsd|mingw32) + gnu-linux|freebsd|netbsd|mingw32) $as_echo "#define HAVE_SOUND 1" >>confdefs.h + HAVE_SOUND=yes ;; esac fi @@ -28679,6 +28697,8 @@ echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" +echo " Does Emacs support sound? ${HAVE_SOUND}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" ------------------------------------------------------------ revno: 113566 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-26 21:18:21 -0400 message: * configure.ac: Extend the --with-sound option to allow specification of OSS or ALSA (see bug#14812#64). diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-26 17:02:22 +0000 +++ ChangeLog 2013-07-27 01:18:21 +0000 @@ -1,3 +1,8 @@ +2013-07-27 Glenn Morris + + * configure.ac: Extend the --with-sound option to allow + specification of OSS or ALSA (see bug#14812#64). + 2013-07-25 Glenn Morris * info/dir: Add ido. === modified file 'configure.ac' --- configure.ac 2013-07-24 01:03:56 +0000 +++ configure.ac 2013-07-27 01:18:21 +0000 @@ -141,7 +141,18 @@ [string giving default POP mail host])], AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.])) -OPTION_DEFAULT_ON([sound],[don't compile with sound support]) +AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE], + [compile with sound support (VALUE one of: yes, ossaudio, alsa, no; +default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])], + [ case "${withval}" in + yes|no|ossaudio|alsa) val=$withval ;; + *) AC_MSG_ERROR([`--with-sound=$withval' is invalid; +this option's value should be `yes', `no', `ossaudio', or `alsa'.]) + ;; + esac + with_sound=$val + ], + [with_sound=$with_features]) dnl FIXME currently it is not the last. dnl This should be the last --with option, because --with-x is @@ -1253,6 +1264,7 @@ fi ]) +HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h], @@ -1262,47 +1274,61 @@ #include #endif ]) - # Emulation library used on NetBSD. - AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then + # Emulation library used on NetBSD. + AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ + AC_MSG_ERROR([ossaudio sound support requested but not found.]) + dnl FIXME? If we did find ossaudio, should we set with_sound=ossaudio? + dnl Traditionally, we go on to check for alsa too. Does that make sense? + fi AC_SUBST(LIBSOUND) - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" - PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], - emacs_alsa_normal=yes, - emacs_alsa_normal=no) - if test "$emacs_alsa_normal" != yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[snd_lib_error_set_handler (0);]])], - emacs_alsa_subdir=yes, - emacs_alsa_subdir=no) - if test "$emacs_alsa_subdir" != yes; then - AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" + PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], + emacs_alsa_normal=yes, + emacs_alsa_normal=no) + if test "$emacs_alsa_normal" != yes; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[snd_lib_error_set_handler (0);]])], + emacs_alsa_subdir=yes, + emacs_alsa_subdir=no) + if test "$emacs_alsa_subdir" != yes; then + AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" + + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) + elif test "${with_sound}" = "alsa"; then + AC_MSG_ERROR([ALSA sound support requested but not found.]) fi - - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) - fi + fi dnl with_sound = alsa|yes dnl Define HAVE_SOUND if we have sound support. We know it works and dnl compiles only on the specified platforms. For others, it dnl probably doesn't make sense to try. + dnl FIXME So surely we should bypass this whole section if not using + dnl one of these platforms? if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ + dnl Adjust the --with-sound help text if you change this. gnu-linux|freebsd|netbsd|mingw32) AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) + HAVE_SOUND=yes ;; esac fi @@ -4749,6 +4775,8 @@ echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" +echo " Does Emacs support sound? ${HAVE_SOUND}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.