Now on revision 110345. ------------------------------------------------------------ revno: 110345 fixes bug: http://debbugs.gnu.org/12541 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-10-01 23:55:27 -0700 message: Prefer plain 'static' to 'static inline'. * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category) (bidi_set_sor_type, bidi_push_embedding_level) (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it) (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state) (bidi_cache_search, bidi_cache_ensure_space) (bidi_cache_iterator_state, bidi_cache_find) (bidi_peek_at_next_level, bidi_set_paragraph_end) (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char) (bidi_explicit_dir_char, bidi_resolve_neutral_1): Now 'static', not 'static inline'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-02 06:30:40 +0000 +++ src/ChangeLog 2012-10-02 06:55:27 +0000 @@ -1,5 +1,17 @@ 2012-10-02 Paul Eggert + Prefer plain 'static' to 'static inline' (Bug#12541). + * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category) + (bidi_set_sor_type, bidi_push_embedding_level) + (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it) + (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state) + (bidi_cache_search, bidi_cache_ensure_space) + (bidi_cache_iterator_state, bidi_cache_find) + (bidi_peek_at_next_level, bidi_set_paragraph_end) + (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char) + (bidi_explicit_dir_char, bidi_resolve_neutral_1): + Now 'static', not 'static inline'. + Count overruns when profiling; change units to ns. * profiler.c (handle_profiler_signal): Count sampling intervals, not ms. Give extra weight to samples after overruns, to attempt to count === modified file 'src/bidi.c' --- src/bidi.c 2012-10-01 06:19:52 +0000 +++ src/bidi.c 2012-10-02 06:55:27 +0000 @@ -96,7 +96,7 @@ /* Return the bidi type of a character CH, subject to the current directional OVERRIDE. */ -static inline bidi_type_t +static bidi_type_t bidi_get_type (int ch, bidi_dir_t override) { bidi_type_t default_type; @@ -145,14 +145,14 @@ } } -static inline void +static void bidi_check_type (bidi_type_t type) { eassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); } /* Given a bidi TYPE of a character, return its category. */ -static inline bidi_category_t +static bidi_category_t bidi_get_category (bidi_type_t type) { switch (type) @@ -226,7 +226,7 @@ embedding levels on either side of the run boundary. Also, update the saved info about previously seen characters, since that info is generally valid for a single level run. */ -static inline void +static void bidi_set_sor_type (struct bidi_it *bidi_it, int level_before, int level_after) { int higher_level = (level_before > level_after ? level_before : level_after); @@ -257,7 +257,7 @@ /* Push the current embedding level and override status; reset the current level to LEVEL and the current override status to OVERRIDE. */ -static inline void +static void bidi_push_embedding_level (struct bidi_it *bidi_it, int level, bidi_dir_t override) { @@ -269,7 +269,7 @@ /* Pop the embedding level and directional override status from the stack, and return the new level. */ -static inline int +static int bidi_pop_embedding_level (struct bidi_it *bidi_it) { /* UAX#9 says to ignore invalid PDFs. */ @@ -279,7 +279,7 @@ } /* Record in SAVED_INFO the information about the current character. */ -static inline void +static void bidi_remember_char (struct bidi_saved_info *saved_info, struct bidi_it *bidi_it) { @@ -295,7 +295,7 @@ /* Copy the bidi iterator from FROM to TO. To save cycles, this only copies the part of the level stack that is actually in use. */ -static inline void +static void bidi_copy_it (struct bidi_it *to, struct bidi_it *from) { /* Copy everything from the start through the active part of @@ -340,7 +340,7 @@ intact. This is called when the cached information is no more useful for the current iteration, e.g. when we were reseated to a new position on the same object. */ -static inline void +static void bidi_cache_reset (void) { bidi_cache_idx = bidi_cache_start; @@ -351,7 +351,7 @@ iterator for reordering a buffer or a string that does not come from display properties, because that means all the previously cached info is of no further use. */ -static inline void +static void bidi_cache_shrink (void) { if (bidi_cache_size > BIDI_CACHE_CHUNK) @@ -362,7 +362,7 @@ bidi_cache_reset (); } -static inline void +static void bidi_cache_fetch_state (ptrdiff_t idx, struct bidi_it *bidi_it) { int current_scan_dir = bidi_it->scan_dir; @@ -379,7 +379,7 @@ level less or equal to LEVEL. if LEVEL is -1, disregard the resolved levels in cached states. DIR, if non-zero, means search in that direction from the last cache hit. */ -static inline ptrdiff_t +static ptrdiff_t bidi_cache_search (ptrdiff_t charpos, int level, int dir) { ptrdiff_t i, i_start; @@ -484,7 +484,7 @@ return -1; } -static inline void +static void bidi_cache_ensure_space (ptrdiff_t idx) { /* Enlarge the cache as needed. */ @@ -506,7 +506,7 @@ } } -static inline void +static void bidi_cache_iterator_state (struct bidi_it *bidi_it, bool resolved) { ptrdiff_t idx; @@ -563,7 +563,7 @@ bidi_cache_idx = idx + 1; } -static inline bidi_type_t +static bidi_type_t bidi_cache_find (ptrdiff_t charpos, int level, struct bidi_it *bidi_it) { ptrdiff_t i = bidi_cache_search (charpos, level, bidi_it->scan_dir); @@ -583,7 +583,7 @@ return UNKNOWN_BT; } -static inline int +static int bidi_peek_at_next_level (struct bidi_it *bidi_it) { if (bidi_cache_idx == bidi_cache_start || bidi_cache_last_idx == -1) @@ -786,7 +786,7 @@ /* Do whatever UAX#9 clause X8 says should be done at paragraph's end. */ -static inline void +static void bidi_set_paragraph_end (struct bidi_it *bidi_it) { bidi_it->invalid_levels = 0; @@ -868,7 +868,7 @@ /* Count bytes in string S between BEG/BEGBYTE and END. BEG and END are zero-based character positions in S, BEGBYTE is byte position corresponding to BEG. UNIBYTE means S is a unibyte string. */ -static inline ptrdiff_t +static ptrdiff_t bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, const ptrdiff_t begbyte, const ptrdiff_t end, bool unibyte) { @@ -896,7 +896,7 @@ non-NULL, fetch the character from string S; otherwise fetch the character from the current buffer. UNIBYTE means S is a unibyte string. */ -static inline int +static int bidi_char_at_pos (ptrdiff_t bytepos, const unsigned char *s, bool unibyte) { if (s) @@ -924,7 +924,7 @@ u+2029 to handle it as a paragraph separator. STRING->s is the C string to iterate, or NULL if iterating over a buffer or a Lisp string; in the latter case, STRING->lstring is the Lisp string. */ -static inline int +static int bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, int *disp_prop, struct bidi_string_data *string, bool frame_window_p, ptrdiff_t *ch_len, ptrdiff_t *nchars) @@ -1314,7 +1314,7 @@ The rest of this file constitutes the core of the UBA implementation. ***********************************************************************/ -static inline bool +static bool bidi_explicit_dir_char (int ch) { bidi_type_t ch_type; @@ -1837,7 +1837,7 @@ /* Resolve the type of a neutral character according to the type of surrounding strong text and the current embedding level. */ -static inline bidi_type_t +static bidi_type_t bidi_resolve_neutral_1 (bidi_type_t prev_type, bidi_type_t next_type, int lev) { /* N1: European and Arabic numbers are treated as though they were R. */ ------------------------------------------------------------ revno: 110344 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-10-01 23:46:40 -0700 message: Insert the literal warning string, to make it easier to find diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-10-02 00:40:56 +0000 +++ etc/NEWS 2012-10-02 06:46:40 +0000 @@ -823,7 +823,8 @@ but can also bump into harmless and previously unnoticed cyclic dependencies. These should not be fatal: they will simply cause the macro-calls to be left for later expansion (as before), but will also -result in a warning describing the cycle. +result in a warning ("Eager macro-expansion skipped due to cycle") +describing the cycle. ** Misc new functions: ------------------------------------------------------------ revno: 110343 fixes bug: http://debbugs.gnu.org/12553 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-10-01 23:44:30 -0700 message: * maintaining.texi (VC Directory Commands): Remove duplicate `q' entry. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-09-30 09:18:38 +0000 +++ doc/emacs/ChangeLog 2012-10-02 06:44:30 +0000 @@ -1,3 +1,8 @@ +2012-10-02 Glenn Morris + + * maintaining.texi (VC Directory Commands): + Remove duplicate `q' entry. (Bug#12553) + 2012-09-30 Chong Yidong * killing.texi (Rectangles): Document copy-rectangle-as-kill. === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2012-07-06 04:31:46 +0000 +++ doc/emacs/maintaining.texi 2012-10-02 06:44:30 +0000 @@ -1186,11 +1186,8 @@ (@code{vc-dir-mark-all-files}). With a prefix argument, mark all listed files and directories. -@kindex q @r{(VC Directory)} -@findex quit-window @item q -Bury the VC Directory buffer, and delete its window if the window was -created just for that buffer. +Quit the VC Directory buffer, and bury it (@code{quit-window}). @item u Unmark the file or directory on the current line. If the region is @@ -1205,9 +1202,6 @@ @item x Hide files with @samp{up-to-date} status (@code{vc-dir-hide-up-to-date}). - -@item q -Quit the VC Directory buffer, and bury it (@code{quit-window}). @end table @findex vc-dir-mark ------------------------------------------------------------ revno: 110342 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-10-01 23:30:40 -0700 message: Count overruns when profiling; change units to ns. * lisp/profiler.el (profiler-sampling-interval): Change units from ms to ns, multiplying the default by 1000000 so that it remains 1 ms. (profiler-report-cpu-line-format): Give enough room for the maximum counters on 64-bit hosts. (profiler-report-render-calltree-1): Call them "CPU samples", not "Time (ms)", since they are not milliseconds now (and never really were). * src/profiler.c (handle_profiler_signal): Count sampling intervals, not ms. Give extra weight to samples after overruns, to attempt to count the time more accurately. (setup_cpu_timer): Change sampling interval units from ms to ns, since the underlying primitives nominally do ns. (Fprofiler_cpu_start): Document the change. Mention that the sampling intervals are only approximate. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 06:08:36 +0000 +++ lisp/ChangeLog 2012-10-02 06:30:40 +0000 @@ -1,3 +1,15 @@ +2012-10-02 Paul Eggert + + Change sampling interval units from ms to ns. + * profiler.el (profiler-sampling-interval): Change units + from ms to ns, multiplying the default by 1000000 so that + it remains 1 ms. + (profiler-report-cpu-line-format): Give enough room for + the maximum counters on 64-bit hosts. + (profiler-report-render-calltree-1): Call them "CPU samples", + not "Time (ms)", since they are not milliseconds now (and + never really were). + 2012-10-02 Sergio Durigan Junior (tiny change) * net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix === modified file 'lisp/profiler.el' --- lisp/profiler.el 2012-10-01 01:46:06 +0000 +++ lisp/profiler.el 2012-10-02 06:30:40 +0000 @@ -33,8 +33,8 @@ (defconst profiler-version "24.3") -(defcustom profiler-sampling-interval 1 - "Default sampling interval in millisecond." +(defcustom profiler-sampling-interval 1000000 + "Default sampling interval in nanoseconds." :type 'integer :group 'profiler) @@ -323,8 +323,8 @@ :group 'profiler) (defvar profiler-report-cpu-line-format - '((60 left) - (14 right ((9 right) + '((50 left) + (24 right ((19 right) (5 right))))) (defvar profiler-report-memory-line-format @@ -551,7 +551,7 @@ (cpu (profiler-report-header-line-format profiler-report-cpu-line-format - "Function" (list "Time (ms)" "%"))) + "Function" (list "CPU samples" "%"))) (memory (profiler-report-header-line-format profiler-report-memory-line-format === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-02 02:43:53 +0000 +++ src/ChangeLog 2012-10-02 06:30:40 +0000 @@ -1,3 +1,14 @@ +2012-10-02 Paul Eggert + + Count overruns when profiling; change units to ns. + * profiler.c (handle_profiler_signal): Count sampling intervals, not ms. + Give extra weight to samples after overruns, to attempt to count + the time more accurately. + (setup_cpu_timer): Change sampling interval units from ms to ns, since + the underlying primitives nominally do ns. + (Fprofiler_cpu_start): Document the change. Mention that + the sampling intervals are only approximate. + 2012-10-02 Stefan Monnier * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP. === modified file 'src/profiler.c' --- src/profiler.c 2012-09-30 22:21:25 +0000 +++ src/profiler.c 2012-10-02 06:30:40 +0000 @@ -128,8 +128,8 @@ } /* 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. */ + current backtrace: interrupt counts for CPU, and the allocation + size for memory. */ static void record_backtrace (log_t *log, EMACS_INT count) @@ -220,7 +220,7 @@ /* Separate counter for the time spent in the GC. */ static EMACS_INT cpu_gc_count; -/* The current sampling interval in milliseconds. */ +/* The current sampling interval in nanoseconds. */ static EMACS_INT current_sampling_interval; /* Signal handler for sampling profiler. */ @@ -235,11 +235,20 @@ 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 = saturated_add (cpu_gc_count, current_sampling_interval); + cpu_gc_count = saturated_add (cpu_gc_count, 1); else { + EMACS_INT count = 1; +#ifdef HAVE_TIMER_SETTIME + if (profiler_timer_ok) + { + int overruns = timer_getoverrun (profiler_timer); + eassert (0 <= overruns); + count += overruns; + } +#endif eassert (HASH_TABLE_P (cpu_log)); - record_backtrace (XHASH_TABLE (cpu_log), current_sampling_interval); + record_backtrace (XHASH_TABLE (cpu_log), count); } } @@ -255,16 +264,18 @@ struct sigaction action; struct itimerval timer; struct timespec interval; + int billion = 1000000000; if (! RANGED_INTEGERP (1, sampling_interval, - (TYPE_MAXIMUM (time_t) < EMACS_INT_MAX / 1000 - ? (EMACS_INT) TYPE_MAXIMUM (time_t) * 1000 + 999 + (TYPE_MAXIMUM (time_t) < EMACS_INT_MAX / billion + ? ((EMACS_INT) TYPE_MAXIMUM (time_t) * billion + + (billion - 1)) : EMACS_INT_MAX))) return NOT_RUNNING; current_sampling_interval = XINT (sampling_interval); - interval = make_emacs_time (current_sampling_interval / 1000, - current_sampling_interval % 1000 * 1000000); + interval = make_emacs_time (current_sampling_interval / billion, + current_sampling_interval % billion); emacs_sigaction_init (&action, deliver_profiler_signal); sigaction (SIGPROF, &action, 0); @@ -315,7 +326,7 @@ DEFUN ("profiler-cpu-start", Fprofiler_cpu_start, Sprofiler_cpu_start, 1, 1, 0, doc: /* Start or restart the cpu profiler. -It takes call-stack samples each SAMPLING-INTERVAL milliseconds. +It takes call-stack samples each SAMPLING-INTERVAL nanoseconds, approximately. See also `profiler-log-size' and `profiler-max-stack-depth'. */) (Lisp_Object sampling_interval) { ------------------------------------------------------------ revno: 110341 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-10-01 23:08:36 -0700 message: Mark tiny change from author without assignment diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 05:10:16 +0000 +++ lisp/ChangeLog 2012-10-02 06:08:36 +0000 @@ -1,4 +1,4 @@ -2012-10-02 Sergio Durigan Junior +2012-10-02 Sergio Durigan Junior (tiny change) * net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix querying BBDB for entries without a last name (Bug#11580). ------------------------------------------------------------ revno: 110340 fixes bug: http://debbugs.gnu.org/11580 author: Sergio Durigan Junior committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-10-02 13:10:16 +0800 message: Bugfix for EUDCB-BBDB queries. * net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix querying BBDB for entries without a last name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 05:02:52 +0000 +++ lisp/ChangeLog 2012-10-02 05:10:16 +0000 @@ -1,3 +1,8 @@ +2012-10-02 Sergio Durigan Junior + + * net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix + querying BBDB for entries without a last name (Bug#11580). + 2012-10-02 Chong Yidong * emacs-lisp/eieio.el: Restore Version header. === modified file 'lisp/net/eudcb-bbdb.el' --- lisp/net/eudcb-bbdb.el 2012-01-19 07:21:25 +0000 +++ lisp/net/eudcb-bbdb.el 2012-10-02 05:10:16 +0000 @@ -166,18 +166,18 @@ (symbol-name attr))) 'record)))) (t - (setq val "Unknown BBDB attribute"))) - (if val - (cond - ((memq attr '(phones addresses)) - (setq eudc-rec (append val eudc-rec))) - ((and (listp val) - (= 1 (length val))) - (setq eudc-rec (cons (cons attr (car val)) eudc-rec))) - ((> (length val) 0) - (setq eudc-rec (cons (cons attr val) eudc-rec))) - (t - (error "Unexpected attribute value"))))) + (error "Unknown BBDB attribute"))) + (cond + ((or (not val) (equal val ""))) ; do nothing + ((memq attr '(phones addresses)) + (setq eudc-rec (append val eudc-rec))) + ((and (listp val) + (= 1 (length val))) + (setq eudc-rec (cons (cons attr (car val)) eudc-rec))) + ((> (length val) 0) + (setq eudc-rec (cons (cons attr val) eudc-rec))) + (t + (error "Unexpected attribute value")))) (nreverse eudc-rec))) ------------------------------------------------------------ revno: 110339 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-10-02 13:02:52 +0800 message: Restore Version headers removed in last CEDET merge. These are needed for ELPA dependencies. * srecode.el, ede.el: Restore Version header. * emacs-lisp/eieio.el: Restore Version header. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 03:49:28 +0000 +++ lisp/ChangeLog 2012-10-02 05:02:52 +0000 @@ -1,3 +1,7 @@ +2012-10-02 Chong Yidong + + * emacs-lisp/eieio.el: Restore Version header. + 2012-10-02 Stefan Monnier * vc/diff-mode.el (diff--auto-refine-data): New var. === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-01 18:10:29 +0000 +++ lisp/cedet/ChangeLog 2012-10-02 05:02:52 +0000 @@ -1,3 +1,7 @@ +2012-10-02 Chong Yidong + + * srecode.el, ede.el: Restore Version header. + 2012-10-01 Chong Yidong * semantic/bovine/c-by.el: Regenerate. === modified file 'lisp/cedet/ede.el' --- lisp/cedet/ede.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/ede.el 2012-10-02 05:02:52 +0000 @@ -4,6 +4,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: project, make +;; Version: 1.0 ;; This file is part of GNU Emacs. === modified file 'lisp/cedet/srecode.el' --- lisp/cedet/srecode.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/srecode.el 2012-10-02 05:02:52 +0000 @@ -4,6 +4,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: codegeneration +;; Version: 1.0 ;; This file is part of GNU Emacs. === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2012-10-01 18:10:29 +0000 +++ lisp/emacs-lisp/eieio.el 2012-10-02 05:02:52 +0000 @@ -4,6 +4,7 @@ ;; Copyright (C) 1995-1996, 1998-2012 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam +;; Version: 1.3 ;; Keywords: OO, lisp ;; This file is part of GNU Emacs. ------------------------------------------------------------ revno: 110338 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 23:49:28 -0400 message: * lisp/vc/diff-mode.el (diff--auto-refine-data): New var. (diff-hunk): Use it to delay refinement. (diff-mode): Remove overlays when we turn off font-lock. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 03:46:08 +0000 +++ lisp/ChangeLog 2012-10-02 03:49:28 +0000 @@ -1,5 +1,9 @@ 2012-10-02 Stefan Monnier + * vc/diff-mode.el (diff--auto-refine-data): New var. + (diff-hunk): Use it to delay refinement. + (diff-mode): Remove overlays when we turn off font-lock. + * textmodes/table.el: Use lexical-binding, dolist, define-minor-mode. (table-initialize-table-fixed-width-mode) (table-set-table-fixed-width-mode): Remove functions. === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2012-09-30 16:36:42 +0000 +++ lisp/vc/diff-mode.el 2012-10-02 03:49:28 +0000 @@ -565,11 +565,24 @@ (goto-char (match-beginning 1)) (beginning-of-line))) +(defvar diff--auto-refine-data nil) + ;; Define diff-{hunk,file}-{prev,next} (easy-mmode-define-navigation diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view - (if diff-auto-refine-mode - (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) + (when diff-auto-refine-mode + (setq diff--auto-refine-data (cons (current-buffer) (point-marker))) + (run-at-time 0.0 nil + (lambda () + (when diff--auto-refine-data + (let ((buffer (car diff--auto-refine-data)) + (point (cdr diff--auto-refine-data))) + (setq diff--auto-refine-data nil) + (with-local-quit + (when (buffer-live-p buffer) + (with-current-buffer buffer + (goto-char point) + (diff-refine-hunk)))))))))) (easy-mmode-define-navigation diff-file diff-file-header-re "file" diff-end-of-file) @@ -1317,6 +1330,9 @@ \\{diff-mode-map}" (set (make-local-variable 'font-lock-defaults) diff-font-lock-defaults) + (add-hook 'font-lock-mode-hook + (lambda () (remove-overlays nil nil 'diff-mode 'fine)) + nil 'local) (set (make-local-variable 'outline-regexp) diff-outline-regexp) (set (make-local-variable 'imenu-generic-expression) diff-imenu-generic-expression) @@ -1390,6 +1406,8 @@ (set (make-local-variable 'whitespace-style) '(face trailing)) (let ((style (save-excursion (goto-char (point-min)) + ;; FIXME: For buffers filled from async processes, this search + ;; will simply fail because the buffer is still empty :-( (when (re-search-forward diff-hunk-header-re nil t) (goto-char (match-beginning 0)) (diff-hunk-style))))) ------------------------------------------------------------ revno: 110337 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 23:48:01 -0400 message: * lisp/url/url-http.el (url-http-user-agent-string): Leak less info. (url-http, url-http-file-exists-p, url-http-file-readable-p) (url-http-file-attributes, url-http-options, url-https-default-port) (url-https-asynchronous-p): Don't autoload. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-09-30 03:26:52 +0000 +++ lisp/url/ChangeLog 2012-10-02 03:48:01 +0000 @@ -1,3 +1,10 @@ +2012-10-02 Stefan Monnier + + * url-http.el (url-http-user-agent-string): Leak less info. + (url-http, url-http-file-exists-p, url-http-file-readable-p) + (url-http-file-attributes, url-http-options, url-https-default-port) + (url-https-asynchronous-p): Don't autoload. + 2012-09-30 Stefan Monnier * url-handlers.el (url-file-handler): Don't assume any url-FOO function === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2012-08-14 14:54:51 +0000 +++ lisp/url/url-http.el 2012-10-02 03:48:01 +0000 @@ -215,17 +215,11 @@ (and (listp url-privacy-level) (memq 'agent url-privacy-level))) "" - (format "User-Agent: %sURL/%s%s\r\n" + (format "User-Agent: %sURL/%s\r\n" (if url-package-name (concat url-package-name "/" url-package-version " ") "") - url-version - (cond - ((and url-os-type url-system-type) - (concat " (" url-os-type "; " url-system-type ")")) - ((or url-os-type url-system-type) - (concat " (" (or url-system-type url-os-type) ")")) - (t ""))))) + url-version))) (defun url-http-create-request (&optional ref-url) "Create an HTTP request for `url-http-target-url', referred to by REF-URL." @@ -1153,7 +1147,6 @@ (when (eq process-buffer (current-buffer)) (goto-char (point-max))))) -;;;###autoload (defun url-http (url callback cbargs &optional retry-buffer) "Retrieve URL via HTTP asynchronously. URL must be a parsed URL. See `url-generic-parse-url' for details. @@ -1299,7 +1292,6 @@ (url-request-data nil)) (url-retrieve-synchronously url))) -;;;###autoload (defun url-http-file-exists-p (url) (let ((status nil) (exists nil) @@ -1313,7 +1305,6 @@ (kill-buffer buffer)) exists)) -;;;###autoload (defalias 'url-http-file-readable-p 'url-http-file-exists-p) (defun url-http-head-file-attributes (url &optional id-format) @@ -1333,13 +1324,11 @@ (declare-function url-dav-file-attributes "url-dav" (url &optional id-format)) -;;;###autoload (defun url-http-file-attributes (url &optional id-format) (if (url-dav-supported-p url) (url-dav-file-attributes url id-format) (url-http-head-file-attributes url id-format))) -;;;###autoload (defun url-http-options (url) "Return a property list describing options available for URL. This list is retrieved using the `OPTIONS' HTTP method. @@ -1417,9 +1406,7 @@ ;; with url-http.el on systems with 8-character file names. (require 'tls) -;;;###autoload (defconst url-https-default-port 443 "Default HTTPS port.") -;;;###autoload (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") ;; FIXME what is the point of this alias being an autoload? ------------------------------------------------------------ revno: 110336 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 23:46:08 -0400 message: * lisp/textmodes/table.el: Use lexical-binding, dolist, define-minor-mode. (table-initialize-table-fixed-width-mode) (table-set-table-fixed-width-mode): Remove functions. (table-command-list): Move initialization into declaration. (table--tweak-menu-for-xemacs): Move defun outside mapcar. (table-with-cache-buffer): Use `declare'. (table-span-cell): Simplify via CSE. (table-fixed-width-mode): Use define-minor-mode. (table-call-interactively, table-funcall, table-apply): Remove. (table-function): New function, to replace them. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 02:47:12 +0000 +++ lisp/ChangeLog 2012-10-02 03:46:08 +0000 @@ -1,5 +1,16 @@ 2012-10-02 Stefan Monnier + * textmodes/table.el: Use lexical-binding, dolist, define-minor-mode. + (table-initialize-table-fixed-width-mode) + (table-set-table-fixed-width-mode): Remove functions. + (table-command-list): Move initialization into declaration. + (table--tweak-menu-for-xemacs): Move defun outside mapcar. + (table-with-cache-buffer): Use `declare'. + (table-span-cell): Simplify via CSE. + (table-fixed-width-mode): Use define-minor-mode. + (table-call-interactively, table-funcall, table-apply): Remove. + (table-function): New function, to replace them. + * bookmark.el (bookmark-search-pattern): Remove var. (bookmark-read-search-input): Remove function. (bookmark-bmenu-search): Reimplement using a minibuffer. === modified file 'lisp/textmodes/table.el' --- lisp/textmodes/table.el 2012-09-17 05:41:04 +0000 +++ lisp/textmodes/table.el 2012-10-02 03:46:08 +0000 @@ -1,4 +1,4 @@ -;;; table.el --- create and edit WYSIWYG text based embedded tables +;;; table.el --- create and edit WYSIWYG text based embedded tables -*- lexical-binding: t -*- ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. @@ -715,28 +715,6 @@ :type 'character :group 'table) -(defun table-set-table-fixed-width-mode (variable value) - (if (fboundp variable) - (funcall variable (if value 1 -1)))) - -(defun table-initialize-table-fixed-width-mode (variable value) - (set variable value)) - -(defcustom table-fixed-width-mode nil - "Cell width is fixed when this is non-nil. -Normally it should be nil for allowing automatic cell width expansion -that widens a cell when it is necessary. When non-nil, typing in a -cell does not automatically expand the cell width. A word that is too -long to fit in a cell is chopped into multiple lines. The chopped -location is indicated by `table-word-continuation-char'. This -variable's value can be toggled by \\[table-fixed-width-mode] at -run-time." - :tag "Fix Cell Width" - :type 'boolean - :initialize 'table-initialize-table-fixed-width-mode - :set 'table-set-table-fixed-width-mode - :group 'table) - (defcustom table-detect-cell-alignment t "Detect cell contents alignment automatically. When non-nil cell alignment is automatically determined by the @@ -1001,14 +979,10 @@ (dabbrev-completion . *table--cell-dabbrev-completion)) "List of cons cells consisting of (ORIGINAL-COMMAND . TABLE-VERSION-OF-THE-COMMAND).") -(defvar table-command-list nil +(defvar table-command-list + ;; Construct the real contents of the `table-command-list'. + (mapcar #'cdr table-command-remap-alist) "List of commands that override original commands.") -;; construct the real contents of the `table-command-list' -(let ((remap-alist table-command-remap-alist)) - (setq table-command-list nil) - (while remap-alist - (setq table-command-list (cons (cdar remap-alist) table-command-list)) - (setq remap-alist (cdr remap-alist)))) (defconst table-global-menu '("Table" @@ -1241,18 +1215,17 @@ ;; Unknown keywords should be quietly ignore so that future extension ;; does not cause a problem in the old implementation. Sigh... (when (featurep 'xemacs) - (mapcar - (defun table--tweak-menu-for-xemacs (menu) + (defun table--tweak-menu-for-xemacs (menu) (cond ((listp menu) - (mapcar 'table--tweak-menu-for-xemacs menu)) + (mapcar #'table--tweak-menu-for-xemacs menu)) ((vectorp menu) - (let ((i 0) (len (length menu))) - (while (< i len) + (let ((len (length menu))) + (dotimes (i len) ;; replace :help with something harmless. - (if (eq (aref menu i) :help) (aset menu i :included)) - (setq i (1+ i))))))) - (list table-global-menu table-cell-menu)) + (if (eq (aref menu i) :help) (aset menu i :included))))))) + (mapcar #'table--tweak-menu-for-xemacs + (list table-global-menu table-cell-menu)) (defvar mark-active t)) ;; register table menu under global tools menu @@ -1286,6 +1259,7 @@ coordinate is stored in `table-cell-cache-point-coordinate'. The original buffer's point is moved to the location that corresponds to the last cache point coordinate." + (declare (debug (body)) (indent 0)) (let ((height-expansion (make-symbol "height-expansion-var-symbol")) (width-expansion (make-symbol "width-expansion-var-symbol"))) `(let (,height-expansion ,width-expansion) @@ -1341,14 +1315,9 @@ ;; set up the update timer unless it is explicitly inhibited. (unless table-inhibit-update (table--update-cell))))) - -;; for debugging the body form of the macro -(put 'table-with-cache-buffer 'edebug-form-spec '(body)) -;; for neat presentation use the same indentation as `progn' -(put 'table-with-cache-buffer 'lisp-indent-function 0) (if (or (featurep 'xemacs) (null (fboundp 'font-lock-add-keywords))) nil - ;; color it as a keyword + ;; Color it as a keyword. (font-lock-add-keywords 'emacs-lisp-mode '("\\"))) @@ -1367,122 +1336,114 @@ ;; ;; Point Motion Only Group -(mapc - (lambda (command) - (let ((func-symbol (intern (format "*table--cell-%s" command))) - (doc-string (format "Table remapped function for `%s'." command))) - (fset func-symbol - `(lambda - (&rest args) - ,doc-string - (interactive) - (let ((table-inhibit-update t) - (deactivate-mark nil)) - (table--finish-delayed-tasks) - (table-recognize-cell 'force) - (table-with-cache-buffer - (call-interactively ',command) - (setq table-inhibit-auto-fill-paragraph t))))) - (setq table-command-remap-alist - (cons (cons command func-symbol) - table-command-remap-alist)))) - '(move-beginning-of-line - beginning-of-line - move-end-of-line - end-of-line - beginning-of-buffer - end-of-buffer - forward-word - backward-word - forward-sentence - backward-sentence - forward-paragraph - backward-paragraph)) +(dolist (command + '(move-beginning-of-line + beginning-of-line + move-end-of-line + end-of-line + beginning-of-buffer + end-of-buffer + forward-word + backward-word + forward-sentence + backward-sentence + forward-paragraph + backward-paragraph)) + (let ((func-symbol (intern (format "*table--cell-%s" command))) + (doc-string (format "Table remapped function for `%s'." command))) + (defalias func-symbol + `(lambda + (&rest args) + ,doc-string + (interactive) + (let ((table-inhibit-update t) + (deactivate-mark nil)) + (table--finish-delayed-tasks) + (table-recognize-cell 'force) + (table-with-cache-buffer + (call-interactively ',command) + (setq table-inhibit-auto-fill-paragraph t))))) + (push (cons command func-symbol) + table-command-remap-alist))) ;; Extraction Group -(mapc - (lambda (command) - (let ((func-symbol (intern (format "*table--cell-%s" command))) - (doc-string (format "Table remapped function for `%s'." command))) - (fset func-symbol - `(lambda - (&rest args) - ,doc-string - (interactive) - (table--finish-delayed-tasks) - (table-recognize-cell 'force) - (table-with-cache-buffer - (table--remove-cell-properties (point-min) (point-max)) - (table--remove-eol-spaces (point-min) (point-max)) - (call-interactively ',command)) - (table--finish-delayed-tasks))) - (setq table-command-remap-alist - (cons (cons command func-symbol) - table-command-remap-alist)))) - '(kill-region - kill-ring-save - delete-region - copy-region-as-kill - kill-line - kill-word - backward-kill-word - kill-sentence - backward-kill-sentence - kill-paragraph - backward-kill-paragraph - kill-sexp - backward-kill-sexp)) +(dolist (command + '(kill-region + kill-ring-save + delete-region + copy-region-as-kill + kill-line + kill-word + backward-kill-word + kill-sentence + backward-kill-sentence + kill-paragraph + backward-kill-paragraph + kill-sexp + backward-kill-sexp)) + (let ((func-symbol (intern (format "*table--cell-%s" command))) + (doc-string (format "Table remapped function for `%s'." command))) + (defalias func-symbol + `(lambda + (&rest args) + ,doc-string + (interactive) + (table--finish-delayed-tasks) + (table-recognize-cell 'force) + (table-with-cache-buffer + (table--remove-cell-properties (point-min) (point-max)) + (table--remove-eol-spaces (point-min) (point-max)) + (call-interactively ',command)) + (table--finish-delayed-tasks))) + (push (cons command func-symbol) + table-command-remap-alist))) ;; Pasting Group -(mapc - (lambda (command) - (let ((func-symbol (intern (format "*table--cell-%s" command))) - (doc-string (format "Table remapped function for `%s'." command))) - (fset func-symbol - `(lambda - (&rest args) - ,doc-string - (interactive) - (table--finish-delayed-tasks) - (table-recognize-cell 'force) - (table-with-cache-buffer - (call-interactively ',command) - (table--untabify (point-min) (point-max)) - (table--fill-region (point-min) (point-max)) - (setq table-inhibit-auto-fill-paragraph t)) - (table--finish-delayed-tasks))) - (setq table-command-remap-alist - (cons (cons command func-symbol) - table-command-remap-alist)))) - '(yank - clipboard-yank - yank-clipboard-selection - insert)) +(dolist (command + '(yank + clipboard-yank + yank-clipboard-selection + insert)) + (let ((func-symbol (intern (format "*table--cell-%s" command))) + (doc-string (format "Table remapped function for `%s'." command))) + (fset func-symbol + `(lambda + (&rest args) + ,doc-string + (interactive) + (table--finish-delayed-tasks) + (table-recognize-cell 'force) + (table-with-cache-buffer + (call-interactively ',command) + (table--untabify (point-min) (point-max)) + (table--fill-region (point-min) (point-max)) + (setq table-inhibit-auto-fill-paragraph t)) + (table--finish-delayed-tasks))) + (push (cons command func-symbol) + table-command-remap-alist))) ;; Formatting Group -(mapc - (lambda (command) - (let ((func-symbol (intern (format "*table--cell-%s" command))) - (doc-string (format "Table remapped function for `%s'." command))) - (fset func-symbol - `(lambda - (&rest args) - ,doc-string - (interactive) - (table--finish-delayed-tasks) - (table-recognize-cell 'force) - (table-with-cache-buffer - (let ((fill-column table-cell-info-width)) - (call-interactively ',command)) - (setq table-inhibit-auto-fill-paragraph t)) - (table--finish-delayed-tasks))) - (setq table-command-remap-alist - (cons (cons command func-symbol) - table-command-remap-alist)))) - '(center-line - center-region - center-paragraph - fill-paragraph)) +(dolist (command + '(center-line + center-region + center-paragraph + fill-paragraph)) + (let ((func-symbol (intern (format "*table--cell-%s" command))) + (doc-string (format "Table remapped function for `%s'." command))) + (fset func-symbol + `(lambda + (&rest args) + ,doc-string + (interactive) + (table--finish-delayed-tasks) + (table-recognize-cell 'force) + (table-with-cache-buffer + (let ((fill-column table-cell-info-width)) + (call-interactively ',command)) + (setq table-inhibit-auto-fill-paragraph t)) + (table--finish-delayed-tasks))) + (push (cons command func-symbol) + table-command-remap-alist))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -2581,7 +2542,7 @@ DIRECTION is one of symbols; right, left, above or below." (interactive (list - (let* ((dummy (barf-if-buffer-read-only)) + (let* ((_ (barf-if-buffer-read-only)) (direction-list (let* ((tmp (delete nil (mapcar (lambda (d) @@ -2605,40 +2566,35 @@ (table-recognize-cell 'force) (unless (table--cell-can-span-p direction) (error "Can't span %s" (symbol-name direction))) - ;; prepare beginning and ending positions of the border bar to strike through - (let ((beg (cond - ((eq direction 'right) - (save-excursion - (table--goto-coordinate + ;; Prepare beginning and end positions of the border bar to strike through. + (let ((beg (save-excursion + (table--goto-coordinate + (cond + ((eq direction 'right) (cons (car table-cell-info-rb-coordinate) - (1- (cdr table-cell-info-lu-coordinate))) 'no-extension))) - ((eq direction 'below) - (save-excursion - (table--goto-coordinate - (cons (1- (car table-cell-info-lu-coordinate)) - (1+ (cdr table-cell-info-rb-coordinate))) 'no-extension))) - (t - (save-excursion - (table--goto-coordinate - (cons (1- (car table-cell-info-lu-coordinate)) - (1- (cdr table-cell-info-lu-coordinate))) 'no-extension))))) - (end (cond - ((eq direction 'left) - (save-excursion - (table--goto-coordinate + (1- (cdr table-cell-info-lu-coordinate)))) + ((eq direction 'below) + (cons (1- (car table-cell-info-lu-coordinate)) + (1+ (cdr table-cell-info-rb-coordinate)))) + (t + (cons (1- (car table-cell-info-lu-coordinate)) + (1- (cdr table-cell-info-lu-coordinate))))) + 'no-extension))) + (end (save-excursion + (table--goto-coordinate + (cond + ((eq direction 'left) (cons (car table-cell-info-lu-coordinate) - (1+ (cdr table-cell-info-rb-coordinate))) 'no-extension))) - ((eq direction 'above) - (save-excursion - (table--goto-coordinate - (cons (1+ (car table-cell-info-rb-coordinate)) - (1- (cdr table-cell-info-lu-coordinate))) 'no-extension))) - (t - (save-excursion - (table--goto-coordinate - (cons (1+ (car table-cell-info-rb-coordinate)) - (1+ (cdr table-cell-info-rb-coordinate))) 'no-extension)))))) - ;; replace the bar with blank space while taking care of edges to be border or intersection + (1+ (cdr table-cell-info-rb-coordinate)))) + ((eq direction 'above) + (cons (1+ (car table-cell-info-rb-coordinate)) + (1- (cdr table-cell-info-lu-coordinate)))) + (t + (cons (1+ (car table-cell-info-rb-coordinate)) + (1+ (cdr table-cell-info-rb-coordinate))))) + 'no-extension)))) + ;; Replace the bar with blank space while taking care of edges to be border + ;; or intersection. (save-excursion (goto-char beg) (if (memq direction '(left right)) @@ -2832,7 +2788,7 @@ ORIENTATION is a symbol either horizontally or vertically." (interactive (list - (let* ((dummy (barf-if-buffer-read-only)) + (let* ((_ (barf-if-buffer-read-only)) (completion-ignore-case t) (default (car table-cell-split-orientation-history))) (intern (downcase (completing-read @@ -2852,7 +2808,7 @@ WHAT is a symbol 'cell, 'row or 'column. JUSTIFY is a symbol 'left, 'center, 'right, 'top, 'middle, 'bottom or 'none." (interactive - (list (let* ((dummy (barf-if-buffer-read-only)) + (list (let* ((_ (barf-if-buffer-read-only)) (completion-ignore-case t) (default (car table-target-history))) (intern (downcase (completing-read @@ -2910,17 +2866,18 @@ (table--justify-cell-contents justify)))))) ;;;###autoload -(defun table-fixed-width-mode (&optional arg) - "Toggle fixing width mode. -In the fixed width mode, typing inside a cell never changes the cell -width where in the normal mode the cell width expands automatically in -order to prevent a word being folded into multiple lines." - (interactive "P") +(define-minor-mode table-fixed-width-mode + "Cell width is fixed when this is non-nil. +Normally it should be nil for allowing automatic cell width expansion +that widens a cell when it is necessary. When non-nil, typing in a +cell does not automatically expand the cell width. A word that is too +long to fit in a cell is chopped into multiple lines. The chopped +location is indicated by `table-word-continuation-char'. This +variable's value can be toggled by \\[table-fixed-width-mode] at +run-time." + :tag "Fix Cell Width" + :group 'table (table--finish-delayed-tasks) - (setq table-fixed-width-mode - (if (null arg) - (not table-fixed-width-mode) - (> (prefix-numeric-value arg) 0))) (table--update-cell-face)) ;;;###autoload @@ -3004,7 +2961,7 @@ URL `http://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751' " (interactive - (let* ((dummy (unless (table--probe-cell) (error "Table not found here"))) + (let* ((_ (unless (table--probe-cell) (error "Table not found here"))) (completion-ignore-case t) (default (car table-source-language-history)) (language (downcase (completing-read @@ -3093,7 +3050,7 @@ ))) dest-buffer)) -(defun table--generate-source-prologue (dest-buffer language caption col-list row-list) +(defun table--generate-source-prologue (dest-buffer language caption col-list _row-list) "Generate and insert source prologue into DEST-BUFFER." (with-current-buffer dest-buffer (cond @@ -3121,7 +3078,7 @@ (insert (format " <%s valign=\"top\">\n" (table-get-source-info 'row-type)))) ))) -(defun table--generate-source-epilogue (dest-buffer language col-list row-list) +(defun table--generate-source-epilogue (dest-buffer language _col-list _row-list) "Generate and insert source epilogue into DEST-BUFFER." (with-current-buffer dest-buffer (cond @@ -3133,14 +3090,12 @@ (set-marker-insertion-type (table-get-source-info 'colspec-marker) t) ;; insert before (save-excursion (goto-char (table-get-source-info 'colspec-marker)) - (mapc - (lambda (col) - (insert (format " \n" col col))) - (sort (table-get-source-info 'colnum-list) '<))) + (dolist (col (sort (table-get-source-info 'colnum-list) '<)) + (insert (format " \n" col col)))) (insert (format " \n \n\n" (table-get-source-info 'row-type)))) ))) -(defun table--generate-source-scan-rows (dest-buffer language origin-cell col-list row-list) +(defun table--generate-source-scan-rows (dest-buffer language _origin-cell col-list row-list) "Generate and insert source rows into DEST-BUFFER." (table-put-source-info 'current-row 1) (while row-list @@ -3286,7 +3241,7 @@ "Test if character C is one of the horizontal characters" (memq c (string-to-list table-cell-horizontal-chars))) -(defun table--generate-source-scan-lines (dest-buffer language origin-cell tail-cell col-list row-list) +(defun table--generate-source-scan-lines (dest-buffer _language origin-cell tail-cell col-list row-list) "Scan the table line by line. Currently this method is for LaTeX only." (let* ((lu-coord (table--get-coordinate (car origin-cell))) @@ -3403,8 +3358,7 @@ (table-insert 16 8 5 1) (table-insert-sequence \"@\" 0 1 2 'right) (table-forward-cell 1) - (table-insert-sequence \"64\" 0 1 2 'left)) -" + (table-insert-sequence \"64\" 0 1 2 'left))" (interactive (progn (barf-if-buffer-read-only) @@ -3896,36 +3850,34 @@ (defun table--make-cell-map () "Make the table cell keymap if it does not exist yet." - ;; this is irrelevant to keymap but good place to make sure to be executed + ;; This is irrelevant to keymap but good place to make sure to be executed. (table--update-cell-face) (unless table-cell-map - (let ((map (make-sparse-keymap)) - (remap-alist table-command-remap-alist)) - ;; table-command-prefix mode specific bindings + (let ((map (make-sparse-keymap))) + ;; `table-command-prefix' mode specific bindings. (if (vectorp table-command-prefix) - (mapc (lambda (binding) - (let ((seq (copy-sequence (car binding)))) - (and (vectorp seq) - (listp (aref seq 0)) - (eq (car (aref seq 0)) 'control) - (progn - (aset seq 0 (cadr (aref seq 0))) - (define-key map (vconcat table-command-prefix seq) (cdr binding)))))) - table-cell-bindings)) - ;; shorthand control bindings - (mapc (lambda (binding) - (define-key map (car binding) (cdr binding))) - table-cell-bindings) - ;; remap normal commands to table specific version - (while remap-alist - (define-key map (vector 'remap (caar remap-alist)) (cdar remap-alist)) - (setq remap-alist (cdr remap-alist))) + (dolist (binding table-cell-bindings) + (let ((seq (copy-sequence (car binding)))) + (and (vectorp seq) + (listp (aref seq 0)) + (eq (car (aref seq 0)) 'control) + (progn + (aset seq 0 (cadr (aref seq 0))) + (define-key map (vconcat table-command-prefix seq) + (cdr binding))))))) + ;; Shorthand control bindings. + (dolist (binding table-cell-bindings) + (define-key map (car binding) (cdr binding))) + ;; Remap normal commands to table specific version. + (dolist (remap table-command-remap-alist) + (define-key map (vector 'remap (car remap)) (cdr remap))) ;; (setq table-cell-map map) (fset 'table-cell-map map))) - ;; add menu for table cells + ;; Add menu for table cells. (unless table-disable-menu - (easy-menu-define table-cell-menu-map table-cell-map "Table cell menu" table-cell-menu) + (easy-menu-define table-cell-menu-map table-cell-map + "Table cell menu" table-cell-menu) (if (featurep 'xemacs) (easy-menu-add table-cell-menu))) (run-hooks 'table-cell-map-hook)) @@ -4092,6 +4044,8 @@ table-cell-bindings) (help-print-return-message)))) +(defvar dabbrev-abbrev-char-regexp) + (defun *table--cell-dabbrev-expand (arg) "Table cell version of `dabbrev-expand'." (interactive "*P") @@ -4291,38 +4245,16 @@ (car (table--get-coordinate (cdr (table--horizontal-cell-list nil t)))) (1+ (cdr (table--get-coordinate (cdr (table--vertical-cell-list nil t)))))))) -(defun table-call-interactively (function &optional record-flag keys) - "Call FUNCTION, or a table version of it if applicable. -See `call-interactively' for full description of the arguments." - (let ((table-func (intern-soft (format "*table--cell-%s" function)))) - (call-interactively - (if (and table-func - (table--point-in-cell-p)) - table-func - function) record-flag keys))) - -(defun table-funcall (function &rest arguments) - "Call FUNCTION, or a table version of it if applicable. -See `funcall' for full description of the arguments." - (let ((table-func (intern-soft (format "*table--cell-%s" function)))) - (apply - (if (and table-func - (table--point-in-cell-p)) - table-func - function) - arguments))) - -(defmacro table-apply (function &rest arguments) - "Call FUNCTION, or a table version of it if applicable. -See `apply' for full description of the arguments." - (let ((table-func (make-symbol "table-func"))) - `(let ((,table-func (intern-soft (format "*table--cell-%s" ,function)))) - (apply - (if (and ,table-func - (table--point-in-cell-p)) - ,table-func - ,function) - ,@arguments)))) +(defun table-function (function) + ;; FIXME: Apparently unused. There used to be table-funcall, table-apply, + ;; and table-call-interactively instead, neither of which seemed to be + ;; used either. + "Return FUNCTION, or a table version of it if applicable." + (let ((table-func (intern-soft (format "*table--cell-%s" function)))) + (if (and table-func + (table--point-in-cell-p)) + table-func + function))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -5124,7 +5056,7 @@ (throw 'retry-vertical nil)) (t (throw 'retry-horizontal nil))))))))))))) -(defun table--editable-cell-p (&optional abort-on-error) +(defun table--editable-cell-p (&optional _abort-on-error) (and (not buffer-read-only) (get-text-property (point) 'table-cell))) @@ -5310,7 +5242,7 @@ "Put cell's vertical alignment property." (table--put-property cell 'table-valign valign)) -(defun table--point-entered-cell-function (&optional old-point new-point) +(defun table--point-entered-cell-function (&optional _old-point _new-point) "Point has entered a cell. Refresh the menu bar." ;; Avoid calling point-motion-hooks recursively. @@ -5322,7 +5254,7 @@ (table--warn-incompatibility) (run-hooks 'table-point-entered-cell-hook)))) -(defun table--point-left-cell-function (&optional old-point new-point) +(defun table--point-left-cell-function (&optional _old-point _new-point) "Point has left a cell. Refresh the menu bar." ;; Avoid calling point-motion-hooks recursively. ------------------------------------------------------------ revno: 110335 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 22:47:12 -0400 message: * lisp/bookmark.el (bookmark-search-pattern): Remove var. (bookmark-read-search-input): Remove function. (bookmark-bmenu-search): Reimplement using a minibuffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 00:40:56 +0000 +++ lisp/ChangeLog 2012-10-02 02:47:12 +0000 @@ -1,5 +1,9 @@ 2012-10-02 Stefan Monnier + * bookmark.el (bookmark-search-pattern): Remove var. + (bookmark-read-search-input): Remove function. + (bookmark-bmenu-search): Reimplement using a minibuffer. + * faces.el (modeline): Remove obsolete face name. * vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2012-10-01 04:15:48 +0000 +++ lisp/bookmark.el 2012-10-02 02:47:12 +0000 @@ -2010,32 +2010,6 @@ ;;; Bookmark-bmenu search -;; Store keyboard input for incremental search. -(defvar bookmark-search-pattern) - -(defun bookmark-read-search-input () - "Read each keyboard input and add it to `bookmark-search-pattern'." - (let ((prompt (propertize "Pattern: " 'face 'minibuffer-prompt)) - ;; (inhibit-quit t) ; inhibit-quit is evil. Use it with extreme care! - (tmp-list ())) - (while - (let ((char (read-key (concat prompt bookmark-search-pattern)))) - (pcase char - ((or ?\e ?\r) nil) ; RET or ESC break the search loop. - (?\C-g (setq bookmark-quit-flag t) nil) - (?\d (pop tmp-list) t) ; Delete last char of pattern with DEL - (_ - (if (characterp char) - (push char tmp-list) - (setq unread-command-events - (nconc (mapcar 'identity - (this-single-command-raw-keys)) - unread-command-events)) - nil)))) - (setq bookmark-search-pattern - (apply 'string (reverse tmp-list)))))) - - (defun bookmark-bmenu-filter-alist-by-regexp (regexp) "Filter `bookmark-alist' with bookmarks matching REGEXP and rebuild list." (let ((bookmark-alist @@ -2050,19 +2024,23 @@ "Incremental search of bookmarks, hiding the non-matches as we go." (interactive) (let ((bmk (bookmark-bmenu-bookmark)) - (bookmark-search-pattern "") - (timer (run-with-idle-timer - bookmark-search-delay 'repeat - #'(lambda () - (bookmark-bmenu-filter-alist-by-regexp - bookmark-search-pattern))))) + (timer nil)) (unwind-protect - (bookmark-read-search-input) - (cancel-timer timer) - (message nil) - (when bookmark-quit-flag ; C-g hit restore menu list. - (bookmark-bmenu-list) (bookmark-bmenu-goto-bookmark bmk)) - (setq bookmark-quit-flag nil)))) + (minibuffer-with-setup-hook + (lambda () + (setq timer (run-with-idle-timer + bookmark-search-delay 'repeat + #'(lambda (buf) + (with-current-buffer buf + (bookmark-bmenu-filter-alist-by-regexp + (minibuffer-contents)))) + (current-buffer)))) + (read-string "Pattern: ") + (when timer (cancel-timer timer) (setq timer nil))) + (when timer ;; Signalled an error or a `quit'. + (cancel-timer timer) + (bookmark-bmenu-list) + (bookmark-bmenu-goto-bookmark bmk))))) (defun bookmark-bmenu-goto-bookmark (name) "Move point to bookmark with name NAME." ------------------------------------------------------------ revno: 110334 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 22:43:53 -0400 message: * src/buffer.c (Fmake_overlay): Fix last change. (fix_start_end_in_overlays): Remove redundant recentering. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-02 00:31:56 +0000 +++ src/ChangeLog 2012-10-02 02:43:53 +0000 @@ -7,6 +7,7 @@ * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. (Fmake_overlay): Remove redundant tests. + (fix_start_end_in_overlays): Remove redundant recentering. 2012-10-02 Juanma Barranquero === modified file 'src/buffer.c' --- src/buffer.c 2012-10-02 00:31:56 +0000 +++ src/buffer.c 2012-10-02 02:43:53 +0000 @@ -3689,7 +3689,6 @@ beforep->next = current_buffer->overlays_before; set_buffer_overlays_before (current_buffer, before_list); } - recenter_overlay_lists (current_buffer, current_buffer->overlay_center); if (afterp) { @@ -3847,13 +3846,13 @@ end = OVERLAY_END (overlay); if (OVERLAY_POSITION (end) < b->overlay_center) { - eassert (b->overlays_after); + eassert (b->overlays_after || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_after; set_buffer_overlays_after (b, XOVERLAY (overlay)); } else { - eassert (b->overlays_before); + eassert (b->overlays_before || (XOVERLAY (overlay)->next == NULL)); XOVERLAY (overlay)->next = b->overlays_before; set_buffer_overlays_before (b, XOVERLAY (overlay)); } ------------------------------------------------------------ revno: 110333 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 20:40:56 -0400 message: * lisp/faces.el (modeline): Remove obsolete face name. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-10-02 00:31:56 +0000 +++ etc/NEWS 2012-10-02 00:40:56 +0000 @@ -686,7 +686,7 @@ **** inactivate-current-input-method-function -> deactivate-current-input-method-function -** Some obsolete functions and variables were removed: +** Some obsolete functions, variables, and faces were removed: *** `facemenu-unlisted-faces' *** `rmail-decode-mime-charset' @@ -705,6 +705,7 @@ *** `vc-ignore-vc-files' (use `vc-handled-backends' instead) *** `vc-master-templates' (use `vc-handled-backends' instead) *** `vc-checkout-carefully' +*** `modeline' * Lisp changes in Emacs 24.3 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 00:37:39 +0000 +++ lisp/ChangeLog 2012-10-02 00:40:56 +0000 @@ -1,5 +1,7 @@ 2012-10-02 Stefan Monnier + * faces.el (modeline): Remove obsolete face name. + * vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar and give a non-nil default value. (add-change-log-entry): Simplify accordingly. === modified file 'lisp/faces.el' --- lisp/faces.el 2012-09-27 07:28:48 +0000 +++ lisp/faces.el 2012-10-02 00:40:56 +0000 @@ -2272,8 +2272,6 @@ :version "21.1" :group 'mode-line-faces :group 'basic-faces) -;; No need to define aliases of this form for new faces. -(define-obsolete-face-alias 'modeline 'mode-line "21.1") (defface mode-line-inactive '((default ------------------------------------------------------------ revno: 110332 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 20:37:39 -0400 message: * lisp/vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar and give a non-nil default value. (add-change-log-entry): Simplify accordingly. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-02 00:24:18 +0000 +++ lisp/ChangeLog 2012-10-02 00:37:39 +0000 @@ -1,3 +1,9 @@ +2012-10-02 Stefan Monnier + + * vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar + and give a non-nil default value. + (add-change-log-entry): Simplify accordingly. + 2012-10-01 Dmitry Gutov * vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function. === modified file 'lisp/vc/add-log.el' --- lisp/vc/add-log.el 2012-08-15 16:29:11 +0000 +++ lisp/vc/add-log.el 2012-10-02 00:37:39 +0000 @@ -136,12 +136,10 @@ :type 'boolean :group 'change-log) -(defcustom add-log-buffer-file-name-function nil +(defvar add-log-buffer-file-name-function 'buffer-file-name "If non-nil, function to call to identify the full filename of a buffer. -This function is called with no argument. If this is nil, the default is to -use `buffer-file-name'." - :type '(choice (const nil) function) - :group 'change-log) +This function is called with no argument. The default is to +use `buffer-file-name'.") (defcustom add-log-file-name-function nil "If non-nil, function to call to identify the filename for a ChangeLog entry. @@ -806,9 +804,7 @@ (let* ((defun (add-log-current-defun)) (version (and change-log-version-info-enabled (change-log-version-number-search))) - (buf-file-name (if add-log-buffer-file-name-function - (funcall add-log-buffer-file-name-function) - buffer-file-name)) + (buf-file-name (funcall add-log-buffer-file-name-function)) (buffer-file (if buf-file-name (expand-file-name buf-file-name))) (file-name (expand-file-name (find-change-log file-name buffer-file))) ;; Set ITEM to the file name to use in the new item. ------------------------------------------------------------ revno: 110331 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 20:31:56 -0400 message: Misc minor simplifications in C code. * src/buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. (Fmake_overlay): Remove redundant tests. * src/coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special case for the special 0 coding-system. * src/frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-10-01 07:03:04 +0000 +++ etc/NEWS 2012-10-02 00:31:56 +0000 @@ -619,6 +619,8 @@ * Incompatible Lisp Changes in Emacs 24.3 +** set-buffer-multibyte now signals an error in narrowed buffers. + +++ ** (random) by default now returns a different random sequence in every Emacs run. Use (random S), where S is a string, to set the === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-02 00:08:54 +0000 +++ src/ChangeLog 2012-10-02 00:31:56 +0000 @@ -1,3 +1,13 @@ +2012-10-02 Stefan Monnier + + * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP. + + * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special + case for the special 0 coding-system. + + * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. + (Fmake_overlay): Remove redundant tests. + 2012-10-02 Juanma Barranquero * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)): === modified file 'src/buffer.c' --- src/buffer.c 2012-10-01 06:36:54 +0000 +++ src/buffer.c 2012-10-02 00:31:56 +0000 @@ -2464,7 +2464,7 @@ begv = BEGV, zv = ZV; if (narrowed) - Fwiden (); + error ("Changing multibyteness in a narrowed buffer"); if (NILP (flag)) { @@ -3847,17 +3847,16 @@ end = OVERLAY_END (overlay); if (OVERLAY_POSITION (end) < b->overlay_center) { - if (b->overlays_after) - XOVERLAY (overlay)->next = b->overlays_after; + eassert (b->overlays_after); + XOVERLAY (overlay)->next = b->overlays_after; set_buffer_overlays_after (b, XOVERLAY (overlay)); } else { - if (b->overlays_before) - XOVERLAY (overlay)->next = b->overlays_before; + eassert (b->overlays_before); + XOVERLAY (overlay)->next = b->overlays_before; set_buffer_overlays_before (b, XOVERLAY (overlay)); } - /* This puts it in the right list, and in the right order. */ recenter_overlay_lists (b, b->overlay_center); @@ -4141,7 +4140,7 @@ /* Put all the overlays we want in a vector in overlay_vec. Store the length in len. */ noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, - 0, 0, 0); + NULL, NULL, 0); /* Make a list of them all. */ result = Flist (noverlays, overlay_vec); === modified file 'src/coding.h' --- src/coding.h 2012-08-27 16:19:34 +0000 +++ src/coding.h 2012-10-02 00:31:56 +0000 @@ -646,10 +646,8 @@ for file names, if any. */ #define ENCODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ : (! NILP (Vdefault_file_name_coding_system) \ - && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ : name)) @@ -658,10 +656,8 @@ for file names, if any. */ #define DECODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ : (! NILP (Vdefault_file_name_coding_system) \ - && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ : name)) @@ -670,7 +666,6 @@ for system functions, if any. */ #define ENCODE_SYSTEM(str) \ (! NILP (Vlocale_coding_system) \ - && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ : str) @@ -678,7 +673,6 @@ for system functions, if any. */ #define DECODE_SYSTEM(str) \ (! NILP (Vlocale_coding_system) \ - && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ : str) === modified file 'src/frame.c' --- src/frame.c 2012-10-01 06:36:54 +0000 +++ src/frame.c 2012-10-02 00:31:56 +0000 @@ -632,7 +632,7 @@ Lisp_Object terminal; terminal = Fassq (Qterminal, parms); - if (!NILP (terminal)) + if (CONSP (terminal)) { terminal = XCDR (terminal); t = get_terminal (terminal, 1); ------------------------------------------------------------ revno: 110330 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2012-10-02 04:24:18 +0400 message: Support git commit --amend/--signoff * lisp/vc/log-edit.el (log-edit-font-lock-keywords): Allow hyphens in header names. (log-edit-toggle-header): New function. (log-edit-extract-headers): Accept function values in HEADERS alist. * lisp/vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function. (vc-git-log-edit-toggle-amend): New function. (vc-git-log-edit-toggle-signoff): New function. (vc-git-log-edit-mode): New major mode. (vc-git-log-edit-mode-map): Keymap for it. (vc-git-checkin): Handle "Amend" and "Sign-Off" headers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-01 18:10:29 +0000 +++ lisp/ChangeLog 2012-10-02 00:24:18 +0000 @@ -1,3 +1,17 @@ +2012-10-01 Dmitry Gutov + + * vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function. + (vc-git-log-edit-toggle-amend): New function. + (vc-git-log-edit-toggle-signoff): New function. + (vc-git-log-edit-mode): New major mode. + (vc-git-log-edit-mode-map): Keymap for it. + (vc-git-checkin): Handle "Amend" and "Sign-Off" headers. + + * vc/log-edit.el (log-edit-font-lock-keywords): Allow hyphens in + header names. + (log-edit-toggle-header): New function. + (log-edit-extract-headers): Accept function values in HEADERS alist. + 2012-10-01 David Engster * emacs-lisp/eieio-opt.el (eieio-describe-class): Add filename === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2012-09-30 03:30:25 +0000 +++ lisp/vc/log-edit.el 2012-10-02 00:24:18 +0000 @@ -341,7 +341,7 @@ (defvar log-edit-font-lock-keywords ;; Copied/inspired by message-font-lock-keywords. `((log-edit-match-to-eoh - (,(concat "^\\(\\([[:alpha:]]+\\):\\)" log-edit-header-contents-regexp) + (,(concat "^\\(\\([[:alpha:]-]+\\):\\)" log-edit-header-contents-regexp) (progn (goto-char (match-beginning 0)) (match-end 0)) nil (1 (if (assoc-string (match-string 2) log-edit-headers-alist t) 'log-edit-header @@ -900,14 +900,44 @@ (insert "\n")) log-edit-author)) +(defun log-edit-toggle-header (header value) + "Toggle a boolean-type header in the current buffer. +If the value of HEADER is VALUE, clear it. Otherwise, add the +header if it's not present and set it to VALUE. Then make sure +there is an empty line after the headers. Return t if toggled +on, otherwise nil." + (let ((val t) + (line (concat header ": " value "\n"))) + (save-excursion + (save-restriction + (rfc822-goto-eoh) + (narrow-to-region (point-min) (point)) + (goto-char (point-min)) + (if (re-search-forward (concat "^" header ":" + log-edit-header-contents-regexp) + nil t) + (if (setq val (not (string= (match-string 1) value))) + (replace-match line t t) + (replace-match "" t t nil 1)) + (insert line))) + (rfc822-goto-eoh) + (delete-horizontal-space) + (unless (looking-at "\n") + (insert "\n"))) + val)) + (defun log-edit-extract-headers (headers comment) "Extract headers from COMMENT to form command line arguments. -HEADERS should be an alist with elements of the form (HEADER . CMDARG) -associating header names to the corresponding cmdline option name and the -result is then a list of the form (MSG CMDARG1 HDRTEXT1 CMDARG2 HDRTEXT2...). -where MSG is the remaining text from STRING. -If \"Summary\" is not in HEADERS, then the \"Summary\" header is extracted -anyway and put back as the first line of MSG." +HEADERS should be an alist with elements (HEADER . CMDARG) +or (HEADER . FUNCTION) associating headers to command line +options and the result is then a list of the form (MSG ARGUMENTS...) +where MSG is the remaining text from COMMENT. +FUNCTION should be a function of one argument that takes the +header value and returns the list of strings to be appended to +ARGUMENTS. CMDARG will be added to ARGUMENTS followed by the +header value. If \"Summary\" is not in HEADERS, then the +\"Summary\" header is extracted anyway and put back as the first +line of MSG." (with-temp-buffer (insert comment) (rfc822-goto-eoh) @@ -923,8 +953,10 @@ nil t) (if (eq t (cdr header)) (setq summary (match-string 1)) - (push (match-string 1) res) - (push (or (cdr header) (car header)) res)) + (if (functionp (cdr header)) + (setq res (nconc res (funcall (cdr header) (match-string 1)))) + (push (match-string 1) res) + (push (or (cdr header) (car header)) res))) (replace-match "" t t))) ;; Remove header separator if the header is empty. (widen) === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2012-09-17 05:41:04 +0000 +++ lisp/vc/vc-git.el 2012-10-02 00:24:18 +0000 @@ -608,16 +608,52 @@ (defun vc-git-unregister (file) (vc-git-command nil 0 file "rm" "-f" "--cached" "--")) +(declare-function log-edit-mode "log-edit" ()) +(declare-function log-edit-toggle-header "log-edit" (header value)) (declare-function log-edit-extract-headers "log-edit" (headers string)) +(defun vc-git-log-edit-toggle-signoff () + "Toggle whether to add the \"Signed-off-by\" line at the end of +the commit message." + (interactive) + (log-edit-toggle-header "Sign-Off" "yes")) + +(defun vc-git-log-edit-toggle-amend () + "Toggle whether this will amend the previous commit. +If toggling on, also insert its message into the buffer." + (interactive) + (when (log-edit-toggle-header "Amend" "yes") + (goto-char (point-max)) + (unless (bolp) (insert "\n")) + (insert (with-output-to-string + (vc-git-command + standard-output 1 nil + "log" "--max-count=1" "--pretty=format:%B" "HEAD"))))) + +(defvar vc-git-log-edit-mode-map + (let ((map (make-sparse-keymap "Git-Log-Edit"))) + (define-key map "\C-c\C-s" 'vc-git-log-edit-toggle-signoff) + (define-key map "\C-c\C-e" 'vc-git-log-edit-toggle-amend) + map)) + +(define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git" + "Major mode for editing Git log messages. +It is based on `log-edit-mode', and has Git-specific extensions.") + (defun vc-git-checkin (files _rev comment) (let ((coding-system-for-write vc-git-commits-coding-system)) - (apply 'vc-git-command nil 0 files - (nconc (list "commit" "-m") - (log-edit-extract-headers '(("Author" . "--author") - ("Date" . "--date")) - comment) - (list "--only" "--"))))) + (cl-flet ((boolean-arg-fn + (argument) + (lambda (value) (when (equal value "yes") (list argument))))) + (apply 'vc-git-command nil 0 files + (nconc (list "commit" "-m") + (log-edit-extract-headers + `(("Author" . "--author") + ("Date" . "--date") + ("Amend" . ,(boolean-arg-fn "--amend")) + ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) + comment) + (list "--only" "--")))))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects ------------------------------------------------------------ revno: 110329 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2012-10-02 02:08:54 +0200 message: src/makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)): Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-01 22:12:44 +0000 +++ src/ChangeLog 2012-10-02 00:08:54 +0000 @@ -1,3 +1,8 @@ +2012-10-02 Juanma Barranquero + + * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)): + Update dependencies. + 2012-10-01 Paul Eggert Fix a malloc race condition involving strsignal. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-09-30 21:36:42 +0000 +++ src/makefile.w32-in 2012-10-02 00:08:54 +0000 @@ -485,6 +485,7 @@ $(SRC)/blockinput.h \ $(SRC)/puresize.h \ $(SRC)/w32.h \ + $(SRC)/w32heap.h \ $(NT_INC)/unistd.h \ $(GNU_LIB)/verify.h \ $(BUFFER_H) \ @@ -955,6 +956,7 @@ $(BLD)/gmalloc.$(O) : \ $(SRC)/gmalloc.c \ + $(SRC)/w32heap.h \ $(NT_INC)/stdint.h \ $(NT_INC)/unistd.h \ $(CONFIG_H) ------------------------------------------------------------ revno: 110328 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-10-01 15:12:44 -0700 message: Fix a malloc race condition involving strsignal. A signal can arrive in the middle of a malloc, and Emacs's signal handler can invoke strsignal, which can invoke malloc, which is not portable. This race condition bug makes Emacs hang on GNU/Linux. Fix it by altering the signal handler so that it does not invoke strsignal. * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal. * process.c (status_message): Use const pointer, in case strsignal is #defined to safe_strsignal. * sysdep.c (sys_siglist, init_signals): Always define and initialize a substitute sys_siglist if the system does not define one, even if HAVE_STRSIGNAL. (safe_strsignal): Rename from strsignal. Always define, using sys_siglist. Return a const pointer. * syssignal.h (safe_strsignal): New decl. (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-01 21:09:30 +0000 +++ src/ChangeLog 2012-10-01 22:12:44 +0000 @@ -1,3 +1,22 @@ +2012-10-01 Paul Eggert + + Fix a malloc race condition involving strsignal. + A signal can arrive in the middle of a malloc, and Emacs's signal + handler can invoke strsignal, which can invoke malloc, which is + not portable. This race condition bug makes Emacs hang on GNU/Linux. + Fix it by altering the signal handler so that it does not invoke + strsignal. + * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal. + * process.c (status_message): Use const pointer, in case strsignal + is #defined to safe_strsignal. + * sysdep.c (sys_siglist, init_signals): Always define and + initialize a substitute sys_siglist if the system does not define + one, even if HAVE_STRSIGNAL. + (safe_strsignal): Rename from strsignal. Always define, + using sys_siglist. Return a const pointer. + * syssignal.h (safe_strsignal): New decl. + (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal. + 2012-10-01 Eli Zaretskii * w32proc.c (timer_loop): Fix code that waits for timer === modified file 'src/emacs.c' --- src/emacs.c 2012-10-01 14:25:40 +0000 +++ src/emacs.c 2012-10-01 22:12:44 +0000 @@ -1886,7 +1886,7 @@ static char const format[] = "Fatal error %d: "; char buf[sizeof format - 2 + INT_STRLEN_BOUND (int)]; int buflen = sprintf (buf, format, sig); - char const *sig_desc = strsignal (sig); + char const *sig_desc = safe_strsignal (sig); ignore_value (write (STDERR_FILENO, buf, buflen)); ignore_value (write (STDERR_FILENO, sig_desc, strlen (sig_desc))); } === modified file 'src/process.c' --- src/process.c 2012-10-01 06:36:54 +0000 +++ src/process.c 2012-10-01 22:12:44 +0000 @@ -570,7 +570,7 @@ if (EQ (symbol, Qsignal) || EQ (symbol, Qstop)) { - char *signame; + char const *signame; synchronize_system_messages_locale (); signame = strsignal (code); if (signame == 0) === modified file 'src/sysdep.c' --- src/sysdep.c 2012-10-01 02:07:14 +0000 +++ src/sysdep.c 2012-10-01 22:12:44 +0000 @@ -1543,12 +1543,10 @@ errno = old_errno; } -#if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST -static char *my_sys_siglist[NSIG]; -# ifdef sys_siglist -# undef sys_siglist -# endif +#if !HAVE_DECL_SYS_SIGLIST +# undef sys_siglist # define sys_siglist my_sys_siglist +static char const *sys_siglist[NSIG]; #endif /* Handle bus errors, invalid instruction, etc. */ @@ -1611,7 +1609,7 @@ main_thread = pthread_self (); #endif -#if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST +#if !HAVE_DECL_SYS_SIGLIST if (! initialized) { sys_siglist[SIGABRT] = "Aborted"; @@ -1759,7 +1757,7 @@ sys_siglist[SIGXFSZ] = "File size limit exceeded"; # endif } -#endif /* !defined HAVE_STRSIGNAL && !defined HAVE_DECL_SYS_SIGLIST */ +#endif /* !HAVE_DECL_SYS_SIGLIST */ /* Don't alter signal handlers if dumping. On some machines, changing signal handlers sets static data that would make signals @@ -2280,21 +2278,20 @@ return fdutimens (fd, filename, timespec); } -#ifndef HAVE_STRSIGNAL -char * -strsignal (int code) +/* Like strsignal, except async-signal-safe, and this function typically + returns a string in the C locale rather than the current locale. */ +char const * +safe_strsignal (int code) { - char *signame = 0; + char const *signame = 0; if (0 <= code && code < NSIG) - { - /* Cast to suppress warning if the table has const char *. */ - signame = (char *) sys_siglist[code]; - } + signame = sys_siglist[code]; + if (! signame) + signame = "Unknown signal"; return signame; } -#endif /* HAVE_STRSIGNAL */ #ifndef DOS_NT /* For make-serial-process */ === modified file 'src/syssignal.h' --- src/syssignal.h 2012-09-30 08:15:11 +0000 +++ src/syssignal.h 2012-10-01 22:12:44 +0000 @@ -39,6 +39,7 @@ typedef void (*signal_handler_t) (int); extern void emacs_sigaction_init (struct sigaction *, signal_handler_t); +char const *safe_strsignal (int); #if NSIG < NSIG_MINIMUM # undef NSIG @@ -70,8 +71,7 @@ #endif /* ! defined (SIGCLD) */ #ifndef HAVE_STRSIGNAL -/* strsignal is in sysdep.c */ -char *strsignal (int); +# define strsignal(sig) safe_strsignal (sig) #endif void deliver_process_signal (int, signal_handler_t); ------------------------------------------------------------ revno: 110327 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2012-10-01 23:09:30 +0200 message: Fix high CPU usage in profiling on MS-Windows. src/w32proc.c (timer_loop): Fix code that waits for timer expiration, to avoid high CPU usage. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-01 18:59:52 +0000 +++ src/ChangeLog 2012-10-01 21:09:30 +0000 @@ -1,3 +1,8 @@ +2012-10-01 Eli Zaretskii + + * w32proc.c (timer_loop): Fix code that waits for timer + expiration, to avoid high CPU usage. + 2012-10-01 Stefan Monnier * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table) === modified file 'src/w32proc.c' --- src/w32proc.c 2012-10-01 09:59:53 +0000 +++ src/w32proc.c 2012-10-01 21:09:30 +0000 @@ -333,11 +333,11 @@ Sleep (sleep_time * 1000 / CLOCKS_PER_SEC); /* Always sleep past the expiration time, to make sure we never call the handler _before_ the expiration time, - always slightly after it. Sleep(0) relinquishes the rest - of the scheduled slot, so that we let other threads - work. */ + always slightly after it. Sleep(5) makes sure we don't + hog the CPU by calling 'clock' with high frequency, and + also let other threads work. */ while (clock () < expire) - Sleep (0); + Sleep (5); } if (itimer->expire == 0) ------------------------------------------------------------ revno: 110326 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-10-01 14:59:52 -0400 message: * src/fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table) (sweep_weak_table): Remove redundant prototypes. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-01 14:25:40 +0000 +++ src/ChangeLog 2012-10-01 18:59:52 +0000 @@ -1,3 +1,8 @@ +2012-10-01 Stefan Monnier + + * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table) + (sweep_weak_table): Remove redundant prototypes. + 2012-10-01 Fabrice Popineau * emacs.c: Move the inclusion of TERM_HEADER after including === modified file 'src/fns.c' --- src/fns.c 2012-10-01 06:36:54 +0000 +++ src/fns.c 2012-10-01 18:59:52 +0000 @@ -3337,14 +3337,6 @@ Lisp_Object QCtest, QCsize, QCrehash_size, QCrehash_threshold, QCweakness; static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; -/* Function prototypes. */ - -static struct Lisp_Hash_Table *check_hash_table (Lisp_Object); -static ptrdiff_t get_key_arg (Lisp_Object, ptrdiff_t, Lisp_Object *, char *); -static void maybe_resize_hash_table (struct Lisp_Hash_Table *); -static bool sweep_weak_table (struct Lisp_Hash_Table *, bool); - - /*********************************************************************** Utilities ------------------------------------------------------------ revno: 110325 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-10-02 02:10:29 +0800 message: Update CEDET from upstream. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-09-27 06:45:38 +0000 +++ admin/ChangeLog 2012-10-01 18:10:29 +0000 @@ -1,3 +1,18 @@ +2012-10-01 David Engster + + * grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote): + Remove. + (bovine-grammar-expand-form): Test for emacs-major-version. + + * grammars/c.by: Add EXPLICIT to keyword tokens. + + * grammars/f90.by: Add %provide token. + + * grammar/grammar.wy (semantic-grammar-lexer): Remove, since it + was copied to grammar.el. New %provide token to generate prefix + which conforms with Emacs conventions. Remove lexer definition, + which is now in grammar.el. + 2012-09-27 Glenn Morris * admin.el (set-version): Set msdos.c's Vwindow_system_version. === modified file 'admin/grammars/bovine-grammar.el' --- admin/grammars/bovine-grammar.el 2012-01-05 09:46:05 +0000 +++ admin/grammars/bovine-grammar.el 2012-10-01 18:10:29 +0000 @@ -109,14 +109,6 @@ ;; Cache of macro definitions currently in use. (defvar bovine--grammar-macros nil) -;; Detect if we have an Emacs with newstyle unquotes allowed outside -;; of backquote. -;; This should probably be changed to a test to (= emacs-major-version 24) -;; when it is released, but at the moment it might be possible that people -;; are using an older snapshot. -(defvar bovine--grammar-newstyle-unquote - (equal '(\, test) (read ",test"))) - (defun bovine-grammar-expand-form (form quotemode &optional inplace) "Expand FORM into a new one suitable to the bovine parser. FORM is a list in which we are substituting. @@ -152,7 +144,7 @@ form (cdr form)) ;; Hack for dealing with new reading of unquotes outside of ;; backquote (introduced in rev. 102591 in emacs-bzr). - (when (and bovine--grammar-newstyle-unquote + (when (and (>= emacs-major-version 24) (listp first) (or (equal (car first) '\,) (equal (car first) '\,@))) @@ -456,6 +448,7 @@ (defun bovine-make-parsers () "Generate Emacs' built-in Bovine-based parser files." + (interactive) (semantic-mode 1) ;; Loop through each .by file in current directory, and run ;; `semantic-grammar-batch-build-one-package' to build the grammar. @@ -465,13 +458,14 @@ (with-current-buffer (find-file-noselect f) (semantic-grammar-create-package)) (error (message "%s" (error-message-string err)) nil))) - lang) + lang filename) (when (and packagename - (string-match "^semantic-\\(.*\\)-by\\.el\\'" packagename)) + (string-match "^.*/\\(.*\\)-by\\.el\\'" packagename)) (setq lang (match-string 1 packagename)) + (setq filename (concat lang "-by.el")) (with-temp-buffer - (insert-file-contents packagename) - (setq buffer-file-name (expand-file-name packagename)) + (insert-file-contents filename) + (setq buffer-file-name (expand-file-name filename)) ;; Fix copyright header: (goto-char (point-min)) (re-search-forward "^;; Author:") @@ -500,20 +494,14 @@ lang ".by. ;;; Code: - -\(require 'semantic/lex) -\(eval-when-compile (require 'semantic/bovine))\n") +") (goto-char (point-min)) (delete-region (point-min) (line-end-position)) - (insert ";;; semantic/bovine/" lang - "-by.el --- Generated parser support file") + (insert ";;; " packagename + " --- Generated parser support file") (delete-trailing-whitespace) - ;; Fix footer: - (goto-char (point-max)) - (re-search-backward ".\n;;; Analyzers") - (delete-region (point) (point-max)) - (insert "(provide 'semantic/bovine/" lang "-by)\n\n") - (insert ";;; semantic/bovine/" lang "-by.el ends here\n") + (re-search-forward ";;; \\(.*\\) ends here") + (replace-match packagename nil nil nil 1) (save-buffer)))))) ;;; bovine-grammar.el ends here === modified file 'admin/grammars/c.by' --- admin/grammars/c.by 2012-01-05 09:46:05 +0000 +++ admin/grammars/c.by 2012-10-01 18:10:29 +0000 @@ -1,5 +1,4 @@ ;;; c.by -- LL grammar for C/C++ language specification - ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; ;; Author: Eric M. Ludlam @@ -39,6 +38,13 @@ ;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus" %package semantic-c-by +%provide semantic/bovine/c-by + +%{ +(declare-function semantic-c-reconstitute-token "semantic/bovine/c") +(declare-function semantic-c-reconstitute-template "semantic/bovine/c") +(declare-function semantic-expand-c-tag "semantic/bovine/c") +} %languagemode c-mode c++-mode %start declaration @@ -98,6 +104,8 @@ %put VIRTUAL summary "Method Modifier: virtual (...) ..." %token MUTABLE "mutable" %put MUTABLE summary "Member Declaration Modifier: mutable ..." +%token EXPLICIT "explicit" +%put EXPLICIT summary "Forbids implicit type conversion: explicit " %token STRUCT "struct" %put STRUCT summary "Structure Type Declaration: struct [name] { ... };" @@ -370,6 +378,9 @@ ;; PUBLIC or PRIVATE bits. Ignore them for now. | template | using + ;; Includes inside namespaces + | spp-include + (TAG $1 'include :inside-ns t) | ;;EMPTY ; @@ -1098,6 +1109,8 @@ function-pointer : LPAREN STAR symbol RPAREN ( (concat "*" $3) ) + | LPAREN symbol RPAREN + ( $2 ) ; fun-or-proto-end === modified file 'admin/grammars/grammar.wy' --- admin/grammars/grammar.wy 2012-01-05 09:46:05 +0000 +++ admin/grammars/grammar.wy 2012-10-01 18:10:29 +0000 @@ -23,6 +23,9 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . +%package semantic-grammar-wy +%provide semantic/grammar-wy + %{ (defvar semantic-grammar-lex-c-char-re) @@ -32,8 +35,6 @@ (defvar semantic-grammar-wy--rindx nil) } -%package semantic-grammar-wy - %languagemode wy-mode ;; Main @@ -52,6 +53,7 @@ %keyword LEFT "%left" %keyword NONASSOC "%nonassoc" %keyword PACKAGE "%package" +%keyword PROVIDE "%provide" %keyword PREC "%prec" %keyword PUT "%put" %keyword QUOTEMODE "%quotemode" @@ -134,6 +136,7 @@ | no_default_prec_decl | languagemode_decl | package_decl + | provide_decl | precedence_decl | put_decl | quotemode_decl @@ -165,6 +168,11 @@ `(PACKAGE-TAG ',$2 nil) ; +provide_decl: + PROVIDE SYMBOL + `(TAG ',$2 'provide) + ; + precedence_decl: associativity token_type_opt items `(TAG ',$1 'assoc :type ',$2 :value ',$3) === modified file 'admin/grammars/java-tags.wy' --- admin/grammars/java-tags.wy 2012-01-05 09:46:05 +0000 +++ admin/grammars/java-tags.wy 2012-10-01 18:10:29 +0000 @@ -23,6 +23,7 @@ ;; along with GNU Emacs. If not, see . %package wisent-java-tags-wy +%provide semantic/wisent/javat-wy %languagemode java-mode @@ -444,7 +445,7 @@ ;;; Type Declaration token ;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING") interface_declaration - : modifiers_opt INTERFACE IDENTIFIER extends_interfaces_opt interface_body + : modifiers_opt INTERFACE qualified_name extends_interfaces_opt interface_body (TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1) ; @@ -547,7 +548,7 @@ ;;; Variable token ;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING") formal_parameter - : formal_parameter_modifier_opt type variable_declarator_id + : formal_parameter_modifier_opt type opt_variable_declarator_id (VARIABLE-TAG $3 $2 nil :typemodifiers $1) ; @@ -582,6 +583,13 @@ (cons $1 $region) ; +opt_variable_declarator_id + : ;; EMPTY + (identity "") + | variable_declarator_id + (identity $1) + ; + variable_declarator_id : IDENTIFIER dims_opt (concat $1 $2) === modified file 'admin/grammars/js.wy' --- admin/grammars/js.wy 2012-01-05 09:46:05 +0000 +++ admin/grammars/js.wy 2012-10-01 18:10:29 +0000 @@ -58,6 +58,7 @@ ;; DAMAGE. %package wisent-javascript-jv-wy +%provide semantic/wisent/js-wy ;; JAVE I prefere ecmascript-mode %languagemode ecmascript-mode javascript-mode === modified file 'admin/grammars/make.by' --- admin/grammars/make.by 2012-01-05 09:46:05 +0000 +++ admin/grammars/make.by 2012-10-01 18:10:29 +0000 @@ -22,6 +22,7 @@ ;; along with GNU Emacs. If not, see . %package semantic-make-by +%provide semantic/bovine/make-by %languagemode makefile-mode %start Makefile === modified file 'admin/grammars/python.wy' --- admin/grammars/python.wy 2012-01-19 07:21:25 +0000 +++ admin/grammars/python.wy 2012-10-01 18:10:29 +0000 @@ -88,6 +88,12 @@ ;; -------- %package wisent-python-wy +%provide semantic/wisent/python-wy + +%{ +(declare-function wisent-python-reconstitute-function-tag "semantic/wisent/python") +(declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python") +} %languagemode python-mode @@ -173,6 +179,7 @@ %token COMMA "," %token ASSIGN "=" %token BACKQUOTE "`" +%token AT "@" ;; ----------------- @@ -307,6 +314,10 @@ %put WHILE summary "Start a 'while' loop" +%keyword WITH "with" +%put WITH summary +"Start statement with an associated context object" + %keyword YIELD "yield" %put YIELD summary "Create a generator function" @@ -545,8 +556,10 @@ ;; dotted_as_name (',' dotted_as_name)* dotted_as_name_list - : dotted_as_name - | dotted_as_name_list COMMA dotted_as_name + : dotted_as_name_list COMMA dotted_as_name + (cons $3 $1) + | dotted_as_name + (list $1) ; ;; ('*' | import_as_name (',' import_as_name)*) @@ -649,6 +662,7 @@ | while_stmt | for_stmt | try_stmt + | with_stmt | funcdef | class_declaration ; @@ -756,13 +770,46 @@ ; ;;;============================================================================ +;;@@ with_stmt +;;;============================================================================ + +;; with_stmt: 'with' test [ with_var ] ':' suite +with_stmt + : WITH test COLON suite + (CODE-TAG $1 nil) + | WITH test with_var COLON suite + (CODE-TAG $1 nil) ;; TODO capture variable + ; + +with_var + : AS expr + () ;; TODO capture + ; + +;;;============================================================================ ;;;@@ funcdef ;;;============================================================================ -;; funcdef: 'def' NAME parameters ':' suite +decorator + : AT dotted_name varargslist_opt NEWLINE + (FUNCTION-TAG $2 "decorator" $3) + ; + +decorators + : decorator + (list $1) + | decorator decorators + (cons $1 $2) + ; + +;; funcdef: [decorators] 'def' NAME parameters ':' suite funcdef : DEF NAME function_parameter_list COLON suite - (FUNCTION-TAG $2 nil $3) + (wisent-python-reconstitute-function-tag + (FUNCTION-TAG $2 nil $3) $5) + | decorators DEF NAME function_parameter_list COLON suite + (wisent-python-reconstitute-function-tag + (FUNCTION-TAG $3 nil $4 :decorators $1) $6) ; function_parameter_list @@ -798,10 +845,11 @@ ;; classdef: 'class' NAME ['(' testlist ')'] ':' suite class_declaration : CLASS NAME paren_class_list_opt COLON suite - (TYPE-TAG $2 $1 ;; Name "class" - $5 ;; Members - (cons $3 nil) ;; (SUPERCLASSES . INTERFACES) - ) + (wisent-python-reconstitute-class-tag + (TYPE-TAG $2 $1 ;; Name "class" + $5 ;; Members + (cons $3 nil) ;; (SUPERCLASSES . INTERFACES) + )) ; ;; ['(' testlist ')'] === modified file 'admin/grammars/scheme.by' --- admin/grammars/scheme.by 2012-01-05 09:46:05 +0000 +++ admin/grammars/scheme.by 2012-10-01 18:10:29 +0000 @@ -18,6 +18,7 @@ ;; along with GNU Emacs. If not, see . %package semantic-scm-by +%provide semantic/bovine/scm-by %languagemode scheme-mode %start scheme === modified file 'admin/grammars/srecode-template.wy' --- admin/grammars/srecode-template.wy 2012-01-05 09:46:05 +0000 +++ admin/grammars/srecode-template.wy 2012-10-01 18:10:29 +0000 @@ -28,6 +28,9 @@ ;; Semantic Recoder templates are based on Google Templates ;; and are at the bottom of the Semantic Recoder API. +%package srecode-template-wy +%provide srecode/srt-wy + %languagemode srecode-mode %start template_file @@ -46,6 +49,15 @@ %put TEMPLATE summary "template \\n