Now on revision 110243. ------------------------------------------------------------ revno: 110243 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-09-28 22:02:34 -0400 message: * src/lisp.h (struct backtrace): Remove indirection for `function' field. * src/xdisp.c (redisplay_internal): * src/profiler.c (record_backtrace, sigprof_handler_1): * src/alloc.c (Fgarbage_collect): * src/eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace) (Fbacktrace_frame): Adjust accordingly. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-09-10 01:16:13 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-09-29 02:02:34 +0000 @@ -11,7 +11,7 @@ ;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively ;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan ;;;;;; cl-mapl cl-maplist cl-map cl--mapcar-many cl-equalp cl-coerce) -;;;;;; "cl-extra" "cl-extra.el" "535a24c1cff55a16e3d51219498a7858") +;;;;;; "cl-extra" "cl-extra.el" "1572ae52fa4fbd9c4bf89b49a068a865") ;;; Generated autoloads from cl-extra.el (autoload 'cl-coerce "cl-extra" "\ @@ -260,7 +260,7 @@ ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "6d0676869af66e5b5a671f95ee069461") +;;;;;; "cl-macs" "cl-macs.el" "da92f58f688ff6fb4d0098eb0f3acf0b") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ @@ -748,7 +748,7 @@ ;;;;;; cl-nsubstitute-if cl-nsubstitute cl-substitute-if-not cl-substitute-if ;;;;;; cl-substitute cl-delete-duplicates cl-remove-duplicates cl-delete-if-not ;;;;;; cl-delete-if cl-delete cl-remove-if-not cl-remove-if cl-remove -;;;;;; cl-replace cl-fill cl-reduce) "cl-seq" "cl-seq.el" "b444601641dcbd14a23ca5182bc80ffa") +;;;;;; cl-replace cl-fill cl-reduce) "cl-seq" "cl-seq.el" "4c1e1191e82dc8d5449a5ec4d59efc10") ;;; Generated autoloads from cl-seq.el (autoload 'cl-reduce "cl-seq" "\ === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-28 16:02:31 +0000 +++ src/ChangeLog 2012-09-29 02:02:34 +0000 @@ -1,3 +1,12 @@ +2012-09-29 Stefan Monnier + + * lisp.h (struct backtrace): Remove indirection for `function' field. + * xdisp.c (redisplay_internal): + * profiler.c (record_backtrace, sigprof_handler_1): + * alloc.c (Fgarbage_collect): + * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace) + (Fbacktrace_frame): Adjust accordingly. + 2012-09-28 Glenn Morris * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success) === modified file 'src/alloc.c' --- src/alloc.c 2012-09-26 15:19:10 +0000 +++ src/alloc.c 2012-09-29 02:02:34 +0000 @@ -5112,8 +5112,8 @@ /* Record this function, so it appears on the profiler's backtraces. */ backtrace.next = backtrace_list; - backtrace.function = &Qautomatic_gc; - backtrace.args = &Qautomatic_gc; + backtrace.function = Qautomatic_gc; + backtrace.args = &Qnil; backtrace.nargs = 0; backtrace.debug_on_exit = 0; backtrace_list = &backtrace; === modified file 'src/eval.c' --- src/eval.c 2012-09-28 16:02:31 +0000 +++ src/eval.c 2012-09-29 02:02:34 +0000 @@ -552,7 +552,7 @@ /* If this isn't a byte-compiled function, there may be a frame at the top for Finteractive_p. If so, skip it. */ - fun = Findirect_function (*btp->function, Qnil); + fun = Findirect_function (btp->function, Qnil); if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p || XSUBR (fun) == &Scalled_interactively_p)) btp = btp->next; @@ -565,7 +565,7 @@ If this isn't a byte-compiled function, then we may now be looking at several frames for special forms. Skip past them. */ while (btp - && (EQ (*btp->function, Qbytecode) + && (EQ (btp->function, Qbytecode) || btp->nargs == UNEVALLED)) btp = btp->next; @@ -573,13 +573,13 @@ a special form, ignoring frames for Finteractive_p and/or Fbytecode at the top. If this frame is for a built-in function (such as load or eval-region) return false. */ - fun = Findirect_function (*btp->function, Qnil); + fun = Findirect_function (btp->function, Qnil); if (SUBRP (fun)) return 0; /* `btp' points to the frame of a Lisp function that called interactive-p. Return t if that function was called interactively. */ - if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively)) + if (btp && btp->next && EQ (btp->next->function, Qcall_interactively)) return 1; return 0; } @@ -1496,10 +1496,10 @@ if (backtrace_list && !NILP (error_symbol)) { bp = backtrace_list->next; - if (bp && bp->function && EQ (*bp->function, Qerror)) + if (bp && EQ (bp->function, Qerror)) bp = bp->next; - if (bp && bp->function) - Vsignaling_function = *bp->function; + if (bp) + Vsignaling_function = bp->function; } for (h = handlerlist; h; h = h->next) @@ -1510,7 +1510,7 @@ } if (/* Don't run the debugger for a memory-full error. - (There is no room in memory to do that!) */ + (There is no room in memory to do that!) */ !NILP (error_symbol) && (!NILP (Vdebug_on_signal) /* If no handler is present now, try to run the debugger. */ @@ -2045,7 +2045,7 @@ original_args = XCDR (form); backtrace.next = backtrace_list; - backtrace.function = &original_fun; /* This also protects them from gc. */ + backtrace.function = original_fun; /* This also protects them from gc. */ backtrace.args = &original_args; backtrace.nargs = UNEVALLED; backtrace.debug_on_exit = 0; @@ -2713,7 +2713,7 @@ } backtrace.next = backtrace_list; - backtrace.function = &args[0]; + backtrace.function = args[0]; backtrace.args = &args[1]; /* This also GCPROs them. */ backtrace.nargs = nargs - 1; backtrace.debug_on_exit = 0; @@ -3289,12 +3289,12 @@ write_string (backlist->debug_on_exit ? "* " : " ", 2); if (backlist->nargs == UNEVALLED) { - Fprin1 (Fcons (*backlist->function, *backlist->args), Qnil); + Fprin1 (Fcons (backlist->function, *backlist->args), Qnil); write_string ("\n", -1); } else { - tem = *backlist->function; + tem = backlist->function; Fprin1 (tem, Qnil); /* This can QUIT. */ write_string ("(", -1); if (backlist->nargs == MANY) @@ -3352,7 +3352,7 @@ if (!backlist) return Qnil; if (backlist->nargs == UNEVALLED) - return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); + return Fcons (Qnil, Fcons (backlist->function, *backlist->args)); else { if (backlist->nargs == MANY) /* FIXME: Can this happen? */ @@ -3360,7 +3360,7 @@ else tem = Flist (backlist->nargs, backlist->args); - return Fcons (Qt, Fcons (*backlist->function, tem)); + return Fcons (Qt, Fcons (backlist->function, tem)); } } === modified file 'src/lisp.h' --- src/lisp.h 2012-09-26 15:19:10 +0000 +++ src/lisp.h 2012-09-29 02:02:34 +0000 @@ -2034,7 +2034,7 @@ struct backtrace { struct backtrace *next; - Lisp_Object *function; + Lisp_Object function; Lisp_Object *args; /* Points to vector of args. */ ptrdiff_t nargs; /* Length of vector. */ /* Nonzero means call value of debugger when done with this operation. */ === modified file 'src/profiler.c' --- src/profiler.c 2012-09-28 09:34:20 +0000 +++ src/profiler.c 2012-09-29 02:02:34 +0000 @@ -149,7 +149,7 @@ /* Copy the backtrace contents into working memory. */ for (; i < asize && backlist; i++, backlist = backlist->next) /* FIXME: For closures we should ignore the environment. */ - ASET (backtrace, i, *backlist->function); + ASET (backtrace, i, backlist->function); /* Make sure that unused space of working memory is filled with nil. */ for (; i < asize; i++) @@ -218,7 +218,7 @@ sigprof_handler_1 (int signal) { eassert (HASH_TABLE_P (cpu_log)); - if (backtrace_list && EQ (*backtrace_list->function, Qautomatic_gc)) + if (backtrace_list && EQ (backtrace_list->function, Qautomatic_gc)) /* Special case the time-count inside GC because the hash-table code is not prepared to be used while the GC is running. More specifically it uses ASIZE at many places where it does === modified file 'src/xdisp.c' --- src/xdisp.c 2012-09-28 14:10:41 +0000 +++ src/xdisp.c 2012-09-29 02:02:34 +0000 @@ -12975,8 +12975,8 @@ /* Record this function, so it appears on the profiler's backtraces. */ backtrace.next = backtrace_list; - backtrace.function = &Qredisplay_internal; - backtrace.args = &Qredisplay_internal; + backtrace.function = Qredisplay_internal; + backtrace.args = &Qnil; backtrace.nargs = 0; backtrace.debug_on_exit = 0; backtrace_list = &backtrace; ------------------------------------------------------------ revno: 110242 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 19:51:20 -0400 message: * lisp/emacs-lisp/cl.el (flet): Fix case of obsolescence message. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 23:30:52 +0000 +++ lisp/ChangeLog 2012-09-28 23:51:20 +0000 @@ -1,5 +1,7 @@ 2012-09-28 Glenn Morris + * emacs-lisp/cl.el (flet): Fix case of obsolescence message. + * emacs-lisp/bytecomp.el (byte-compile-cl-file-p): Only "cl.el" counts as cl these days. === modified file 'lisp/emacs-lisp/cl.el' --- lisp/emacs-lisp/cl.el 2012-08-15 16:29:11 +0000 +++ lisp/emacs-lisp/cl.el 2012-09-28 23:51:20 +0000 @@ -452,7 +452,7 @@ \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" (declare (indent 1) (debug cl-flet) - (obsolete "Use either `cl-flet' or `cl-letf'." "24.3")) + (obsolete "use either `cl-flet' or `cl-letf'." "24.3")) `(letf ,(mapcar (lambda (x) (if (or (and (fboundp (car x)) ------------------------------------------------------------ revno: 110241 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 19:30:52 -0400 message: * bytecomp.el (byte-compile-cl-file-p): Only "cl.el" counts as cl these days. Remove no longer appropriate file-local suppression of CL warnings in lisp/emacs-lisp/cl-*.el files. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 16:38:07 +0000 +++ lisp/ChangeLog 2012-09-28 23:30:52 +0000 @@ -1,3 +1,8 @@ +2012-09-28 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-cl-file-p): + Only "cl.el" counts as cl these days. + 2012-09-28 Juri Linkov Display archive errors in the echo area instead of inserting === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2012-09-20 13:46:36 +0000 +++ lisp/emacs-lisp/bytecomp.el 2012-09-28 23:30:52 +0000 @@ -846,7 +846,7 @@ (defun byte-compile-cl-file-p (file) "Return non-nil if FILE is one of the CL files." (and (stringp file) - (string-match "^cl\\>" (file-name-nondirectory file)))) + (string-match "^cl\\.el" (file-name-nondirectory file)))) (defun byte-compile-eval (form) "Eval FORM and mark the functions defined therein. === modified file 'lisp/emacs-lisp/cl-extra.el' --- lisp/emacs-lisp/cl-extra.el 2012-07-11 23:13:41 +0000 +++ lisp/emacs-lisp/cl-extra.el 2012-09-28 23:30:52 +0000 @@ -689,7 +689,6 @@ ;; Local variables: ;; byte-compile-dynamic: t -;; byte-compile-warnings: (not cl-functions) ;; generated-autoload-file: "cl-loaddefs.el" ;; End: === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-09-17 05:41:04 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-09-28 23:30:52 +0000 @@ -745,7 +745,6 @@ ;; Local variables: ;; byte-compile-dynamic: t -;; byte-compile-warnings: (not cl-functions) ;; End: ;;; cl-lib.el ends here === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2012-09-10 01:16:13 +0000 +++ lisp/emacs-lisp/cl-macs.el 2012-09-28 23:30:52 +0000 @@ -2686,7 +2686,6 @@ ;; Local variables: ;; byte-compile-dynamic: t -;; byte-compile-warnings: (not cl-functions) ;; generated-autoload-file: "cl-loaddefs.el" ;; End: === modified file 'lisp/emacs-lisp/cl-seq.el' --- lisp/emacs-lisp/cl-seq.el 2012-06-11 15:52:50 +0000 +++ lisp/emacs-lisp/cl-seq.el 2012-09-28 23:30:52 +0000 @@ -1010,7 +1010,6 @@ ;; Local variables: ;; byte-compile-dynamic: t -;; byte-compile-warnings: (not cl-functions) ;; generated-autoload-file: "cl-loaddefs.el" ;; End: ------------------------------------------------------------ revno: 110240 fixes bug: http://debbugs.gnu.org/10347 committer: Juri Linkov branch nick: trunk timestamp: Fri 2012-09-28 19:38:07 +0300 message: Display archive errors in the echo area instead of inserting to the file buffer. * lisp/arc-mode.el (archive-extract-by-stdout): Change arg STDERR-FILE to STDERR-TEST that can be a regexp matching a successful output. Create a temporary file and redirect stderr to it. Search for STDERR-TEST in the stderr output and display it in the echo area if no match is found. (archive-extract-by-file): New function like `archive-extract-by-stdout' but extracting archives to files and looking for successful matches in stdout. Function body is mostly copied from `archive-rar-extract'. (archive-rar-extract): Use `archive-extract-by-file'. (archive-7z-extract): Use `archive-extract-by-stdout'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 16:02:31 +0000 +++ lisp/ChangeLog 2012-09-28 16:38:07 +0000 @@ -1,3 +1,20 @@ +2012-09-28 Juri Linkov + + Display archive errors in the echo area instead of inserting + to the file buffer. + + * arc-mode.el (archive-extract-by-stdout): Change arg STDERR-FILE + to STDERR-TEST that can be a regexp matching a successful output. + Create a temporary file and redirect stderr to it. Search for + STDERR-TEST in the stderr output and display it in the echo area + if no match is found. + (archive-extract-by-file): New function like + `archive-extract-by-stdout' but extracting archives to files + and looking for successful matches in stdout. Function body is + mostly copied from `archive-rar-extract'. + (archive-rar-extract): Use `archive-extract-by-file'. + (archive-7z-extract): Use `archive-extract-by-stdout'. (Bug#10347) + 2012-09-28 Leo Liu * pcomplete.el (pcomplete-show-completions): Use === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2012-05-04 06:13:18 +0000 +++ lisp/arc-mode.el 2012-09-28 16:38:07 +0000 @@ -1117,13 +1117,54 @@ (archive-delete-local tmpfile) success)) -(defun archive-extract-by-stdout (archive name command &optional stderr-file) - (apply 'call-process - (car command) - nil - (if stderr-file (list t stderr-file) t) - nil - (append (cdr command) (list archive name)))) +(defun archive-extract-by-stdout (archive name command &optional stderr-test) + (let ((stderr-file (make-temp-file "arc-stderr"))) + (unwind-protect + (prog1 + (apply 'call-process + (car command) + nil + (if stderr-file (list t stderr-file) t) + nil + (append (cdr command) (list archive name))) + (with-temp-buffer + (insert-file-contents stderr-file) + (goto-char (point-min)) + (when (if (stringp stderr-test) + (not (re-search-forward stderr-test nil t)) + (> (buffer-size) 0)) + (message "%s" (buffer-string))))) + (if (file-exists-p stderr-file) + (delete-file stderr-file))))) + +(defun archive-extract-by-file (archive name command &optional stdout-test) + (let ((dest (make-temp-file "arc-dir" 'dir)) + (stdout-file (make-temp-file "arc-stdout"))) + (unwind-protect + (prog1 + (apply 'call-process + (car command) + nil + `(:file ,stdout-file) + nil + (append (cdr command) (list archive name dest))) + (with-temp-buffer + (insert-file-contents stdout-file) + (goto-char (point-min)) + (when (if (stringp stdout-test) + (not (re-search-forward stdout-test nil t)) + (> (buffer-size) 0)) + (message "%s" (buffer-string)))) + (if (file-exists-p (expand-file-name name dest)) + (insert-file-contents-literally (expand-file-name name dest)))) + (if (file-exists-p stdout-file) + (delete-file stdout-file)) + (if (file-exists-p (expand-file-name name dest)) + (delete-file (expand-file-name name dest))) + (while (file-name-directory name) + (setq name (directory-file-name (file-name-directory name))) + (delete-directory (expand-file-name name dest))) + (delete-directory dest)))) (defun archive-extract-other-window () "In archive mode, find this member in another window." @@ -2006,17 +2047,7 @@ ;; The code below assumes the name is relative and may do undesirable ;; things otherwise. (error "Can't extract files with non-relative names") - (let ((dest (make-temp-file "arc-rar" 'dir))) - (unwind-protect - (progn - (call-process "unrar-free" nil nil nil - "--extract" archive name dest) - (insert-file-contents-literally (expand-file-name name dest))) - (delete-file (expand-file-name name dest)) - (while (file-name-directory name) - (setq name (directory-file-name (file-name-directory name))) - (delete-directory (expand-file-name name dest))) - (delete-directory dest))))) + (archive-extract-by-file archive name '("unrar-free" "--extract") "All OK"))) ;;; Section: Rar self-extracting .exe archives. @@ -2099,17 +2130,11 @@ (apply 'vector files)))) (defun archive-7z-extract (archive name) - (let ((tmpfile (make-temp-file "7z-stderr"))) - ;; 7z doesn't provide a `quiet' option to suppress non-essential - ;; stderr messages. So redirect stderr to a temp file and display it - ;; in the echo area when it contains error messages. - (prog1 (archive-extract-by-stdout - archive name archive-7z-extract tmpfile) - (with-temp-buffer - (insert-file-contents tmpfile) - (unless (search-forward "Everything is Ok" nil t) - (message "%s" (buffer-string))) - (delete-file tmpfile))))) + ;; 7z doesn't provide a `quiet' option to suppress non-essential + ;; stderr messages. So redirect stderr to a temp file and display it + ;; in the echo area when it contains no message indicating success. + (archive-extract-by-stdout + archive name archive-7z-extract "Everything is Ok")) (defun archive-7z-write-file-member (archive descr) (archive-*-write-file-member ------------------------------------------------------------ revno: 110239 [merge] committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 09:02:31 -0700 message: Merge from emacs-24; up to r108150 diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-09-23 10:46:50 +0000 +++ doc/lispref/ChangeLog 2012-09-28 16:02:31 +0000 @@ -1,3 +1,7 @@ +2012-09-28 Leo Liu + + * files.texi (Files): Fix typo. + 2012-09-23 Chong Yidong * buffers.texi (Read Only Buffers): Document read-only-mode. === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2012-06-26 16:23:01 +0000 +++ doc/lispref/files.texi 2012-09-28 16:02:31 +0000 @@ -29,7 +29,7 @@ When file I/O functions signal Lisp errors, they usually use the condition @code{file-error} (@pxref{Handling Errors}). The error message is in most cases obtained from the operating system, according -to locale @code{system-message-locale}, and decoded using coding system +to locale @code{system-messages-locale}, and decoded using coding system @code{locale-coding-system} (@pxref{Locales}). @menu === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 15:17:08 +0000 +++ lisp/ChangeLog 2012-09-28 16:02:31 +0000 @@ -1,3 +1,10 @@ +2012-09-28 Leo Liu + + * pcomplete.el (pcomplete-show-completions): Use + minibuffer-message to make pcomplete usable in minibuffer. + + * ido.el (ido-set-matches-1): Fix 2012-09-11 change. + 2012-09-28 Stefan Monnier * type-break.el: Use lexical-binding. === modified file 'lisp/ido.el' --- lisp/ido.el 2012-09-21 03:03:48 +0000 +++ lisp/ido.el 2012-09-28 16:02:31 +0000 @@ -3701,14 +3701,14 @@ (rexq (concat rex0 (if slash ".*/" ""))) (re (if ido-enable-prefix (concat "\\`" rexq) rexq)) (full-re (and do-full - (and (eq ido-cur-item 'buffer) - (not ido-buffer-disable-smart-matches)) + (not (and (eq ido-cur-item 'buffer) + ido-buffer-disable-smart-matches)) (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) (concat "\\`" rex0 (if slash "/" "") "\\'"))) (suffix-re (and do-full slash - (and (eq ido-cur-item 'buffer) - (not ido-buffer-disable-smart-matches)) + (not (and (eq ido-cur-item 'buffer) + ido-buffer-disable-smart-matches)) (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) (concat rex0 "/\\'"))) === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2012-09-25 04:13:02 +0000 +++ lisp/pcomplete.el 2012-09-28 16:02:31 +0000 @@ -1089,7 +1089,7 @@ (setq pcomplete-last-window-config (current-window-configuration))) (with-output-to-temp-buffer "*Completions*" (display-completion-list completions)) - (message "Hit space to flush") + (minibuffer-message "Hit space to flush") (let (event) (prog1 (catch 'done === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-28 14:10:41 +0000 +++ src/ChangeLog 2012-09-28 16:02:31 +0000 @@ -1,3 +1,8 @@ +2012-09-28 Glenn Morris + + * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success) + (Frun_hook_with_args_until_failure): Doc fixes. + 2012-09-28 Eli Zaretskii * xdisp.c (syms_of_xdisp) : Rename from === modified file 'src/eval.c' --- src/eval.c 2012-09-26 15:19:10 +0000 +++ src/eval.c 2012-09-28 16:02:31 +0000 @@ -2351,14 +2351,10 @@ DEFUN ("run-hook-with-args", Frun_hook_with_args, Srun_hook_with_args, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. -HOOK should be a symbol, a hook variable. If HOOK has a non-nil -value, that value may be a function or a list of functions to be -called to run the hook. If the value is a function, it is called with -the given arguments and its return value is returned. If it is a list -of functions, those functions are called, in order, -with the given arguments ARGS. -It is best not to depend on the value returned by `run-hook-with-args', -as that may change. +HOOK should be a symbol, a hook variable. The value of HOOK +may be nil, a function, or a list of functions. Call each +function in order with arguments ARGS. The final return value +is unspecified. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. @@ -2368,18 +2364,18 @@ return run_hook_with_args (nargs, args, funcall_nil); } +/* NB this one still documents a specific non-nil return value. + (As did run-hook-with-args and run-hook-with-args-until-failure + until they were changed in 24.1.) */ DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, Srun_hook_with_args_until_success, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. -HOOK should be a symbol, a hook variable. If HOOK has a non-nil -value, that value may be a function or a list of functions to be -called to run the hook. If the value is a function, it is called with -the given arguments and its return value is returned. -If it is a list of functions, those functions are called, in order, -with the given arguments ARGS, until one of them -returns a non-nil value. Then we return that value. -However, if they all return nil, we return nil. -If the value of HOOK is nil, this function returns nil. +HOOK should be a symbol, a hook variable. The value of HOOK +may be nil, a function, or a list of functions. Call each +function in order with arguments ARGS, stopping at the first +one that returns non-nil, and return that value. Otherwise (if +all functions return nil, or if there are no functions to call), +return nil. Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. @@ -2398,15 +2394,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, Srun_hook_with_args_until_failure, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. -HOOK should be a symbol, a hook variable. If HOOK has a non-nil -value, that value may be a function or a list of functions to be -called to run the hook. If the value is a function, it is called with -the given arguments. Then we return nil if the function returns nil, -and t if it returns non-nil. -If it is a list of functions, those functions are called, in order, -with the given arguments ARGS, until one of them returns nil. -Then we return nil. However, if they all return non-nil, we return t. -If the value of HOOK is nil, this function returns t. +HOOK should be a symbol, a hook variable. The value of HOOK +may be nil, a function, or a list of functions. Call each +function in order with arguments ARGS, stopping at the first +one that returns nil, and return nil. Otherwise (if all functions +return non-nil, or if there are no functions to call), return non-nil +\(do not rely on the precise return value in this case). Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. ------------------------------------------------------------ revno: 110238 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-09-28 11:17:08 -0400 message: * lisp/type-break.el: Use lexical-binding. (type-break-mode): Use define-minor-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 12:18:38 +0000 +++ lisp/ChangeLog 2012-09-28 15:17:08 +0000 @@ -1,5 +1,8 @@ 2012-09-28 Stefan Monnier + * type-break.el: Use lexical-binding. + (type-break-mode): Use define-minor-mode. + * emacs-lisp/pcase.el (pcase--mark-used): New. (pcase--u1): Use it (bug#12512). === modified file 'lisp/type-break.el' --- lisp/type-break.el 2012-09-28 08:01:08 +0000 +++ lisp/type-break.el 2012-09-28 15:17:08 +0000 @@ -1,4 +1,4 @@ -;;; type-break.el --- encourage rests from typing at appropriate intervals +;;; type-break.el --- encourage rests from typing at appropriate intervals -*- lexical-binding: t -*- ;; Copyright (C) 1994-1995, 1997, 2000-2012 Free Software Foundation, Inc. @@ -69,18 +69,6 @@ :prefix "type-break" :group 'keyboard) -(defcustom type-break-mode nil - "Toggle typing break mode. -See the docstring for the `type-break-mode' command for more information. -Setting this variable directly does not take effect; -use either \\[customize] or the function `type-break-mode'." - :set (lambda (_symbol value) - (type-break-mode (if value 1 -1))) - :initialize 'custom-initialize-default - :type 'boolean - :group 'type-break - :require 'type-break) - (defcustom type-break-interval (* 60 60) "Number of seconds between scheduled typing breaks." :type 'integer @@ -285,7 +273,7 @@ ;;;###autoload -(defun type-break-mode (&optional prefix) +(define-minor-mode type-break-mode "Enable or disable typing-break mode. This is a minor mode, but it is global to all buffers by default. @@ -358,74 +346,61 @@ across Emacs sessions. This provides recovery of the break status between sessions and after a crash. Manual changes to the file may result in problems." - (interactive "P") + :lighter type-break-mode-line-format + :global t + (type-break-check-post-command-hook) - (let ((already-enabled type-break-mode)) - (setq type-break-mode (>= (prefix-numeric-value prefix) 0)) - - (cond - ((and already-enabled type-break-mode) - (and (called-interactively-p 'interactive) - (message "Type Break mode is already enabled"))) - (type-break-mode - (when type-break-file-name - (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) - (setq buffer-save-without-query t))) - - (or global-mode-string - (setq global-mode-string '(""))) - (or (assq 'type-break-mode-line-message-mode - minor-mode-alist) - (setq minor-mode-alist - (cons type-break-mode-line-format - minor-mode-alist))) - (type-break-keystroke-reset) - (type-break-mode-line-countdown-or-break nil) - - (setq type-break-time-last-break - (or (type-break-get-previous-time) - (current-time))) - - ;; schedule according to break time from session file - (type-break-schedule - (let (diff) - (if (and type-break-time-last-break - (< (setq diff (type-break-time-difference - type-break-time-last-break - (current-time))) - type-break-interval)) - ;; use the file's value - (progn - (setq type-break-keystroke-count - (type-break-get-previous-count)) - ;; file the time, in case it was read from the auto-save file - (type-break-file-time type-break-interval-start) - (setq type-break-interval-start type-break-time-last-break) - (- type-break-interval diff)) - ;; schedule from now - (setq type-break-interval-start (current-time)) - (type-break-file-time type-break-interval-start) - type-break-interval)) - type-break-interval-start - type-break-interval) - - (and (called-interactively-p 'interactive) - (message "Type Break mode is enabled and set"))) - (t - (type-break-keystroke-reset) - (type-break-mode-line-countdown-or-break nil) - (type-break-cancel-schedule) - (do-auto-save) - (when type-break-file-name - (with-current-buffer (find-file-noselect type-break-file-name - 'nowarn) - (set-buffer-modified-p nil) - (unlock-buffer) - (kill-this-buffer))) - (and (called-interactively-p 'interactive) - (message "Type Break mode is disabled"))))) - type-break-mode) + (cond + ;; ((and already-enabled type-break-mode) + ;; (and (called-interactively-p 'interactive) + ;; (message "Type Break mode is already enabled"))) + (type-break-mode + (when type-break-file-name + (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) + (setq buffer-save-without-query t))) + + (or global-mode-string (setq global-mode-string '(""))) ;FIXME: Why? + (type-break-keystroke-reset) + (type-break-mode-line-countdown-or-break nil) + + (setq type-break-time-last-break + (or (type-break-get-previous-time) + (current-time))) + + ;; Schedule according to break time from session file. + (type-break-schedule + (let (diff) + (if (and type-break-time-last-break + (< (setq diff (type-break-time-difference + type-break-time-last-break + (current-time))) + type-break-interval)) + ;; Use the file's value. + (progn + (setq type-break-keystroke-count + (type-break-get-previous-count)) + ;; File the time, in case it was read from the auto-save file. + (type-break-file-time type-break-interval-start) + (setq type-break-interval-start type-break-time-last-break) + (- type-break-interval diff)) + ;; Schedule from now. + (setq type-break-interval-start (current-time)) + (type-break-file-time type-break-interval-start) + type-break-interval)) + type-break-interval-start + type-break-interval)) + (t + (type-break-keystroke-reset) + (type-break-mode-line-countdown-or-break nil) + (type-break-cancel-schedule) + (do-auto-save) + (when type-break-file-name + (with-current-buffer (find-file-noselect type-break-file-name + 'nowarn) + (set-buffer-modified-p nil) + (unlock-buffer) + (kill-this-buffer)))))) (define-minor-mode type-break-mode-line-message-mode "Toggle warnings about typing breaks in the mode line. @@ -994,10 +969,11 @@ ;; "low" bits and format the time incorrectly. (defun type-break-time-sum (&rest tmlist) (let ((sum '(0 0 0))) - (dolist (tem tmlist sum) + (dolist (tem tmlist) (setq sum (time-add sum (if (integerp tem) (list (floor tem 65536) (mod tem 65536)) - tem)))))) + tem)))) + sum)) (defun type-break-time-stamp (&optional when) (if (fboundp 'format-time-string) ------------------------------------------------------------ revno: 110237 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2012-09-28 16:10:41 +0200 message: Rename "Automatic Redisplay" entry in Lisp backtrace. src/xdisp.c (syms_of_xdisp) : Rename from Qautomatic_redisplay and change the symbol name. All users changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-28 09:34:20 +0000 +++ src/ChangeLog 2012-09-28 14:10:41 +0000 @@ -1,3 +1,8 @@ +2012-09-28 Eli Zaretskii + + * xdisp.c (syms_of_xdisp) : Rename from + Qautomatic_redisplay and change the symbol name. All users changed. + 2012-09-28 Tomohiro Matsuyama * profiler.c (sigprof_handler): Fix race condition. === modified file 'src/xdisp.c' --- src/xdisp.c 2012-09-26 15:19:10 +0000 +++ src/xdisp.c 2012-09-28 14:10:41 +0000 @@ -347,7 +347,7 @@ static Lisp_Object Qwrap_prefix; static Lisp_Object Qline_prefix; -static Lisp_Object Qautomatic_redisplay; +static Lisp_Object Qredisplay_internal; /* Non-nil means don't actually do any redisplay. */ @@ -12975,8 +12975,8 @@ /* Record this function, so it appears on the profiler's backtraces. */ backtrace.next = backtrace_list; - backtrace.function = &Qautomatic_redisplay; - backtrace.args = &Qautomatic_redisplay; + backtrace.function = &Qredisplay_internal; + backtrace.args = &Qredisplay_internal; backtrace.nargs = 0; backtrace.debug_on_exit = 0; backtrace_list = &backtrace; @@ -28694,7 +28694,7 @@ staticpro (&Vmessage_stack); DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); - DEFSYM (Qautomatic_redisplay, "Automatic Redisplay"); + DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); message_dolog_marker1 = Fmake_marker (); staticpro (&message_dolog_marker1); ------------------------------------------------------------ revno: 110236 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12512 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-09-28 08:18:38 -0400 message: * lisp/emacs-lisp/pcase.el (pcase--mark-used): New. (pcase--u1): Use it. * lisp/custom.el (load-theme): Set buffer-file-name so the load is recorded in load-history with the right file name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 10:05:46 +0000 +++ lisp/ChangeLog 2012-09-28 12:18:38 +0000 @@ -1,3 +1,11 @@ +2012-09-28 Stefan Monnier + + * emacs-lisp/pcase.el (pcase--mark-used): New. + (pcase--u1): Use it (bug#12512). + + * custom.el (load-theme): Set buffer-file-name so the load is recorded + in load-history with the right file name. + 2012-09-28 Tassilo Horn * doc-view.el (doc-view-current-cache-doc-pdf): New function. === modified file 'lisp/custom.el' --- lisp/custom.el 2012-09-18 05:14:42 +0000 +++ lisp/custom.el 2012-09-28 12:18:38 +0000 @@ -1193,7 +1193,8 @@ (expand-file-name "themes/" data-directory))) (member hash custom-safe-themes) (custom-theme-load-confirm hash)) - (let ((custom--inhibit-theme-enable t)) + (let ((custom--inhibit-theme-enable t) + (buffer-file-name fn)) ;For load-history. (eval-buffer)) ;; Optimization: if the theme changes the `default' face, put that ;; entry first. This avoids some `frame-set-background-mode' rigmarole === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2012-09-04 17:40:25 +0000 +++ lisp/emacs-lisp/pcase.el 2012-09-28 12:18:38 +0000 @@ -517,6 +517,10 @@ (defun pcase--self-quoting-p (upat) (or (keywordp upat) (numberp upat) (stringp upat))) +(defsubst pcase--mark-used (sym) + ;; Exceptionally, `sym' may be a constant expression rather than a symbol. + (if (symbolp sym) (put sym 'pcase-used t))) + ;; It's very tempting to use `pcase' below, tho obviously, it'd create ;; bootstrapping problems. (defun pcase--u1 (matches code vars rest) @@ -581,7 +585,7 @@ ((memq upat '(t _)) (pcase--u1 matches code vars rest)) ((eq upat 'pcase--dontcare) :pcase--dontcare) ((memq (car-safe upat) '(guard pred)) - (if (eq (car upat) 'pred) (put sym 'pcase-used t)) + (if (eq (car upat) 'pred) (pcase--mark-used sym)) (let* ((splitrest (pcase--split-rest sym (lambda (pat) (pcase--split-pred upat pat)) rest)) @@ -614,10 +618,10 @@ (pcase--u1 matches code vars then-rest) (pcase--u else-rest)))) ((pcase--self-quoting-p upat) - (put sym 'pcase-used t) + (pcase--mark-used sym) (pcase--q1 sym upat matches code vars rest)) ((symbolp upat) - (put sym 'pcase-used t) + (pcase--mark-used sym) (if (not (assq upat vars)) (pcase--u1 matches code (cons (cons upat sym) vars) rest) ;; Non-linear pattern. Turn it into an `eq' test. @@ -640,7 +644,7 @@ (pcase--u1 (cons `(match ,sym . ,(nth 1 upat)) matches) code vars rest))) ((eq (car-safe upat) '\`) - (put sym 'pcase-used t) + (pcase--mark-used sym) (pcase--q1 sym (cadr upat) matches code vars rest)) ((eq (car-safe upat) 'or) (let ((all (> (length (cdr upat)) 1)) @@ -662,7 +666,7 @@ sym (lambda (pat) (pcase--split-member elems pat)) rest)) (then-rest (car splitrest)) (else-rest (cdr splitrest))) - (put sym 'pcase-used t) + (pcase--mark-used sym) (pcase--if `(,(if memq-fine #'memq #'member) ,sym ',elems) (pcase--u1 matches code vars then-rest) (pcase--u else-rest))) ------------------------------------------------------------ revno: 110235 committer: Tassilo Horn branch nick: trunk timestamp: Fri 2012-09-28 12:05:46 +0200 message: * doc-view.el (doc-view-current-cache-doc-pdf): New function. (doc-view-doc->txt, doc-view-convert-current-doc): Use it. (doc-view-get-bounding-box): Make bounding box slicing work for ODF and DVI documents. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 08:01:08 +0000 +++ lisp/ChangeLog 2012-09-28 10:05:46 +0000 @@ -1,3 +1,10 @@ +2012-09-28 Tassilo Horn + + * doc-view.el (doc-view-current-cache-doc-pdf): New function. + (doc-view-doc->txt, doc-view-convert-current-doc): Use it. + (doc-view-get-bounding-box): Make bounding box slicing work for + ODF and DVI documents. + 2012-09-28 Glenn Morris * type-break.el (type-break-mode, type-break-interval) === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2012-09-27 03:16:35 +0000 +++ lisp/doc-view.el 2012-09-28 10:05:46 +0000 @@ -904,6 +904,11 @@ (list "-raw" pdf txt) callback)) +(defun doc-view-current-cache-doc-pdf () + "Return the name of the doc.pdf in the current cache dir. + This file exists only if the current document isn't a PDF or PS file already." + (expand-file-name "doc.pdf" (doc-view-current-cache-dir))) + (defun doc-view-doc->txt (txt callback) "Convert the current document to text and call CALLBACK when done." (make-directory (doc-view-current-cache-dir) t) @@ -914,22 +919,17 @@ (`ps ;; Doc is a PS, so convert it to PDF (which will be converted to ;; TXT thereafter). - (let ((pdf (expand-file-name "doc.pdf" - (doc-view-current-cache-dir)))) + (let ((pdf (doc-view-current-cache-doc-pdf))) (doc-view-ps->pdf doc-view-buffer-file-name pdf (lambda () (doc-view-pdf->txt pdf txt callback))))) (`dvi ;; Doc is a DVI. This means that a doc.pdf already exists in its ;; cache subdirectory. - (doc-view-pdf->txt (expand-file-name "doc.pdf" - (doc-view-current-cache-dir)) - txt callback)) + (doc-view-pdf->txt (doc-view-current-cache-doc-pdf) txt callback)) (`odf ;; Doc is some ODF (or MS Office) doc. This means that a doc.pdf ;; already exists in its cache subdirectory. - (doc-view-pdf->txt (expand-file-name "doc.pdf" - (doc-view-current-cache-dir)) - txt callback)) + (doc-view-pdf->txt (doc-view-current-cache-doc-pdf) txt callback)) (_ (error "DocView doesn't know what to do")))) (defun doc-view-ps->pdf (ps pdf callback) @@ -969,13 +969,13 @@ (`dvi ;; DVI files have to be converted to PDF before Ghostscript can process ;; it. - (let ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir))) + (let ((pdf (doc-view-current-cache-doc-pdf))) (doc-view-dvi->pdf doc-view-buffer-file-name pdf (lambda () (doc-view-pdf/ps->png pdf png-file))))) (`odf ;; ODF files have to be converted to PDF before Ghostscript can ;; process it. - (let ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir)) + (let ((pdf (doc-view-current-cache-doc-pdf)) (opdf (expand-file-name (concat (file-name-base doc-view-buffer-file-name) ".pdf") doc-view-current-cache-dir)) @@ -1042,12 +1042,15 @@ (defun doc-view-get-bounding-box () "Get the BoundingBox information of the current page." (let* ((page (doc-view-current-page)) + (doc (let ((cache-doc (doc-view-current-cache-doc-pdf))) + (if (file-exists-p cache-doc) + cache-doc + doc-view-buffer-file-name))) (o (shell-command-to-string (concat doc-view-ghostscript-program " -dSAFER -dBATCH -dNOPAUSE -q -sDEVICE=bbox " (format "-dFirstPage=%s -dLastPage=%s %s" - page page - doc-view-buffer-file-name))))) + page page doc))))) (save-match-data (when (string-match (concat "%%BoundingBox: " "\\([[:digit:]]+\\) \\([[:digit:]]+\\) " ------------------------------------------------------------ revno: 110234 committer: Tomohiro Matsuyama branch nick: trunk timestamp: Fri 2012-09-28 18:34:20 +0900 message: * profiler.c (sigprof_handler): Fix race condition. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-28 07:40:42 +0000 +++ src/ChangeLog 2012-09-28 09:34:20 +0000 @@ -1,3 +1,7 @@ +2012-09-28 Tomohiro Matsuyama + + * profiler.c (sigprof_handler): Fix race condition. + 2012-09-28 Glenn Morris * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528) === modified file 'src/profiler.c' --- src/profiler.c 2012-09-26 23:14:13 +0000 +++ src/profiler.c 2012-09-28 09:34:20 +0000 @@ -24,6 +24,7 @@ #include #include #include "lisp.h" +#include "syssignal.h" /* Logs. */ @@ -214,7 +215,7 @@ /* Signal handler for sample profiler. */ static void -sigprof_handler (int signal) +sigprof_handler_1 (int signal) { eassert (HASH_TABLE_P (cpu_log)); if (backtrace_list && EQ (*backtrace_list->function, Qautomatic_gc)) @@ -229,6 +230,12 @@ record_backtrace (XHASH_TABLE (cpu_log), current_sample_interval); } +static void +sigprof_handler (int signal) +{ + deliver_process_signal (signal, sigprof_handler_1); +} + DEFUN ("profiler-cpu-start", Fprofiler_cpu_start, Sprofiler_cpu_start, 1, 1, 0, doc: /* Start or restart the cpu profiler. ------------------------------------------------------------ revno: 110233 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 01:01:08 -0700 message: Don't autoload defcustoms in type-break.el * type-break.el (type-break-mode, type-break-interval) (type-break-good-rest-interval, type-break-keystroke-threshold): No need to autoload. (type-break-good-rest-interval, type-break-keystroke-threshold): Add :set-after. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 05:19:55 +0000 +++ lisp/ChangeLog 2012-09-28 08:01:08 +0000 @@ -1,3 +1,11 @@ +2012-09-28 Glenn Morris + + * type-break.el (type-break-mode, type-break-interval) + (type-break-good-rest-interval, type-break-keystroke-threshold): + No need to autoload. + (type-break-good-rest-interval, type-break-keystroke-threshold): + Add :set-after. + 2012-09-28 Chong Yidong * progmodes/verilog-mode.el (verilog-auto-inst-interfaced-ports): === modified file 'lisp/type-break.el' --- lisp/type-break.el 2012-09-01 01:04:26 +0000 +++ lisp/type-break.el 2012-09-28 08:01:08 +0000 @@ -69,7 +69,6 @@ :prefix "type-break" :group 'keyboard) -;;;###autoload (defcustom type-break-mode nil "Toggle typing break mode. See the docstring for the `type-break-mode' command for more information. @@ -82,13 +81,11 @@ :group 'type-break :require 'type-break) -;;;###autoload (defcustom type-break-interval (* 60 60) "Number of seconds between scheduled typing breaks." :type 'integer :group 'type-break) -;;;###autoload (defcustom type-break-good-rest-interval (/ type-break-interval 6) "Number of seconds of idle time considered to be an adequate typing rest. @@ -98,10 +95,10 @@ If a break is interrupted before this much time elapses, the user will be asked whether or not really to interrupt the break." + :set-after '(type-break-interval) :type 'integer :group 'type-break) -;;;###autoload (defcustom type-break-good-break-interval nil "Number of seconds considered to be an adequate explicit typing rest. @@ -112,7 +109,6 @@ :type 'integer :group 'type-break) -;;;###autoload (defcustom type-break-keystroke-threshold ;; Assuming typing speed is 35wpm (on the average, do you really ;; type more than that in a minute? I spend a lot of time reading mail @@ -147,6 +143,7 @@ The command `type-break-guesstimate-keystroke-threshold' can be used to guess a reasonably good pair of values for this variable." + :set-after '(type-break-interval) :type 'sexp :group 'type-break) ------------------------------------------------------------ revno: 110232 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 00:45:18 -0700 message: Comment diff: === modified file 'src/lread.c' --- src/lread.c 2012-09-28 07:40:42 +0000 +++ src/lread.c 2012-09-28 07:45:18 +0000 @@ -784,6 +784,8 @@ while (ch != '\n' && ch != EOF) ch = READCHAR; if (ch == '\n') ch = READCHAR; + /* It is OK to leave the position after a #! line, since + that is what read1 does. */ } if (ch != ';') ------------------------------------------------------------ revno: 110231 fixes bug: http://debbugs.gnu.org/12528 committer: Glenn Morris branch nick: trunk timestamp: Fri 2012-09-28 00:40:42 -0700 message: * src/lread.c (lisp_file_lexically_bound_p): Handle #! lines. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-27 23:02:23 +0000 +++ src/ChangeLog 2012-09-28 07:40:42 +0000 @@ -1,3 +1,7 @@ +2012-09-28 Glenn Morris + + * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528) + 2012-09-27 Paul Eggert Check more robustly for timer_settime. === modified file 'src/lread.c' --- src/lread.c 2012-09-23 08:44:20 +0000 +++ src/lread.c 2012-09-28 07:40:42 +0000 @@ -764,13 +764,28 @@ /* Return true if the lisp code read using READCHARFUN defines a non-nil `lexical-binding' file variable. After returning, the stream is - positioned following the first line, if it is a comment, otherwise - nothing is read. */ + positioned following the first line, if it is a comment or #! line, + otherwise nothing is read. */ static int lisp_file_lexically_bound_p (Lisp_Object readcharfun) { int ch = READCHAR; + + if (ch == '#') + { + ch = READCHAR; + if (ch != '!') + { + UNREAD (ch); + UNREAD ('#'); + return 0; + } + while (ch != '\n' && ch != EOF) + ch = READCHAR; + if (ch == '\n') ch = READCHAR; + } + if (ch != ';') /* The first line isn't a comment, just give up. */ { ------------------------------------------------------------ revno: 110230 committer: Chong Yidong branch nick: trunk timestamp: Fri 2012-09-28 13:19:55 +0800 message: * verilog-mode.el (verilog-auto-inst-interfaced-ports): Add :version tag. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-27 22:55:03 +0000 +++ lisp/ChangeLog 2012-09-28 05:19:55 +0000 @@ -1,3 +1,8 @@ +2012-09-28 Chong Yidong + + * progmodes/verilog-mode.el (verilog-auto-inst-interfaced-ports): + Add :version tag. + 2012-09-27 Stefan Monnier * json.el (json-encode-char): Codes 127-160 aren't "ASCII printable". === modified file 'lisp/progmodes/verilog-mode.el' --- lisp/progmodes/verilog-mode.el 2012-09-27 03:30:46 +0000 +++ lisp/progmodes/verilog-mode.el 2012-09-28 05:19:55 +0000 @@ -1130,7 +1130,8 @@ (defcustom verilog-auto-inst-interfaced-ports nil "Non-nil means include interfaced ports in AUTOINST expansions." :group 'verilog-mode-auto - :type 'boolean) + :type 'boolean + :version "24.3") (put 'verilog-auto-inst-interfaced-ports 'safe-local-variable 'verilog-booleanp) (defcustom verilog-auto-input-ignore-regexp nil ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.