Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 104133. ------------------------------------------------------------ revno: 104133 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-05-05 21:28:53 -0700 message: Add diary comments feature. * lisp/calendar/diary-lib.el (diary-comment-start, diary-comment-end): New options. (diary-add-to-list): Strip comments from the displayed string. (diary-mode): Set comment-start and comment-end. * doc/emacs/cal-xtra.texi (Fancy Diary Display): Mention diary comments. * etc/NEWS: Mention this. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-05-02 02:06:53 +0000 +++ doc/emacs/ChangeLog 2011-05-06 04:28:53 +0000 @@ -1,3 +1,7 @@ +2011-05-06 Glenn Morris + + * cal-xtra.texi (Fancy Diary Display): Mention diary comments. + 2011-05-02 Lars Magne Ingebrigtsen * misc.texi (Emacs Server): Document `server-eval-at'. === modified file 'doc/emacs/cal-xtra.texi' --- doc/emacs/cal-xtra.texi 2011-01-26 08:36:39 +0000 +++ doc/emacs/cal-xtra.texi 2011-05-06 04:28:53 +0000 @@ -616,6 +616,20 @@ of the hook list, in case earlier members of the list change the order of the diary entries, or add items. +@vindex diary-comment-start + You can write @samp{comments} in diary entries, by setting the +variables @code{diary-comment-start} and @code{diary-comment-end} to +strings that delimit comments. The fancy display does not print +comments. You might want to put meta-data for the use of other packages +(e.g. the appointment package, +@iftex +@pxref{Appointments,,,emacs, the Emacs Manual}) +@end iftex +@ifnottex +@pxref{Appointments}) +@end ifnottex +inside comments. + @vindex diary-include-string Your main diary file can include other files. This permits a group of people to share a diary file for events that apply to all of them. === modified file 'etc/NEWS' --- etc/NEWS 2011-05-03 03:34:26 +0000 +++ etc/NEWS 2011-05-06 04:28:53 +0000 @@ -447,6 +447,10 @@ ** Calendar, Diary, and Appt ++++ +*** Diary entries can contain non-printing `comments'. +See the variable `diary-comment-start'. + *** New function `diary-hebrew-birthday'. --- === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-06 04:07:47 +0000 +++ lisp/ChangeLog 2011-05-06 04:28:53 +0000 @@ -1,5 +1,10 @@ 2011-05-06 Glenn Morris + * calendar/diary-lib.el (diary-comment-start, diary-comment-end): + New options. + (diary-add-to-list): Strip comments from the displayed string. + (diary-mode): Set comment-start and comment-end. + * vc/diff-mode.el (smerge-refine-subst): Declare. (diff-refine-hunk): Don't require smerge-mode when compiling. === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2011-05-04 02:06:28 +0000 +++ lisp/calendar/diary-lib.el 2011-05-06 04:28:53 +0000 @@ -142,6 +142,25 @@ :type 'string :group 'diary) +(defcustom diary-comment-start nil + "String marking the start of a comment in the diary, or nil. +Nil means there are no comments. The diary does not display +parts of entries that are inside comments. You can use comments +for whatever you like, e.g. for meta-data that packages such as +`appt.el' can use. +See also `diary-comment-end'." + :version "24.1" + :type '(choice (const :tag "No comment" nil) string) + :group 'diary) + +(defcustom diary-comment-end "" + "String marking the end of a comment in the diary. +The empty string means comments finish at the end of a line. +See also `diary-comment-start'." + :version "24.1" + :type 'string + :group 'diary) + (defcustom diary-hook nil "List of functions called after the display of the diary. Used for example by the appointment package - see `appt-activate'." @@ -610,10 +629,15 @@ The entry is added to the list as (DATE STRING SPECIFIER LOCATOR GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL), -FILENAME being the file containing the diary entry." +FILENAME being the file containing the diary entry. + +Modifies STRING using `diary-modify-entry-list-string-function', if non-nil. +Also removes the region between `diary-comment-start' and +`diary-comment-end', if the former is non-nil." (when (and date string) ;; b-f-n is nil if we are visiting an include file in a temp-buffer. - (let ((dfile (or (buffer-file-name) diary-file))) + (let ((dfile (or (buffer-file-name) diary-file)) + cstart) (if diary-file-name-prefix (let ((prefix (funcall diary-file-name-prefix-function dfile))) (or (string-equal prefix "") @@ -621,6 +645,16 @@ (and diary-modify-entry-list-string-function (setq string (funcall diary-modify-entry-list-string-function string))) + (when (and diary-comment-start + (string-match (setq cstart (regexp-quote diary-comment-start)) + string)) + ;; Preserve the value with the comments. + (or literal (setq literal string)) + (setq string (replace-regexp-in-string + (format "%s.*%s" cstart + (if (zerop (length diary-comment-end)) "$" + (regexp-quote diary-comment-end))) + "" string))) (setq diary-entries-list (append diary-entries-list (list (list date string specifier @@ -2353,6 +2387,8 @@ "Major mode for editing the diary file." (set (make-local-variable 'font-lock-defaults) '(diary-font-lock-keywords t)) + (set (make-local-variable 'comment-start) diary-comment-start) + (set (make-local-variable 'comment-end) diary-comment-end) (add-to-invisibility-spec '(diary . nil)) (add-hook 'after-save-hook 'diary-redraw-calendar nil t) ;; In case the file was modified externally, refresh the calendar ------------------------------------------------------------ revno: 104132 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-05-05 21:07:47 -0700 message: Silence diff-mode.el compilation. * lisp/vc/diff-mode.el (smerge-refine-subst): Declare. (diff-refine-hunk): Don't require smerge-mode when compiling. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-06 01:02:49 +0000 +++ lisp/ChangeLog 2011-05-06 04:07:47 +0000 @@ -1,3 +1,8 @@ +2011-05-06 Glenn Morris + + * vc/diff-mode.el (smerge-refine-subst): Declare. + (diff-refine-hunk): Don't require smerge-mode when compiling. + 2011-05-06 Juanma Barranquero * simple.el (list-processes): Return nil as the docstring says. === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2011-03-21 16:42:16 +0000 +++ lisp/vc/diff-mode.el 2011-05-06 04:07:47 +0000 @@ -1825,10 +1825,13 @@ (replace-match (cdr (assq (char-before) '((?+ . "-") (?> . "<")))))) ) +(declare-function smerge-refine-subst "smerge-mode" + (beg1 end1 beg2 end2 props &optional preproc)) + (defun diff-refine-hunk () "Highlight changes of hunk at point at a finer granularity." (interactive) - (eval-and-compile (require 'smerge-mode)) + (require 'smerge-mode) (save-excursion (diff-beginning-of-hunk 'try-harder) (let* ((start (point)) ------------------------------------------------------------ revno: 104131 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-05-06 03:05:25 +0200 message: src/gnutls.c, src/image.c: Make function pointers static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-05 16:56:39 +0000 +++ src/ChangeLog 2011-05-06 01:05:25 +0000 @@ -1,3 +1,8 @@ +2011-05-06 Juanma Barranquero + + * gnutls.c (DEF_GNUTLS_FN): + * image.c (DEF_IMGLIB_FN): Make function pointers static. + 2011-05-05 Andreas Schwab * lread.c (lisp_file_lexically_bound_p): Stop scanning at end === modified file 'src/gnutls.c' --- src/gnutls.c 2011-05-05 02:18:36 +0000 +++ src/gnutls.c 2011-05-06 01:05:25 +0000 @@ -64,7 +64,7 @@ #ifdef WINDOWSNT /* Macro for defining functions that will be loaded from the GnuTLS DLL. */ -#define DEF_GNUTLS_FN(rettype,func,args) rettype (FAR CDECL *fn_##func)args +#define DEF_GNUTLS_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args /* Macro for loading GnuTLS functions from the library. */ #define LOAD_GNUTLS_FN(lib,func) { \ === modified file 'src/image.c' --- src/image.c 2011-05-04 20:03:07 +0000 +++ src/image.c 2011-05-06 01:05:25 +0000 @@ -1892,7 +1892,7 @@ #ifdef HAVE_NTGUI /* Macro for defining functions that will be loaded from image DLLs. */ -#define DEF_IMGLIB_FN(rettype,func,args) rettype (FAR CDECL *fn_##func)args +#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args /* Macro for loading those image functions from the library. */ #define LOAD_IMGLIB_FN(lib,func) { \ ------------------------------------------------------------ revno: 104130 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2011-05-06 03:02:49 +0200 message: lisp/simple.el (list-processes): Return nil as the docstring says. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-05 10:22:14 +0000 +++ lisp/ChangeLog 2011-05-06 01:02:49 +0000 @@ -1,3 +1,7 @@ +2011-05-06 Juanma Barranquero + + * simple.el (list-processes): Return nil as the docstring says. + 2011-05-05 Michael Albinus * net/ange-ftp.el (ange-ftp-binary-file-name-regexp): Set default === modified file 'lisp/simple.el' --- lisp/simple.el 2011-05-05 06:50:24 +0000 +++ lisp/simple.el 2011-05-06 01:02:49 +0000 @@ -2792,7 +2792,8 @@ (setq process-menu-query-only query-only) (list-processes--refresh) (tabulated-list-print)) - (display-buffer buffer)) + (display-buffer buffer) + nil) (defvar universal-argument-map (let ((map (make-sparse-keymap))) ------------------------------------------------------------ revno: 104129 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-05-05 22:12:41 +0000 message: shr.el (shr-urlify, shr-link): Still broken but at least doesn't error out because the face is not a list. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-05 06:56:54 +0000 +++ lisp/gnus/ChangeLog 2011-05-05 22:12:41 +0000 @@ -1,3 +1,8 @@ +2011-05-05 Teodor Zlatanov + + * shr.el (shr-urlify, shr-link): Still broken but at least doesn't + error out because the face is not a list. + 2011-05-05 Glenn Morris * gnus-start.el (gnus-propagate-marks): Declare. === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-05-03 22:41:28 +0000 +++ lisp/gnus/shr.el 2011-05-05 22:12:41 +0000 @@ -94,7 +94,7 @@ (defface shr-link '((t (:underline t) (:foreground "yellow") (:background "black"))) - "Font for elements." + "Font for link elements." :group 'shr) ;;; Internal variables. @@ -597,7 +597,7 @@ :help-echo (if title (format "%s (%s)" url title) url) :keymap shr-map url) - (put-text-property start (point) 'face 'shr-link) + (put-text-property start (point) 'face '(shr-link)) (put-text-property start (point) 'shr-url url)) (defun shr-encode-url (url) ------------------------------------------------------------ revno: 104128 committer: Andreas Schwab branch nick: emacs timestamp: Thu 2011-05-05 18:56:39 +0200 message: * src/lread.c (lisp_file_lexically_bound_p): Stop scanning at end marker. (Bug#8610) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-05-05 04:00:38 +0000 +++ src/ChangeLog 2011-05-05 16:56:39 +0000 @@ -1,3 +1,8 @@ +2011-05-05 Andreas Schwab + + * lread.c (lisp_file_lexically_bound_p): Stop scanning at end + marker. (Bug#8610) + 2011-05-05 Eli Zaretskii * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: === modified file 'src/lread.c' --- src/lread.c 2011-04-25 21:34:39 +0000 +++ src/lread.c 2011-05-05 16:56:39 +0000 @@ -830,7 +830,7 @@ ch = READCHAR; i = 0; - while (ch != ':' && ch != '\n' && ch != EOF) + while (ch != ':' && ch != '\n' && ch != EOF && in_file_vars) { if (i < sizeof var - 1) var[i++] = ch; @@ -838,6 +838,10 @@ ch = READCHAR; } + /* Stop scanning if no colon was found before end marker. */ + if (!in_file_vars) + break; + while (i > 0 && (var[i - 1] == ' ' || var[i - 1] == '\t')) i--; var[i] = '\0'; ------------------------------------------------------------ revno: 104127 committer: Michael Albinus branch nick: trunk timestamp: Thu 2011-05-05 12:22:14 +0200 message: * net/ange-ftp.el (ange-ftp-binary-file-name-regexp): Set default to "". (ange-ftp-write-region, ange-ftp-insert-file-contents) (ange-ftp-copy-file-internal): Use only `ange-ftp-binary-file' for determining of binary transfer. (Bug#7383) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-05 09:48:43 +0000 +++ lisp/ChangeLog 2011-05-05 10:22:14 +0000 @@ -1,5 +1,13 @@ 2011-05-05 Michael Albinus + * net/ange-ftp.el (ange-ftp-binary-file-name-regexp): Set default + to "". + (ange-ftp-write-region, ange-ftp-insert-file-contents) + (ange-ftp-copy-file-internal): Use only `ange-ftp-binary-file' for + determining of binary transfer. (Bug#7383) + +2011-05-05 Michael Albinus + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Fix port computation bug. (Bug#8618) === modified file 'lisp/net/ange-ftp.el' --- lisp/net/ange-ftp.el 2011-03-05 21:56:00 +0000 +++ lisp/net/ange-ftp.el 2011-05-05 10:22:14 +0000 @@ -856,15 +856,11 @@ :type '(choice (const :tag "Default" nil) string)) -(defcustom ange-ftp-binary-file-name-regexp - (concat "TAGS\\'\\|\\.\\(?:" - (eval-when-compile - (regexp-opt '("z" "Z" "lzh" "arc" "zip" "zoo" "tar" "dvi" - "ps" "elc" "gif" "gz" "taz" "tgz"))) - "\\|EXE\\(;[0-9]+\\)?\\|[zZ]-part-..\\)\\'") +(defcustom ange-ftp-binary-file-name-regexp "" "If a file matches this regexp then it is transferred in binary mode." :group 'ange-ftp - :type 'regexp) + :type 'regexp + :version "24.1") (defcustom ange-ftp-gateway-host nil "Name of host to use as gateway machine when local FTP isn't possible." @@ -3214,11 +3210,7 @@ ;; What we REALLY need here is a way to determine if the mode ;; of the transfer is irrelevant, i.e. we can use binary mode ;; regardless. Maybe a system-type to host-type lookup? - (binary (or (ange-ftp-binary-file filename) - (and (not (memq system-type - '(ms-dos windows-nt))) - (memq (ange-ftp-host-type host user) - '(unix dumb-unix))))) + (binary (ange-ftp-binary-file filename)) (cmd (if append 'append 'put)) (abbr (ange-ftp-abbreviate-filename filename)) ;; we need to reset `last-coding-system-used' to its @@ -3290,9 +3282,7 @@ (user (nth 1 parsed)) (name (ange-ftp-quote-string (nth 2 parsed))) (temp (ange-ftp-make-tmp-name host)) - (binary (or (ange-ftp-binary-file filename) - (memq (ange-ftp-host-type host user) - '(unix dumb-unix)))) + (binary (ange-ftp-binary-file filename)) (abbr (ange-ftp-abbreviate-filename filename)) (coding-system-used last-coding-system-used) size) @@ -3674,11 +3664,7 @@ (t-name (and t-parsed (ange-ftp-quote-string (nth 2 t-parsed)))) (t-abbr (ange-ftp-abbreviate-filename newname filename)) (binary (or (ange-ftp-binary-file filename) - (ange-ftp-binary-file newname) - (and (memq (ange-ftp-host-type f-host f-user) - '(unix dumb-unix)) - (memq (ange-ftp-host-type t-host t-user) - '(unix dumb-unix))))) + (ange-ftp-binary-file newname))) temp1 temp2) ------------------------------------------------------------ revno: 104126 committer: Michael Albinus branch nick: trunk timestamp: Thu 2011-05-05 11:48:43 +0200 message: * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Fix port computation bug. (Bug#8618) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-05-05 06:53:29 +0000 +++ lisp/ChangeLog 2011-05-05 09:48:43 +0000 @@ -1,3 +1,8 @@ +2011-05-05 Michael Albinus + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Fix + port computation bug. (Bug#8618) + 2011-05-05 Glenn Morris * allout-widgets.el (allout-widgets-mode-inhibit): Declare before use. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-04-25 18:10:17 +0000 +++ lisp/net/tramp-sh.el 2011-05-05 09:48:43 +0000 @@ -2260,8 +2260,8 @@ (setq host (tramp-file-name-host v) port "") (when (string-match tramp-host-with-port-regexp host) - (setq host (string-to-number (match-string 1 host)) - port (string-to-number (match-string 2 host)))) + (setq port (string-to-number (match-string 2 host)) + host (string-to-number (match-string 1 host)))) ;; Compose copy command. (setq spec (format-spec-make ------------------------------------------------------------ revno: 104125 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-05-04 23:56:54 -0700 message: * lisp/gnus/gnus-start.el (gnus-propagate-marks): Declare. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-05-04 11:28:46 +0000 +++ lisp/gnus/ChangeLog 2011-05-05 06:56:54 +0000 @@ -1,3 +1,7 @@ +2011-05-05 Glenn Morris + + * gnus-start.el (gnus-propagate-marks): Declare. + 2011-05-04 Teodor Zlatanov * registry.el (registry-reindex): Fix percentage message. === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2011-04-12 22:18:02 +0000 +++ lisp/gnus/gnus-start.el 2011-05-05 06:56:54 +0000 @@ -1491,6 +1491,8 @@ ;; Return the new active info. active))))) +(defvar gnus-propagate-marks) ; gnus-sum + (defun gnus-get-unread-articles-in-group (info active &optional update) (when (and info active) ;; Allow the backend to update the info in the group.