------------------------------------------------------------ revno: 115519 committer: Dani Moncayo branch nick: trunk timestamp: Sat 2013-12-14 10:30:15 +0100 message: * configure.ac (srcdir) [MINGW32]: Convert to an absolute MSYS path of the form "/c/foo/bar" to simplify conversion of formats. diff: === modified file 'ChangeLog' --- ChangeLog 2013-12-13 18:25:30 +0000 +++ ChangeLog 2013-12-14 09:30:15 +0000 @@ -1,3 +1,8 @@ +2013-12-14 Dani Moncayo + + * configure.ac (srcdir) [MINGW32]: Convert to an absolute MSYS + path of the form "/c/foo/bar" to simplify conversion of formats. + 2013-12-13 Glenn Morris * INSTALL: No longer mention load-path and site-init/site-load. === modified file 'configure.ac' --- configure.ac 2013-12-12 04:53:59 +0000 +++ configure.ac 2013-12-14 09:30:15 +0000 @@ -24,7 +24,16 @@ AC_PREREQ(2.65) AC_INIT(emacs, 24.3.50) -test "x$MSYSTEM" = "xMINGW32" && . $srcdir/nt/mingw-cfg.site +if test "x$MSYSTEM" = "xMINGW32" +then + . $srcdir/nt/mingw-cfg.site + + # Convert srcdir to an absolute MSYS path of the form "/c/foo/bar" + # to simplify later conversions of paths to windows-native format + # "c:/foo/bar" + srcdir=`cd "${srcdir}" && pwd -W` + srcdir="/${srcdir:0:1}${srcdir:2}" +fi dnl Set emacs_config_options to the options of 'configure', quoted for the shell, dnl and then quoted again for a C string. Separate options with spaces. ------------------------------------------------------------ revno: 115518 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-12-14 11:18:23 +0200 message: Minor tweak of the last commit. diff: === modified file 'src/alloc.c' --- src/alloc.c 2013-12-14 09:16:10 +0000 +++ src/alloc.c 2013-12-14 09:18:23 +0000 @@ -2881,7 +2881,7 @@ struct font *fnt = (struct font *) vector; if (fnt->driver) - fnt->driver->close ((struct font *) vector); + fnt->driver->close (fnt); } } ------------------------------------------------------------ revno: 115517 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-12-14 11:16:10 +0200 message: Avoid crashing due to closing of font whose driver pointer is NULL. src/alloc.c (cleanup_vector): Don't call the font driver's 'close' method if the 'driver' pointer is NULL. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-14 08:29:42 +0000 +++ src/ChangeLog 2013-12-14 09:16:10 +0000 @@ -1,5 +1,8 @@ 2013-12-14 Eli Zaretskii + * alloc.c (cleanup_vector): Don't call the font driver's 'close' + method if the 'driver' pointer is NULL. + * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the Windows-specific code to w32.c. Change error message text to match that of Posix platforms. === modified file 'src/alloc.c' --- src/alloc.c 2013-12-13 15:55:23 +0000 +++ src/alloc.c 2013-12-14 09:16:10 +0000 @@ -2877,7 +2877,12 @@ if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT) && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX)) - ((struct font *) vector)->driver->close ((struct font *) vector); + { + struct font *fnt = (struct font *) vector; + + if (fnt->driver) + fnt->driver->close ((struct font *) vector); + } } /* Reclaim space used by unmarked vectors. */ ------------------------------------------------------------ revno: 115516 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-12-14 10:33:06 +0200 message: src/fileio.c: Remove redundant empty #ifdef. diff: === modified file 'src/fileio.c' --- src/fileio.c 2013-12-14 08:29:42 +0000 +++ src/fileio.c 2013-12-14 08:33:06 +0000 @@ -146,9 +146,6 @@ static Lisp_Object Qsubstitute_env_in_file_name; -#ifdef WINDOWSNT -#endif - Lisp_Object Qfile_error, Qfile_notify_error; static Lisp_Object Qfile_already_exists, Qfile_date_error; static Lisp_Object Qexcl; ------------------------------------------------------------ revno: 115515 fixes bug: http://debbugs.gnu.org/7100 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-12-14 10:29:42 +0200 message: Fix copy-file on MS-Windows with file names outside of current locale. src/fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the Windows-specific code to w32.c. Change error message text to match that of Posix platforms. src/w32.c (w32_copy_file): New function, most of the code copied and reworked from Fcopy_file. Improve error handling. Plug memory leak when errors are thrown. Support file names outside of the current codepage. (Bug#7100) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-13 22:27:05 +0000 +++ src/ChangeLog 2013-12-14 08:29:42 +0000 @@ -1,3 +1,14 @@ +2013-12-14 Eli Zaretskii + + * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the + Windows-specific code to w32.c. Change error message text to + match that of Posix platforms. + + * w32.c (w32_copy_file): New function, most of the code copied and + reworked from Fcopy_file. Improve error handling. Plug memory + leak when errors are thrown. Support file names outside of the + current codepage. (Bug#7100) + 2013-12-13 Paul Eggert * lread.c (load_path_default): Prototype. === modified file 'src/fileio.c' --- src/fileio.c 2013-12-12 20:52:38 +0000 +++ src/fileio.c 2013-12-14 08:29:42 +0000 @@ -1959,7 +1959,7 @@ int conlength = 0; #endif #ifdef WINDOWSNT - acl_t acl = NULL; + int result; #endif encoded_file = encoded_newname = Qnil; @@ -1996,52 +1996,20 @@ out_st.st_mode = 0; #ifdef WINDOWSNT - if (!NILP (preserve_extended_attributes)) - { - acl = acl_get_file (SDATA (encoded_file), ACL_TYPE_ACCESS); - if (acl == NULL && acl_errno_valid (errno)) - report_file_error ("Getting ACL", file); - } - if (!CopyFile (SDATA (encoded_file), - SDATA (encoded_newname), - FALSE)) - { - /* CopyFile doesn't set errno when it fails. By far the most - "popular" reason is that the target is read-only. */ - report_file_errno ("Copying file", list2 (file, newname), - GetLastError () == 5 ? EACCES : EPERM); - } - /* CopyFile retains the timestamp by default. */ - else if (NILP (keep_time)) - { - struct timespec now; - DWORD attributes; - char * filename; - - filename = SDATA (encoded_newname); - - /* Ensure file is writable while its modified time is set. */ - attributes = GetFileAttributes (filename); - SetFileAttributes (filename, attributes & ~FILE_ATTRIBUTE_READONLY); - now = current_timespec (); - if (set_file_times (-1, filename, now, now)) - { - /* Restore original attributes. */ - SetFileAttributes (filename, attributes); - xsignal2 (Qfile_date_error, - build_string ("Cannot set file date"), newname); - } - /* Restore original attributes. */ - SetFileAttributes (filename, attributes); - } - if (acl != NULL) - { - bool fail = - acl_set_file (SDATA (encoded_newname), ACL_TYPE_ACCESS, acl) != 0; - if (fail && acl_errno_valid (errno)) - report_file_error ("Setting ACL", newname); - - acl_free (acl); + result = w32_copy_file (SSDATA (encoded_file), SSDATA (encoded_newname), + !NILP (keep_time), !NILP (preserve_uid_gid), + !NILP (preserve_extended_attributes)); + switch (result) + { + case -1: + report_file_error ("Copying file", list2 (file, newname)); + case -2: + report_file_error ("Copying permissions from", file); + case -3: + xsignal2 (Qfile_date_error, + build_string ("Resetting file times"), newname); + case -4: + report_file_error ("Copying permissions to", newname); } #else /* not WINDOWSNT */ immediate_quit = 1; === modified file 'src/w32.c' --- src/w32.c 2013-12-12 20:07:40 +0000 +++ src/w32.c 2013-12-14 08:29:42 +0000 @@ -140,6 +140,7 @@ #include #include +#include /* This is not in MinGW's sddl.h (but they are in MSVC headers), so we define them by hand if not already defined. */ @@ -6001,6 +6002,116 @@ return NULL; } +int +w32_copy_file (const char *from, const char *to, + int keep_time, int preserve_ownership, int copy_acls) +{ + acl_t acl = NULL; + BOOL copy_result; + wchar_t from_w[MAX_PATH], to_w[MAX_PATH]; + char from_a[MAX_PATH], to_a[MAX_PATH]; + + /* We ignore preserve_ownership for now. */ + preserve_ownership = preserve_ownership; + + if (copy_acls) + { + acl = acl_get_file (from, ACL_TYPE_ACCESS); + if (acl == NULL && acl_errno_valid (errno)) + return -2; + } + if (w32_unicode_filenames) + { + filename_to_utf16 (from, from_w); + filename_to_utf16 (to, to_w); + copy_result = CopyFileW (from_w, to_w, FALSE); + } + else + { + filename_to_ansi (from, from_a); + filename_to_ansi (to, to_a); + copy_result = CopyFileA (from_a, to_a, FALSE); + } + if (!copy_result) + { + /* CopyFile doesn't set errno when it fails. By far the most + "popular" reason is that the target is read-only. */ + DWORD err = GetLastError (); + + switch (err) + { + case ERROR_FILE_NOT_FOUND: + errno = ENOENT; + break; + case ERROR_ACCESS_DENIED: + errno = EACCES; + break; + case ERROR_ENCRYPTION_FAILED: + errno = EIO; + break; + default: + errno = EPERM; + break; + } + + if (acl) + acl_free (acl); + return -1; + } + /* CopyFile retains the timestamp by default. However, see + "Community Additions" for CopyFile: it sounds like that is not + entirely true. Testing on Windows XP confirms that modified time + is copied, but creation and last-access times are not. + FIXME? */ + else if (!keep_time) + { + struct timespec now; + DWORD attributes; + + if (w32_unicode_filenames) + { + /* Ensure file is writable while its times are set. */ + attributes = GetFileAttributesW (to_w); + SetFileAttributesW (to_w, attributes & ~FILE_ATTRIBUTE_READONLY); + now = current_timespec (); + if (set_file_times (-1, to, now, now)) + { + /* Restore original attributes. */ + SetFileAttributesW (to_w, attributes); + if (acl) + acl_free (acl); + return -3; + } + /* Restore original attributes. */ + SetFileAttributesW (to_w, attributes); + } + else + { + attributes = GetFileAttributesA (to_a); + SetFileAttributesA (to_a, attributes & ~FILE_ATTRIBUTE_READONLY); + now = current_timespec (); + if (set_file_times (-1, to, now, now)) + { + SetFileAttributesA (to_a, attributes); + if (acl) + acl_free (acl); + return -3; + } + SetFileAttributesA (to_a, attributes); + } + } + if (acl != NULL) + { + bool fail = + acl_set_file (to, ACL_TYPE_ACCESS, acl) != 0; + acl_free (acl); + if (fail && acl_errno_valid (errno)) + return -4; + } + + return 0; +} + /* Support for browsing other processes and their attributes. See process.c for the Lisp bindings. */ === modified file 'src/w32.h' --- src/w32.h 2013-12-03 15:29:48 +0000 +++ src/w32.h 2013-12-14 08:29:42 +0000 @@ -185,6 +185,7 @@ extern int filename_from_utf16 (const wchar_t *, char *); extern int filename_to_utf16 (const char *, wchar_t *); extern Lisp_Object ansi_encode_filename (Lisp_Object); +extern int w32_copy_file (const char *, const char *, int, int, int); extern BOOL init_winsock (int load_now); extern void srandom (int); ------------------------------------------------------------ revno: 115514 fixes bug: http://debbugs.gnu.org/16118 committer: Dmitry Gutov branch nick: trunk timestamp: Sat 2013-12-14 08:46:13 +0200 message: Fix bug#16118 * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Return nil before open-paren tokens when preceded by a open-paren, too. (ruby-smie-rules): Handle virtual indentation after open-paren tokens specially. If there is code between it and eol, return the column where is starts. * test/indent/ruby.rb: New examples. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 19:49:56 +0000 +++ lisp/ChangeLog 2013-12-14 06:46:13 +0000 @@ -1,3 +1,11 @@ +2013-12-14 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie-rules): Return nil before + open-paren tokens when preceded by a open-paren, too. + (ruby-smie-rules): Handle virtual indentation after open-paren + tokens specially. If there is code between it and eol, return the + column where is starts (Bug#16118). + 2013-12-13 Teodor Zlatanov * progmodes/cfengine.el: Fix `add-hook' doc. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-12-09 04:19:16 +0000 +++ lisp/progmodes/ruby-mode.el 2013-12-14 06:46:13 +0000 @@ -549,10 +549,21 @@ (ruby-smie--indent-to-stmt)) ((smie-rule-hanging-p) ;; Treat purely syntactic block-constructs as being part of their parent, - ;; when the opening statement is hanging. + ;; when the opening token is hanging and the parent is not an open-paren. (let ((state (smie-backward-sexp 'halfsexp))) - (when (eq t (car state)) (goto-char (cadr state)))) - (cons 'column (smie-indent-virtual))))) + (unless (and (eq t (car state)) + (not (eq (cadr state) (point-min)))) + (cons 'column (smie-indent-virtual))))))) + (`(:after . ,(or `"(" "[" "{")) + ;; FIXME: Shouldn't this be the default behavior of + ;; `smie-indent-after-keyword'? + (save-excursion + (forward-char 1) + (skip-chars-forward " \t") + ;; `smie-rule-hanging-p' is not good enough here, + ;; because we want to accept hanging tokens at bol, too. + (unless (or (eolp) (forward-comment 1)) + (cons 'column (current-column))))) (`(:after . " @ ") (smie-rule-parent)) (`(:before . "do") (ruby-smie--indent-to-stmt)) (`(,(or :before :after) . ".") === modified file 'test/ChangeLog' --- test/ChangeLog 2013-12-12 23:32:05 +0000 +++ test/ChangeLog 2013-12-14 06:46:13 +0000 @@ -1,3 +1,7 @@ +2013-12-14 Dmitry Gutov + + * indent/ruby.rb: New examples. + 2013-12-12 Fabián Ezequiel Gallina * automated/python-tests.el (python-indent-dedenters-2): New test. === modified file 'test/indent/ruby.rb' --- test/indent/ruby.rb 2013-12-09 04:19:16 +0000 +++ test/indent/ruby.rb 2013-12-14 06:46:13 +0000 @@ -45,10 +45,41 @@ a1: b1 } -foo({ - a: b, - c: d - }) +foo({ # bug#16118 + a: b, + c: d + } + ) # bug#16116 + +bar = foo( + a, [ + 1, + ], + :qux => [ + 3 + ] + ) + +foo( + [ + { + a: b + }, + ], + { + c: d + } +) + +foo([{ + a: 2 + }, + { + b: 3 + }, + 4 + ] + ) foo = [ # ruby-deep-indent-disabled 1 ------------------------------------------------------------ revno: 115513 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-12-13 14:27:05 -0800 message: * lread.c (load_path_default): Prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-13 18:25:30 +0000 +++ src/ChangeLog 2013-12-13 22:27:05 +0000 @@ -1,3 +1,7 @@ +2013-12-13 Paul Eggert + + * lread.c (load_path_default): Prototype. + 2013-12-13 Glenn Morris * lread.c: Unconditionally reset load-path after dumping. (Bug#16107) === modified file 'src/lread.c' --- src/lread.c 2013-12-13 18:25:30 +0000 +++ src/lread.c 2013-12-13 22:27:05 +0000 @@ -4159,7 +4159,7 @@ check), then repeat the above steps for source-dir/lisp, site-lisp. */ static Lisp_Object -load_path_default () +load_path_default (void) { Lisp_Object lpath = Qnil; const char *normal; ------------------------------------------------------------ revno: 115512 committer: David Engster branch nick: trunk timestamp: Fri 2013-12-13 22:41:35 +0100 message: * etc/NEWS: Add sections for CEDET and EIEIO. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-12-12 18:19:10 +0000 +++ etc/ChangeLog 2013-12-13 21:41:35 +0000 @@ -1,3 +1,7 @@ +2013-12-13 David Engster + + * NEWS: Add sections for CEDET and EIEIO. + 2013-12-12 Eli Zaretskii * NEWS: Mention support on MS-Windows of file names outside of the === modified file 'etc/NEWS' --- etc/NEWS 2013-12-13 18:25:30 +0000 +++ etc/NEWS 2013-12-13 21:41:35 +0000 @@ -628,6 +628,33 @@ ** New term.el option `term-suppress-hard-newline'. +** CEDET + +*** EDE + +**** The cpp-root project now supports executing a compile command. +It can be set through the new :compile-command slot or the +buffer-local variable `compile-command'. + +**** Better selection of include directories for the 'linux' project. +Include directories now support out-of-tree build directories and +target architecture auto-detection. + +*** Semantic + +**** Improved detection of used namespaces in current scope in C++. + +**** Parsing of default values for variables and function arguments in C/C++. +They are also displayed by the summarize feature in the modeline. + +**** Improved parsing of function pointers in C/C++. +This also includes parsing of function pointers as function arguments. + +**** Parsing of C/C++ preprocessor macros which open new scope. +For example, this enables parsing of macros which open new namespaces. + +**** Support for 'this' pointer in inline member functions in C++. + ** Obsolete packages: *** Iswitchb is made obsolete by icomplete-mode. @@ -909,6 +936,28 @@ *** You can change the speed of animated images. +** EIEIO + +*** Namespace cleanup by obsolete-aliasing functions to use `eieio-' prefix. +**** object-name -> eieio-object-name +**** object-class -> eieio-object-class +**** object-class-fast -> eieio--object-class +**** object-name-string -> eieio-object-name-string +**** object-num-slots -> eieio--object-num-slots +**** object-set-name-string -> eieio-object-set-name-string +**** class-parent -> eieio-class-parent +**** class-parents -> eieio-class-parents +**** class-children -> eieio-class-children +**** class-num-slots -> eieio--class-num-slots +**** class-precedence-list -> eieio-class-precedence-list +**** All generated class-* and object-* field accessors are now +prefixed with `eieio-' as well. + +*** Obsoleted functions: +**** class-of +**** class-direct-subclasses +**** class-direct-superclasses + ** Changes in encoding and decoding of text --- ------------------------------------------------------------ revno: 115511 committer: Ted Zlatanov branch nick: quickfixes timestamp: Fri 2013-12-13 14:49:56 -0500 message: progmodes/cfengine.el: Fix `add-hook' doc. * progmodes/cfengine.el: Fix `add-hook' doc. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 18:55:08 +0000 +++ lisp/ChangeLog 2013-12-13 19:49:56 +0000 @@ -1,6 +1,7 @@ 2013-12-13 Teodor Zlatanov - * progmodes/cfengine.el (cfengine-mode-syntax-functions-regex): + * progmodes/cfengine.el: Fix `add-hook' doc. + (cfengine-mode-syntax-functions-regex): Initialize sensibly. (cfengine3--current-word): Fix parameters. (cfengine3-make-syntax-cache): Simplify further. === modified file 'lisp/progmodes/cfengine.el' --- lisp/progmodes/cfengine.el 2013-12-13 18:55:08 +0000 +++ lisp/progmodes/cfengine.el 2013-12-13 19:49:56 +0000 @@ -47,7 +47,7 @@ ;; It's *highly* recommended that you enable the eldoc minor mode: -;; (add-hook 'cfengine-mode-hook 'turn-on-eldoc-mode) +;; (add-hook 'cfengine3-mode-hook 'turn-on-eldoc-mode) ;; This is not the same as the mode written by Rolf Ebert ;; , distributed with cfengine-2.0.5. It does ------------------------------------------------------------ revno: 115510 committer: Ted Zlatanov branch nick: quickfixes timestamp: Fri 2013-12-13 13:55:08 -0500 message: More cfengine.el fixes over previous commit. * progmodes/cfengine.el (cfengine-mode-syntax-functions-regex): Initialize sensibly. (cfengine3--current-word): Fix parameters. (cfengine3-make-syntax-cache): Simplify further. (cfengine3-completion-function, cfengine3--current-function): Use `assq' for symbols. (cfengine3--current-function): Fix `cfengine3--current-word' call. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 18:25:30 +0000 +++ lisp/ChangeLog 2013-12-13 18:55:08 +0000 @@ -1,3 +1,13 @@ +2013-12-13 Teodor Zlatanov + + * progmodes/cfengine.el (cfengine-mode-syntax-functions-regex): + Initialize sensibly. + (cfengine3--current-word): Fix parameters. + (cfengine3-make-syntax-cache): Simplify further. + (cfengine3-completion-function, cfengine3--current-function): Use + `assq' for symbols. + (cfengine3--current-function): Fix `cfengine3--current-word' call. + 2013-12-13 Glenn Morris * loadup.el (load-path): Warn if site-load or site-init changes it. === modified file 'lisp/progmodes/cfengine.el' --- lisp/progmodes/cfengine.el 2013-12-13 18:18:19 +0000 +++ lisp/progmodes/cfengine.el 2013-12-13 18:55:08 +0000 @@ -153,8 +153,6 @@ (defvar cfengine-mode-syntax-cache nil "Cache for `cfengine-mode' syntax trees obtained from 'cf-promises -s json'.") -(defvar cfengine-mode-syntax-functions-regex nil) - (defconst cfengine3-fallback-syntax '((functions (userexists @@ -787,6 +785,12 @@ (returnType . "context") (status . "normal")))) "Fallback CFEngine syntax, containing just function definitions.") +(defvar cfengine-mode-syntax-functions-regex + (regexp-opt (mapcar (lambda (def) + (format "%s" (car def))) + (cdr (assq 'functions cfengine3-fallback-syntax))) + 'symbols)) + (defcustom cfengine-mode-abbrevs nil "Abbrevs for CFEngine2 mode." :group 'cfengine @@ -1161,7 +1165,7 @@ ;; CLASS: [.|&!()a-zA-Z0-9_\200-\377]+:: ;; CATEGORY: [a-zA-Z_]+: -(defun cfengine3--current-word (flist &optional bounds) +(defun cfengine3--current-word (&optional bounds) "Propose a word around point in the current CFEngine 3 buffer." (save-excursion (skip-syntax-forward "w_") @@ -1176,9 +1180,9 @@ (defun cfengine3--current-function () "Look up current CFEngine 3 function" (let* ((syntax (cfengine3-make-syntax-cache)) - (flist (assoc 'functions syntax))) + (flist (assq 'functions syntax))) (when flist - (let ((w (cfengine3--current-word flist))) + (let ((w (cfengine3--current-word))) (and w (assq (intern w) flist)))))) ;; format from "cf-promises -s json", e.g. "sort" function: @@ -1225,6 +1229,8 @@ "")))) (defun cfengine3-clear-syntax-cache () + "Clear the internal syntax cache. +Should not be necessary unless you reinstall CFEngine." (interactive) (setq cfengine-mode-syntax-functions-regex nil) (setq cfengine-mode-syntax-cache nil)) @@ -1232,32 +1238,27 @@ (defun cfengine3-make-syntax-cache () "Build the CFEngine 3 syntax cache. Calls `cfengine-cf-promises' with \"-s json\"" - (let ((ret (if cfengine-cf-promises - (let ((loaded-json-lib (require 'json nil t)) - (syntax (cfengine3-make-syntax-cache))) - (if (not loaded-json-lib) - (message "JSON library could not be loaded!") - (unless syntax - (with-demoted-errors - (with-temp-buffer - (call-process-shell-command cfengine-cf-promises - nil ; no input - t ; current buffer - nil ; no redisplay - "-s" "json") - (goto-char (point-min)) - (setq syntax (json-read)) - (setq cfengine-mode-syntax-cache - (cons (cons cfengine-cf-promises syntax) - cfengine-mode-syntax-cache))))))) - cfengine3-fallback-syntax))) - (unless cfengine-mode-syntax-functions-regex - (setq cfengine-mode-syntax-functions-regex - (regexp-opt (mapcar (lambda (def) - (format "%s" (car def))) - (cdr (assoc 'functions ret))) - 'symbols))) - ret)) + (let ((syntax (cddr (assoc cfengine-cf-promises cfengine-mode-syntax-cache)))) + (if cfengine-cf-promises + (or syntax + (with-demoted-errors + (with-temp-buffer + (call-process-shell-command cfengine-cf-promises + nil ; no input + t ; current buffer + nil ; no redisplay + "-s" "json") + (goto-char (point-min)) + (setq syntax (json-read)) + (setq cfengine-mode-syntax-cache + (cons (cons cfengine-cf-promises syntax) + cfengine-mode-syntax-cache)) + (setq cfengine-mode-syntax-functions-regex + (regexp-opt (mapcar (lambda (def) + (format "%s" (car def))) + (cdr (assq 'functions syntax))) + 'symbols)))))) + cfengine3-fallback-syntax)) (defun cfengine3-documentation-function () "Document CFengine 3 functions around point. @@ -1272,7 +1273,7 @@ (cfengine3-make-syntax-cache) (let* ((bounds (cfengine3--current-word t)) (syntax (cfengine3-make-syntax-cache)) - (flist (assoc 'functions syntax))) + (flist (assq 'functions syntax))) (when bounds (append bounds (list (cdr flist)))))) ------------------------------------------------------------ revno: 115509 fixes bug: http://debbugs.gnu.org/16107 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-12-13 13:25:30 -0500 message: Unconditionally reset load-path after dumping * src/lread.c: (dump_path): Remove. (load-path-default): Remove `changed' argument. Do not set dump_path permanently. Simplify. (init_lread): Simplify. (syms_of_lread): Remove dump_path. * lisp/loadup.el (load-path): Warn if site-load or site-init changes it. No more need to reset it when bootstrapping. * doc/lispref/internals.texi (Building Emacs): * doc/lispref/loading.texi (Library Search): Mention that site-load, site-init cannot change load-path. * INSTALL: No longer mention load-path and site-init/site-load. * etc/NEWS: Mention this. diff: === modified file 'ChangeLog' --- ChangeLog 2013-12-12 22:41:31 +0000 +++ ChangeLog 2013-12-13 18:25:30 +0000 @@ -1,3 +1,7 @@ +2013-12-13 Glenn Morris + + * INSTALL: No longer mention load-path and site-init/site-load. + 2013-12-12 Glenn Morris * Makefile.in (install-info): Handle missing info/dir. === modified file 'INSTALL' --- INSTALL 2013-09-20 16:33:46 +0000 +++ INSTALL 2013-12-13 18:25:30 +0000 @@ -468,10 +468,6 @@ variable should have. If you don't pay attention to what you are doing, you'll make a mistake. -If you set load-path to a different value in site-init.el or -site-load.el, Emacs will use *precisely* that value when it starts up -again. If you do this, you are on your own! - The `site-*.el' files are nonexistent in the distribution. You do not need to create them if you have nothing to put in them. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-12-12 22:41:31 +0000 +++ doc/lispref/ChangeLog 2013-12-13 18:25:30 +0000 @@ -1,3 +1,9 @@ +2013-12-13 Glenn Morris + + * internals.texi (Building Emacs): + * loading.texi (Library Search): Mention that site-load, + site-init cannot change load-path. + 2013-12-12 Glenn Morris * elisp.texi: Tweak dircategory. === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2013-04-23 18:57:44 +0000 +++ doc/lispref/internals.texi 2013-12-13 18:25:30 +0000 @@ -116,6 +116,11 @@ expect in an ordinary unmodified Emacs. If you feel you must override normal features for your site, do it with @file{default.el}, so that users can override your changes if they wish. @xref{Startup Summary}. +Note that if either @file{site-load.el} or @file{site-init.el} changes +@code{load-path}, the changes will be lost after dumping. +@xref{Library Search}. To make a permanent change to +@code{load-path}, use the @option{--enable-locallisppath} option +of @command{configure}. In a package that can be preloaded, it is sometimes necessary (or useful) to delay certain evaluations until Emacs subsequently starts === modified file 'doc/lispref/loading.texi' --- doc/lispref/loading.texi 2013-11-27 06:15:06 +0000 +++ doc/lispref/loading.texi 2013-12-13 18:25:30 +0000 @@ -361,12 +361,10 @@ (push "~/.emacs.d/lisp" load-path) @end example - Dumping Emacs uses a special value of @code{load-path}. If the -value of @code{load-path} at the end of dumping is unchanged (that is, -still the same special value), the dumped Emacs switches to the -ordinary @code{load-path} value when it starts up, as described above. -But if @code{load-path} has any other value at the end of dumping, -that value is used for execution of the dumped Emacs also. + Dumping Emacs uses a special value of @code{load-path}. If you use +a @file{site-load.el} or @file{site-init.el} file to customize the +dumped Emacs (@pxref{Building Emacs}), any changes to @code{load-path} +that these files make will be lost after dumping. @deffn Command locate-library library &optional nosuffix path interactive-call This command finds the precise file name for library @var{library}. It === modified file 'etc/NEWS' --- etc/NEWS 2013-12-12 18:19:10 +0000 +++ etc/NEWS 2013-12-13 18:25:30 +0000 @@ -77,6 +77,12 @@ will instead append, if the argument begins with `:' (or `;' on MS Windows; i.e., `path-separator'). ++++ +** If you use either site-load.el or site-init.el to customize the dumped +Emacs executable, any changes to `load-path' that these files make +will no longer be present after dumping. To affect a permanent change +to `load-path', use the `--enable-locallisppath' option of `configure'. + * Changes in Emacs 24.4 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 18:18:19 +0000 +++ lisp/ChangeLog 2013-12-13 18:25:30 +0000 @@ -1,3 +1,8 @@ +2013-12-13 Glenn Morris + + * loadup.el (load-path): Warn if site-load or site-init changes it. + No more need to reset it when bootstrapping. + 2013-12-13 Teodor Zlatanov * progmodes/cfengine.el (cfengine-cf-promises): Add more default === modified file 'lisp/loadup.el' --- lisp/loadup.el 2013-11-29 18:36:31 +0000 +++ lisp/loadup.el 2013-12-13 18:25:30 +0000 @@ -46,9 +46,6 @@ ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping. ;; This is because PATH_DUMPLOADSEARCH is just "../lisp". -;; Note that we reset load-path below just before dumping, -;; since lread.c:init_lread checks for changes to load-path -;; in deciding whether to modify it. (if (or (equal (nth 3 command-line-args) "bootstrap") (equal (nth 4 command-line-args) "bootstrap") ;; FIXME this is irritatingly fragile. @@ -293,8 +290,15 @@ ;; you may load them with a "site-load.el" file. ;; But you must also cause them to be scanned when the DOC file ;; is generated. -;; For other systems, you must edit ../src/Makefile.in. -(load "site-load" t) +(let ((lp load-path)) + (load "site-load" t) + ;; We reset load-path after dumping. + ;; For a permanent change in load-path, use configure's + ;; --enable-locallisppath option. + ;; See http://debbugs.gnu.org/16107 for more details. + (or (equal lp load-path) + (message "Warning: Change in load-path due to site-load will be \ +lost after dumping"))) ;; Make sure default-directory is unibyte when dumping. This is ;; because we cannot decode and encode it correctly (since the locale @@ -342,8 +346,13 @@ ;; Note: You can cause additional libraries to be preloaded ;; by writing a site-init.el that loads them. -;; See also "site-load" above. -(load "site-init" t) +;; See also "site-load" above +(let ((lp load-path)) + (load "site-init" t) + (or (equal lp load-path) + (message "Warning: Change in load-path due to site-init will be \ +lost after dumping"))) + (setq current-load-list nil) ;; We keep the load-history data in PURE space. @@ -353,11 +362,6 @@ (set-buffer-modified-p nil) -;; reset the load-path. See lread.c:init_lread why. -(if (or (equal (nth 3 command-line-args) "bootstrap") - (equal (nth 4 command-line-args) "bootstrap")) - (setcdr load-path nil)) - (remove-hook 'after-load-functions (lambda (f) (garbage-collect))) (setq inhibit-load-charset-map nil) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-13 15:55:23 +0000 +++ src/ChangeLog 2013-12-13 18:25:30 +0000 @@ -1,3 +1,12 @@ +2013-12-13 Glenn Morris + + * lread.c: Unconditionally reset load-path after dumping. (Bug#16107) + (dump_path): Remove. + (load-path-default): Remove `changed' argument. + Do not set dump_path permanently. Simplify. + (init_lread): Simplify. + (syms_of_lread): Remove dump_path. + 2013-12-13 Dmitry Antipov * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m, === modified file 'src/lread.c' --- src/lread.c 2013-12-01 22:33:13 +0000 +++ src/lread.c 2013-12-13 18:25:30 +0000 @@ -4128,10 +4128,6 @@ } } -/* Record the value of load-path used at the start of dumping - so we can see if the site changed it later during dumping. */ -static Lisp_Object dump_path; - /* Return the default load-path, to be used if EMACSLOADPATH is unset. This does not include the standard site-lisp directories under the installation prefix (i.e., PATH_SITELOADSEARCH), @@ -4145,18 +4141,16 @@ If purify-flag (ie dumping) just use PATH_DUMPLOADSEARCH. Otherwise use PATH_LOADSEARCH. - If !initialized, then just set dump_path and return PATH_DUMPLOADSEARCH. - If initialized, then if Vload_path != dump_path, return just Vload_path. - (Presumably the load-path has already been changed by something. - This can only be from a site-load file during dumping.) + If !initialized, then just return PATH_DUMPLOADSEARCH. + If initialized: If Vinstallation_directory is not nil (ie, running uninstalled): If installation-dir/lisp exists and not already a member, we must be running uninstalled. Reset the load-path to just installation-dir/lisp. (The default PATH_LOADSEARCH refers to the eventual installation directories. Since we are not yet installed, we should not use them, even if they exist.) - If installation-dir/lisp does not exist, just add dump_path at the - end instead. + If installation-dir/lisp does not exist, just add + PATH_DUMPLOADSEARCH at the end instead. Add installation-dir/site-lisp (if !no_site_lisp, and exists and not already a member) at the front. If installation-dir != source-dir (ie running an uninstalled, @@ -4165,7 +4159,7 @@ check), then repeat the above steps for source-dir/lisp, site-lisp. */ static Lisp_Object -load_path_default (bool changed) +load_path_default () { Lisp_Object lpath = Qnil; const char *normal; @@ -4186,131 +4180,108 @@ normal = NILP (Vpurify_flag) ? PATH_LOADSEARCH : PATH_DUMPLOADSEARCH; - /* In a dumped Emacs, we normally reset the value of Vload_path using - PATH_LOADSEARCH, since the value that was dumped uses lisp/ in - the source directory, instead of the path of the installed elisp - libraries. However, if it appears that Vload_path has already been - changed from the default that was saved before dumping, don't - change it further. Changes can only be due to site-lisp - files that were processed during dumping. */ - /* FIXME? AFAICS, it does not make sense to change load-path in a - dumped site-lisp file, so maybe we should just drop this check. - E.g., if you add an element to load-path, you are going to be - adding it to PATH_DUMPLOADSEARCH, which refers to the source directory. - This will make no sense (and may not still exist) in an installed Emacs. - And the only change it is sensible to make to load-path is to add - something to the front, which you should do with configure's - --enable-locallisppath option if you really want to have it dumped. */ if (initialized) { - if (changed || NILP (Fequal (dump_path, Vload_path))) - { - /* Do not make any changes. */ - return Vload_path; - } - else - { #ifdef HAVE_NS - const char *loadpath = ns_load_path (); - lpath = decode_env_path (0, loadpath ? loadpath : normal, 0); + const char *loadpath = ns_load_path (); + lpath = decode_env_path (0, loadpath ? loadpath : normal, 0); #else - lpath = decode_env_path (0, normal, 0); + lpath = decode_env_path (0, normal, 0); #endif - if (!NILP (Vinstallation_directory)) - { - Lisp_Object tem, tem1; - - /* Add to the path the lisp subdir of the installation - dir, if it is accessible. Note: in out-of-tree builds, - this directory is empty save for Makefile. */ - tem = Fexpand_file_name (build_string ("lisp"), + if (!NILP (Vinstallation_directory)) + { + Lisp_Object tem, tem1; + + /* Add to the path the lisp subdir of the installation + dir, if it is accessible. Note: in out-of-tree builds, + this directory is empty save for Makefile. */ + tem = Fexpand_file_name (build_string ("lisp"), + Vinstallation_directory); + tem1 = Ffile_accessible_directory_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, lpath))) + { + /* We are running uninstalled. The default load-path + points to the eventual installed lisp directories. + We should not use those now, even if they exist, + so start over from a clean slate. */ + lpath = list1 (tem); + } + } + else + /* That dir doesn't exist, so add the build-time + Lisp dirs instead. */ + { + Lisp_Object dump_path = + decode_env_path (0, PATH_DUMPLOADSEARCH, 0); + lpath = nconc2 (lpath, dump_path); + } + + /* Add site-lisp under the installation dir, if it exists. */ + if (!no_site_lisp) + { + tem = Fexpand_file_name (build_string ("site-lisp"), Vinstallation_directory); tem1 = Ffile_accessible_directory_p (tem); if (!NILP (tem1)) { if (NILP (Fmember (tem, lpath))) - { - /* We are running uninstalled. The default load-path - points to the eventual installed lisp directories. - We should not use those now, even if they exist, - so start over from a clean slate. */ - lpath = list1 (tem); - } - } - else - /* That dir doesn't exist, so add the build-time - Lisp dirs instead. */ - lpath = nconc2 (lpath, dump_path); - - /* Add site-lisp under the installation dir, if it exists. */ - if (!no_site_lisp) - { - tem = Fexpand_file_name (build_string ("site-lisp"), - Vinstallation_directory); - tem1 = Ffile_accessible_directory_p (tem); - if (!NILP (tem1)) - { - if (NILP (Fmember (tem, lpath))) - lpath = Fcons (tem, lpath); - } - } - - /* If Emacs was not built in the source directory, - and it is run from where it was built, add to load-path - the lisp and site-lisp dirs under that directory. */ - - if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) - { - Lisp_Object tem2; - - tem = Fexpand_file_name (build_string ("src/Makefile"), - Vinstallation_directory); - tem1 = Ffile_exists_p (tem); - - /* Don't be fooled if they moved the entire source tree - AFTER dumping Emacs. If the build directory is indeed - different from the source dir, src/Makefile.in and - src/Makefile will not be found together. */ - tem = Fexpand_file_name (build_string ("src/Makefile.in"), - Vinstallation_directory); - tem2 = Ffile_exists_p (tem); - if (!NILP (tem1) && NILP (tem2)) - { - tem = Fexpand_file_name (build_string ("lisp"), + lpath = Fcons (tem, lpath); + } + } + + /* If Emacs was not built in the source directory, + and it is run from where it was built, add to load-path + the lisp and site-lisp dirs under that directory. */ + + if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) + { + Lisp_Object tem2; + + tem = Fexpand_file_name (build_string ("src/Makefile"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + + /* Don't be fooled if they moved the entire source tree + AFTER dumping Emacs. If the build directory is indeed + different from the source dir, src/Makefile.in and + src/Makefile will not be found together. */ + tem = Fexpand_file_name (build_string ("src/Makefile.in"), + Vinstallation_directory); + tem2 = Ffile_exists_p (tem); + if (!NILP (tem1) && NILP (tem2)) + { + tem = Fexpand_file_name (build_string ("lisp"), + Vsource_directory); + + if (NILP (Fmember (tem, lpath))) + lpath = Fcons (tem, lpath); + + if (!no_site_lisp) + { + tem = Fexpand_file_name (build_string ("site-lisp"), Vsource_directory); - - if (NILP (Fmember (tem, lpath))) - lpath = Fcons (tem, lpath); - - if (!no_site_lisp) + tem1 = Ffile_accessible_directory_p (tem); + if (!NILP (tem1)) { - tem = Fexpand_file_name (build_string ("site-lisp"), - Vsource_directory); - tem1 = Ffile_accessible_directory_p (tem); - if (!NILP (tem1)) - { - if (NILP (Fmember (tem, lpath))) - lpath = Fcons (tem, lpath); - } + if (NILP (Fmember (tem, lpath))) + lpath = Fcons (tem, lpath); } } - } /* Vinstallation_directory != Vsource_directory */ - - } /* if Vinstallation_directory */ - - } /* if dump_path == Vload_path */ + } + } /* Vinstallation_directory != Vsource_directory */ + + } /* if Vinstallation_directory */ } else /* !initialized */ { /* NORMAL refers to PATH_DUMPLOADSEARCH, ie the lisp dir in the source directory. We used to add ../lisp (ie the lisp dir in - the build directory) at the front here, but that caused trouble - because it was copied from dump_path into Vload_path, above, - when Vinstallation_directory was non-nil. It should not be - necessary, since in out of tree builds lisp/ is empty, save + the build directory) at the front here, but that should not + be necessary, since in out of tree builds lisp/ is empty, save for Makefile. */ lpath = decode_env_path (0, normal, 0); - dump_path = lpath; } #endif /* !CANNOT_DUMP */ @@ -4322,27 +4293,20 @@ { /* First, set Vload_path. */ - /* NB: Do not change Vload_path before calling load_path_default, - since it may check it against dump_path. - (This behavior could be changed.) */ - /* We explicitly ignore EMACSLOADPATH when dumping. */ if (NILP (Vpurify_flag) && egetenv ("EMACSLOADPATH")) { - Lisp_Object elpath = decode_env_path ("EMACSLOADPATH", 0, 1); + Vload_path = decode_env_path ("EMACSLOADPATH", 0, 1); /* Check (non-nil) user-supplied elements. */ - load_path_check (elpath); + load_path_check (Vload_path); /* If no nils in the environment variable, use as-is. Otherwise, replace any nils with the default. */ - if (NILP (Fmemq (Qnil, elpath))) - { - Vload_path = elpath; - } - else - { - Lisp_Object elem, default_lpath = load_path_default (0); + if (! NILP (Fmemq (Qnil, Vload_path))) + { + Lisp_Object elem, elpath = Vload_path; + Lisp_Object default_lpath = load_path_default (); /* Check defaults, before adding site-lisp. */ load_path_check (default_lpath); @@ -4372,13 +4336,7 @@ } else /* Vpurify_flag || !EMACSLOADPATH */ { -#ifdef CANNOT_DUMP - bool changed = 0; -#else - bool changed = initialized && NILP (Fequal (dump_path, Vload_path)); -#endif - - Vload_path = load_path_default (changed); + Vload_path = load_path_default (); /* Check before adding site-lisp directories. The install should have created them, but they are not @@ -4386,10 +4344,8 @@ Or we might be running before installation. */ load_path_check (Vload_path); - /* Add the site-lisp directories at the front, unless the - load-path has already been changed. - FIXME? Should we ignore changed here? */ - if (initialized && !no_site_lisp && !changed) + /* Add the site-lisp directories at the front. */ + if (initialized && !no_site_lisp) { Lisp_Object sitelisp; sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0); @@ -4694,8 +4650,6 @@ DEFSYM (Qdir_ok, "dir-ok"); DEFSYM (Qdo_after_load_evaluation, "do-after-load-evaluation"); - staticpro (&dump_path); - staticpro (&read_objects); read_objects = Qnil; staticpro (&seen_list); ------------------------------------------------------------ revno: 115508 committer: Ted Zlatanov branch nick: quickfixes timestamp: Fri 2013-12-13 13:18:19 -0500 message: Improve CFEngine 3 parsing and eldoc support, with syntax fallbacks * progmodes/cfengine.el (cfengine-cf-promises): Add more default locations for cf-promises. (cfengine-mode-syntax-functions-regex): New caching variable. (cfengine3-fallback-syntax): Fallback syntax for cases where cf-promises doesn't run. (cfengine3--current-word): Reimplement using `cfengine-mode-syntax-functions-regex'. (cfengine3-completion-function, cfengine3--current-function): Use `cfengine3-make-syntax-cache' directly. (cfengine3-clear-syntax-cache): New function. (cfengine3-make-syntax-cache): Simplify and create `cfengine-mode-syntax-functions-regex' on demand. (cfengine3-format-function-docstring): Don't call `cfengine3-make-syntax-cache' explicitly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 17:06:30 +0000 +++ lisp/ChangeLog 2013-12-13 18:18:19 +0000 @@ -1,3 +1,20 @@ +2013-12-13 Teodor Zlatanov + + * progmodes/cfengine.el (cfengine-cf-promises): Add more default + locations for cf-promises. + (cfengine-mode-syntax-functions-regex): New caching variable. + (cfengine3-fallback-syntax): Fallback syntax for cases where + cf-promises doesn't run. + (cfengine3--current-word): Reimplement using + `cfengine-mode-syntax-functions-regex'. + (cfengine3-completion-function, cfengine3--current-function): Use + `cfengine3-make-syntax-cache' directly. + (cfengine3-clear-syntax-cache): New function. + (cfengine3-make-syntax-cache): Simplify and create + `cfengine-mode-syntax-functions-regex' on demand. + (cfengine3-format-function-docstring): Don't call + `cfengine3-make-syntax-cache' explicitly. + 2013-12-13 Martin Rudalics Fix windmove-find-other-window broken after pixelwise resizing === modified file 'lisp/progmodes/cfengine.el' --- lisp/progmodes/cfengine.el 2013-11-16 22:36:14 +0000 +++ lisp/progmodes/cfengine.el 2013-12-13 18:18:19 +0000 @@ -55,6 +55,9 @@ ;;; Code: +(autoload 'json-read "json") +(autoload 'regexp-opt "regexp-opt") + (defgroup cfengine () "Editing CFEngine files." :group 'languages) @@ -68,11 +71,15 @@ (or (executable-find "cf-promises") (executable-find "/var/cfengine/bin/cf-promises") (executable-find "/usr/bin/cf-promises") + (executable-find "/usr/sbin/cf-promises") (executable-find "/usr/local/bin/cf-promises") - (executable-find "~/bin/cf-promises")) + (executable-find "/usr/local/sbin/cf-promises") + (executable-find "~/bin/cf-promises") + (executable-find "~/sbin/cf-promises")) "The location of the cf-promises executable. Used for syntax discovery and checking. Set to nil to disable -the `compile-command' override and the ElDoc support." +the `compile-command' override. In that case, the ElDoc support +will use a fallback syntax definition." :group 'cfengine :type 'file) @@ -146,6 +153,640 @@ (defvar cfengine-mode-syntax-cache nil "Cache for `cfengine-mode' syntax trees obtained from 'cf-promises -s json'.") +(defvar cfengine-mode-syntax-functions-regex nil) + +(defconst cfengine3-fallback-syntax + '((functions + (userexists + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (usemodule + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (unique + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (translatepath + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "string") (status . "normal")) + (sum + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "real") (status . "normal")) + (sublist + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "head,tail") (type . "option")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (strftime + (category . "data") (variadic . :json-false) + (parameters . [((range . "gmtime,localtime") (type . "option")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (strcmp + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (splitstring + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (splayclass + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "daily,hourly") (type . "option"))]) + (returnType . "context") (status . "normal")) + (sort + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "lex") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (some + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (shuffle + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (selectservers + (category . "communication") (variadic . :json-false) + (parameters . [((range . "@[(][a-zA-Z0-9]+[)]") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "int") (status . "normal")) + (reverse + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (rrange + (category . "data") (variadic . :json-false) + (parameters . [((range . "-9.99999E100,9.99999E100") (type . "real")) + ((range . "-9.99999E100,9.99999E100") (type . "real"))]) + (returnType . "rrange") (status . "normal")) + (returnszero + (category . "utils") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "useshell,noshell,powershell") (type . "option"))]) + (returnType . "context") (status . "normal")) + (remoteclassesmatching + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "true,false,yes,no,on,off") (type . "option")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (remotescalar + (category . "communication") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "true,false,yes,no,on,off") (type . "option"))]) + (returnType . "string") (status . "normal")) + (regldap + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "subtree,onelevel,base") (type . "option")) + ((range . ".*") (type . "string")) + ((range . "none,ssl,sasl") (type . "option"))]) + (returnType . "context") (status . "normal")) + (reglist + (category . "data") (variadic . :json-false) + (parameters . [((range . "@[(][a-zA-Z0-9]+[)]") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (regline + (category . "io") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (registryvalue + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (regextract + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (regcmp + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (regarray + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (readtcp + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (readstringlist + (category . "io") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (readstringarrayidx + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (readstringarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (readreallist + (category . "io") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "rlist") (status . "normal")) + (readrealarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (readintlist + (category . "io") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "ilist") (status . "normal")) + (readintarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (readfile + (category . "io") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (randomint + (category . "data") (variadic . :json-false) + (parameters . [((range . "-99999999999,9999999999") (type . "int")) + ((range . "-99999999999,9999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (product + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "real") (status . "normal")) + (peerleaders + (category . "communication") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (peerleader + (category . "communication") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (peers + (category . "communication") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (parsestringarrayidx + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (parsestringarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (parserealarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (parseintarray + (category . "io") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "0,99999999999") (type . "int")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "int") (status . "normal")) + (or + (category . "data") (variadic . t) + (parameters . []) + (returnType . "string") (status . "normal")) + (on + (category . "data") (variadic . :json-false) + (parameters . [((range . "1970,3000") (type . "int")) + ((range . "1,12") (type . "int")) + ((range . "1,31") (type . "int")) + ((range . "0,23") (type . "int")) + ((range . "0,59") (type . "int")) + ((range . "0,59") (type . "int"))]) + (returnType . "int") (status . "normal")) + (nth + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (now + (category . "system") (variadic . :json-false) + (parameters . []) + (returnType . "int") (status . "normal")) + (not + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (none + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (maplist + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (maparray + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (lsdir + (category . "files") (variadic . :json-false) + (parameters . [((range . ".+") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "true,false,yes,no,on,off") (type . "option"))]) + (returnType . "slist") (status . "normal")) + (length + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "int") (status . "normal")) + (ldapvalue + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "subtree,onelevel,base") (type . "option")) + ((range . "none,ssl,sasl") (type . "option"))]) + (returnType . "string") (status . "normal")) + (ldaplist + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "subtree,onelevel,base") (type . "option")) + ((range . "none,ssl,sasl") (type . "option"))]) + (returnType . "slist") (status . "normal")) + (ldaparray + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string")) + ((range . "subtree,onelevel,base") (type . "option")) + ((range . "none,ssl,sasl") (type . "option"))]) + (returnType . "context") (status . "normal")) + (laterthan + (category . "files") (variadic . :json-false) + (parameters . [((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,40000") (type . "int"))]) + (returnType . "context") (status . "normal")) + (lastnode + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (join + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "string") (status . "normal")) + (isvariable + (category . "utils") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (isplain + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (isnewerthan + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (islink + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (islessthan + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (isgreaterthan + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (isexecutable + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (isdir + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (irange + (category . "data") (variadic . :json-false) + (parameters . [((range . "-99999999999,9999999999") (type . "int")) + ((range . "-99999999999,9999999999") (type . "int"))]) + (returnType . "irange") (status . "normal")) + (iprange + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (intersection + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (ifelse + (category . "data") (variadic . t) + (parameters . []) + (returnType . "string") (status . "normal")) + (hubknowledge + (category . "communication") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "string") (status . "normal")) + (hostswithclass + (category . "communication") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_]+") (type . "string")) + ((range . "name,address") (type . "option"))]) + (returnType . "slist") (status . "normal")) + (hostsseen + (category . "communication") (variadic . :json-false) + (parameters . [((range . "0,99999999999") (type . "int")) + ((range . "lastseen,notseen") (type . "option")) + ((range . "name,address") (type . "option"))]) + (returnType . "slist") (status . "normal")) + (hostrange + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (hostinnetgroup + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (ip2host + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (host2ip + (category . "communication") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (hashmatch + (category . "data") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "md5,sha1,crypt,cf_sha224,cf_sha256,cf_sha384,cf_sha512") (type . "option")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (hash + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "md5,sha1,sha256,sha512,sha384,crypt") (type . "option"))]) + (returnType . "string") (status . "normal")) + (groupexists + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (grep + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (getvalues + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (getusers + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (getuid + (category . "system") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "int") (status . "normal")) + (getindices + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (getgid + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "int") (status . "normal")) + (getfields + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "\"?(/.*)") (type . "string")) + ((range . ".*") (type . "string")) + ((range . ".*") (type . "string"))]) + (returnType . "int") (status . "normal")) + (getenv + (category . "system") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "string") (status . "normal")) + (format + (category . "data") (variadic . t) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (filter + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "true,false,yes,no,on,off") (type . "option")) + ((range . "true,false,yes,no,on,off") (type . "option")) + ((range . "0,99999999999") (type . "int"))]) + (returnType . "slist") (status . "normal")) + (filestat + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "size,gid,uid,ino,nlink,ctime,atime,mtime,mode,modeoct,permstr,permoct,type,devno,dev_minor,dev_major,basename,dirname") (type . "option"))]) + (returnType . "string") (status . "normal")) + (filesize + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "int") (status . "normal")) + (filesexist + (category . "files") (variadic . :json-false) + (parameters . [((range . "@[(][a-zA-Z0-9]+[)]") (type . "string"))]) + (returnType . "context") (status . "normal")) + (fileexists + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (execresult + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".+") (type . "string")) + ((range . "useshell,noshell,powershell") (type . "option"))]) + (returnType . "string") (status . "normal")) + (every + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "context") (status . "normal")) + (escape + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (diskfree + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string"))]) + (returnType . "int") (status . "normal")) + (dirname + (category . "files") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (difference + (category . "data") (variadic . :json-false) + (parameters . [((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string")) + ((range . "[a-zA-Z0-9_$(){}\\[\\].:]+") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (countlinesmatching + (category . "io") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string")) + ((range . "\"?(/.*)") (type . "string"))]) + (returnType . "int") (status . "normal")) + (countclassesmatching + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "int") (status . "normal")) + (classesmatching + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "slist") (status . "normal")) + (classmatch + (category . "utils") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (classify + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "context") (status . "normal")) + (changedbefore + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")) + (concat + (category . "data") (variadic . t) + (parameters . []) + (returnType . "string") (status . "normal")) + (canonify + (category . "data") (variadic . :json-false) + (parameters . [((range . ".*") (type . "string"))]) + (returnType . "string") (status . "normal")) + (and + (category . "data") (variadic . t) + (parameters . []) + (returnType . "string") (status . "normal")) + (ago + (category . "data") (variadic . :json-false) + (parameters . [((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,40000") (type . "int"))]) + (returnType . "int") (status . "normal")) + (accumulated + (category . "data") (variadic . :json-false) + (parameters . [((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,1000") (type . "int")) + ((range . "0,40000") (type . "int"))]) + (returnType . "int") (status . "normal")) + (accessedbefore + (category . "files") (variadic . :json-false) + (parameters . [((range . "\"?(/.*)") (type . "string")) + ((range . "\"?(/.*)") (type . "string"))]) + (returnType . "context") (status . "normal")))) + "Fallback CFEngine syntax, containing just function definitions.") + (defcustom cfengine-mode-abbrevs nil "Abbrevs for CFEngine2 mode." :group 'cfengine @@ -520,31 +1161,24 @@ ;; CLASS: [.|&!()a-zA-Z0-9_\200-\377]+:: ;; CATEGORY: [a-zA-Z_]+: -(defun cfengine3--current-word (&optional bounds) +(defun cfengine3--current-word (flist &optional bounds) "Propose a word around point in the current CFEngine 3 buffer." - (let ((c (char-after (point))) - (s (syntax-ppss))) - (when (not (nth 3 s)) ; not inside a string + (save-excursion + (skip-syntax-forward "w_") + (when (search-backward-regexp + cfengine-mode-syntax-functions-regex + (point-at-bol) + t) (if bounds - (save-excursion - (let ((oldpoint (point)) - start end) - (skip-syntax-backward "w_") (setq start (point)) - (goto-char oldpoint) - (skip-syntax-forward "w_") (setq end (point)) - (when (not (and (eq start oldpoint) - (eq end oldpoint))) - (list start (point))))) - (and c - (memq (char-syntax c) '(?_ ?w)) - (current-word)))))) + (list (point) (match-end 1)) + (match-string 1))))) (defun cfengine3--current-function () "Look up current CFEngine 3 function" - (let* ((syntax (assoc cfengine-cf-promises cfengine-mode-syntax-cache)) + (let* ((syntax (cfengine3-make-syntax-cache)) (flist (assoc 'functions syntax))) (when flist - (let ((w (cfengine3--current-word))) + (let ((w (cfengine3--current-word flist))) (and w (assq (intern w) flist)))))) ;; format from "cf-promises -s json", e.g. "sort" function: @@ -590,33 +1224,45 @@ (if has-some-parameters ", ..." "...") "")))) +(defun cfengine3-clear-syntax-cache () + (interactive) + (setq cfengine-mode-syntax-functions-regex nil) + (setq cfengine-mode-syntax-cache nil)) + (defun cfengine3-make-syntax-cache () "Build the CFEngine 3 syntax cache. Calls `cfengine-cf-promises' with \"-s json\"" - (when cfengine-cf-promises - (let ((loaded-json-lib (require 'json nil t)) - (syntax (assoc cfengine-cf-promises cfengine-mode-syntax-cache))) - (if (not loaded-json-lib) - (message "JSON library could not be loaded!") - (unless syntax - (with-demoted-errors - (with-temp-buffer - (call-process-shell-command cfengine-cf-promises - nil ; no input - t ; current buffer - nil ; no redisplay - "-s" "json") - (goto-char (point-min)) - (setq syntax (json-read)) - (setq cfengine-mode-syntax-cache - (cons (cons cfengine-cf-promises syntax) - cfengine-mode-syntax-cache))))))))) + (let ((ret (if cfengine-cf-promises + (let ((loaded-json-lib (require 'json nil t)) + (syntax (cfengine3-make-syntax-cache))) + (if (not loaded-json-lib) + (message "JSON library could not be loaded!") + (unless syntax + (with-demoted-errors + (with-temp-buffer + (call-process-shell-command cfengine-cf-promises + nil ; no input + t ; current buffer + nil ; no redisplay + "-s" "json") + (goto-char (point-min)) + (setq syntax (json-read)) + (setq cfengine-mode-syntax-cache + (cons (cons cfengine-cf-promises syntax) + cfengine-mode-syntax-cache))))))) + cfengine3-fallback-syntax))) + (unless cfengine-mode-syntax-functions-regex + (setq cfengine-mode-syntax-functions-regex + (regexp-opt (mapcar (lambda (def) + (format "%s" (car def))) + (cdr (assoc 'functions ret))) + 'symbols))) + ret)) (defun cfengine3-documentation-function () "Document CFengine 3 functions around point. Intended as the value of `eldoc-documentation-function', which see. Use it by executing `turn-on-eldoc-mode'." - (cfengine3-make-syntax-cache) (let ((fdef (cfengine3--current-function))) (when fdef (cfengine3-format-function-docstring fdef)))) @@ -625,7 +1271,7 @@ "Return completions for function name around or before point." (cfengine3-make-syntax-cache) (let* ((bounds (cfengine3--current-word t)) - (syntax (assoc cfengine-cf-promises cfengine-mode-syntax-cache)) + (syntax (cfengine3-make-syntax-cache)) (flist (assoc 'functions syntax))) (when bounds (append bounds (list (cdr flist)))))) ------------------------------------------------------------ revno: 115507 committer: martin rudalics branch nick: trunk timestamp: Fri 2013-12-13 18:06:30 +0100 message: Fix windmove-find-other-window broken after pixelwise resizing (Bug#16017). * windmove.el (windmove-other-window-loc): Revert change from 2013-12-04. (windmove-find-other-window): Call window-in-direction. * window.el (window-in-direction): New arguments SIGN, WRAP and MINI to emulate original windmove-find-other-window behavior. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 04:14:17 +0000 +++ lisp/ChangeLog 2013-12-13 17:06:30 +0000 @@ -1,3 +1,13 @@ +2013-12-13 Martin Rudalics + + Fix windmove-find-other-window broken after pixelwise resizing + (Bug#16017). + * windmove.el (windmove-other-window-loc): Revert change from + 2013-12-04. + (windmove-find-other-window): Call window-in-direction. + * window.el (window-in-direction): New arguments SIGN, WRAP and + MINI to emulate original windmove-find-other-window behavior. + 2013-12-13 Dmitry Gutov * simple.el (blink-matching--overlay): New variable. === modified file 'lisp/windmove.el' --- lisp/windmove.el 2013-12-04 14:11:33 +0000 +++ lisp/windmove.el 2013-12-13 17:06:30 +0000 @@ -438,49 +438,38 @@ to. DIR is one of `left', `up', `right', or `down'; an optional ARG is handled as by `windmove-reference-loc'; WINDOW is the window that movement is relative to." - (let ((edges (window-pixel-edges window)) ; edges: (x0, y0, x1, y1) + (let ((edges (window-edges window)) ; edges: (x0, y0, x1, y1) (refpoint (windmove-reference-loc arg window))) ; (x . y) (cond ((eq dir 'left) - (cons (- (ceiling (nth 0 edges) - (frame-char-width (window-frame window))) + (cons (- (nth 0 edges) windmove-window-distance-delta) (cdr refpoint))) ; (x0-d, y) ((eq dir 'up) (cons (car refpoint) - (- (ceiling (nth 1 edges) - (frame-char-height (window-frame window))) + (- (nth 1 edges) windmove-window-distance-delta))) ; (x, y0-d) ((eq dir 'right) - (cons (+ (1- (ceiling (nth 2 edges) - (frame-char-width (window-frame window)))) ; -1 to get actual max x + (cons (+ (1- (nth 2 edges)) ; -1 to get actual max x windmove-window-distance-delta) (cdr refpoint))) ; (x1+d-1, y) ((eq dir 'down) ; -1 to get actual max y (cons (car refpoint) - (+ (1- (ceiling (nth 3 edges) - (frame-char-height (window-frame window)))) + (+ (1- (nth 3 edges)) windmove-window-distance-delta))) ; (x, y1+d-1) (t (error "Invalid direction of movement: %s" dir))))) +;; Rewritten on 2013-12-13 using `window-in-direction'. After the +;; pixelwise change the old approach didn't work any more. martin (defun windmove-find-other-window (dir &optional arg window) "Return the window object in direction DIR. DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'." - (let* ((actual-current-window (or window (selected-window))) - (raw-other-window-loc - (windmove-other-window-loc dir arg actual-current-window)) - (constrained-other-window-loc - (windmove-constrain-loc-for-movement raw-other-window-loc - actual-current-window - dir)) - (other-window-loc - (if windmove-wrap-around - (windmove-wrap-loc-for-movement constrained-other-window-loc - actual-current-window) - constrained-other-window-loc))) - (window-at (car other-window-loc) - (cdr other-window-loc)))) - + (window-in-direction + (cond + ((eq dir 'up) 'above) + ((eq dir 'down) 'below) + (t dir)) + window nil arg windmove-wrap-around t)) ;; Selects the window that's hopefully at the location returned by ;; `windmove-other-window-loc', or screams if there's no window there. === modified file 'lisp/window.el' --- lisp/window.el 2013-12-11 17:54:09 +0000 +++ lisp/window.el 2013-12-13 17:06:30 +0000 @@ -1719,7 +1719,7 @@ ;; Neither of these allow to selectively ignore specific windows ;; (windows whose `no-other-window' parameter is non-nil) as targets of ;; the movement. -(defun window-in-direction (direction &optional window ignore) +(defun window-in-direction (direction &optional window ignore sign wrap mini) "Return window in DIRECTION as seen from WINDOW. More precisely, return the nearest window in direction DIRECTION as seen from the position of `window-point' in window WINDOW. @@ -1732,6 +1732,22 @@ If, however, the optional argument IGNORE is non-nil, return that window even if its `no-other-window' parameter is non-nil. +Optional argument SIGN a negative number means to use the right +or bottom edge of WINDOW as reference position instead of +`window-point'. SIGN a positive number means to use the left or +top edge of WINDOW as reference position. + +Optional argument WRAP non-nil means to wrap DIRECTION around +frame borders. This means to return for a WINDOW a the top of +the frame and DIRECTION `above' to return the minibuffer window +if the frame has one, and a window at the bottom of the frame +otherwise. + +Optional argument MINI nil means to return the minibuffer window +if and only if it is currently active. MINI non-nil means to +return the minibuffer window even when it's not active. However, +if WRAP non-nil, always act as if MINI were nil. + Return nil if no suitable window can be found." (setq window (window-normalize-window window t)) (unless (memq direction '(above below left right)) @@ -1742,12 +1758,22 @@ (window-pixel-left window) (window-pixel-top window))) (last (+ first (window-size window hor t))) - (posn-cons (nth 2 (posn-at-point (window-point window) window))) ;; The column / row value of `posn-at-point' can be nil for the ;; mini-window, guard against that. - (posn (if hor - (+ (or (cdr posn-cons) 1) (window-pixel-top window)) - (+ (or (car posn-cons) 1) (window-pixel-left window)))) + (posn + (cond + ((and (numberp sign) (< sign 0)) + (if hor + (1- (+ (window-pixel-top window) (window-pixel-height window))) + (1- (+ (window-pixel-left window) (window-pixel-width window))))) + ((and (numberp sign) (> sign 0)) + (if hor + (window-pixel-top window) + (window-pixel-left window))) + ((let ((posn-cons (nth 2 (posn-at-point (window-point window) window)))) + (if hor + (+ (or (cdr posn-cons) 1) (window-pixel-top window)) + (+ (or (car posn-cons) 1) (window-pixel-left window))))))) (best-edge (cond ((eq direction 'below) (frame-pixel-height frame)) @@ -1772,9 +1798,15 @@ (< posn (+ w-top (window-pixel-height w)))) ;; W is to the left or right of WINDOW and covers POSN. (when (or (and (eq direction 'left) - (<= w-left first) (> w-left best-edge)) + (or (and (<= w-left first) (> w-left best-edge)) + (and wrap + (window-at-side-p window 'left) + (window-at-side-p w 'right)))) (and (eq direction 'right) - (>= w-left last) (< w-left best-edge))) + (or (and (>= w-left last) (< w-left best-edge)) + (and wrap + (window-at-side-p window 'right) + (window-at-side-p w 'left))))) (setq best-edge w-left) (setq best w))) ((and (or (and (eq direction 'left) @@ -1792,32 +1824,40 @@ (setq best-edge-2 w-left) (setq best-diff-2 best-diff-2-new) (setq best-2 w)))) - (t - (cond - ((and (<= w-left posn) - (< posn (+ w-left (window-pixel-width w)))) - ;; W is above or below WINDOW and covers POSN. - (when (or (and (eq direction 'above) - (<= w-top first) (> w-top best-edge)) - (and (eq direction 'below) - (>= w-top first) (< w-top best-edge))) - (setq best-edge w-top) - (setq best w))) - ((and (or (and (eq direction 'above) - (<= (+ w-top (window-pixel-height w)) first)) - (and (eq direction 'below) (<= last w-top))) - ;; W is above or below WINDOW but does not cover POSN. - (setq best-diff-2-new - (window--in-direction-2 w posn hor)) - (or (< best-diff-2-new best-diff-2) - (and (= best-diff-2-new best-diff-2) - (if (eq direction 'above) - (> w-top best-edge-2) - (< w-top best-edge-2))))) - (setq best-edge-2 w-top) - (setq best-diff-2 best-diff-2-new) - (setq best-2 w))))))) - frame) + ((and (<= w-left posn) + (< posn (+ w-left (window-pixel-width w)))) + ;; W is above or below WINDOW and covers POSN. + (when (or (and (eq direction 'above) + (or (and (<= w-top first) (> w-top best-edge)) + (and wrap + (window-at-side-p window 'top) + (if (active-minibuffer-window) + (minibuffer-window-active-p w) + (window-at-side-p w 'bottom))))) + (and (eq direction 'below) + (or (and (>= w-top first) (< w-top best-edge)) + (and wrap + (if (active-minibuffer-window) + (minibuffer-window-active-p window) + (window-at-side-p window 'bottom)) + (window-at-side-p w 'top))))) + (setq best-edge w-top) + (setq best w))) + ((and (or (and (eq direction 'above) + (<= (+ w-top (window-pixel-height w)) first)) + (and (eq direction 'below) (<= last w-top))) + ;; W is above or below WINDOW but does not cover POSN. + (setq best-diff-2-new + (window--in-direction-2 w posn hor)) + (or (< best-diff-2-new best-diff-2) + (and (= best-diff-2-new best-diff-2) + (if (eq direction 'above) + (> w-top best-edge-2) + (< w-top best-edge-2))))) + (setq best-edge-2 w-top) + (setq best-diff-2 best-diff-2-new) + (setq best-2 w))))) + frame nil (and mini t)) (or best best-2))) (defun get-window-with-predicate (predicate &optional minibuf all-frames default) ------------------------------------------------------------ revno: 115506 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-12-13 19:55:23 +0400 message: * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m, * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and 2013-12-12 font-related change to avoid Bug#16128, which is quite hard to fix without even more substantial changes. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-13 13:34:05 +0000 +++ src/ChangeLog 2013-12-13 15:55:23 +0000 @@ -1,5 +1,12 @@ 2013-12-13 Dmitry Antipov + * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m, + * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and + 2013-12-12 font-related change to avoid Bug#16128, which + is quite hard to fix without even more substantial changes. + +2013-12-13 Dmitry Antipov + * font.c (font_close_object): Check for live frame (Bug#16128). 2013-12-13 Paul Eggert === modified file 'src/alloc.c' --- src/alloc.c 2013-12-12 14:26:06 +0000 +++ src/alloc.c 2013-12-13 15:55:23 +0000 @@ -2874,22 +2874,10 @@ static void cleanup_vector (struct Lisp_Vector *vector) { - if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT)) - { - ptrdiff_t size = vector->header.size & PSEUDOVECTOR_SIZE_MASK; - Lisp_Object obj = make_lisp_ptr (vector, Lisp_Vectorlike); - - if (size == FONT_OBJECT_MAX) - font_close_object (obj); -#ifdef HAVE_NS - else if (size == FONT_ENTITY_MAX) - { - struct font_entity *entity = (struct font_entity *) vector; - if (entity->driver && entity->driver->free_entity) - entity->driver->free_entity (obj); - } -#endif /* HAVE_NS */ - } + if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT) + && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK) + == FONT_OBJECT_MAX)) + ((struct font *) vector)->driver->close ((struct font *) vector); } /* Reclaim space used by unmarked vectors. */ === modified file 'src/font.c' --- src/font.c 2013-12-13 13:34:05 +0000 +++ src/font.c 2013-12-13 15:55:23 +0000 @@ -173,9 +173,6 @@ allocate_pseudovector (VECSIZE (struct font_entity), FONT_ENTITY_MAX, PVEC_FONT)); XSETFONT (font_entity, entity); -#ifdef HAVE_NS - entity->driver = NULL; -#endif return font_entity; } @@ -2884,10 +2881,10 @@ } -/* Close FONT_OBJECT. */ +/* Close FONT_OBJECT that is opened on frame F. */ -void -font_close_object (Lisp_Object font_object) +static void +font_close_object (struct frame *f, Lisp_Object font_object) { struct font *font = XFONT_OBJECT (font_object); @@ -2897,13 +2894,8 @@ FONT_ADD_LOG ("close", font_object, Qnil); font->driver->close (font); #ifdef HAVE_WINDOW_SYSTEM - eassert (font->frame); - /* If the frame is gone, we can't do anything (Bug#16128). */ - if (FRAME_LIVE_P (font->frame)) - { - eassert (FRAME_DISPLAY_INFO (font->frame)->n_fonts); - FRAME_DISPLAY_INFO (font->frame)->n_fonts--; - } + eassert (FRAME_DISPLAY_INFO (f)->n_fonts); + FRAME_DISPLAY_INFO (f)->n_fonts--; #endif } @@ -4556,11 +4548,11 @@ } DEFUN ("close-font", Fclose_font, Sclose_font, 1, 2, 0, - doc: /* Close FONT-OBJECT. Optional FRAME is unused. */) + doc: /* Close FONT-OBJECT. */) (Lisp_Object font_object, Lisp_Object frame) { CHECK_FONT_OBJECT (font_object); - font_close_object (font_object); + font_close_object (decode_live_frame (frame), font_object); return Qnil; } @@ -4895,7 +4887,7 @@ /* As font_object is still in FONT_OBJLIST of the entity, we can't close it now. Perhaps, we should manage font-objects by `reference-count'. */ - font_close_object (font_object); + font_close_object (f, font_object); #endif return info; } === modified file 'src/font.h' --- src/font.h 2013-12-12 14:26:06 +0000 +++ src/font.h 2013-12-13 15:55:23 +0000 @@ -265,9 +265,6 @@ { struct vectorlike_header header; Lisp_Object props[FONT_ENTITY_MAX]; -#ifdef HAVE_NS - struct font_driver *driver; -#endif }; /* A value which may appear in the member `encoding' of struct font @@ -319,9 +316,6 @@ #if defined (HAVE_WINDOW_SYSTEM) - /* The frame where the font was opened. */ - struct frame *frame; - /* Vertical pixel width of the underline. If is zero if that information is not in the font. */ int underline_thickness; @@ -741,7 +735,6 @@ extern Lisp_Object font_make_entity (void); extern Lisp_Object font_make_object (int, Lisp_Object, int); -extern void font_close_object (Lisp_Object); extern Lisp_Object find_font_encoding (Lisp_Object); extern int font_registry_charsets (Lisp_Object, struct charset **, === modified file 'src/ftfont.c' --- src/ftfont.c 2013-12-12 14:26:06 +0000 +++ src/ftfont.c 2013-12-13 15:55:23 +0000 @@ -1236,7 +1236,6 @@ ASET (font_object, FONT_FILE_INDEX, filename); ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (NULL, filename)); font = XFONT_OBJECT (font_object); - font->frame = f; ftfont_info = (struct ftfont_info *) font; ftfont_info->ft_size = ft_face->size; ftfont_info->index = XINT (idx); === modified file 'src/ftxfont.c' --- src/ftxfont.c 2013-12-12 14:26:06 +0000 +++ src/ftxfont.c 2013-12-13 15:55:23 +0000 @@ -255,7 +255,6 @@ if (NILP (font_object)) return Qnil; font = XFONT_OBJECT (font_object); - eassert (font->frame == f); font->driver = &ftxfont_driver; return font_object; } === modified file 'src/macfont.m' --- src/macfont.m 2013-12-12 14:26:06 +0000 +++ src/macfont.m 2013-12-13 15:55:23 +0000 @@ -882,7 +882,6 @@ CFStringRef name; entity = font_make_entity (); - XFONT_ENTITY (entity)->driver = &macfont_driver; ASET (entity, FONT_TYPE_INDEX, macfont_driver.type); ASET (entity, FONT_REGISTRY_INDEX, Qiso10646_1); @@ -2492,7 +2491,6 @@ ASET (font_object, FONT_FULLNAME_INDEX, AREF (font_object, FONT_NAME_INDEX)); font = XFONT_OBJECT (font_object); - font->frame = f; font->pixel_size = size; font->driver = &macfont_driver; font->encoding_charset = font->repertory_charset = -1; === modified file 'src/nsfont.m' --- src/nsfont.m 2013-12-12 14:26:06 +0000 +++ src/nsfont.m 2013-12-13 15:55:23 +0000 @@ -805,7 +805,6 @@ return Qnil; /* FIXME: other terms do, but return Qnil causes segfault */ } - font->frame = f; font_info->glyphs = xzalloc (0x100 * sizeof *font_info->glyphs); font_info->metrics = xzalloc (0x100 * sizeof *font_info->metrics); === modified file 'src/w32font.c' --- src/w32font.c 2013-12-12 14:26:06 +0000 +++ src/w32font.c 2013-12-13 15:55:23 +0000 @@ -999,7 +999,6 @@ = DECODE_SYSTEM (build_string (logfont.lfFaceName)); } - font->frame = f; font->max_width = w32_font->metrics.tmMaxCharWidth; /* Parts of Emacs display assume that height = ascent + descent... so height is defined later, after ascent and descent. === modified file 'src/xfont.c' --- src/xfont.c 2013-12-12 14:26:06 +0000 +++ src/xfont.c 2013-12-13 15:55:23 +0000 @@ -806,7 +806,6 @@ ASET (font_object, FONT_FILE_INDEX, Qnil); ASET (font_object, FONT_FORMAT_INDEX, Qx); font = XFONT_OBJECT (font_object); - font->frame = f; ((struct xfont_info *) font)->xfont = xfont; ((struct xfont_info *) font)->display = FRAME_X_DISPLAY (f); font->pixel_size = pixel_size; === modified file 'src/xftfont.c' --- src/xftfont.c 2013-12-12 14:26:06 +0000 +++ src/xftfont.c 2013-12-13 15:55:23 +0000 @@ -365,7 +365,6 @@ ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (xftfont->pattern, filename)); font = XFONT_OBJECT (font_object); - font->frame = f; font->pixel_size = size; font->driver = &xftfont_driver; font->encoding_charset = font->repertory_charset = -1; ------------------------------------------------------------ revno: 115505 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-12-13 17:34:05 +0400 message: * font.c (font_close_object): Check for live frame (Bug#16128). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-12-13 03:44:59 +0000 +++ src/ChangeLog 2013-12-13 13:34:05 +0000 @@ -1,3 +1,7 @@ +2013-12-13 Dmitry Antipov + + * font.c (font_close_object): Check for live frame (Bug#16128). + 2013-12-13 Paul Eggert * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending): === modified file 'src/font.c' --- src/font.c 2013-12-12 14:26:06 +0000 +++ src/font.c 2013-12-13 13:34:05 +0000 @@ -2898,8 +2898,12 @@ font->driver->close (font); #ifdef HAVE_WINDOW_SYSTEM eassert (font->frame); - eassert (FRAME_DISPLAY_INFO (font->frame)->n_fonts); - FRAME_DISPLAY_INFO (font->frame)->n_fonts--; + /* If the frame is gone, we can't do anything (Bug#16128). */ + if (FRAME_LIVE_P (font->frame)) + { + eassert (FRAME_DISPLAY_INFO (font->frame)->n_fonts); + FRAME_DISPLAY_INFO (font->frame)->n_fonts--; + } #endif } ------------------------------------------------------------ revno: 115504 committer: Dmitry Gutov branch nick: trunk timestamp: Fri 2013-12-13 06:14:17 +0200 message: Make blink-matching-paren perform blinking without moving the cursor * lisp/faces.el (paren-showing-faces, show-paren-match) (show-paren-mismatch): Move from paren.el. * lisp/simple.el (blink-matching--overlay): New variable. (blink-matching-open): Instead of moving point, highlight the matching paren with an overlay (http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00333.html). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-12-13 01:54:09 +0000 +++ lisp/ChangeLog 2013-12-13 04:14:17 +0000 @@ -1,3 +1,13 @@ +2013-12-13 Dmitry Gutov + + * simple.el (blink-matching--overlay): New variable. + (blink-matching-open): Instead of moving point, highlight the + matching paren with an overlay + (http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00333.html). + + * faces.el (paren-showing-faces, show-paren-match) + (show-paren-mismatch): Move from paren.el. + 2013-12-13 Leo Liu * indent.el (indent-region): Disable progress reporter in === modified file 'lisp/faces.el' --- lisp/faces.el 2013-11-08 17:26:03 +0000 +++ lisp/faces.el 2013-12-13 04:14:17 +0000 @@ -2573,6 +2573,30 @@ "Face for displaying the currently selected item in TTY menus." :group 'basic-faces) +(defgroup paren-showing-faces nil + "Faces used to highlight paren matches." + :group 'paren-showing + :group 'faces + :version "22.1") + +(defface show-paren-match + '((((class color) (background light)) + :background "turquoise") ; looks OK on tty (becomes cyan) + (((class color) (background dark)) + :background "steelblue3") ; looks OK on tty (becomes blue) + (((background dark)) + :background "grey50") + (t + :background "gray")) + "Face used for a matching paren." + :group 'paren-showing-faces) + +(defface show-paren-mismatch + '((((class color)) (:foreground "white" :background "purple")) + (t (:inverse-video t))) + "Face used for a mismatching paren." + :group 'paren-showing-faces) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Manipulating font names. === modified file 'lisp/paren.el' --- lisp/paren.el 2013-05-30 15:44:54 +0000 +++ lisp/paren.el 2013-12-13 04:14:17 +0000 @@ -72,30 +72,8 @@ :group 'paren-showing :version "20.3") -(defgroup paren-showing-faces nil - "Group for faces of Show Paren mode." - :group 'paren-showing - :group 'faces - :version "22.1") - -(defface show-paren-match - '((((class color) (background light)) - :background "turquoise") ; looks OK on tty (becomes cyan) - (((class color) (background dark)) - :background "steelblue3") ; looks OK on tty (becomes blue) - (((background dark)) - :background "grey50") - (t - :background "gray")) - "Show Paren mode face used for a matching paren." - :group 'paren-showing-faces) (define-obsolete-face-alias 'show-paren-match-face 'show-paren-match "22.1") -(defface show-paren-mismatch - '((((class color)) (:foreground "white" :background "purple")) - (t (:inverse-video t))) - "Show Paren mode face used for a mismatching paren." - :group 'paren-showing-faces) (define-obsolete-face-alias 'show-paren-mismatch-face 'show-paren-mismatch "22.1") === modified file 'lisp/simple.el' --- lisp/simple.el 2013-12-13 01:03:04 +0000 +++ lisp/simple.el 2013-12-13 04:14:17 +0000 @@ -6308,8 +6308,15 @@ START can be nil, if it was not found. The function should return non-nil if the two tokens do not match.") +(defvar blink-matching--overlay + (let ((ol (make-overlay (point) (point) nil t))) + (overlay-put ol 'face 'show-paren-match) + (delete-overlay ol) + ol) + "Overlay used to highlight the matching paren.") + (defun blink-matching-open () - "Move cursor momentarily to the beginning of the sexp before point." + "Momentarily highlight the beginning of the sexp before point." (interactive) (when (and (not (bobp)) blink-matching-paren) @@ -6351,13 +6358,17 @@ (message "No matching parenthesis found")))) ((not blinkpos) nil) ((pos-visible-in-window-p blinkpos) - ;; Matching open within window, temporarily move to blinkpos but only - ;; if `blink-matching-paren-on-screen' is non-nil. + ;; Matching open within window, temporarily highlight char + ;; after blinkpos but only if `blink-matching-paren-on-screen' + ;; is non-nil. (and blink-matching-paren-on-screen (not show-paren-mode) - (save-excursion - (goto-char blinkpos) - (sit-for blink-matching-delay)))) + (unwind-protect + (progn + (move-overlay blink-matching--overlay blinkpos (1+ blinkpos) + (current-buffer)) + (sit-for blink-matching-delay)) + (delete-overlay blink-matching--overlay)))) (t (save-excursion (goto-char blinkpos)