Now on revision 110270. ------------------------------------------------------------ revno: 110270 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-29 23:19:33 -0700 message: Profiler improvements: more-accurate timers, overflow checks. * profiler.c: Don't include stdio.h, limits.h, sys/time.h, signal.h, setjmp.h. Include systime.h instead. (saturated_add): New function. (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t. (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow. (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]: New static vars. (enum profiler_cpu_running): New enumn. (profiler_cpu_running): Now of that enum type, not bool. All uses changed to store the new value. (handle_profiler_signal): Rename from sigprof_handler_1, for consistency with other handlers. Do not check whether cpu_log is a hash-table if garbage collecting, since it doesn't matter in that case. (deliver_profiler_signal): Rename from sigprof_handler, for consistency with other handlers. (setup_cpu_timer): New function, with much of what used to be in Fprofiler_cpu_start. Check for out-of-range argument. Prefer timer_settime if available, and prefer thread cputime clocks, then process cputime clocks, then monotonic clocks, to the old realtime clock. Use make_timeval to round more-correctly when falling back to setitimer. (Fprofiler_cpu_start): Use it. (Fprofiler_cpu_stop): Prefer timer_settime if available. Don't assume that passing NULL as the 2nd argument of setitimer is the same as passing a pointer to all-zero storage. Ignore SIGPROF afterwards. (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM. * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in non-fatal signal handlers. Ignore SIGPROF on startup. * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not in profiler.c, since sysdep.c now uses it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-30 01:29:53 +0000 +++ src/ChangeLog 2012-09-30 06:19:33 +0000 @@ -1,5 +1,39 @@ 2012-09-30 Paul Eggert + Profiler improvements: more-accurate timers, overflow checks. + * profiler.c: Don't include stdio.h, limits.h, sys/time.h, + signal.h, setjmp.h. Include systime.h instead. + (saturated_add): New function. + (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t. + (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow. + (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]: + New static vars. + (enum profiler_cpu_running): New enumn. + (profiler_cpu_running): Now of that enum type, not bool. + All uses changed to store the new value. + (handle_profiler_signal): Rename from sigprof_handler_1, + for consistency with other handlers. Do not check whether + cpu_log is a hash-table if garbage collecting, since it + doesn't matter in that case. + (deliver_profiler_signal): Rename from sigprof_handler, + for consistency with other handlers. + (setup_cpu_timer): New function, with much of what used to be in + Fprofiler_cpu_start. Check for out-of-range argument. + Prefer timer_settime if available, and prefer + thread cputime clocks, then process cputime clocks, then + monotonic clocks, to the old realtime clock. Use make_timeval + to round more-correctly when falling back to setitimer. + (Fprofiler_cpu_start): Use it. + (Fprofiler_cpu_stop): Prefer timer_settime if available. + Don't assume that passing NULL as the 2nd argument of setitimer + is the same as passing a pointer to all-zero storage. + Ignore SIGPROF afterwards. + (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM. + * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in + non-fatal signal handlers. Ignore SIGPROF on startup. + * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not + in profiler.c, since sysdep.c now uses it. + * sysdep.c (handle_fatal_signal): Bump backtrace size to 40. Suggested by Eli Zaretskii in . === modified file 'src/profiler.c' --- src/profiler.c 2012-09-29 02:02:34 +0000 +++ src/profiler.c 2012-09-30 06:19:33 +0000 @@ -18,13 +18,18 @@ along with GNU Emacs. If not, see . */ #include -#include -#include -#include -#include -#include #include "lisp.h" #include "syssignal.h" +#include "systime.h" + +/* Return A + B, but return the maximum fixnum if the result would overflow. + Assume A and B are nonnegative and in fixnum range. */ + +static EMACS_INT +saturated_add (EMACS_INT a, EMACS_INT b) +{ + return min (a + b, MOST_POSITIVE_FIXNUM); +} /* Logs. */ @@ -122,14 +127,12 @@ } } -/* Record the current backtrace in LOG. BASE is a special name for - describing which the backtrace come from. BASE can be nil. COUNT is - a number how many times the profiler sees the backtrace at the - time. ELAPSED is a elapsed time in millisecond that the backtrace - took. */ +/* Record the current backtrace in LOG. COUNT is the weight of this + current backtrace: milliseconds for CPU counts, and the allocation + size for memory logs. */ static void -record_backtrace (log_t *log, size_t count) +record_backtrace (log_t *log, EMACS_INT count) { struct backtrace *backlist = backtrace_list; Lisp_Object backtrace; @@ -162,8 +165,11 @@ EMACS_UINT hash; ptrdiff_t j = hash_lookup (log, backtrace, &hash); if (j >= 0) - set_hash_value_slot (log, j, - make_number (count + XINT (HASH_VALUE (log, j)))); + { + EMACS_INT old_val = XINT (HASH_VALUE (log, j)); + EMACS_INT new_val = saturated_add (old_val, count); + set_hash_value_slot (log, j, make_number (new_val)); + } else { /* BEWARE! hash_put in general can allocate memory. But currently it only does that if log->next_free is nil. */ @@ -195,29 +201,35 @@ /* Sample profiler. */ /* FIXME: Add support for the CPU profiler in W32. */ -/* FIXME: the sigprof_handler suffers from race-conditions if the signal - is delivered to a thread other than the main Emacs thread. */ - -#if defined SIGPROF && defined HAVE_SETITIMER -#define PROFILER_CPU_SUPPORT - -/* True if sampling profiler is running. */ -static bool profiler_cpu_running; - + +#ifdef PROFILER_CPU_SUPPORT + +/* The profiler timer and whether it was properly initialized, if + POSIX timers are available. */ +#ifdef HAVE_TIMER_SETTIME +static timer_t profiler_timer; +static bool profiler_timer_ok; +#endif + +/* Status of sampling profiler. */ +static enum profiler_cpu_running + { NOT_RUNNING, TIMER_SETTIME_RUNNING, SETITIMER_RUNNING } + profiler_cpu_running; + +/* Hash-table log of CPU profiler. */ static Lisp_Object cpu_log; + /* Separate counter for the time spent in the GC. */ static EMACS_INT cpu_gc_count; -/* The current sample interval in millisecond. */ - -static int current_sample_interval; +/* The current sample interval in milliseconds. */ +static EMACS_INT current_sample_interval; /* Signal handler for sample profiler. */ static void -sigprof_handler_1 (int signal) +handle_profiler_signal (int signal) { - eassert (HASH_TABLE_P (cpu_log)); 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. @@ -225,27 +237,90 @@ not expect the ARRAY_MARK_FLAG to be set. We could try and harden the hash-table code, but it doesn't seem worth the effort. */ - cpu_gc_count += current_sample_interval; + cpu_gc_count = saturated_add (cpu_gc_count, current_sample_interval); else - record_backtrace (XHASH_TABLE (cpu_log), current_sample_interval); + { + eassert (HASH_TABLE_P (cpu_log)); + record_backtrace (XHASH_TABLE (cpu_log), current_sample_interval); + } } static void -sigprof_handler (int signal) -{ - deliver_process_signal (signal, sigprof_handler_1); +deliver_profiler_signal (int signal) +{ + deliver_process_signal (signal, handle_profiler_signal); +} + +static enum profiler_cpu_running +setup_cpu_timer (Lisp_Object sample_interval) +{ + struct sigaction action; + struct itimerval timer; + struct timespec interval; + + if (! RANGED_INTEGERP (1, sample_interval, + (TYPE_MAXIMUM (time_t) < EMACS_INT_MAX / 1000 + ? (EMACS_INT) TYPE_MAXIMUM (time_t) * 1000 + 999 + : EMACS_INT_MAX))) + return NOT_RUNNING; + + current_sample_interval = XINT (sample_interval); + interval = make_emacs_time (current_sample_interval / 1000, + current_sample_interval % 1000 * 1000000); + emacs_sigaction_init (&action, deliver_profiler_signal); + sigaction (SIGPROF, &action, 0); + +#ifdef HAVE_TIMER_SETTIME + if (! profiler_timer_ok) + { + /* System clocks to try, in decreasing order of desirability. */ + static clockid_t const system_clock[] = { +#ifdef CLOCK_THREAD_CPUTIME_ID + CLOCK_THREAD_CPUTIME_ID, +#endif +#ifdef CLOCK_PROCESS_CPUTIME_ID + CLOCK_PROCESS_CPUTIME_ID, +#endif +#ifdef CLOCK_MONOTONIC + CLOCK_MONOTONIC, +#endif + CLOCK_REALTIME + }; + int i; + struct sigevent sigev; + sigev.sigev_value.sival_ptr = &profiler_timer; + sigev.sigev_signo = SIGPROF; + sigev.sigev_notify = SIGEV_SIGNAL; + + for (i = 0; i < sizeof system_clock / sizeof *system_clock; i++) + if (timer_create (system_clock[i], &sigev, &profiler_timer) == 0) + { + profiler_timer_ok = 1; + break; + } + } + + if (profiler_timer_ok) + { + struct itimerspec ispec; + ispec.it_value = ispec.it_interval = interval; + timer_settime (profiler_timer, 0, &ispec, 0); + return TIMER_SETTIME_RUNNING; + } +#endif + + timer.it_value = timer.it_interval = make_timeval (interval); + setitimer (ITIMER_PROF, &timer, 0); + return SETITIMER_RUNNING; } DEFUN ("profiler-cpu-start", Fprofiler_cpu_start, Sprofiler_cpu_start, 1, 1, 0, doc: /* Start or restart the cpu profiler. -The cpu profiler will take call-stack samples each SAMPLE-INTERVAL (expressed in milliseconds). +It takes call-stack samples each SAMPLE-INTERVAL milliseconds. See also `profiler-log-size' and `profiler-max-stack-depth'. */) (Lisp_Object sample_interval) { - struct sigaction sa; - struct itimerval timer; - if (profiler_cpu_running) error ("Sample profiler is already running"); @@ -256,19 +331,9 @@ profiler_max_stack_depth); } - current_sample_interval = XINT (sample_interval); - - sa.sa_handler = sigprof_handler; - sa.sa_flags = SA_RESTART; - sigemptyset (&sa.sa_mask); - sigaction (SIGPROF, &sa, 0); - - timer.it_interval.tv_sec = 0; - timer.it_interval.tv_usec = current_sample_interval * 1000; - timer.it_value = timer.it_interval; - setitimer (ITIMER_PROF, &timer, 0); - - profiler_cpu_running = true; + profiler_cpu_running = setup_cpu_timer (sample_interval); + if (! profiler_cpu_running) + error ("Invalid sample interval"); return Qt; } @@ -279,12 +344,30 @@ Return non-nil if the profiler was running. */) (void) { - if (!profiler_cpu_running) - return Qnil; - profiler_cpu_running = false; - - setitimer (ITIMER_PROF, 0, 0); - + switch (profiler_cpu_running) + { + case NOT_RUNNING: + return Qnil; + + case TIMER_SETTIME_RUNNING: + { + struct itimerspec disable; + memset (&disable, 0, sizeof disable); + timer_settime (profiler_timer, 0, &disable, 0); + } + break; + + case SETITIMER_RUNNING: + { + struct itimerval disable; + memset (&disable, 0, sizeof disable); + setitimer (ITIMER_PROF, &disable, 0); + } + break; + } + + signal (SIGPROF, SIG_IGN); + profiler_cpu_running = NOT_RUNNING; return Qt; } @@ -307,7 +390,7 @@ (void) { Lisp_Object result = cpu_log; - /* Here we're making the log visible to Elisp , so it's not safe any + /* Here we're making the log visible to Elisp, so it's not safe any more for our use afterwards since we can't rely on its special pre-allocated keys anymore. So we have to allocate a new one. */ cpu_log = (profiler_cpu_running @@ -319,7 +402,7 @@ cpu_gc_count = 0; return result; } -#endif /* not defined PROFILER_CPU_SUPPORT */ +#endif /* PROFILER_CPU_SUPPORT */ /* Memory profiler. */ @@ -399,7 +482,7 @@ malloc_probe (size_t size) { eassert (HASH_TABLE_P (memory_log)); - record_backtrace (XHASH_TABLE (memory_log), size); + record_backtrace (XHASH_TABLE (memory_log), min (size, MOST_POSITIVE_FIXNUM)); } void @@ -415,7 +498,7 @@ profiler_log_size = 10000; #ifdef PROFILER_CPU_SUPPORT - profiler_cpu_running = false; + profiler_cpu_running = NOT_RUNNING; cpu_log = Qnil; staticpro (&cpu_log); defsubr (&Sprofiler_cpu_start); === modified file 'src/sysdep.c' --- src/sysdep.c 2012-09-30 01:29:53 +0000 +++ src/sysdep.c 2012-09-30 06:19:33 +0000 @@ -1447,6 +1447,9 @@ #ifdef SIGDANGER sigaddset (&action->sa_mask, SIGDANGER); #endif +#ifdef PROFILER_CPU_SUPPORT + sigaddset (&action->sa_mask, SIGPROF); +#endif #ifdef SIGWINCH sigaddset (&action->sa_mask, SIGWINCH); #endif @@ -1837,7 +1840,7 @@ #endif sigaction (SIGTERM, &process_fatal_action, 0); #ifdef SIGPROF - sigaction (SIGPROF, &process_fatal_action, 0); + signal (SIGPROF, SIG_IGN); #endif #ifdef SIGVTALRM sigaction (SIGVTALRM, &process_fatal_action, 0); === modified file 'src/syssignal.h' --- src/syssignal.h 2012-09-23 08:44:20 +0000 +++ src/syssignal.h 2012-09-30 06:19:33 +0000 @@ -29,6 +29,10 @@ #define FORWARD_SIGNAL_TO_MAIN_THREAD #endif +#if defined SIGPROF && (defined HAVE_TIMER_SETTIME || defined HAVE_SETITIMER) +# define PROFILER_CPU_SUPPORT +#endif + extern sigset_t empty_mask; typedef void (*signal_handler_t) (int); ------------------------------------------------------------ revno: 110269 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-29 21:19:32 -0700 message: Merge from gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2012-09-27 23:02:23 +0000 +++ ChangeLog 2012-09-30 04:19:32 +0000 @@ -1,3 +1,8 @@ +2012-09-30 Paul Eggert + + Merge from gnulib, incorporating: + 2012-09-28 extern-inline: provide a -Wundef safe config.h + 2012-09-27 Paul Eggert Check more robustly for timer_settime. === modified file 'm4/extern-inline.m4' --- m4/extern-inline.m4 2012-08-21 14:37:56 +0000 +++ m4/extern-inline.m4 2012-09-30 04:19:32 +0000 @@ -18,7 +18,9 @@ . _GL_INLINE_HEADER_END contains useful stuff to put in the same include file, after uses of _GL_INLINE. */ -#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ +#if (__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : 199901L <= __STDC_VERSION__) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline #elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) @@ -35,7 +37,7 @@ #endif #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) -# if __GNUC_STDC_INLINE__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else # define _GL_INLINE_HEADER_CONST_PRAGMA \ ------------------------------------------------------------ revno: 110268 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-09-30 00:00:46 -0400 message: * lisp/winner.el (winner-mode-map): Obey winner-dont-bind-my-keys here. (minor-mode-map-alist): Remove redundant code. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:44:35 +0000 +++ lisp/ChangeLog 2012-09-30 04:00:46 +0000 @@ -1,5 +1,8 @@ 2012-09-30 Stefan Monnier + * winner.el (winner-mode-map): Obey winner-dont-bind-my-keys here. + (minor-mode-map-alist): Remove redundant code. + * vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently visited in a buffer. (cvs-insert-visited-file): New function. === modified file 'lisp/winner.el' --- lisp/winner.el 2012-09-29 23:52:03 +0000 +++ lisp/winner.el 2012-09-30 04:00:46 +0000 @@ -64,7 +64,7 @@ :group 'windows) (defcustom winner-dont-bind-my-keys nil - "Non-nil means do not use `winner-mode-map' in Winner mode." + "Non-nil means do not bind keys in Winner mode." :type 'boolean :group 'winner) @@ -338,8 +338,9 @@ (defvar winner-mode-map (let ((map (make-sparse-keymap))) - (define-key map [(control c) left] 'winner-undo) - (define-key map [(control c) right] 'winner-redo) + (unless winner-dont-bind-my-keys + (define-key map [(control c) left] 'winner-undo) + (define-key map [(control c) right] 'winner-redo)) map) "Keymap for Winner mode.") @@ -435,12 +436,5 @@ (message "Winner undid undo"))) (t (error "Previous command was not a `winner-undo'")))) -;;; To be evaluated when the package is loaded: - -(unless (or (assq 'winner-mode minor-mode-map-alist) - winner-dont-bind-my-keys) - (push (cons 'winner-mode winner-mode-map) - minor-mode-map-alist)) - (provide 'winner) ;;; winner.el ends here ------------------------------------------------------------ revno: 110267 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:44:35 -0400 message: * lisp/vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently visited in a buffer. (cvs-insert-visited-file): New function. (find-file-hook): Use it. * lisp/vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:30:25 +0000 +++ lisp/ChangeLog 2012-09-30 03:44:35 +0000 @@ -1,5 +1,12 @@ 2012-09-30 Stefan Monnier + * vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently + visited in a buffer. + (cvs-insert-visited-file): New function. + (find-file-hook): Use it. + + * vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces. + * vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to chose face. (log-edit-empty-buffer-p): Don't require a space after a header. === modified file 'lisp/vc/pcvs-info.el' --- lisp/vc/pcvs-info.el 2012-07-10 11:51:54 +0000 +++ lisp/vc/pcvs-info.el 2012-09-30 03:44:35 +0000 @@ -124,7 +124,7 @@ (define-obsolete-face-alias 'cvs-marked-face 'cvs-marked "22.1") (defface cvs-msg - '((t (:slant italic))) + '((t :slant italic)) "PCL-CVS face used to highlight CVS messages." :group 'pcl-cvs) (define-obsolete-face-alias 'cvs-msg-face 'cvs-msg "22.1") @@ -358,7 +358,7 @@ ;;(MOD-CONFLICT "Not Removed") (`DEAD "") (_ (capitalize (symbol-name type))))) - (face (let ((sym (intern + (face (let ((sym (intern-soft (concat "cvs-fi-" (downcase (symbol-name type)) "-face")))) === modified file 'lisp/vc/pcvs.el' --- lisp/vc/pcvs.el 2012-07-10 11:51:54 +0000 +++ lisp/vc/pcvs.el 2012-09-30 03:44:35 +0000 @@ -60,8 +60,6 @@ ;; - rework the displaying of error messages. ;; - allow to flush messages only ;; - allow to protect files like ChangeLog from flushing -;; - automatically cvs-mode-insert files from find-file-hook -;; (and don't flush them as long as they are visited) ;; - query the user for cvs-get-marked (for some cmds or if nothing's selected) ;; - don't return the first (resp last) FI if the cursor is before ;; (resp after) it. @@ -877,7 +875,10 @@ ;; remove entries (`DEAD nil) ;; handled also? - (`UP-TO-DATE (not rm-handled)) + (`UP-TO-DATE + (if (find-buffer-visiting (cvs-fileinfo->full-name fi)) + t + (not rm-handled))) ;; keep the rest (_ (not (run-hook-with-args-until-success 'cvs-cleanup-functions fi)))))) @@ -1617,7 +1618,8 @@ (defun-cvs-mode (cvs-mode-diff . DOUBLE) (flags) "Diff the selected files against the repository. This command compares the files in your working area against the -revision which they are based upon." +revision which they are based upon. +See also `cvs-diff-ignore-marks'." (interactive (list (cvs-add-branch-prefix (cvs-add-secondary-branch-prefix @@ -2435,6 +2437,21 @@ (add-hook 'after-save-hook 'cvs-mark-buffer-changed) +(defun cvs-insert-visited-file () + (let* ((file (expand-file-name buffer-file-name)) + (version (and (fboundp 'vc-backend) + (eq (vc-backend file) 'CVS) + (vc-working-revision file)))) + (when version + (save-current-buffer + (dolist (cvs-buf (buffer-list)) + (set-buffer cvs-buf) + ;; look for a corresponding pcl-cvs buffer + (when (and (eq major-mode 'cvs-mode) + (string-prefix-p default-directory file)) + (cvs-insert-file file))))))) + +(add-hook 'find-file-hook 'cvs-insert-visited-file 'append) (provide 'pcvs) ------------------------------------------------------------ revno: 110266 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:30:25 -0400 message: * lisp/vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to chose face. (log-edit-empty-buffer-p): Don't require a space after a header. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:28:38 +0000 +++ lisp/ChangeLog 2012-09-30 03:30:25 +0000 @@ -1,5 +1,9 @@ 2012-09-30 Stefan Monnier + * vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to + chose face. + (log-edit-empty-buffer-p): Don't require a space after a header. + * vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1. * tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook. === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2012-09-24 12:31:24 +0000 +++ lisp/vc/log-edit.el 2012-09-30 03:30:25 +0000 @@ -343,14 +343,17 @@ `((log-edit-match-to-eoh (,(concat "^\\(\\([[:alpha:]]+\\):\\)" log-edit-header-contents-regexp) (progn (goto-char (match-beginning 0)) (match-end 0)) nil - (1 (if (assoc (match-string 2) log-edit-headers-alist) + (1 (if (assoc-string (match-string 2) log-edit-headers-alist t) 'log-edit-header 'log-edit-unknown-header) nil lax) ;; From `log-edit-header-contents-regexp': - (3 (or (cdr (assoc (match-string 2) log-edit-headers-alist)) + (3 (or (cdr (assoc-string (match-string 2) log-edit-headers-alist t)) 'log-edit-header) - nil lax))))) + nil lax)) + ("^\n" + (progn (goto-char (match-end 0)) (1+ (match-end 0))) nil + (0 '(:height 0.1 :inverse-video t)))))) (defvar log-edit-font-lock-gnu-style nil "If non-nil, highlight common failures to follow the GNU coding standards.") @@ -574,7 +577,7 @@ (or (= (point-min) (point-max)) (save-excursion (goto-char (point-min)) - (while (and (looking-at "^\\([a-zA-Z]+: \\)?$") + (while (and (looking-at "^\\([a-zA-Z]+: ?\\)?$") (zerop (forward-line 1)))) (eobp)))) @@ -807,7 +810,7 @@ change-log-default-name) ;; `find-change-log' uses `change-log-default-name' if set ;; and sets it before exiting, so we need to work around - ;; that memoizing which is undesired here + ;; that memoizing which is undesired here. (setq change-log-default-name nil) (find-change-log))))) (with-current-buffer (find-file-noselect changelog-file-name) ------------------------------------------------------------ revno: 110265 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:28:38 -0400 message: * lisp/vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:21:50 +0000 +++ lisp/ChangeLog 2012-09-30 03:28:38 +0000 @@ -1,5 +1,7 @@ 2012-09-30 Stefan Monnier + * vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1. + * tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook. * textmodes/text-mode.el (paragraph-indent-minor-mode): Make it === modified file 'lisp/vc/ediff-util.el' --- lisp/vc/ediff-util.el 2012-02-28 08:17:21 +0000 +++ lisp/vc/ediff-util.el 2012-09-30 03:28:38 +0000 @@ -1907,8 +1907,8 @@ (cond ((eq which-diff 'after) (1+ diff-no)) ((eq which-diff 'before) diff-no) - ((< (abs (count-lines pos (max 1 prev-end))) - (abs (count-lines pos (max 1 beg)))) + ((< (abs (count-lines pos (max (point-min) prev-end))) + (abs (count-lines pos (max (point-min) beg)))) diff-no) ; choose prev difference (t (1+ diff-no))) ; choose next difference ------------------------------------------------------------ revno: 110264 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:26:52 -0400 message: * lisp/url/url-handlers.el (url-file-handler): Don't assume any url-FOO function is a good handler for FOO. (url-copy-file, url-file-local-copy, url-insert-file-contents) (url-file-name-completion, url-file-name-all-completions) (url-handlers-create-wrapper): Explicitly register as handler. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-09-29 20:45:44 +0000 +++ lisp/url/ChangeLog 2012-09-30 03:26:52 +0000 @@ -1,3 +1,11 @@ +2012-09-30 Stefan Monnier + + * url-handlers.el (url-file-handler): Don't assume any url-FOO function + is a good handler for FOO. + (url-copy-file, url-file-local-copy, url-insert-file-contents) + (url-file-name-completion, url-file-name-all-completions) + (url-handlers-create-wrapper): Explicitly register as handler. + 2012-09-29 Bastien Guerry * url-util.el (url-insert-entities-in-string) === modified file 'lisp/url/url-handlers.el' --- lisp/url/url-handlers.el 2012-06-13 16:25:03 +0000 +++ lisp/url/url-handlers.el 2012-09-30 03:26:52 +0000 @@ -137,11 +137,13 @@ "Function called from the `file-name-handler-alist' routines. OPERATION is what needs to be done (`file-exists-p', etc). ARGS are the arguments that would have been passed to OPERATION." - (let ((fn (or (get operation 'url-file-handlers) - (intern-soft (format "url-%s" operation)))) + (let ((fn (get operation 'url-file-handlers)) (val nil) (hooked nil)) - (if (and fn (fboundp fn)) + (if (and (not fn) (intern-soft (format "url-%s" operation)) + (fboundp (intern-soft (format "url-%s" operation)))) + (error "Missing URL handler mapping for %s" operation)) + (if fn (setq hooked t val (save-match-data (apply fn args))) (setq hooked nil @@ -249,6 +251,7 @@ (mm-save-part-to-file handle newname) (kill-buffer buffer) (mm-destroy-parts handle))) +(put 'copy-file 'url-file-handlers 'url-copy-file) ;;;###autoload (defun url-file-local-copy (url &rest ignored) @@ -258,6 +261,7 @@ (let ((filename (make-temp-file "url"))) (url-copy-file url filename 'ok-if-already-exists) filename)) +(put 'file-local-copy 'url-file-handlers 'url-file-local-copy) (defun url-insert (buffer &optional beg end) "Insert the body of a URL object. @@ -300,22 +304,29 @@ ;; usual heuristic/rules that we apply to files. (decode-coding-inserted-region start (point) url visit beg end replace)) (list url (car size-and-charset)))))) +(put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents) (defun url-file-name-completion (url directory &optional predicate) (error "Unimplemented")) +(put 'file-name-completion 'url-file-handlers 'url-file-name-completion) (defun url-file-name-all-completions (file directory) (error "Unimplemented")) +(put 'file-name-all-completions + 'url-file-handlers 'url-file-name-all-completions) ;; All other handlers map onto their respective backends. (defmacro url-handlers-create-wrapper (method args) - `(defun ,(intern (format "url-%s" method)) ,args - ,(format "URL file-name-handler wrapper for `%s' call.\n---\n%s" method - (or (documentation method t) "No original documentation.")) - (setq url (url-generic-parse-url url)) - (when (url-type url) - (funcall (url-scheme-get-property (url-type url) (quote ,method)) - ,@(remove '&rest (remove '&optional args)))))) + `(progn + (defun ,(intern (format "url-%s" method)) ,args + ,(format "URL file-name-handler wrapper for `%s' call.\n---\n%s" method + (or (documentation method t) "No original documentation.")) + (setq url (url-generic-parse-url url)) + (when (url-type url) + (funcall (url-scheme-get-property (url-type url) (quote ,method)) + ,@(remove '&rest (remove '&optional args))))) + (unless (get ',method 'url-file-handlers) + (put ',method 'url-file-handlers ',(intern (format "url-%s" method)))))) (url-handlers-create-wrapper file-exists-p (url)) (url-handlers-create-wrapper file-attributes (url &optional id-format)) ------------------------------------------------------------ revno: 110263 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:21:50 -0400 message: * lisp/tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:20:00 +0000 +++ lisp/ChangeLog 2012-09-30 03:21:50 +0000 @@ -1,5 +1,7 @@ 2012-09-30 Stefan Monnier + * tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook. + * textmodes/text-mode.el (paragraph-indent-minor-mode): Make it a proper minor-mode. === modified file 'lisp/tutorial.el' --- lisp/tutorial.el 2012-08-11 02:12:12 +0000 +++ lisp/tutorial.el 2012-09-30 03:21:50 +0000 @@ -765,14 +765,13 @@ (funcall 'viper-tutorial 0)) (message "Tutorial aborted by user")) (message prompt1))) - (let* ((lang (if arg - (let ((minibuffer-setup-hook minibuffer-setup-hook)) - (add-hook 'minibuffer-setup-hook - 'minibuffer-completion-help) - (read-language-name 'tutorial "Language: " "English")) - (if (get-language-info current-language-environment 'tutorial) - current-language-environment - "English"))) + (let* ((lang (cond + (arg + (minibuffer-with-setup-hook #'minibuffer-completion-help + (read-language-name 'tutorial "Language: " "English"))) + ((get-language-info current-language-environment 'tutorial) + current-language-environment) + (t "English"))) (filename (get-language-info lang 'tutorial)) (tut-buf-name filename) (old-tut-buf (get-buffer tut-buf-name)) ------------------------------------------------------------ revno: 110262 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:20:00 -0400 message: * lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Make it a proper minor-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-30 03:10:13 +0000 +++ lisp/ChangeLog 2012-09-30 03:20:00 +0000 @@ -1,5 +1,8 @@ 2012-09-30 Stefan Monnier + * textmodes/text-mode.el (paragraph-indent-minor-mode): Make it + a proper minor-mode. + * textmodes/tex-mode.el (tex-mode-map): Don't bind paren keys. 2012-09-29 Glenn Morris === modified file 'lisp/textmodes/text-mode.el' --- lisp/textmodes/text-mode.el 2012-01-28 03:49:22 +0000 +++ lisp/textmodes/text-mode.el 2012-09-30 03:20:00 +0000 @@ -80,18 +80,29 @@ :abbrev-table nil :syntax-table nil (paragraph-indent-minor-mode)) -(defun paragraph-indent-minor-mode () +(define-minor-mode paragraph-indent-minor-mode "Minor mode for editing text, with leading spaces starting a paragraph. In this mode, you do not need blank lines between paragraphs when the first line of the following paragraph starts with whitespace, as with `paragraph-indent-text-mode'. Turning on Paragraph-Indent minor mode runs the normal hook `paragraph-indent-text-mode-hook'." - (interactive) - (set (make-local-variable 'paragraph-start) - (concat "[ \t\n\f]\\|" paragraph-start)) - (set (make-local-variable 'indent-line-function) 'indent-to-left-margin) - (run-hooks 'paragraph-indent-text-mode-hook)) + :initial-value nil + ;; Change the definition of a paragraph start. + (let ((ps-re "[ \t\n\f]\\|")) + (if (eq t (compare-strings ps-re nil nil + paragraph-start nil (length ps-re))) + (if (not paragraph-indent-minor-mode) + (set (make-local-variable 'paragraph-start) + (substring paragraph-start (length ps-re)))) + (if paragraph-indent-minor-mode + (set (make-local-variable 'paragraph-start) + (concat ps-re paragraph-start))))) + ;; Change the indentation function. + (if paragraph-indent-minor-mode + (set (make-local-variable 'indent-line-function) 'indent-to-left-margin) + (if (eq indent-line-function 'indent-to-left-margin) + (set (make-local-variable 'indent-line-function) 'indent-region)))) (defalias 'indented-text-mode 'text-mode) ------------------------------------------------------------ revno: 110261 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-09-29 23:10:13 -0400 message: * lisp/textmodes/tex-mode.el (tex-mode-map): Don't bind paren keys. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 23:52:03 +0000 +++ lisp/ChangeLog 2012-09-30 03:10:13 +0000 @@ -1,3 +1,7 @@ +2012-09-30 Stefan Monnier + + * textmodes/tex-mode.el (tex-mode-map): Don't bind paren keys. + 2012-09-29 Glenn Morris * winner.el (winner-mode): Remove variable (let define-minor-mode === modified file 'lisp/textmodes/tex-mode.el' --- lisp/textmodes/tex-mode.el 2012-08-15 16:29:11 +0000 +++ lisp/textmodes/tex-mode.el 2012-09-30 03:10:13 +0000 @@ -860,10 +860,6 @@ (set-keymap-parent map text-mode-map) (tex-define-common-keys map) (define-key map "\"" 'tex-insert-quote) - (define-key map "(" 'skeleton-pair-insert-maybe) - (define-key map "{" 'skeleton-pair-insert-maybe) - (define-key map "[" 'skeleton-pair-insert-maybe) - (define-key map "$" 'skeleton-pair-insert-maybe) (define-key map "\n" 'tex-terminate-paragraph) (define-key map "\M-\r" 'latex-insert-item) (define-key map "\C-c}" 'up-list) ------------------------------------------------------------ revno: 110260 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 19:27:36 -0700 message: Comment fix diff: === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-09-29 23:21:57 +0000 +++ lisp/vc/vc-sccs.el 2012-09-30 02:27:36 +0000 @@ -107,8 +107,8 @@ ;;; State-querying functions ;;; -;; The autoload cookie below places vc-rcs-registered directly into -;; loaddefs.el, so that vc-rcs.el does not need to be loaded for +;; The autoload cookie below places vc-sccs-registered directly into +;; loaddefs.el, so that vc-sccs.el does not need to be loaded for ;; every file that is visited. ;;;###autoload (progn ------------------------------------------------------------ revno: 110259 committer: Paul Eggert branch nick: trunk timestamp: Sat 2012-09-29 18:29:53 -0700 message: * sysdep.c (handle_fatal_signal): Bump backtrace size to 40. Suggested by Eli Zaretskii in . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-29 17:07:01 +0000 +++ src/ChangeLog 2012-09-30 01:29:53 +0000 @@ -1,3 +1,9 @@ +2012-09-30 Paul Eggert + + * sysdep.c (handle_fatal_signal): Bump backtrace size to 40. + Suggested by Eli Zaretskii in + . + 2012-09-29 Juanma Barranquero * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies. === modified file 'src/sysdep.c' --- src/sysdep.c 2012-09-23 17:05:14 +0000 +++ src/sysdep.c 2012-09-30 01:29:53 +0000 @@ -1549,7 +1549,7 @@ static void handle_fatal_signal (int sig) { - terminate_due_to_signal (sig, 10); + terminate_due_to_signal (sig, 40); } static void ------------------------------------------------------------ revno: 110258 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 16:52:03 -0700 message: Use define-minor-mode for winner-mode * lisp/winner.el (winner-mode): Remove variable (let define-minor-mode handle it). (winner-dont-bind-my-keys, winner-boring-buffers, winner-mode-hook): Doc fixes. (winner-mode-leave-hook): Rename to winner-mode-off-hook. (winner-mode): Use define-minor-mode. * etc/NEWS: Mention winner-mode-hook. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-09-27 02:10:54 +0000 +++ etc/NEWS 2012-09-29 23:52:03 +0000 @@ -568,6 +568,9 @@ ** which-function-mode now applies to all applicable major modes by default. +--- +** winner-mode-hook now runs when the mode is disabled, as well as when it is +enabled. ** FIXME something happened to ses.el, 2012-04-17. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 23:21:57 +0000 +++ lisp/ChangeLog 2012-09-29 23:52:03 +0000 @@ -1,5 +1,12 @@ 2012-09-29 Glenn Morris + * winner.el (winner-mode): Remove variable (let define-minor-mode + handle it). + (winner-dont-bind-my-keys, winner-boring-buffers, winner-mode-hook): + Doc fixes. + (winner-mode-leave-hook): Rename to winner-mode-off-hook. + (winner-mode): Use define-minor-mode. + * vc/vc-sccs.el (vc-sccs-registered): Use the progn trick to get the full definition in loaddefs, rather than duplicating it. === modified file 'lisp/winner.el' --- lisp/winner.el 2012-07-11 23:13:41 +0000 +++ lisp/winner.el 2012-09-29 23:52:03 +0000 @@ -63,19 +63,8 @@ "Restoring window configurations." :group 'windows) -;;;###autoload -(defcustom winner-mode nil - "Toggle Winner mode. -Setting this variable directly does not take effect; -use either \\[customize] or the function `winner-mode'." - :set #'(lambda (symbol value) (funcall symbol (or value 0))) - :initialize 'custom-initialize-default - :type 'boolean - :group 'winner - :require 'winner) - (defcustom winner-dont-bind-my-keys nil - "If non-nil: Do not use `winner-mode-map' in Winner mode." + "Non-nil means do not use `winner-mode-map' in Winner mode." :type 'boolean :group 'winner) @@ -85,15 +74,13 @@ :group 'winner) (defcustom winner-boring-buffers '("*Completions*") - "`winner-undo' will not restore windows displaying any of these buffers. + "List of buffer names whose windows `winner-undo' will not restore. You may want to include buffer names such as *Help*, *Apropos*, *Buffer List*, *info* and *Compile-Log*." :type '(repeat string) :group 'winner) - - ;;;; Saving old configurations (internal variables and subroutines) @@ -337,11 +324,14 @@ ;;;; Winner mode (a minor mode) (defcustom winner-mode-hook nil - "Functions to run whenever Winner mode is turned on." + "Functions to run whenever Winner mode is turned on or off." :type 'hook :group 'winner) -(defcustom winner-mode-leave-hook nil +(define-obsolete-variable-alias 'winner-mode-leave-hook + 'winner-mode-off-hook "24.3") + +(defcustom winner-mode-off-hook nil "Functions to run whenever Winner mode is turned off." :type 'hook :group 'winner) @@ -364,37 +354,21 @@ ;;;###autoload -(defun winner-mode (&optional arg) - "Toggle Winner mode. -With arg, turn Winner mode on if and only if arg is positive." - (interactive "P") - (let ((on-p (if arg (> (prefix-numeric-value arg) 0) - (not winner-mode)))) - (cond - ;; Turn mode on - (on-p - (setq winner-mode t) - (cond - ((winner-hook-installed-p) - (add-hook 'window-configuration-change-hook 'winner-change-fun) - (add-hook 'post-command-hook 'winner-save-old-configurations)) - (t (add-hook 'post-command-hook 'winner-save-conditionally))) - (add-hook 'minibuffer-setup-hook 'winner-save-unconditionally) - (setq winner-modified-list (frame-list)) - (winner-save-old-configurations) - (run-hooks 'winner-mode-hook) - (when (called-interactively-p 'interactive) - (message "Winner mode enabled"))) - ;; Turn mode off - (winner-mode - (setq winner-mode nil) - (remove-hook 'window-configuration-change-hook 'winner-change-fun) - (remove-hook 'post-command-hook 'winner-save-old-configurations) - (remove-hook 'post-command-hook 'winner-save-conditionally) - (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally) - (run-hooks 'winner-mode-leave-hook) - (when (called-interactively-p 'interactive) - (message "Winner mode disabled")))))) +(define-minor-mode winner-mode nil :global t ; let d-m-m make the doc + (if winner-mode + (progn + (if (winner-hook-installed-p) + (progn + (add-hook 'window-configuration-change-hook 'winner-change-fun) + (add-hook 'post-command-hook 'winner-save-old-configurations)) + (add-hook 'post-command-hook 'winner-save-conditionally)) + (add-hook 'minibuffer-setup-hook 'winner-save-unconditionally) + (setq winner-modified-list (frame-list)) + (winner-save-old-configurations)) + (remove-hook 'window-configuration-change-hook 'winner-change-fun) + (remove-hook 'post-command-hook 'winner-save-old-configurations) + (remove-hook 'post-command-hook 'winner-save-conditionally) + (remove-hook 'minibuffer-setup-hook 'winner-save-unconditionally))) ;; Inspired by undo (simple.el) ------------------------------------------------------------ revno: 110257 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 16:21:57 -0700 message: Remove duplication of vc-sccs-registered definition * lisp/vc/vc-sccs.el (vc-sccs-registered): Use the progn trick to get the full definition in loaddefs, rather than duplicating it. Cf vc-rcs-registered. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 19:19:17 +0000 +++ lisp/ChangeLog 2012-09-29 23:21:57 +0000 @@ -1,5 +1,8 @@ 2012-09-29 Glenn Morris + * vc/vc-sccs.el (vc-sccs-registered): Use the progn trick to get + the full definition in loaddefs, rather than duplicating it. + * help-macro.el (three-step-help): No need to autoload defcustom. * progmodes/inf-lisp.el (inferior-lisp-filter-regexp) === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-09-29 23:18:33 +0000 +++ lisp/vc/vc-sccs.el 2012-09-29 23:21:57 +0000 @@ -107,13 +107,12 @@ ;;; State-querying functions ;;; -;; The autoload cookie below places vc-sccs-registered directly into -;; loaddefs.el, so that vc-sccs.el does not need to be loaded for -;; every file that is visited. The definition is repeated below -;; so that Help and etags can find it. - -;;;###autoload (defun vc-sccs-registered(f) (vc-default-registered 'SCCS f)) -(defun vc-sccs-registered (f) (vc-default-registered 'SCCS f)) +;; The autoload cookie below places vc-rcs-registered directly into +;; loaddefs.el, so that vc-rcs.el does not need to be loaded for +;; every file that is visited. +;;;###autoload +(progn +(defun vc-sccs-registered (f) (vc-default-registered 'SCCS f))) (defun vc-sccs-state (file) "SCCS-specific function to compute the version control state." ------------------------------------------------------------ revno: 110256 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 16:19:46 -0700 message: Comment for vc-rcs diff: === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2012-09-29 19:19:17 +0000 +++ lisp/vc/vc-rcs.el 2012-09-29 23:19:46 +0000 @@ -89,6 +89,9 @@ :type '(choice (const :tag "Work out" nil) (const yes) (const no)) :group 'vc-rcs) +;; This needs to be autoloaded because vc-rcs-registered uses it (via +;; vc-default-registered), and vc-hooks needs to be able to check +;; for a registered backend without loading every backend. ;;;###autoload (defcustom vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) ------------------------------------------------------------ revno: 110255 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 16:18:33 -0700 message: Comment for vc-sccs diff: === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-09-29 19:19:17 +0000 +++ lisp/vc/vc-sccs.el 2012-09-29 23:18:33 +0000 @@ -74,6 +74,9 @@ :version "24.1" ; no longer consult the obsolete vc-header-alist :group 'vc-sccs) +;; This needs to be autoloaded because vc-sccs-registered uses it (via +;; vc-default-registered), and vc-hooks needs to be able to check +;; for a registered backend without loading every backend. ;;;###autoload (defcustom vc-sccs-master-templates (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) ------------------------------------------------------------ revno: 110254 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 16:13:29 -0700 message: Comments for vc-bzr, clarifying vc-bzr-registered diff: === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2012-09-15 01:11:52 +0000 +++ lisp/vc/vc-bzr.el 2012-09-29 23:13:29 +0000 @@ -150,12 +150,6 @@ (defconst vc-bzr-admin-branchconf (concat vc-bzr-admin-dirname "/branch/branch.conf")) -;;;###autoload (defun vc-bzr-registered (file) -;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file) -;;;###autoload (progn -;;;###autoload (load "vc-bzr") -;;;###autoload (vc-bzr-registered file)))) - (defun vc-bzr-root (file) "Return the root directory of the bzr repository containing FILE." ;; Cache technique copied from vc-arch.el. @@ -291,6 +285,14 @@ (message "Falling back on \"slow\" status detection (%S)" err) (vc-bzr-state file)))))) +;; This is a cheap approximation that is autoloaded. If it finds a +;; possible match it loads this file and runs the real function. +;; It requires vc-bzr-admin-checkout-format-file to be autoloaded too. +;;;###autoload (defun vc-bzr-registered (file) +;;;###autoload (if (vc-find-root file vc-bzr-admin-checkout-format-file) +;;;###autoload (progn +;;;###autoload (load "vc-bzr") +;;;###autoload (vc-bzr-registered file)))) (defun vc-bzr-registered (file) "Return non-nil if FILE is registered with bzr." ------------------------------------------------------------ revno: 110253 committer: Bastien Guerry branch nick: trunk timestamp: Sun 2012-09-30 00:01:57 +0200 message: Partially revert previous commit. The help: target for the Makefile was just meant as a local test. diff: === modified file 'Makefile.in' --- Makefile.in 2012-09-29 20:45:44 +0000 +++ Makefile.in 2012-09-29 22:01:57 +0000 @@ -281,19 +281,6 @@ .PHONY: all ${SUBDIR} blessmail epaths-force FRC -help:: - $(info ) - $(info make all Compile and build Emacs.) - $(info make install Install Emacs.) - $(info make TAGS Update tags tables.) - $(info ) - $(info make clean Delete files created by building Emacs.) - $(info make distclean Delete all files created by building or configuring.) - $(info make maintainer-clean Like distclean, but delete more files: *.elc, etc.) - $(info make extra-clean Like maintainer-clean, but delete backups and autosaves.) - $(info ) - $(info make bootstrap Compile and build from a clean state.) - removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g' # Generate epaths.h from epaths.in. This target is invoked by `configure'. ------------------------------------------------------------ revno: 110252 committer: Bastien Guerry branch nick: trunk timestamp: Sat 2012-09-29 22:45:44 +0200 message: url-util.el: Fix two docstrings. diff: === modified file 'Makefile.in' --- Makefile.in 2012-09-23 09:18:24 +0000 +++ Makefile.in 2012-09-29 20:45:44 +0000 @@ -281,6 +281,19 @@ .PHONY: all ${SUBDIR} blessmail epaths-force FRC +help:: + $(info ) + $(info make all Compile and build Emacs.) + $(info make install Install Emacs.) + $(info make TAGS Update tags tables.) + $(info ) + $(info make clean Delete files created by building Emacs.) + $(info make distclean Delete all files created by building or configuring.) + $(info make maintainer-clean Like distclean, but delete more files: *.elc, etc.) + $(info make extra-clean Like maintainer-clean, but delete backups and autosaves.) + $(info ) + $(info make bootstrap Compile and build from a clean state.) + removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g' # Generate epaths.h from epaths.in. This target is invoked by `configure'. === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-09-25 04:13:02 +0000 +++ lisp/url/ChangeLog 2012-09-29 20:45:44 +0000 @@ -1,3 +1,8 @@ +2012-09-29 Bastien Guerry + + * url-util.el (url-insert-entities-in-string) + (url-build-query-string): Fix docstrings. + 2012-09-25 Chong Yidong * url-parse.el (url-recreate-url-attributes): === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2012-09-25 04:13:02 +0000 +++ lisp/url/url-util.el 2012-09-29 20:45:44 +0000 @@ -132,8 +132,8 @@ (defun url-insert-entities-in-string (string) "Convert HTML markup-start characters to entity references in STRING. Also replaces the \" character, so that the result may be safely used as - an attribute value in a tag. Returns a new string with the result of the - conversion. Replaces these characters as follows: +an attribute value in a tag. Returns a new string with the result of the +conversion. Replaces these characters as follows: & ==> & < ==> < > ==> > @@ -294,7 +294,7 @@ (key2 val2) (key3 val1 val2) (key4) - (key5 "")) + (key5 \"\")) \(This is the same format as produced by `url-parse-query-string') ------------------------------------------------------------ revno: 110251 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 12:19:17 -0700 message: Revert bogus vc autoloads change diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 18:28:01 +0000 +++ lisp/ChangeLog 2012-09-29 19:19:17 +0000 @@ -1,8 +1,5 @@ 2012-09-29 Glenn Morris - * vc/vc-rcs.el (vc-rcs-master-templates): - * vc/vc-sccs.el (vc-sccs-master-templates): No need to autoload. - * help-macro.el (three-step-help): No need to autoload defcustom. * progmodes/inf-lisp.el (inferior-lisp-filter-regexp) === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2012-09-29 18:28:01 +0000 +++ lisp/vc/vc-rcs.el 2012-09-29 19:19:17 +0000 @@ -89,7 +89,9 @@ :type '(choice (const :tag "Work out" nil) (const yes) (const no)) :group 'vc-rcs) -(defcustom vc-rcs-master-templates '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s") +;;;###autoload +(defcustom vc-rcs-master-templates + (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "Where to look for RCS master files. For a description of possible values, see `vc-check-master-templates'." :type '(choice (const :tag "Use standard RCS file names" === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-09-29 18:28:01 +0000 +++ lisp/vc/vc-sccs.el 2012-09-29 19:19:17 +0000 @@ -74,8 +74,9 @@ :version "24.1" ; no longer consult the obsolete vc-header-alist :group 'vc-sccs) +;;;###autoload (defcustom vc-sccs-master-templates - '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir) + (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "Where to look for SCCS master files. For a description of possible values, see `vc-check-master-templates'." :type '(choice (const :tag "Use standard SCCS file names" ------------------------------------------------------------ revno: 110250 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 11:30:52 -0700 message: Remove purecopy's that are no longer needed following previous change diff: === modified file 'lisp/hippie-exp.el' --- lisp/hippie-exp.el 2012-09-29 18:15:57 +0000 +++ lisp/hippie-exp.el 2012-09-29 18:30:52 +0000 @@ -243,7 +243,7 @@ integer) :group 'hippie-expand) -(defcustom hippie-expand-ignore-buffers (list (purecopy "^ \\*.*\\*$") 'dired-mode) +(defcustom hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode) "A list specifying which buffers not to search (if not current). Can contain both regexps matching buffer names (as strings) and major modes \(as atoms)" === modified file 'lisp/progmodes/inf-lisp.el' --- lisp/progmodes/inf-lisp.el 2012-09-29 18:20:12 +0000 +++ lisp/progmodes/inf-lisp.el 2012-09-29 18:30:52 +0000 @@ -70,7 +70,7 @@ :version "22.1") (defcustom inferior-lisp-filter-regexp - (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'") + "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "What not to save on inferior Lisp's input history. Input matching this regexp is not saved on the input history in Inferior Lisp mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword @@ -136,12 +136,12 @@ (define-key inferior-lisp-mode-map "\C-cv" 'lisp-show-variable-documentation)) -(defcustom inferior-lisp-program (purecopy "lisp") +(defcustom inferior-lisp-program "lisp" "Program name for invoking an inferior Lisp in Inferior Lisp mode." :type 'string :group 'inferior-lisp) -(defcustom inferior-lisp-load-command (purecopy "(load \"%s\")\n") +(defcustom inferior-lisp-load-command "(load \"%s\")\n" "Format-string for building a Lisp expression to load a file. This format string should use `%s' to substitute a file name and should result in a Lisp expression that will command the inferior Lisp @@ -152,7 +152,7 @@ :type 'string :group 'inferior-lisp) -(defcustom inferior-lisp-prompt (purecopy "^[^> \n]*>+:? *") +(defcustom inferior-lisp-prompt "^[^> \n]*>+:? *" "Regexp to recognize prompts in the Inferior Lisp mode. Defaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl, and franz. This variable is used to initialize `comint-prompt-regexp' in the ------------------------------------------------------------ revno: 110249 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 11:28:01 -0700 message: No need to autoload vc-rcs, vc-sccs defcustoms. * lisp/vc/vc-rcs.el (vc-rcs-master-templates): * lisp/vc/vc-sccs.el (vc-sccs-master-templates): No need to autoload. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 18:21:45 +0000 +++ lisp/ChangeLog 2012-09-29 18:28:01 +0000 @@ -1,17 +1,20 @@ 2012-09-29 Glenn Morris - * help-macro.el (three-step-help): Do not autoload defcustom. + * vc/vc-rcs.el (vc-rcs-master-templates): + * vc/vc-sccs.el (vc-sccs-master-templates): No need to autoload. + + * help-macro.el (three-step-help): No need to autoload defcustom. * progmodes/inf-lisp.el (inferior-lisp-filter-regexp) (inferior-lisp-program, inferior-lisp-load-command) (inferior-lisp-prompt, inferior-lisp-mode-hook): - Do not autoload defcustoms. + No need to autoload defcustoms. * hippie-exp.el (hippie-expand-try-functions-list) (hippie-expand-verbose, hippie-expand-dabbrev-skip-space) (hippie-expand-dabbrev-as-symbol, hippie-expand-no-restriction) (hippie-expand-max-buffers, hippie-expand-ignore-buffers) - (hippie-expand-only-buffers): Do not autoload defcustoms. + (hippie-expand-only-buffers): No need to autoload defcustoms. * progmodes/vhdl-mode.el (vhdl-line-expand): Explicitly load hippie-exp, so it does not get autoloaded while hippie-expand-try-functions-list is let-bound. === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-rcs.el 2012-09-29 18:28:01 +0000 @@ -89,9 +89,7 @@ :type '(choice (const :tag "Work out" nil) (const yes) (const no)) :group 'vc-rcs) -;;;###autoload -(defcustom vc-rcs-master-templates - (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) +(defcustom vc-rcs-master-templates '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s") "Where to look for RCS master files. For a description of possible values, see `vc-check-master-templates'." :type '(choice (const :tag "Use standard RCS file names" === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2012-06-06 00:29:10 +0000 +++ lisp/vc/vc-sccs.el 2012-09-29 18:28:01 +0000 @@ -74,9 +74,8 @@ :version "24.1" ; no longer consult the obsolete vc-header-alist :group 'vc-sccs) -;;;###autoload (defcustom vc-sccs-master-templates - (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) + '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir) "Where to look for SCCS master files. For a description of possible values, see `vc-check-master-templates'." :type '(choice (const :tag "Use standard SCCS file names" ------------------------------------------------------------ revno: 110248 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 11:21:45 -0700 message: * lisp/help-macro.el (three-step-help): Do not autoload defcustom. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 18:20:12 +0000 +++ lisp/ChangeLog 2012-09-29 18:21:45 +0000 @@ -1,5 +1,7 @@ 2012-09-29 Glenn Morris + * help-macro.el (three-step-help): Do not autoload defcustom. + * progmodes/inf-lisp.el (inferior-lisp-filter-regexp) (inferior-lisp-program, inferior-lisp-load-command) (inferior-lisp-prompt, inferior-lisp-mode-hook): === modified file 'lisp/help-macro.el' --- lisp/help-macro.el 2012-01-20 08:12:35 +0000 +++ lisp/help-macro.el 2012-09-29 18:21:45 +0000 @@ -69,7 +69,6 @@ (require 'backquote) -;;;###autoload (defcustom three-step-help nil "Non-nil means give more info about Help command in three steps. The three steps are simple prompt, prompt with all options, and ------------------------------------------------------------ revno: 110247 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 11:20:12 -0700 message: Do not autoload defcustoms in inf-lisp.el * lisp/progmodes/inf-lisp.el (inferior-lisp-filter-regexp) (inferior-lisp-program, inferior-lisp-load-command) (inferior-lisp-prompt, inferior-lisp-mode-hook): Do not autoload defcustoms. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-29 18:15:57 +0000 +++ lisp/ChangeLog 2012-09-29 18:20:12 +0000 @@ -1,5 +1,10 @@ 2012-09-29 Glenn Morris + * progmodes/inf-lisp.el (inferior-lisp-filter-regexp) + (inferior-lisp-program, inferior-lisp-load-command) + (inferior-lisp-prompt, inferior-lisp-mode-hook): + Do not autoload defcustoms. + * hippie-exp.el (hippie-expand-try-functions-list) (hippie-expand-verbose, hippie-expand-dabbrev-skip-space) (hippie-expand-dabbrev-as-symbol, hippie-expand-no-restriction) === modified file 'lisp/progmodes/inf-lisp.el' --- lisp/progmodes/inf-lisp.el 2012-09-17 05:41:04 +0000 +++ lisp/progmodes/inf-lisp.el 2012-09-29 18:20:12 +0000 @@ -69,7 +69,6 @@ :group 'lisp :version "22.1") -;;;###autoload (defcustom inferior-lisp-filter-regexp (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'") "What not to save on inferior Lisp's input history. @@ -137,13 +136,11 @@ (define-key inferior-lisp-mode-map "\C-cv" 'lisp-show-variable-documentation)) -;;;###autoload (defcustom inferior-lisp-program (purecopy "lisp") "Program name for invoking an inferior Lisp in Inferior Lisp mode." :type 'string :group 'inferior-lisp) -;;;###autoload (defcustom inferior-lisp-load-command (purecopy "(load \"%s\")\n") "Format-string for building a Lisp expression to load a file. This format string should use `%s' to substitute a file name @@ -155,7 +152,6 @@ :type 'string :group 'inferior-lisp) -;;;###autoload (defcustom inferior-lisp-prompt (purecopy "^[^> \n]*>+:? *") "Regexp to recognize prompts in the Inferior Lisp mode. Defaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl, @@ -207,7 +203,6 @@ processes, you can change `inferior-lisp-buffer' to another process buffer with \\[set-variable].") -;;;###autoload (defvar inferior-lisp-mode-hook '() "Hook for customizing Inferior Lisp mode.") ------------------------------------------------------------ revno: 110246 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-09-29 11:15:57 -0700 message: Do not autoload defcustoms in hippie-exp.el * lisp/hippie-exp.el (hippie-expand-try-functions-list) (hippie-expand-verbose, hippie-expand-dabbrev-skip-space) (hippie-expand-dabbrev-as-symbol, hippie-expand-no-restriction) (hippie-expand-max-buffers, hippie-expand-ignore-buffers) (hippie-expand-only-buffers): Do not autoload defcustoms. * lisp/progmodes/vhdl-mode.el (vhdl-line-expand): Explicitly load hippie-exp, so it does not get autoloaded while hippie-expand-try-functions-list is let-bound. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-28 23:51:20 +0000 +++ lisp/ChangeLog 2012-09-29 18:15:57 +0000 @@ -1,3 +1,14 @@ +2012-09-29 Glenn Morris + + * hippie-exp.el (hippie-expand-try-functions-list) + (hippie-expand-verbose, hippie-expand-dabbrev-skip-space) + (hippie-expand-dabbrev-as-symbol, hippie-expand-no-restriction) + (hippie-expand-max-buffers, hippie-expand-ignore-buffers) + (hippie-expand-only-buffers): Do not autoload defcustoms. + * progmodes/vhdl-mode.el (vhdl-line-expand): + Explicitly load hippie-exp, so it does not get autoloaded + while hippie-expand-try-functions-list is let-bound. + 2012-09-28 Glenn Morris * emacs-lisp/cl.el (flet): Fix case of obsolescence message. === modified file 'lisp/hippie-exp.el' --- lisp/hippie-exp.el 2012-07-25 05:48:19 +0000 +++ lisp/hippie-exp.el 2012-09-29 18:15:57 +0000 @@ -199,7 +199,6 @@ (defvar he-search-window ()) -;;;###autoload (defcustom hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name @@ -217,31 +216,26 @@ :type '(repeat function) :group 'hippie-expand) -;;;###autoload (defcustom hippie-expand-verbose t "Non-nil makes `hippie-expand' output which function it is trying." :type 'boolean :group 'hippie-expand) -;;;###autoload (defcustom hippie-expand-dabbrev-skip-space nil "Non-nil means tolerate trailing spaces in the abbreviation to expand." :group 'hippie-expand :type 'boolean) -;;;###autoload (defcustom hippie-expand-dabbrev-as-symbol t "Non-nil means expand as symbols, i.e. syntax `_' is considered a letter." :group 'hippie-expand :type 'boolean) -;;;###autoload (defcustom hippie-expand-no-restriction t "Non-nil means that narrowed buffers are widened during search." :group 'hippie-expand :type 'boolean) -;;;###autoload (defcustom hippie-expand-max-buffers () "The maximum number of buffers (apart from the current) searched. If nil, all buffers are searched." @@ -249,7 +243,6 @@ integer) :group 'hippie-expand) -;;;###autoload (defcustom hippie-expand-ignore-buffers (list (purecopy "^ \\*.*\\*$") 'dired-mode) "A list specifying which buffers not to search (if not current). Can contain both regexps matching buffer names (as strings) and major modes @@ -257,7 +250,6 @@ :type '(repeat (choice regexp (symbol :tag "Major Mode"))) :group 'hippie-expand) -;;;###autoload (defcustom hippie-expand-only-buffers () "A list specifying the only buffers to search (in addition to current). Can contain both regexps matching buffer names (as strings) and major modes === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2012-09-06 09:36:40 +0000 +++ lisp/progmodes/vhdl-mode.el 2012-09-29 18:15:57 +0000 @@ -12522,6 +12522,7 @@ (defun vhdl-line-expand (&optional prefix-arg) "Hippie-expand current line." (interactive "P") + (require 'hippie-exp) (let ((case-fold-search t) (case-replace nil) (hippie-expand-try-functions-list '(try-expand-line try-expand-line-all-buffers))) ------------------------------------------------------------ revno: 110245 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2012-09-29 19:07:01 +0200 message: src/makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-29 02:02:34 +0000 +++ src/ChangeLog 2012-09-29 17:07:01 +0000 @@ -1,3 +1,7 @@ +2012-09-29 Juanma Barranquero + + * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies. + 2012-09-29 Stefan Monnier * lisp.h (struct backtrace): Remove indirection for `function' field. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-09-26 22:04:10 +0000 +++ src/makefile.w32-in 2012-09-29 17:07:01 +0000 @@ -978,7 +978,8 @@ $(SRC)/profiler.c \ $(NT_INC)/sys/time.h \ $(CONFIG_H) \ - $(LISP_H) + $(LISP_H) \ + $(SYSSIGNAL_H) $(BLD)/image.$(O) : \ $(SRC)/image.c \ ------------------------------------------------------------ revno: 110244 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2012-09-29 19:06:28 +0200 message: nt/config.nt: Sync with autogen/config.in (HAVE_TIMER_SETTIME): New macro. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-09-23 17:34:30 +0000 +++ nt/ChangeLog 2012-09-29 17:06:28 +0000 @@ -1,3 +1,8 @@ +2012-09-29 Juanma Barranquero + + * config.nt: Sync with autogen/config.in + (HAVE_TIMER_SETTIME): New macro. + 2012-09-23 Eli Zaretskii * inc/ms-w32.h (emacs_raise): Redefine to invoke emacs_abort. === modified file 'nt/config.nt' --- nt/config.nt 2012-09-17 13:22:45 +0000 +++ nt/config.nt 2012-09-29 17:06:28 +0000 @@ -968,6 +968,9 @@ /* Define to 1 if you have the tiff library (-ltiff). */ #undef HAVE_TIFF +/* Define to 1 if you have the `timer_settime' function. */ +#undef HAVE_TIMER_SETTIME + /* Define if struct tm has the tm_gmtoff member. */ #undef HAVE_TM_GMTOFF ------------------------------------------------------------ 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;