Now on revision 110550. ------------------------------------------------------------ revno: 110550 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-10-15 12:03:04 +0800 message: More documentation fixes for changes to defun, defmacro, etc. * doc/lispref/functions.texi (Anonymous Functions): Explicitly list the docstring, declare, and interactive arguments to lambda. (Defining Functions): Likewise for defun. (Inline Functions): Likewise for defsubst. (Declare Form): Tweak description. * doc/lispref/macros.texi (Defining Macros): defmacro is now a macro. Explicitly list the docstring and declare arguments. * emacs-lisp/byte-run.el (defsubst): Doc fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-13 01:18:52 +0000 +++ doc/lispref/ChangeLog 2012-10-15 04:03:04 +0000 @@ -1,3 +1,14 @@ +2012-10-15 Chong Yidong + + * macros.texi (Defining Macros): defmacro is now a macro. + Explicitly list the docstring and declare arguments. + + * functions.texi (Anonymous Functions): Explicitly list the + docstring, declare, and interactive arguments to lambda. + (Defining Functions): Likewise for defun. + (Inline Functions): Likewise for defsubst. + (Declare Form): Tweak description. + 2012-10-13 Chong Yidong * display.texi (ImageMagick Images): ImageMagick enabled by default. === modified file 'doc/lispref/functions.texi' --- doc/lispref/functions.texi 2012-10-05 07:38:05 +0000 +++ doc/lispref/functions.texi 2012-10-15 04:03:04 +0000 @@ -522,21 +522,20 @@ is called @dfn{defining a function}, and it is done with the @code{defun} special form. -@defmac defun name argument-list body-forms... +@defmac defun name args [doc] [declare] [interactive] body@dots{} @code{defun} is the usual way to define new Lisp functions. It -defines the symbol @var{name} as a function that looks like this: - -@example -(lambda @var{argument-list} . @var{body-forms}) -@end example - -@code{defun} stores this lambda expression in the function cell of -@var{name}. Its return value is @emph{undefined}. - -As described previously, @var{argument-list} is a list of argument -names and may include the keywords @code{&optional} and @code{&rest}. -Also, the first two of the @var{body-forms} may be a documentation -string and an interactive declaration. @xref{Lambda Components}. +defines the symbol @var{name} as a function with argument list +@var{args} and body forms given by @var{body}. Neither @var{name} nor +@var{args} should be quoted. + +@var{doc}, if present, should be a string specifying the function's +documentation string (@pxref{Function Documentation}). @var{declare}, +if present, should be a @code{declare} form specifying function +metadata (@pxref{Declare Form}). @var{interactive}, if present, +should be an @code{interactive} form specifying how the function is to +be called interactively (@pxref{Interactive Call}). + +The return value of @code{defun} is undefined. Here are some examples: @@ -582,14 +581,14 @@ @end defmac @cindex function aliases -@defun defalias name definition &optional docstring +@defun defalias name definition &optional doc @anchor{Definition of defalias} This special form defines the symbol @var{name} as a function, with definition @var{definition} (which can be any valid Lisp function). Its return value is @emph{undefined}. -If @var{docstring} is non-@code{nil}, it becomes the function -documentation of @var{name}. Otherwise, any documentation provided by +If @var{doc} is non-@code{nil}, it becomes the function documentation +of @var{name}. Otherwise, any documentation provided by @var{definition} is used. The proper place to use @code{defalias} is where a specific function @@ -902,11 +901,14 @@ But typically you should use the @code{lambda} macro, or the @code{function} special form, or the @code{#'} read syntax: -@defmac lambda args body... -This macro returns an anonymous function with argument list @var{args} -and body forms given by @var{body}. In effect, this macro makes -@code{lambda} forms ``self-quoting'': evaluating a form whose @sc{car} -is @code{lambda} yields the form itself: +@defmac lambda args [doc] [interactive] body@dots{} +This macro returns an anonymous function with argument list +@var{args}, documentation string @var{doc} (if any), interactive spec +@var{interactive} (if any), and body forms given by @var{body}. + +In effect, this macro makes @code{lambda} forms ``self-quoting'': +evaluating a form whose @sc{car} is @code{lambda} yields the form +itself: @example (lambda (x) (* x x)) @@ -1169,13 +1171,13 @@ was first made obsolete---for example, a date or a release number. @end defun -@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring +@defmac define-obsolete-function-alias obsolete-name current-name &optional when doc This convenience macro marks the function @var{obsolete-name} obsolete and also defines it as an alias for the function @var{current-name}. It is equivalent to the following: @example -(defalias @var{obsolete-name} @var{current-name} @var{docstring}) +(defalias @var{obsolete-name} @var{current-name} @var{doc}) (make-obsolete @var{obsolete-name} @var{current-name} @var{when}) @end example @end defmac @@ -1213,16 +1215,16 @@ @section Inline Functions @cindex inline functions -@defmac defsubst name argument-list body-forms... -Define an inline function. The syntax is exactly the same as -@code{defun} (@pxref{Defining Functions}). -@end defmac - - You can define an @dfn{inline function} by using @code{defsubst} -instead of @code{defun}. An inline function works just like an -ordinary function except for one thing: when you byte-compile a call + An @dfn{inline function} is a function that works just like an +ordinary function, except for one thing: when you byte-compile a call to the function (@pxref{Byte Compilation}), the function's definition -is expanded into the caller. +is expanded into the caller. To define an inline function, use +@code{defsubst} instead of @code{defun}. + +@defmac defsubst name args [doc] [declare] [interactive] body@dots{} +This macro defines an inline function. Its syntax is exactly the same +as @code{defun} (@pxref{Defining Functions}). +@end defmac Making a function inline often makes its function calls run faster. But it also has disadvantages. For one thing, it reduces flexibility; @@ -1266,16 +1268,13 @@ @anchor{Definition of declare} @defmac declare @var{specs}@dots{} This macro ignores its arguments and evaluates to @code{nil}; it has -no run-time effect. However, when a @code{declare} form occurs as the -@emph{very first form} in the body of a @code{defun} function -definition or a @code{defmacro} macro definition (@pxref{Defining -Macros}, for a description of @code{defmacro}), it appends the -properties specified by @var{specs} to the function or macro. This -work is specially performed by the @code{defun} and @code{defmacro} -macros. - -Note that if you put a @code{declare} form in an interactive function, -it should go before the @code{interactive} form. +no run-time effect. However, when a @code{declare} form occurs in the +@var{declare} argument of a @code{defun} or @code{defsubst} function +definition (@pxref{Defining Functions}) or a @code{defmacro} macro +definition (@pxref{Defining Macros}), it appends the properties +specified by @var{specs} to the function or macro. This work is +specially performed by @code{defun}, @code{defsubst}, and +@code{defmacro}. Each element in @var{specs} should have the form @code{(@var{property} @var{args}@dots{})}, which should not be quoted. These have the === modified file 'doc/lispref/macros.texi' --- doc/lispref/macros.texi 2012-09-30 09:18:38 +0000 +++ doc/lispref/macros.texi 2012-10-15 04:03:04 +0000 @@ -185,35 +185,38 @@ @node Defining Macros @section Defining Macros - A Lisp macro is a list whose @sc{car} is @code{macro}. Its @sc{cdr} should -be a function; expansion of the macro works by applying the function -(with @code{apply}) to the list of unevaluated argument-expressions -from the macro call. + A Lisp macro object is a list whose @sc{car} is @code{macro}, and +whose @sc{cdr} is a lambda expression. Expansion of the macro works +by applying the lambda expression (with @code{apply}) to the list of +@emph{unevaluated} arguments from the macro call. It is possible to use an anonymous Lisp macro just like an anonymous -function, but this is never done, because it does not make sense to pass -an anonymous macro to functionals such as @code{mapcar}. In practice, -all Lisp macros have names, and they are usually defined with the -special form @code{defmacro}. +function, but this is never done, because it does not make sense to +pass an anonymous macro to functionals such as @code{mapcar}. In +practice, all Lisp macros have names, and they are almost always +defined with the @code{defmacro} macro. -@defspec defmacro name argument-list body-forms@dots{} -@code{defmacro} defines the symbol @var{name} as a macro that looks -like this: +@defmac defmacro name args [doc] [declare] body@dots{} +@code{defmacro} defines the symbol @var{name} (which should not be +quoted) as a macro that looks like this: @example -(macro lambda @var{argument-list} . @var{body-forms}) +(macro lambda @var{args} . @var{body}) @end example -(Note that the @sc{cdr} of this list is a function---a lambda expression.) -This macro object is stored in the function cell of @var{name}. Its return -value is @emph{undefined}. +(Note that the @sc{cdr} of this list is a lambda expression.) This +macro object is stored in the function cell of @var{name}. The +meaning of @var{args} is the same as in a function, and the keywords +@code{&rest} and @code{&optional} may be used (@pxref{Argument List}). +Neither @var{name} nor @var{args} should be quoted. The return value +of @code{defmacro} is undefined. -The shape and meaning of @var{argument-list} is the same as in a -function, and the keywords @code{&rest} and @code{&optional} may be used -(@pxref{Argument List}). Macros may have a documentation string, but -any @code{interactive} declaration is ignored since macros cannot be -called interactively. -@end defspec +@var{doc}, if present, should be a string specifying the macro's +documentation string. @var{declare}, if present, should be a +@code{declare} form specifying metadata for the macro (@pxref{Declare +Form}). Note that macros cannot have interactive declarations, since +they cannot be called interactively. +@end defmac Macros often need to construct large list structures from a mixture of constants and nonconstant parts. To make this easier, use the === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-14 17:07:00 +0000 +++ lisp/ChangeLog 2012-10-15 04:03:04 +0000 @@ -1,3 +1,7 @@ +2012-10-15 Chong Yidong + + * emacs-lisp/byte-run.el (defsubst): Doc fix. + 2012-10-14 Eli Zaretskii * window.el (display-buffer): Doc fix. === modified file 'lisp/emacs-lisp/byte-run.el' --- lisp/emacs-lisp/byte-run.el 2012-09-25 04:13:02 +0000 +++ lisp/emacs-lisp/byte-run.el 2012-10-15 04:03:04 +0000 @@ -232,7 +232,8 @@ ;; fns))) (defmacro defsubst (name arglist &rest body) - "Define an inline function. The syntax is just like that of `defun'." + "Define an inline function. The syntax is just like that of `defun'. +\(fn NAME ARGLIST &optional DOCSTRING DECL &rest BODY)" (declare (debug defun) (doc-string 3)) (or (memq (get name 'byte-optimizer) '(nil byte-compile-inline-expand)) ------------------------------------------------------------ revno: 110549 committer: Daniel Colascione branch nick: cyg timestamp: Sun 2012-10-14 17:38:07 -0800 message: Fix cygw32 build break with dbus compilation diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-14 23:25:37 +0000 +++ src/ChangeLog 2012-10-15 01:38:07 +0000 @@ -1,3 +1,9 @@ +2012-10-15 Daniel Colascione + + * dbusbind.c: Fix cygw32 build break when compiling with dbus + enabled by undefining the symbol "interface", which the platform + headers define to something incompatible. + 2012-10-14 Daniel Colascione * image.c (init_tiff_functions, init_imagemagick_functions) === modified file 'src/dbusbind.c' --- src/dbusbind.c 2012-09-15 07:06:56 +0000 +++ src/dbusbind.c 2012-10-15 01:38:07 +0000 @@ -32,6 +32,10 @@ #define DBUS_NUM_MESSAGE_TYPES 5 #endif +#ifdef interface +#undef interface +#endif + /* Subroutines. */ static Lisp_Object Qdbus_init_bus; ------------------------------------------------------------ revno: 110548 committer: Daniel Colascione branch nick: cyg timestamp: Sun 2012-10-14 15:25:37 -0800 message: * image.c (init_tiff_functions, init_imagemagick_functions) (init_svg_functions): Fix cygw32 build break by using these functions only when WINDOWSNT _and_ HAVE_NTGUI. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-14 18:28:48 +0000 +++ src/ChangeLog 2012-10-14 23:25:37 +0000 @@ -1,3 +1,9 @@ +2012-10-14 Daniel Colascione + + * image.c (init_tiff_functions, init_imagemagick_functions) + (init_svg_functions): Fix cygw32 build break by using these + functions only when WINDOWSNT _and_ HAVE_NTGUI. + 2012-10-14 Jan Djärv * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422). === modified file 'src/image.c' --- src/image.c 2012-10-13 00:52:01 +0000 +++ src/image.c 2012-10-14 23:25:37 +0000 @@ -6577,7 +6577,7 @@ {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} }; -#ifdef HAVE_NTGUI +#if defined HAVE_NTGUI && defined WINDOWSNT static bool init_tiff_functions (void); #else #define init_tiff_functions NULL @@ -7529,7 +7529,7 @@ {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} }; -#ifdef HAVE_NTGUI +#if defined HAVE_NTGUI && defined WINDOWSNT static bool init_imagemagick_functions (void); #else #define init_imagemagick_functions NULL @@ -8083,7 +8083,7 @@ {":background", IMAGE_STRING_OR_NIL_VALUE, 0} }; -#ifdef HAVE_NTGUI +#if defined HAVE_NTGUI && defined WINDOWSNT static bool init_svg_functions (void); #else #define init_svg_functions NULL ------------------------------------------------------------ revno: 110547 committer: David Engster branch nick: trunk timestamp: Sun 2012-10-14 21:31:45 +0200 message: Fix last commit. (semantic-analyze-possible-completions): Replace CEDET compatibility function `cedet-called-interactively-p' with `called-interactively-p'. diff: === modified file 'lisp/cedet/semantic/analyze/complete.el' --- lisp/cedet/semantic/analyze/complete.el 2012-10-14 19:20:28 +0000 +++ lisp/cedet/semantic/analyze/complete.el 2012-10-14 19:31:45 +0000 @@ -104,7 +104,7 @@ ans)) ;; Buffer was not parsed by Semantic. ;; Raise error if called interactively. - (when (cedet-called-interactively-p 'any) + (when (called-interactively-p 'any) (error "Buffer was not parsed by Semantic.")))) (defun semantic-analyze-possible-completions-default (context &optional flags) ------------------------------------------------------------ revno: 110546 [merge] committer: David Engster branch nick: trunk timestamp: Sun 2012-10-14 21:24:16 +0200 message: Merge bug fixes from CEDET upstream. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-08 19:40:50 +0000 +++ lisp/cedet/ChangeLog 2012-10-14 19:24:16 +0000 @@ -1,3 +1,33 @@ +2012-10-14 David Engster + + * semantic.el (semantic-error-if-unparsed): New function. Raise + error if buffer was not parsed by Semantic (bug #12045). + (navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items + only if buffer was parsed. Also, replace ':active' with ':enable' + where necessary. + + * semantic/wisent/python.el + (semantic-python-get-system-include-path): Use + `python-shell-internal-send-string' if available to query Python + for system paths. + + * semantic/senator.el (senator-next-tag): + (senator-previous-tag): + (senator-go-to-up-reference): Use `semantic-error-if-unparsed'. + + * semantic/complete.el (semantic-complete-jump-local): + (semantic-complete-jump): + (semantic-complete-jump-local-members): + (semantic-complete-self-insert): Use `semantic-error-if-unparsed'. + (semantic-complete-inline-project): Fix autoload cookie. + + * semantic/analyze/complete.el + (semantic-analyze-possible-completions): Check if buffer was + parsed. Only raise an error if function was called interactively, + otherwise silently return nil. + + * cedet.el (cedet-menu-map): Fix copy&paste typo in menu creation. + 2012-10-08 David Engster > * semantic/bovine/el.el: Add `semantic-default-elisp-setup' to === modified file 'lisp/cedet/cedet.el' --- lisp/cedet/cedet.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/cedet.el 2012-10-14 19:20:28 +0000 @@ -59,7 +59,7 @@ (define-key map [navigate-menu] 'undefined) (define-key map [semantic-options-separator] 'undefined) (define-key map [global-semantic-highlight-func-mode] 'undefined) - (define-key map [global-semantic-highlight-func-mode] 'undefined) + (define-key map [global-semantic-stickyfunc-mode] 'undefined) (define-key map [global-semantic-decoration-mode] 'undefined) (define-key map [global-semantic-idle-completions-mode] 'undefined) (define-key map [global-semantic-idle-summary-mode] 'undefined) === modified file 'lisp/cedet/semantic.el' --- lisp/cedet/semantic.el 2012-10-07 18:12:46 +0000 +++ lisp/cedet/semantic.el 2012-10-14 19:20:28 +0000 @@ -319,6 +319,11 @@ "Return non-nil if the current buffer was set up for parsing." semantic-new-buffer-fcn-was-run) +(defsubst semantic-error-if-unparsed () + "Raise an error if current buffer was not parsed by Semantic." + (unless semantic-new-buffer-fcn-was-run + (error "Buffer was not parsed by Semantic."))) + (defsubst semantic--umatched-syntax-needs-refresh-p () "Return non-nil if the unmatched syntax cache needs a refresh. That is, if it is dirty or if the current parse tree isn't up to date." @@ -907,75 +912,91 @@ ;; Edit Tags submenu: (define-key edit-menu [semantic-analyze-possible-completions] '(menu-item "List Completions" semantic-analyze-possible-completions + :enable (semantic-active-p) :help "Display a list of completions for the tag at point")) (define-key edit-menu [semantic-complete-analyze-inline] '(menu-item "Complete Tag Inline" semantic-complete-analyze-inline + :enable (semantic-active-p) :help "Display inline completion for the tag at point")) (define-key edit-menu [semantic-completion-separator] '("--")) (define-key edit-menu [senator-transpose-tags-down] '(menu-item "Transpose Tags Down" senator-transpose-tags-down - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Transpose the current tag and the next tag")) (define-key edit-menu [senator-transpose-tags-up] '(menu-item "Transpose Tags Up" senator-transpose-tags-up - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Transpose the current tag and the previous tag")) (define-key edit-menu [semantic-edit-separator] '("--")) (define-key edit-menu [senator-yank-tag] '(menu-item "Yank Tag" senator-yank-tag - :active (not (ring-empty-p senator-tag-ring)) + :enable (not (ring-empty-p senator-tag-ring)) :help "Yank the head of the tag ring into the buffer")) (define-key edit-menu [senator-copy-tag-to-register] '(menu-item "Copy Tag To Register" senator-copy-tag-to-register - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Yank the head of the tag ring into the buffer")) (define-key edit-menu [senator-copy-tag] '(menu-item "Copy Tag" senator-copy-tag - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Copy the current tag to the tag ring")) (define-key edit-menu [senator-kill-tag] '(menu-item "Kill Tag" senator-kill-tag - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Kill the current tag, and copy it to the tag ring")) ;; Navigate Tags submenu: (define-key navigate-menu [senator-narrow-to-defun] '(menu-item "Narrow to Tag" senator-narrow-to-defun - :active (semantic-current-tag) + :enable (and (semantic-active-p) + (semantic-current-tag)) :help "Narrow the buffer to the bounds of the current tag")) (define-key navigate-menu [semantic-narrow-to-defun-separator] '("--")) (define-key navigate-menu [semantic-symref-symbol] '(menu-item "Find Tag References..." semantic-symref-symbol + :enable (semantic-active-p) :help "Read a tag and list the references to it")) (define-key navigate-menu [semantic-complete-jump] '(menu-item "Find Tag Globally..." semantic-complete-jump + :enable (semantic-active-p) :help "Read a tag name and find it in the current project")) (define-key navigate-menu [semantic-complete-jump-local-members] '(menu-item "Find Local Members ..." semantic-complete-jump-local-members + :enable (semantic-active-p) :help "Read a tag name and find a local member with that name")) (define-key navigate-menu [semantic-complete-jump-local] '(menu-item "Find Tag in This Buffer..." semantic-complete-jump-local + :enable (semantic-active-p) :help "Read a tag name and find it in this buffer")) (define-key navigate-menu [semantic-navigation-separator] '("--")) (define-key navigate-menu [senator-go-to-up-reference] '(menu-item "Parent Tag" senator-go-to-up-reference + :enable (semantic-active-p) :help "Navigate up one reference by tag")) (define-key navigate-menu [senator-next-tag] '(menu-item "Next Tag" senator-next-tag + :enable (semantic-active-p) :help "Go to the next tag")) (define-key navigate-menu [senator-previous-tag] '(menu-item "Previous Tag" senator-previous-tag + :enable (semantic-active-p) :help "Go to the previous tag")) ;; Top level menu items: (define-key cedet-menu-map [semantic-force-refresh] '(menu-item "Reparse Buffer" semantic-force-refresh :help "Force a full reparse of the current buffer" - :visible semantic-mode)) + :visible semantic-mode + :enable (semantic-active-p))) (define-key cedet-menu-map [semantic-edit-menu] `(menu-item "Edit Tags" ,edit-menu :visible semantic-mode)) === modified file 'lisp/cedet/semantic/analyze/complete.el' --- lisp/cedet/semantic/analyze/complete.el 2012-01-19 07:21:25 +0000 +++ lisp/cedet/semantic/analyze/complete.el 2012-10-14 19:20:28 +0000 @@ -87,20 +87,25 @@ ;; In theory, we don't need the below since the context will ;; do it for us. ;;(semantic-refresh-tags-safe) - (with-syntax-table semantic-lex-syntax-table - (let* ((context (if (semantic-analyze-context-child-p context) - context - (semantic-analyze-current-context context))) - (ans (if (not context) - (error "Nothing to complete") - (:override)))) - ;; If interactive, display them. - (when (called-interactively-p 'any) - (with-output-to-temp-buffer "*Possible Completions*" - (semantic-analyze-princ-sequence ans "" (current-buffer))) - (shrink-window-if-larger-than-buffer - (get-buffer-window "*Possible Completions*"))) - ans))) + (if (semantic-active-p) + (with-syntax-table semantic-lex-syntax-table + (let* ((context (if (semantic-analyze-context-child-p context) + context + (semantic-analyze-current-context context))) + (ans (if (not context) + (error "Nothing to complete") + (:override)))) + ;; If interactive, display them. + (when (called-interactively-p 'any) + (with-output-to-temp-buffer "*Possible Completions*" + (semantic-analyze-princ-sequence ans "" (current-buffer))) + (shrink-window-if-larger-than-buffer + (get-buffer-window "*Possible Completions*"))) + ans)) + ;; Buffer was not parsed by Semantic. + ;; Raise error if called interactively. + (when (cedet-called-interactively-p 'any) + (error "Buffer was not parsed by Semantic.")))) (defun semantic-analyze-possible-completions-default (context &optional flags) "Default method for producing smart completions. === modified file 'lisp/cedet/semantic/complete.el' --- lisp/cedet/semantic/complete.el 2012-10-06 20:30:26 +0000 +++ lisp/cedet/semantic/complete.el 2012-10-14 19:20:28 +0000 @@ -2088,6 +2088,7 @@ (defun semantic-complete-jump-local () "Jump to a local semantic symbol." (interactive) + (semantic-error-if-unparsed) (let ((tag (semantic-complete-read-tag-buffer-deep "Jump to symbol: "))) (when (semantic-tag-p tag) (push-mark) @@ -2101,6 +2102,7 @@ (defun semantic-complete-jump () "Jump to a semantic symbol." (interactive) + (semantic-error-if-unparsed) (let* ((tag (semantic-complete-read-tag-project "Jump to symbol: "))) (when (semantic-tag-p tag) (push-mark) @@ -2115,6 +2117,7 @@ (defun semantic-complete-jump-local-members () "Jump to a semantic symbol." (interactive) + (semantic-error-if-unparsed) (let* ((tag (semantic-complete-read-tag-local-members "Jump to symbol: "))) (when (semantic-tag-p tag) (let ((start (condition-case nil (semantic-tag-start tag) @@ -2216,7 +2219,7 @@ (error nil)) )) -;;;;###autoload +;;;###autoload (defun semantic-complete-inline-project () "Perform inline completion for any symbol in the current project. `semantic-analyze-possible-completions' is used to determine the === modified file 'lisp/cedet/semantic/senator.el' --- lisp/cedet/semantic/senator.el 2012-01-19 07:21:25 +0000 +++ lisp/cedet/semantic/senator.el 2012-10-14 19:20:28 +0000 @@ -255,6 +255,7 @@ "Navigate to the next Semantic tag. Return the tag or nil if at end of buffer." (interactive) + (semantic-error-if-unparsed) (let ((pos (point)) (tag (semantic-current-tag)) where) @@ -294,6 +295,7 @@ "Navigate to the previous Semantic tag. Return the tag or nil if at beginning of buffer." (interactive) + (semantic-error-if-unparsed) (let ((pos (point)) (tag (semantic-current-tag)) where) @@ -519,6 +521,7 @@ is found, we can jump to it. Some tags such as includes have other reference features." (interactive) + (semantic-error-if-unparsed) (let ((result (semantic-up-reference (or tag (semantic-current-tag))))) (if (not result) (error "No up reference found") === modified file 'lisp/cedet/semantic/wisent/python.el' --- lisp/cedet/semantic/wisent/python.el 2012-10-07 18:23:50 +0000 +++ lisp/cedet/semantic/wisent/python.el 2012-10-14 19:20:28 +0000 @@ -48,24 +48,15 @@ (defun semantic-python-get-system-include-path () "Evaluate some Python code that determines the system include path." - (python-proc) - (if python-buffer - (with-current-buffer python-buffer - (set (make-local-variable 'python-preoutput-result) nil) - (python-send-string - "import sys; print '_emacs_out ' + '\\0'.join(sys.path)") - (accept-process-output (python-proc) 2) - (if python-preoutput-result - (split-string python-preoutput-result "[\0\n]" t) - ;; Try a second, Python3k compatible shot - (python-send-string - "import sys; print('_emacs_out ' + '\\0'.join(sys.path))") - (accept-process-output (python-proc) 2) - (if python-preoutput-result - (split-string python-preoutput-result "[\0\n]" t) - (message "Timeout while querying Python for system include path.") - nil))) - (message "Python seems to be unavailable on this system."))) + (delq nil + (mapcar + (lambda (dir) + (when (file-directory-p dir) + dir)) + (split-string + (python-shell-internal-send-string + "import sys;print ('\\n'.join(sys.path))") + "\n" t)))) (defcustom-mode-local-semantic-dependency-system-include-path python-mode semantic-python-dependency-system-include-path ------------------------------------------------------------ revno: 110545 fixes bug: http://debbugs.gnu.org/12422 committer: Jan D. branch nick: trunk timestamp: Sun 2012-10-14 20:28:48 +0200 message: * nsterm.m (ns_select): Count fd:s in writefs also. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-14 00:17:07 +0000 +++ src/ChangeLog 2012-10-14 18:28:48 +0000 @@ -1,3 +1,7 @@ +2012-10-14 Jan Djärv + + * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422). + 2012-10-13 Jan Djärv * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612). === modified file 'src/nsterm.m' --- src/nsterm.m 2012-10-12 17:50:39 +0000 +++ src/nsterm.m 2012-10-14 18:28:48 +0000 @@ -3444,7 +3444,10 @@ /* NSTRACE (ns_select); */ for (k = 0; readfds && k < nfds+1; k++) - if (FD_ISSET(k, readfds)) ++nr; + { + if (FD_ISSET(k, readfds)) ++nr; + if (FD_ISSET(k, writefds)) ++nr; + } if (NSApp == nil || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0)) ------------------------------------------------------------ revno: 110544 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-10-14 19:07:00 +0200 message: lisp/window.el (display-buffer): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-14 07:40:05 +0000 +++ lisp/ChangeLog 2012-10-14 17:07:00 +0000 @@ -1,5 +1,7 @@ 2012-10-14 Eli Zaretskii + * window.el (display-buffer): Doc fix. + * progmodes/compile.el (compilation-error-regexp-alist-alist): Adjust the msft regexp to the output of Studio 2010, and move msft before edg-1. See the discussion on emacs-devel, === modified file 'lisp/window.el' --- lisp/window.el 2012-10-10 09:36:45 +0000 +++ lisp/window.el 2012-10-14 17:07:00 +0000 @@ -5361,8 +5361,16 @@ buffer. Return the window chosen for displaying BUFFER-OR-NAME, or nil if no such window is found. -Optional argument ACTION should have the form (FUNCTION . ALIST). -FUNCTION is either a function or a list of functions. +Optional argument ACTION, if non-nil, should specify a display +action. Its form is described below. + +Optional argument FRAME, if non-nil, acts like an additional +ALIST entry (reusable-frames . FRAME) to the action list of ACTION, +specifying the frame(s) to search for a window that is already +displaying the buffer. See `display-buffer-reuse-window' + +If ACTION is non-nil, it should have the form (FUNCTION . ALIST), +where FUNCTION is either a function or a list of functions, and ALIST is an arbitrary association list (alist). Each such FUNCTION should accept two arguments: the buffer to @@ -5379,6 +5387,9 @@ buffer as the first argument and the combined alist as the second argument, until one of the functions returns non-nil. +If ACTION is nil, the function list and the alist are built using +only the other variables mentioned above. + Available action functions include: `display-buffer-same-window' `display-buffer-reuse-window' @@ -5407,12 +5418,7 @@ and non-list value. This means to display the buffer in a window other than the selected one, even if it is already displayed in the selected window. If called interactively with a prefix -argument, ACTION is t. - -Optional argument FRAME, if non-nil, acts like an additional -ALIST entry (reusable-frames . FRAME), specifying the frame(s) to -search for a window that is already displaying the buffer. See -`display-buffer-reuse-window'." +argument, ACTION is t." (interactive (list (read-buffer "Display buffer: " (other-buffer)) (if current-prefix-arg t))) (let ((buffer (if (bufferp buffer-or-name) ------------------------------------------------------------ revno: 110543 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Sun 2012-10-14 17:06:52 +0900 message: Add more mappings for the charset japanese-jisx0208-1978. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-10-11 11:29:47 +0000 +++ admin/ChangeLog 2012-10-14 08:01:30 +0000 @@ -1,3 +1,7 @@ +2012-10-12 Kenichi Handa + + * charsets/Makefile (JISC6226.map): Add missing mappings. + 2012-10-11 Kenichi Handa * charsets/mapconv: Adjusted for the change of mapfiles/*.gz to === modified file 'admin/charsets/Makefile' --- admin/charsets/Makefile 2012-10-11 11:26:26 +0000 +++ admin/charsets/Makefile 2012-10-14 08:01:30 +0000 @@ -197,9 +197,19 @@ eucjp-ms.el: ${GLIBC_CHARMAPS}/EUC-JP-MS.gz eucjp-ms.awk @zcat $< | $(AWK) -f eucjp-ms.awk > $@ -JISC6226.map : mapfiles/Uni2JIS mapconv kuten.awk +JISC6226.map: mapfiles/Uni2JIS mapconv kuten.awk # Generating $@... - @./mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@ +# As Uni2JIS doesn't contain mappings of characters added to Unicode +# recently, we add them manually here (including one correction for +# U+005C vs U+FF3C). These changes are based on bogytech's blog at +# http://bogytech.blogspot.jp/search/label/emacs. + @./mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk \ + | sed -e '/0x2140/s/005C/FF3C/' \ + -e '$$ a 0x3442 0x3D4E' \ + -e '$$ a 0x374E 0x25874' \ + -e '$$ a 0x3764 0x28EF6' \ + -e '$$ a 0x513D 0x2F80F' \ + -e '$$ a 0x7045 0x9724' > $@ KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR.gz mapconv compact.awk # Generating $@... === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-10-14 07:40:05 +0000 +++ etc/ChangeLog 2012-10-14 08:06:11 +0000 @@ -1,3 +1,7 @@ +2012-10-14 Kenichi Handa + + * charsets/JISC6226.map: Re-generated. + 2012-10-14 Eli Zaretskii * compilation.txt (msft): Add error messages in new Studio 2010 === modified file 'etc/charsets/JISC6226.map' --- etc/charsets/JISC6226.map 2012-10-11 11:26:26 +0000 +++ etc/charsets/JISC6226.map 2012-10-14 08:01:30 +0000 @@ -31,7 +31,7 @@ 0x213D 0x2014 0x213E 0x2010 0x213F 0xFF0F -0x2140 0x005C +0x2140 0xFF3C 0x2141 0x301C 0x2142 0x2016 0x2143 0xFF5C @@ -6797,3 +6797,8 @@ 0x737C 0x9F95 0x737D 0x9F9C 0x737E 0x9FA0 +0x3442 0x3D4E +0x374E 0x25874 +0x3764 0x28EF6 +0x513D 0x2F80F +0x7045 0x9724 ------------------------------------------------------------ revno: 110542 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-10-14 09:40:05 +0200 message: Adapt compile.el to changes in MSVC diagnostics format. lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Adjust the msft regexp to the output of Studio 2010, and move msft before edg-1. See the discussion on emacs-devel, http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00579.html, for the details. etc/compilation.txt (msft): Add error messages in new Studio 2010 format. test/automated/compile-tests.el (compile-tests--test-regexps-data): Add data for msft's new format. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-10-11 11:26:26 +0000 +++ etc/ChangeLog 2012-10-14 07:40:05 +0000 @@ -1,3 +1,8 @@ +2012-10-14 Eli Zaretskii + + * compilation.txt (msft): Add error messages in new Studio 2010 + format. + 2012-10-11 Kenichi Handa * charsets/CNS-2.map, charsets/CNS-3.map, charsets/CNS-4.map, === modified file 'etc/compilation.txt' --- etc/compilation.txt 2012-01-19 07:21:25 +0000 +++ etc/compilation.txt 2012-10-14 07:40:05 +0000 @@ -308,6 +308,13 @@ keyboard handler.c(537) : warning C4005: 'min' : macro redefinition d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' d:\tmp\test.c(1145) : see declaration of 'nsRefPtr' +1>test_main.cpp(29): error C2144: syntax error : 'int' should be preceded by ';' +1>test_main.cpp(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int +1> +1>Build FAILED. +1> +1>Time Elapsed 00:00:01.46 +========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== * Open Watcom === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-14 01:42:48 +0000 +++ lisp/ChangeLog 2012-10-14 07:40:05 +0000 @@ -1,3 +1,11 @@ +2012-10-14 Eli Zaretskii + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Adjust the msft regexp to the output of Studio 2010, and move msft + before edg-1. See the discussion on emacs-devel, + http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00579.html, + for the details. + 2012-10-14 Stefan Monnier * emacs-lisp/eieio.el (eieio-oset-default, eieio-oset, oset-default) === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2012-09-24 12:23:25 +0000 +++ lisp/progmodes/compile.el 2012-10-14 07:40:05 +0000 @@ -171,6 +171,15 @@ "\\(?:^cucumber\\(?: -p [^[:space:]]+\\)?\\|#\\)\ \\(?: \\)\\([^\(].*\\):\\([1-9][0-9]*\\)" 1 2) + (msft + ;; Must be before edg-1, so that MSVC's longer messages are + ;; considered before EDG. + ;; The message may be a "warning", "error", or "fatal error" with + ;; an error code, or "see declaration of" without an error code. + "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) ?\ +: \\(?:see declaration\\|\\(?:warnin\\(g\\)\\|[a-z ]+\\) C[0-9]+:\\)" + 2 3 nil (4)) + (edg-1 "^\\([^ \n]+\\)(\\([0-9]+\\)): \\(?:error\\|warnin\\(g\\)\\|remar\\(k\\)\\)" 1 2 nil (3 . 4)) === modified file 'test/ChangeLog' --- test/ChangeLog 2012-09-08 23:32:25 +0000 +++ test/ChangeLog 2012-10-14 07:40:05 +0000 @@ -1,3 +1,8 @@ +2012-10-14 Eli Zaretskii + + * automated/compile-tests.el (compile-tests--test-regexps-data): + Add new data for msft's new format. + 2012-09-08 Dmitry Gutov * automated/ruby-mode-tests.el: === modified file 'test/automated/compile-tests.el' --- test/automated/compile-tests.el 2012-05-21 04:28:41 +0000 +++ test/automated/compile-tests.el 2012-10-14 07:40:05 +0000 @@ -215,6 +215,10 @@ 1 nil 23 "d:\\tmp\\test.c") ("d:\\tmp\\test.c(1145) : see declaration of 'nsRefPtr'" 1 nil 1145 "d:\\tmp\\test.c") + ("1>test_main.cpp(29): error C2144: syntax error : 'int' should be preceded by ';'" + 3 nil 29 "test_main.cpp") + ("1>test_main.cpp(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" + 3 nil 29 "test_main.cpp") ;; watcom ("..\src\ctrl\lister.c(109): Error! E1009: Expecting ';' but found '{'" 1 nil 109 "..\src\ctrl\lister.c") ------------------------------------------------------------ revno: 110541 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-10-13 21:42:48 -0400 message: * lisp/emacs-lisp/eieio.el (eieio-oset-default, eieio-oset, oset-default) (oset): Move uses of object-class-fast macro after its definition. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-14 01:39:56 +0000 +++ lisp/ChangeLog 2012-10-14 01:42:48 +0000 @@ -1,5 +1,8 @@ 2012-10-14 Stefan Monnier + * emacs-lisp/eieio.el (eieio-oset-default, eieio-oset, oset-default) + (oset): Move uses of object-class-fast macro after its definition. + * emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code. 2012-10-13 Chong Yidong === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2012-10-12 20:07:58 +0000 +++ lisp/emacs-lisp/eieio.el 2012-10-14 01:42:48 +0000 @@ -1556,71 +1556,6 @@ ;; return it verbatim (t val))) -;;; Object Set macros -;; -(defmacro oset (obj slot value) - "Set the value in OBJ for slot SLOT to VALUE. -SLOT is the slot name as specified in `defclass' or the tag created -with in the :initarg slot. VALUE can be any Lisp object." - `(eieio-oset ,obj (quote ,slot) ,value)) - -(defun eieio-oset (obj slot value) - "Do the work for the macro `oset'. -Fills in OBJ's SLOT with VALUE." - (if (not (eieio-object-p obj)) (signal 'wrong-type-argument (list 'eieio-object-p obj))) - (if (not (symbolp slot)) (signal 'wrong-type-argument (list 'symbolp slot))) - (let ((c (eieio-slot-name-index (object-class-fast obj) obj slot))) - (if (not c) - ;; It might be missing because it is a :class allocated slot. - ;; Let's check that info out. - (if (setq c - (eieio-class-slot-name-index (aref obj object-class) slot)) - ;; Oset that slot. - (progn - (eieio-validate-class-slot-value (object-class-fast obj) c value slot) - (aset (aref (class-v (aref obj object-class)) - class-class-allocation-values) - c value)) - ;; See oref for comment on `slot-missing' - (slot-missing obj slot 'oset value) - ;;(signal 'invalid-slot-name (list (object-name obj) slot)) - ) - (eieio-validate-slot-value (object-class-fast obj) c value slot) - (aset obj c value)))) - -(defmacro oset-default (class slot value) - "Set the default slot in CLASS for SLOT to VALUE. -The default value is usually set with the :initform tag during class -creation. This allows users to change the default behavior of classes -after they are created." - `(eieio-oset-default ,class (quote ,slot) ,value)) - -(defun eieio-oset-default (class slot value) - "Do the work for the macro `oset-default'. -Fills in the default value in CLASS' in SLOT with VALUE." - (if (not (class-p class)) (signal 'wrong-type-argument (list 'class-p class))) - (if (not (symbolp slot)) (signal 'wrong-type-argument (list 'symbolp slot))) - (let* ((scoped-class class) - (c (eieio-slot-name-index class nil slot))) - (if (not c) - ;; It might be missing because it is a :class allocated slot. - ;; Let's check that info out. - (if (setq c (eieio-class-slot-name-index class slot)) - (progn - ;; Oref that slot. - (eieio-validate-class-slot-value class c value slot) - (aset (aref (class-v class) class-class-allocation-values) c - value)) - (signal 'invalid-slot-name (list (class-name class) slot))) - (eieio-validate-slot-value class c value slot) - ;; Set this into the storage for defaults. - (setcar (nthcdr (- c 3) (aref (class-v class) class-public-d)) - value) - ;; Take the value, and put it into our cache object. - (eieio-oset (aref (class-v class) class-default-object-cache) - slot value) - ))) - ;;; Handy CLOS macros ;; (defmacro with-slots (spec-list object &rest body) @@ -1871,6 +1806,71 @@ (setq ia (cdr ia))) f)) +;;; Object Set macros +;; +(defmacro oset (obj slot value) + "Set the value in OBJ for slot SLOT to VALUE. +SLOT is the slot name as specified in `defclass' or the tag created +with in the :initarg slot. VALUE can be any Lisp object." + `(eieio-oset ,obj (quote ,slot) ,value)) + +(defun eieio-oset (obj slot value) + "Do the work for the macro `oset'. +Fills in OBJ's SLOT with VALUE." + (if (not (eieio-object-p obj)) (signal 'wrong-type-argument (list 'eieio-object-p obj))) + (if (not (symbolp slot)) (signal 'wrong-type-argument (list 'symbolp slot))) + (let ((c (eieio-slot-name-index (object-class-fast obj) obj slot))) + (if (not c) + ;; It might be missing because it is a :class allocated slot. + ;; Let's check that info out. + (if (setq c + (eieio-class-slot-name-index (aref obj object-class) slot)) + ;; Oset that slot. + (progn + (eieio-validate-class-slot-value (object-class-fast obj) c value slot) + (aset (aref (class-v (aref obj object-class)) + class-class-allocation-values) + c value)) + ;; See oref for comment on `slot-missing' + (slot-missing obj slot 'oset value) + ;;(signal 'invalid-slot-name (list (object-name obj) slot)) + ) + (eieio-validate-slot-value (object-class-fast obj) c value slot) + (aset obj c value)))) + +(defmacro oset-default (class slot value) + "Set the default slot in CLASS for SLOT to VALUE. +The default value is usually set with the :initform tag during class +creation. This allows users to change the default behavior of classes +after they are created." + `(eieio-oset-default ,class (quote ,slot) ,value)) + +(defun eieio-oset-default (class slot value) + "Do the work for the macro `oset-default'. +Fills in the default value in CLASS' in SLOT with VALUE." + (if (not (class-p class)) (signal 'wrong-type-argument (list 'class-p class))) + (if (not (symbolp slot)) (signal 'wrong-type-argument (list 'symbolp slot))) + (let* ((scoped-class class) + (c (eieio-slot-name-index class nil slot))) + (if (not c) + ;; It might be missing because it is a :class allocated slot. + ;; Let's check that info out. + (if (setq c (eieio-class-slot-name-index class slot)) + (progn + ;; Oref that slot. + (eieio-validate-class-slot-value class c value slot) + (aset (aref (class-v class) class-class-allocation-values) c + value)) + (signal 'invalid-slot-name (list (class-name class) slot))) + (eieio-validate-slot-value class c value slot) + ;; Set this into the storage for defaults. + (setcar (nthcdr (- c 3) (aref (class-v class) class-public-d)) + value) + ;; Take the value, and put it into our cache object. + (eieio-oset (aref (class-v class) class-default-object-cache) + slot value) + ))) + ;;; CLOS queries into classes and slots ;; (defun slot-boundp (object slot) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.