Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100102. ------------------------------------------------------------ revno: 100102 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-04-30 20:04:51 -0700 message: Rework previous autoconf changes, hopefully to make clearer. * configure.in (OTHER_OBJ): Remove. (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New output variables. * configure: Regenerate. * src/Makefile.in (gmallocobj, rallocobj, vmlimitobj): Initialize to null, for clarity. (OTHER_OBJ): Remove. (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New, set by configure. (otherobj): Use PRE_ALLOC_OBJ, POST_ALLOC_OBJ rather than OTHER_OBJ. diff: === modified file 'ChangeLog' --- ChangeLog 2010-04-30 16:37:01 +0000 +++ ChangeLog 2010-05-01 03:04:51 +0000 @@ -1,3 +1,8 @@ +2010-05-01 Glenn Morris + + * configure.in (OTHER_OBJ): Remove. + (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New output variables. + 2010-04-30 Glenn Morris * configure.in (OTHER_OBJ): Always include vm-limit.o on Cygwin. === modified file 'configure' --- configure 2010-04-30 16:37:01 +0000 +++ configure 2010-05-01 03:04:51 +0000 @@ -802,7 +802,8 @@ OLDXMENU LIBXMENU CYGWIN_OBJ -OTHER_OBJ +PRE_ALLOC_OBJ +POST_ALLOC_OBJ LTLIBOBJS' ac_subst_files='' ac_user_opts=' @@ -26166,14 +26167,15 @@ fi -OTHER_OBJ="\$(gmallocobj) \$(rallocobj)" if test "$opsys" = "cygwin"; then CYGWIN_OBJ="sheap.o" ## Cygwin differs because of its unexec(). - OTHER_OBJ="$OTHER_OBJ lastfile.o vm-limit.o" + PRE_ALLOC_OBJ= + POST_ALLOC_OBJ="lastfile.o vm-limit.o" else CYGWIN_OBJ= - OTHER_OBJ="lastfile.o $OTHER_OBJ \$(vmlimitobj)" + PRE_ALLOC_OBJ=lastfile.o + POST_ALLOC_OBJ="\$(vmlimitobj)" fi @@ -26182,6 +26184,7 @@ + #### Report on what we decided to do. #### Report GTK as a toolkit, even if it doesn't use Xt. #### It makes printing result more understandable as using GTK sets === modified file 'configure.in' --- configure.in 2010-04-30 16:37:01 +0000 +++ configure.in 2010-05-01 03:04:51 +0000 @@ -2952,17 +2952,19 @@ fi -OTHER_OBJ="\$(gmallocobj) \$(rallocobj)" if test "$opsys" = "cygwin"; then CYGWIN_OBJ="sheap.o" ## Cygwin differs because of its unexec(). - OTHER_OBJ="$OTHER_OBJ lastfile.o vm-limit.o" + PRE_ALLOC_OBJ= + POST_ALLOC_OBJ="lastfile.o vm-limit.o" else CYGWIN_OBJ= - OTHER_OBJ="lastfile.o $OTHER_OBJ \$(vmlimitobj)" + PRE_ALLOC_OBJ=lastfile.o + POST_ALLOC_OBJ="\$(vmlimitobj)" fi AC_SUBST(CYGWIN_OBJ) -AC_SUBST(OTHER_OBJ) +AC_SUBST(PRE_ALLOC_OBJ) +AC_SUBST(POST_ALLOC_OBJ) AH_TOP([/* GNU Emacs site configuration template file. Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-01 02:58:41 +0000 +++ src/ChangeLog 2010-05-01 03:04:51 +0000 @@ -1,3 +1,11 @@ +2010-05-01 Glenn Morris + + * Makefile.in (gmallocobj, rallocobj, vmlimitobj): Initialize to null, + for clarity. + (OTHER_OBJ): Remove. + (PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New, set by configure. + (otherobj): Use PRE_ALLOC_OBJ, POST_ALLOC_OBJ rather than OTHER_OBJ. + 2010-05-01 Karel Klíč * fileio.c (Ffile_selinux_context): Context functions may return null. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-04-30 16:37:01 +0000 +++ src/Makefile.in 2010-05-01 03:04:51 +0000 @@ -411,7 +411,9 @@ termcapobj = tparam.o #endif /* ! defined (TERMINFO) */ - +gmallocobj = +rallocobj = +vmlimitobj = #ifndef SYSTEM_MALLOC #ifndef DOUG_LEA_MALLOC gmallocobj = gmalloc.o @@ -424,10 +426,14 @@ vmlimitobj = vm-limit.o #endif /* !SYSTEM_MALLOC */ -OTHER_OBJ=@OTHER_OBJ@ +## Empty on Cygwin, lastfile.o elsewhere. +PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ +## lastfile.o vm-limit.o on Cygwin, $vmlimitobj elsewhere. +POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ /* List of object files that make-docfile should not be told about. */ -otherobj= $(termcapobj) $(OTHER_OBJ) $(WIDGET_OBJ) $(LIBOBJS) +otherobj= $(termcapobj) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \ + $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) #ifdef HAVE_MOUSE #define MOUSE_SUPPORT ${lispsource}mouse.elc \ ------------------------------------------------------------ revno: 100101 author: Karel Klic committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-04-30 19:58:41 -0700 message: * src/fileio.c (Ffile_selinux_context): Context functions may return null. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-30 20:48:04 +0000 +++ src/ChangeLog 2010-05-01 02:58:41 +0000 @@ -1,3 +1,7 @@ +2010-05-01 Karel Klíč + + * fileio.c (Ffile_selinux_context): Context functions may return null. + 2010-04-30 Dan Nicolaescu * s/gnu.h (POSIX_SIGNALS): === modified file 'src/fileio.c' --- src/fileio.c 2010-04-21 03:02:58 +0000 +++ src/fileio.c 2010-05-01 02:58:41 +0000 @@ -2918,10 +2918,14 @@ if (conlength > 0) { context = context_new (con); - values[0] = build_string (context_user_get (context)); - values[1] = build_string (context_role_get (context)); - values[2] = build_string (context_type_get (context)); - values[3] = build_string (context_range_get (context)); + if (context_user_get (context)) + values[0] = build_string (context_user_get (context)); + if (context_role_get (context)) + values[1] = build_string (context_role_get (context)); + if (context_type_get (context)) + values[2] = build_string (context_type_get (context)); + if (context_range_get (context)) + values[3] = build_string (context_range_get (context)); context_free (context); } if (con) ------------------------------------------------------------ revno: 100100 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-04-30 22:19:40 -0400 message: Avoid using trash for certain temp files (Bug#6070). * server.el (server-sentinel, server-start, server-force-delete): * jka-compr.el (jka-compr-partial-uncompress) (jka-compr-call-process, jka-compr-write-region, jka-compr-load): * epg.el (epg--make-temp-file, epg-decrypt-string) (epg-encrypt-string, epg-verify-string, epg-sign-string): * diff.el (diff-sentinel): Bind delete-by-moving-to-trash to nil before deleting (Bug#6070). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-01 01:39:58 +0000 +++ lisp/ChangeLog 2010-05-01 02:19:40 +0000 @@ -1,3 +1,16 @@ +2010-05-01 Chong Yidong + + * server.el (server-sentinel, server-start, server-force-delete): + + * jka-compr.el (jka-compr-partial-uncompress) + (jka-compr-call-process, jka-compr-write-region, jka-compr-load): + + * epg.el (epg--make-temp-file, epg-decrypt-string) + (epg-encrypt-string, epg-verify-string, epg-sign-string): + + * diff.el (diff-sentinel): Bind delete-by-moving-to-trash to nil + before deleting (Bug#6070). + 2010-05-01 Stefan Monnier * bindings.el (mode-line-abbrev-mode, mode-line-auto-fill-mode): === modified file 'lisp/diff.el' --- lisp/diff.el 2010-01-13 08:35:10 +0000 +++ lisp/diff.el 2010-05-01 02:19:40 +0000 @@ -64,8 +64,9 @@ "Code run when the diff process exits. CODE is the exit code of the process. It should be 0 only if no diffs were found." - (if diff-old-temp-file (delete-file diff-old-temp-file)) - (if diff-new-temp-file (delete-file diff-new-temp-file)) + (let (delete-by-moving-to-trash) + (if diff-old-temp-file (delete-file diff-old-temp-file)) + (if diff-new-temp-file (delete-file diff-new-temp-file))) (save-excursion (goto-char (point-max)) (let ((inhibit-read-only t)) === modified file 'lisp/epg.el' --- lisp/epg.el 2010-01-13 08:35:10 +0000 +++ lisp/epg.el 2010-05-01 02:19:40 +0000 @@ -1898,7 +1898,8 @@ ;; Cleanup the tempfile. (and tempfile (file-exists-p tempfile) - (delete-file tempfile)) + (let (delete-by-moving-to-trash) + (delete-file tempfile))) ;; Cleanup the tempdir. (and tempdir (file-directory-p tempdir) @@ -1998,7 +1999,8 @@ (epg-read-output context)) (epg-delete-output-file context) (if (file-exists-p input-file) - (delete-file input-file)) + (let (delete-by-moving-to-trash) + (delete-file input-file))) (epg-reset context)))) (defun epg-start-verify (context signature &optional signed-text) @@ -2095,7 +2097,8 @@ (epg-delete-output-file context) (if (and input-file (file-exists-p input-file)) - (delete-file input-file)) + (let (delete-by-moving-to-trash) + (delete-file input-file))) (epg-reset context)))) (defun epg-start-sign (context plain &optional mode) @@ -2202,7 +2205,8 @@ (epg-read-output context)) (epg-delete-output-file context) (if input-file - (delete-file input-file)) + (let (delete-by-moving-to-trash) + (delete-file input-file))) (epg-reset context)))) (defun epg-start-encrypt (context plain recipients @@ -2322,7 +2326,8 @@ (epg-read-output context)) (epg-delete-output-file context) (if input-file - (delete-file input-file)) + (let (delete-by-moving-to-trash) + (delete-file input-file))) (epg-reset context)))) (defun epg-start-export-keys (context keys) === modified file 'lisp/jka-compr.el' --- lisp/jka-compr.el 2010-01-22 10:23:25 +0000 +++ lisp/jka-compr.el 2010-05-01 02:19:40 +0000 @@ -181,7 +181,9 @@ null-device)) jka-compr-acceptable-retval-list) (jka-compr-error prog args infile message err-file)) - (jka-compr-delete-temp-file err-file))) + (let (delete-by-moving-to-trash) + (delete-file err-file)))) + ;; Run the uncompression program directly. ;; We get the whole file and must delete what we don't want. (jka-compr-call-process prog message infile t nil args)) @@ -222,7 +224,8 @@ ""))) jka-compr-acceptable-retval-list) (jka-compr-error prog args infile message err-file)) - (jka-compr-delete-temp-file err-file))) + (let (delete-by-moving-to-trash) + (delete-file err-file)))) (or (eq 0 (apply 'call-process prog infile (if (stringp output) temp output) @@ -248,9 +251,6 @@ "This routine will return the name of a new file." (make-temp-file jka-compr-temp-name-template)) -(defalias 'jka-compr-delete-temp-file 'delete-file) - - (defun jka-compr-write-region (start end file &optional append visit) (let* ((filename (expand-file-name file)) (visit-file (if (stringp visit) (expand-file-name visit) filename)) @@ -337,7 +337,8 @@ (and append can-append) 'dont)) (erase-buffer)) ) - (jka-compr-delete-temp-file temp-file) + (let (delete-by-moving-to-trash) + (delete-file temp-file)) (and compress-message @@ -603,7 +604,8 @@ (setq file (file-name-sans-extension file))) (setcar l file))) - (jka-compr-delete-temp-file local-copy)) + (let (delete-by-moving-to-trash) + (delete-file local-copy))) t)) === modified file 'lisp/server.el' --- lisp/server.el 2010-01-13 08:35:10 +0000 +++ lisp/server.el 2010-05-01 02:19:40 +0000 @@ -344,7 +344,9 @@ ;; for possible servers before doing anything, so it *should* be ours. (and (process-contact proc :server) (eq (process-status proc) 'closed) - (ignore-errors (delete-file (process-get proc :server-file)))) + (ignore-errors + (let (delete-by-moving-to-trash) + (delete-file (process-get proc :server-file))))) (server-log (format "Status changed to %s: %s" (process-status proc) msg) proc) (server-delete-client proc)) @@ -517,7 +519,9 @@ ;; Delete the socket files made by previous server invocations. (if (not (eq t (server-running-p server-name))) ;; Remove any leftover socket or authentication file - (ignore-errors (delete-file server-file)) + (ignore-errors + (let (delete-by-moving-to-trash) + (delete-file server-file))) (setq server-mode nil) ;; already set by the minor mode code (display-warning 'server @@ -600,7 +604,7 @@ server-auth-dir server-socket-dir)))) (condition-case nil - (progn + (let (delete-by-moving-to-trash) (delete-file file) (message "Connection file %S deleted" file)) (file-error ------------------------------------------------------------ revno: 100099 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-04-30 21:39:58 -0400 message: * bindings.el (mode-line-abbrev-mode, mode-line-auto-fill-mode): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-01 01:29:12 +0000 +++ lisp/ChangeLog 2010-05-01 01:39:58 +0000 @@ -1,5 +1,8 @@ 2010-05-01 Stefan Monnier + * bindings.el (mode-line-abbrev-mode, mode-line-auto-fill-mode): + Remove unused functions. + * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode. Set find-tag-default-function as a variable rather than a property. === modified file 'lisp/bindings.el' --- lisp/bindings.el 2010-04-28 19:04:16 +0000 +++ lisp/bindings.el 2010-05-01 01:39:58 +0000 @@ -62,24 +62,6 @@ (force-mode-line-update))) -(defun mode-line-abbrev-mode (event) - "Turn off `abbrev-mode' from the mode-line." - (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) - (abbrev-mode) - (force-mode-line-update))) - - -(defun mode-line-auto-fill-mode (event) - "Turn off `auto-fill-mode' from the mode-line." - (interactive "e") - (save-selected-window - (select-window (posn-window (event-start event))) - (auto-fill-mode) - (force-mode-line-update))) - - (defvar mode-line-input-method-map (let ((map (make-sparse-keymap))) (define-key map [mode-line mouse-2] ------------------------------------------------------------ revno: 100098 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-04-30 21:29:12 -0400 message: * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode. Set find-tag-default-function as a variable rather than a property. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-01 01:08:43 +0000 +++ lisp/ChangeLog 2010-05-01 01:29:12 +0000 @@ -1,5 +1,8 @@ 2010-05-01 Stefan Monnier + * emacs-lisp/lisp-mode.el (lisp-mode): Use define-derived-mode. + Set find-tag-default-function as a variable rather than a property. + * minibuffer.el (tags-completion-at-point-function): Move to etags.el. * progmodes/etags.el (tags-completion-at-point-function): Remove left over interactive spec. Add autoloading stub. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2010-05-01 01:29:12 +0000 @@ -466,7 +466,7 @@ "Keymap for ordinary Lisp mode. All commands in `lisp-mode-shared-map' are inherited by this map.") -(defun lisp-mode () +(define-derived-mode lisp-mode nil "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. @@ -478,19 +478,12 @@ Entry to this mode calls the value of `lisp-mode-hook' if that value is non-nil." - (interactive) - (kill-all-local-variables) - (use-local-map lisp-mode-map) - (setq major-mode 'lisp-mode) - (setq mode-name "Lisp") (lisp-mode-variables nil t) + (set (make-local-variable 'find-tag-default-function) 'lisp-find-tag-default) (make-local-variable 'comment-start-skip) (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") - (setq imenu-case-fold-search t) - (set-syntax-table lisp-mode-syntax-table) - (run-mode-hooks 'lisp-mode-hook)) -(put 'lisp-mode 'find-tag-default-function 'lisp-find-tag-default) + (setq imenu-case-fold-search t)) (defun lisp-find-tag-default () (let ((default (find-tag-default))) ------------------------------------------------------------ revno: 100097 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-04-30 21:27:16 -0400 message: Fix commenting convention diff: === modified file 'lisp/org/org-ctags.el' --- lisp/org/org-ctags.el 2010-04-15 10:11:52 +0000 +++ lisp/org/org-ctags.el 2010-05-01 01:27:16 +0000 @@ -1,9 +1,9 @@ ;;; org-ctags.el - Integrate Emacs "tags" facility with org mode. -;;; +;; ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -;;; Author: Paul Sexton -;;; Version: 1.0 +;; Author: Paul Sexton +;; Version: 1.0 ;; Keywords: org, wp ;; Version: 6.35i @@ -23,116 +23,116 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;; -;;; Synopsis -;;; ======== -;;; -;;; Allows org-mode to make use of the Emacs `etags' system. Defines tag -;;; destinations in org-mode files as any text between <>. This allows the tags-generation program `exuberant ctags' to -;;; parse these files and create tag tables that record where these -;;; destinations are found. Plain [[links]] in org mode files which do not have -;;; <> within the same file will then be interpreted as -;;; links to these 'tagged' destinations, allowing seamless navigation between -;;; multiple org-mode files. Topics can be created in any org mode file and -;;; will always be found by plain links from other files. Other file types -;;; recognised by ctags (source code files, latex files, etc) will also be -;;; available as destinations for plain links, and similarly, org-mode links -;;; will be available as tags from source files. Finally, the function -;;; `org-ctags-find-tag-interactive' lets you choose any known tag, using -;;; autocompletion, and quickly jump to it. -;;; -;;; Installation -;;; ============ -;;; -;;; Install org mode -;;; Ensure org-ctags.el is somewhere in your emacs load path. -;;; Download and install Exuberant ctags -- "http://ctags.sourceforge.net/" -;;; Edit your .emacs file (see next section) and load emacs. +;; +;; Synopsis +;; ======== +;; +;; Allows org-mode to make use of the Emacs `etags' system. Defines tag +;; destinations in org-mode files as any text between <>. This allows the tags-generation program `exuberant ctags' to +;; parse these files and create tag tables that record where these +;; destinations are found. Plain [[links]] in org mode files which do not have +;; <> within the same file will then be interpreted as +;; links to these 'tagged' destinations, allowing seamless navigation between +;; multiple org-mode files. Topics can be created in any org mode file and +;; will always be found by plain links from other files. Other file types +;; recognised by ctags (source code files, latex files, etc) will also be +;; available as destinations for plain links, and similarly, org-mode links +;; will be available as tags from source files. Finally, the function +;; `org-ctags-find-tag-interactive' lets you choose any known tag, using +;; autocompletion, and quickly jump to it. +;; +;; Installation +;; ============ +;; +;; Install org mode +;; Ensure org-ctags.el is somewhere in your emacs load path. +;; Download and install Exuberant ctags -- "http://ctags.sourceforge.net/" +;; Edit your .emacs file (see next section) and load emacs. -;;; To put in your init file (.emacs): -;;; ================================== -;;; -;;; Assuming you already have org mode installed and set up: -;;; -;;; (setq org-ctags-path-to-ctags "/path/to/ctags/executable") -;;; (add-hook 'org-mode-hook -;;; (lambda () -;;; (define-key org-mode-map "\C-co" 'org-ctags-find-tag-interactive))) -;;; -;;; By default, with org-ctags loaded, org will first try and visit the tag -;;; with the same name as the link; then, if unsuccessful, ask the user if -;;; he/she wants to rebuild the 'TAGS' database and try again; then ask if -;;; the user wishes to append 'tag' as a new toplevel heading at the end of -;;; the buffer; and finally, defer to org's default behaviour which is to -;;; search the entire text of the current buffer for 'tag'. -;;; -;;; This behaviour can be modified by changing the value of -;;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my -;;; .emacs, which describes the same behaviour as the above paragraph with -;;; one difference: -;;; -;;; (setq org-ctags-open-link-functions -;;; '(org-ctags-find-tag -;;; org-ctags-ask-rebuild-tags-file-then-find-tag -;;; org-ctags-ask-append-topic -;;; org-ctags-fail-silently)) ; <-- prevents org default behaviour -;;; -;;; -;;; Usage -;;; ===== -;;; -;;; When you click on a link "[[foo]]" and org cannot find a matching "<>" -;;; in the current buffer, the tags facility will take over. The file TAGS in -;;; the active directory is examined to see if the tags facility knows about -;;; "<>" in any other files. If it does, the matching file will be opened -;;; and the cursor will jump to the position of "<>" in that file. -;;; -;;; User-visible functions: -;;; - `org-ctags-find-tag-interactive': type a tag (plain link) name and visit -;;; it. With autocompletion. Bound to ctrl-O in the above setup. -;;; - All the etags functions should work. These include: -;;; -;;; M-. `find-tag' -- finds the tag at point -;;; -;;; C-M-. find-tag based on regular expression -;;; -;;; M-x tags-search RET -- like C-M-. but searches through ENTIRE TEXT -;;; of ALL the files referenced in the TAGS file. A quick way to -;;; search through an entire 'project'. -;;; -;;; M-* "go back" from a tag jump. Like `org-mark-ring-goto'. -;;; You may need to bind this key yourself with (eg) -;;; (global-set-key (kbd "") 'pop-tag-mark) -;;; -;;; (see etags chapter in Emacs manual for more) -;;; -;;; -;;; Keeping the TAGS file up to date -;;; ================================ -;;; -;;; Tags mode has no way of knowing that you have created new tags by typing in -;;; your org-mode buffer. New tags make it into the TAGS file in 3 ways: -;;; -;;; 1. You re-run (org-ctags-create-tags "directory") to rebuild the file. -;;; 2. You put the function `org-ctags-ask-rebuild-tags-file-then-find-tag' in -;;; your `org-open-link-functions' list, as is done in the setup -;;; above. This will cause the TAGS file to be rebuilt whenever a link -;;; cannot be found. This may be slow with large file collections however. -;;; 3. You run the following from the command line (all 1 line): -;;; -;;; ctags --langdef=orgmode --langmap=orgmode:.org -;;; --regex-orgmode="/<<([^>]+)>>/\1/d,definition/" -;;; -f /your/path/TAGS -e -R /your/path/*.org -;;; -;;; If you are paranoid, you might want to run (org-ctags-create-tags -;;; "/path/to/org/files") at startup, by including the following toplevel form -;;; in .emacs. However this can cause a pause of several seconds if ctags has -;;; to scan lots of files. -;;; -;;; (progn -;;; (message "-- rebuilding tags tables...") -;;; (mapc 'org-create-tags tags-table-list)) +;; To put in your init file (.emacs): +;; ================================== +;; +;; Assuming you already have org mode installed and set up: +;; +;; (setq org-ctags-path-to-ctags "/path/to/ctags/executable") +;; (add-hook 'org-mode-hook +;; (lambda () +;; (define-key org-mode-map "\C-co" 'org-ctags-find-tag-interactive))) +;; +;; By default, with org-ctags loaded, org will first try and visit the tag +;; with the same name as the link; then, if unsuccessful, ask the user if +;; he/she wants to rebuild the 'TAGS' database and try again; then ask if +;; the user wishes to append 'tag' as a new toplevel heading at the end of +;; the buffer; and finally, defer to org's default behaviour which is to +;; search the entire text of the current buffer for 'tag'. +;; +;; This behaviour can be modified by changing the value of +;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my +;; .emacs, which describes the same behaviour as the above paragraph with +;; one difference: +;; +;; (setq org-ctags-open-link-functions +;; '(org-ctags-find-tag +;; org-ctags-ask-rebuild-tags-file-then-find-tag +;; org-ctags-ask-append-topic +;; org-ctags-fail-silently)) ; <-- prevents org default behaviour +;; +;; +;; Usage +;; ===== +;; +;; When you click on a link "[[foo]]" and org cannot find a matching "<>" +;; in the current buffer, the tags facility will take over. The file TAGS in +;; the active directory is examined to see if the tags facility knows about +;; "<>" in any other files. If it does, the matching file will be opened +;; and the cursor will jump to the position of "<>" in that file. +;; +;; User-visible functions: +;; - `org-ctags-find-tag-interactive': type a tag (plain link) name and visit +;; it. With autocompletion. Bound to ctrl-O in the above setup. +;; - All the etags functions should work. These include: +;; +;; M-. `find-tag' -- finds the tag at point +;; +;; C-M-. find-tag based on regular expression +;; +;; M-x tags-search RET -- like C-M-. but searches through ENTIRE TEXT +;; of ALL the files referenced in the TAGS file. A quick way to +;; search through an entire 'project'. +;; +;; M-* "go back" from a tag jump. Like `org-mark-ring-goto'. +;; You may need to bind this key yourself with (eg) +;; (global-set-key (kbd "") 'pop-tag-mark) +;; +;; (see etags chapter in Emacs manual for more) +;; +;; +;; Keeping the TAGS file up to date +;; ================================ +;; +;; Tags mode has no way of knowing that you have created new tags by typing in +;; your org-mode buffer. New tags make it into the TAGS file in 3 ways: +;; +;; 1. You re-run (org-ctags-create-tags "directory") to rebuild the file. +;; 2. You put the function `org-ctags-ask-rebuild-tags-file-then-find-tag' in +;; your `org-open-link-functions' list, as is done in the setup +;; above. This will cause the TAGS file to be rebuilt whenever a link +;; cannot be found. This may be slow with large file collections however. +;; 3. You run the following from the command line (all 1 line): +;; +;; ctags --langdef=orgmode --langmap=orgmode:.org +;; --regex-orgmode="/<<([^>]+)>>/\1/d,definition/" +;; -f /your/path/TAGS -e -R /your/path/*.org +;; +;; If you are paranoid, you might want to run (org-ctags-create-tags +;; "/path/to/org/files") at startup, by including the following toplevel form +;; in .emacs. However this can cause a pause of several seconds if ctags has +;; to scan lots of files. +;; +;; (progn +;; (message "-- rebuilding tags tables...") +;; (mapc 'org-create-tags tags-table-list)) (eval-when-compile (require 'cl)) (require 'org) @@ -219,7 +219,7 @@ ;;; General utility functions. =============================================== -;;; These work outside org-ctags mode. +;; These work outside org-ctags mode. (defun org-ctags-get-filename-for-tag (tag) "TAG is a string. Search the active TAGS file for a matching tag, @@ -535,5 +535,5 @@ (provide 'org-ctags) -;;; arch-tag: 4b1ddd5a-8529-4b17-bcde-96a922d26343 +;; arch-tag: 4b1ddd5a-8529-4b17-bcde-96a922d26343 ;;; org-ctags.el ends here ------------------------------------------------------------ revno: 100096 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-04-30 21:08:43 -0400 message: * minibuffer.el (tags-completion-at-point-function): Move to etags.el. * progmodes/etags.el (tags-completion-at-point-function): Remove left over interactive spec. Add autoloading stub. (complete-tag): Use tags-completion-at-point-function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-30 23:13:22 +0000 +++ lisp/ChangeLog 2010-05-01 01:08:43 +0000 @@ -1,3 +1,10 @@ +2010-05-01 Stefan Monnier + + * minibuffer.el (tags-completion-at-point-function): Move to etags.el. + * progmodes/etags.el (tags-completion-at-point-function): + Remove left over interactive spec. Add autoloading stub. + (complete-tag): Use tags-completion-at-point-function. + 2010-04-30 Chong Yidong * minibuffer.el (tags-completion-at-point-function): Fix return === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-04-30 23:13:22 +0000 +++ lisp/minibuffer.el 2010-05-01 01:08:43 +0000 @@ -1169,27 +1169,6 @@ `:predicate' a predicate that completion candidates need to satisfy. `:annotation-function' the value to use for `completion-annotate-function'.") -(declare-function tags-lazy-completion-table "etags.el" ()) -(defun tags-completion-at-point-function () - "Using tags, return a completion table for the text around point. -If no tags table is loaded, do nothing and return nil." - (interactive) - (when (or tags-table-list tags-file-name) - (require 'etags) - (let ((completion-ignore-case (if (memq tags-case-fold-search '(t nil)) - tags-case-fold-search - case-fold-search)) - (pattern (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - 'find-tag-default))) - beg) - (when pattern - (save-excursion - (search-backward pattern) - (setq beg (point)) - (forward-char (length pattern)) - (list beg (point) (tags-lazy-completion-table))))))) - (defun complete-symbol (&optional arg) "Perform completion on the text around point. The completion method is determined by `completion-at-point-functions'. === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2010-04-29 15:32:11 +0000 +++ lisp/progmodes/etags.el 2010-05-01 01:08:43 +0000 @@ -423,9 +423,9 @@ (if (get-file-buffer file) ;; The file is already in a buffer. Check for the visited file ;; having changed since we last used it. - (let (win) + (progn (set-buffer (get-file-buffer file)) - (setq win (or verify-tags-table-function (tags-table-mode))) + (or verify-tags-table-function (tags-table-mode)) (if (or (verify-visited-file-modtime (current-buffer)) ;; Decide whether to revert the file. ;; revert-without-query can say to revert @@ -787,6 +787,30 @@ (let ((enable-recursive-minibuffers t)) (visit-tags-table-buffer)) (complete-with-action action (tags-completion-table) string pred)))))) + +;;;###autoload (defun tags-completion-at-point-function () +;;;###autoload (if (or tags-table-list tags-file-name) +;;;###autoload (progn +;;;###autoload (load "etags") +;;;###autoload (tags-completion-at-point-function)))) + +(defun tags-completion-at-point-function () + "Using tags, return a completion table for the text around point. +If no tags table is loaded, do nothing and return nil." + (when (or tags-table-list tags-file-name) + (let ((completion-ignore-case (if (memq tags-case-fold-search '(t nil)) + tags-case-fold-search + case-fold-search)) + (pattern (funcall (or find-tag-default-function + (get major-mode 'find-tag-default-function) + 'find-tag-default))) + beg) + (when pattern + (save-excursion + (search-backward pattern) ;FIXME: will fail if we're inside pattern. + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table))))))) (defun find-tag-tag (string) "Read a tag name, with defaulting and completion." @@ -2039,20 +2063,10 @@ (error "%s" (substitute-command-keys "No tags table loaded; try \\[visit-tags-table]"))) - (let ((completion-ignore-case (if (memq tags-case-fold-search '(t nil)) - tags-case-fold-search - case-fold-search)) - (pattern (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - 'find-tag-default))) - (comp-table (tags-lazy-completion-table)) - beg) - (or pattern - (error "Nothing to complete")) - (search-backward pattern) - (setq beg (point)) - (forward-char (length pattern)) - (completion-in-region beg (point) comp-table))) + (let ((comp-data (tags-completion-at-point-function))) + (if (null comp-data) + (error "Nothing to complete") + (apply 'completion-in-region comp-data)))) (dolist (x '("^No tags table in use; use .* to select one$" "^There is no default tag$" ------------------------------------------------------------ revno: 100095 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-04-30 19:13:22 -0400 message: * minibuffer.el (tags-completion-at-point-function): Fix return value. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-30 12:16:13 +0000 +++ lisp/ChangeLog 2010-04-30 23:13:22 +0000 @@ -1,3 +1,8 @@ +2010-04-30 Chong Yidong + + * minibuffer.el (tags-completion-at-point-function): Fix return + value. + 2010-04-30 Eli Zaretskii * composite.el (compose-region, reference-point-alist): Fix typos === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-04-29 15:32:11 +0000 +++ lisp/minibuffer.el 2010-04-30 23:13:22 +0000 @@ -1169,6 +1169,7 @@ `:predicate' a predicate that completion candidates need to satisfy. `:annotation-function' the value to use for `completion-annotate-function'.") +(declare-function tags-lazy-completion-table "etags.el" ()) (defun tags-completion-at-point-function () "Using tags, return a completion table for the text around point. If no tags table is loaded, do nothing and return nil." @@ -1180,11 +1181,14 @@ case-fold-search)) (pattern (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) - 'find-tag-default)))) + 'find-tag-default))) + beg) (when pattern - (tags-lazy-completion-table))))) - -(declare-function tags-lazy-completion-table "etags.el" ()) + (save-excursion + (search-backward pattern) + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table))))))) (defun complete-symbol (&optional arg) "Perform completion on the text around point. ------------------------------------------------------------ revno: 100094 committer: Dan Nicolaescu branch nick: trunk timestamp: Fri 2010-04-30 13:48:04 -0700 message: * s/gnu.h (POSIX_SIGNALS, START_FILES): New definitions. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-30 16:37:01 +0000 +++ src/ChangeLog 2010-04-30 20:48:04 +0000 @@ -1,3 +1,8 @@ +2010-04-30 Dan Nicolaescu + + * s/gnu.h (POSIX_SIGNALS): + (START_FILES): New definitions. + 2010-04-30 Glenn Morris * Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable. (Bug#6065) === modified file 'src/s/gnu.h' --- src/s/gnu.h 2010-03-20 07:57:11 +0000 +++ src/s/gnu.h 2010-04-30 20:48:04 +0000 @@ -28,6 +28,8 @@ #define SIGNALS_VIA_CHARACTERS +#define POSIX_SIGNALS + /* Tell Emacs that we are a terminfo based system; disable the use of local termcap. (GNU uses ncurses.) */ #ifdef HAVE_LIBNCURSES @@ -44,6 +46,8 @@ #define ORDINARY_LINK #define DATA_START ({ extern int data_start; (char *) &data_start; }) +#define START_FILES + /* Some losing code fails to include this and then assumes that because it is braindead that O_RDONLY==0. */ #ifndef NOT_C_CODE ------------------------------------------------------------ revno: 100093 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-04-30 09:37:01 -0700 message: Hopefully fix bug#6065. * configure.in (OTHER_OBJ): Always include vm-limit.o on Cygwin. Elsewhere, maybe include it. * src/Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable. (OTHER_OBJ): Define as a separate variable, for clarity. * configure: Regenerate. diff: === modified file 'ChangeLog' --- ChangeLog 2010-04-30 01:50:17 +0000 +++ ChangeLog 2010-04-30 16:37:01 +0000 @@ -1,5 +1,8 @@ 2010-04-30 Glenn Morris + * configure.in (OTHER_OBJ): Always include vm-limit.o on Cygwin. + Elsewhere, maybe include it. + * configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS. (OLDXMENU, LIBXMENU): New output variables. === modified file 'configure' --- configure 2010-04-30 01:54:08 +0000 +++ configure 2010-04-30 16:37:01 +0000 @@ -26170,10 +26170,10 @@ if test "$opsys" = "cygwin"; then CYGWIN_OBJ="sheap.o" ## Cygwin differs because of its unexec(). - OTHER_OBJ="$OTHER_OBJ lastfile.o" + OTHER_OBJ="$OTHER_OBJ lastfile.o vm-limit.o" else CYGWIN_OBJ= - OTHER_OBJ="lastfile.o $OTHER_OBJ" + OTHER_OBJ="lastfile.o $OTHER_OBJ \$(vmlimitobj)" fi === modified file 'configure.in' --- configure.in 2010-04-30 01:50:17 +0000 +++ configure.in 2010-04-30 16:37:01 +0000 @@ -2956,10 +2956,10 @@ if test "$opsys" = "cygwin"; then CYGWIN_OBJ="sheap.o" ## Cygwin differs because of its unexec(). - OTHER_OBJ="$OTHER_OBJ lastfile.o" + OTHER_OBJ="$OTHER_OBJ lastfile.o vm-limit.o" else CYGWIN_OBJ= - OTHER_OBJ="lastfile.o $OTHER_OBJ" + OTHER_OBJ="lastfile.o $OTHER_OBJ \$(vmlimitobj)" fi AC_SUBST(CYGWIN_OBJ) AC_SUBST(OTHER_OBJ) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-30 13:50:34 +0000 +++ src/ChangeLog 2010-04-30 16:37:01 +0000 @@ -1,3 +1,8 @@ +2010-04-30 Glenn Morris + + * Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable. (Bug#6065) + (OTHER_OBJ): Define as a separate variable, for clarity. + 2010-04-30 Jan Djärv * xsettings.c: include limits.h and update file comment. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-04-30 01:50:17 +0000 +++ src/Makefile.in 2010-04-30 16:37:01 +0000 @@ -420,12 +420,14 @@ #ifdef REL_ALLOC rallocobj = ralloc.o #endif + +vmlimitobj = vm-limit.o #endif /* !SYSTEM_MALLOC */ +OTHER_OBJ=@OTHER_OBJ@ + /* List of object files that make-docfile should not be told about. */ -/* OTHER_OBJ = $(gmallocobj) $(rallocobj), with trailing/leading - lastfile.o on Cygwin/other. */ -otherobj= $(termcapobj) @OTHER_OBJ@ vm-limit.o $(WIDGET_OBJ) $(LIBOBJS) +otherobj= $(termcapobj) $(OTHER_OBJ) $(WIDGET_OBJ) $(LIBOBJS) #ifdef HAVE_MOUSE #define MOUSE_SUPPORT ${lispsource}mouse.elc \ ------------------------------------------------------------ revno: 100092 committer: Jan D branch nick: trunk timestamp: Fri 2010-04-30 15:50:34 +0200 message: xsettings.c: include limits.h and update file comment. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-30 01:50:17 +0000 +++ src/ChangeLog 2010-04-30 13:50:34 +0000 @@ -1,3 +1,7 @@ +2010-04-30 Jan Djärv + + * xsettings.c: include limits.h and update file comment. + 2010-04-30 Glenn Morris * Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]: === modified file 'src/xsettings.c' --- src/xsettings.c 2010-04-22 17:23:18 +0000 +++ src/xsettings.c 2010-04-30 13:50:34 +0000 @@ -1,4 +1,4 @@ -/* Functions for handle font changes dynamically. +/* Functions for handle font and other changes dynamically. Copyright (C) 2009, 2010 Free Software Foundation, Inc. @@ -18,6 +18,7 @@ along with GNU Emacs. If not, see . */ #include "config.h" +#include #include #include #include "lisp.h" ------------------------------------------------------------ revno: 100091 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-04-30 15:16:13 +0300 message: Fix typos in doc strings of composite.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-29 15:41:23 +0000 +++ lisp/ChangeLog 2010-04-30 12:16:13 +0000 @@ -1,3 +1,8 @@ +2010-04-30 Eli Zaretskii + + * composite.el (compose-region, reference-point-alist): Fix typos + in the doc strings. + 2010-04-29 Chong Yidong * ido.el (ido-init-completion-maps): Remove C-v binding. === modified file 'lisp/composite.el' --- lisp/composite.el 2010-04-24 16:23:29 +0000 +++ lisp/composite.el 2010-04-30 12:16:13 +0000 @@ -44,7 +44,7 @@ A glyph reference point symbol is to be used to specify a composition rule in COMPONENTS argument to such functions as `compose-region'. -Meanings of glyph reference point codes are as follows: +The meaning of glyph reference point codes is as follows: 0----1----2 <---- ascent 0:tl or top-left | | 1:tc or top-center @@ -212,7 +212,7 @@ this case, TAB element has a special meaning. If the first characer is TAB, the glyphs are displayed with left padding space so that no pixel overlaps with the previous column. If the last -character is TAB, the glyphs are displayed with rigth padding +character is TAB, the glyphs are displayed with right padding space so that no pixel overlaps with the following column. If it is a vector or list, it is a sequence of alternate characters and @@ -222,7 +222,7 @@ A composition rule is a cons of global and new glyph reference point symbols. See the documentation of `reference-point-alist' for more -detail. +details. Optional 4th argument MODIFICATION-FUNC is a function to call to adjust the composition when it gets invalid because of a change of ------------------------------------------------------------ revno: 100090 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-04-29 18:54:08 -0700 message: Regenerate configure. diff: === modified file 'configure' --- configure 2010-04-28 07:33:48 +0000 +++ configure 2010-04-30 01:54:08 +0000 @@ -799,7 +799,10 @@ XOBJ WIDGET_OBJ TOOLKIT_LIBW +OLDXMENU +LIBXMENU CYGWIN_OBJ +OTHER_OBJ LTLIBOBJS' ac_subst_files='' ac_user_opts=' @@ -13260,7 +13263,7 @@ case "$machine" in ## These machines don't supply Xmu. hpux* | aix4-2 ) - test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" = "Xno" && LIBXMU= + test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= ;; esac @@ -26103,20 +26106,43 @@ fi +TOOLKIT_LIBW= case "$USE_X_TOOLKIT" in MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; - *) TOOLKIT_LIBW= ;; + none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; esac +## The X Menu stuff is present in the X10 distribution, but missing +## from X11. If we have X10, just use the installed library; +## otherwise, use our own copy. if test "${HAVE_X11}" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_X11 1 _ACEOF -fi + + if test "$USE_X_TOOLKIT" = "none"; then + OLDXMENU="\${oldXMenudir}libXMenu11.a" + else + OLDXMENU="\${lwlibdir}liblw.a" + fi + LIBXMENU="\$(OLDXMENU)" +else + OLDXMENU= + LIBXMENU="-lXMenu" +fi + +if test "$HAVE_GTK" = "yes"; then + OLDXMENU= + LIBXMENU= +fi + + + + if test "${HAVE_MENUS}" = "yes" ; then cat >>confdefs.h <<\_ACEOF @@ -26139,8 +26165,17 @@ fi -CYGWIN_OBJ= -test "$opsys" = "cygwin" && CYGWIN_OBJ="sheap.o" + +OTHER_OBJ="\$(gmallocobj) \$(rallocobj)" +if test "$opsys" = "cygwin"; then + CYGWIN_OBJ="sheap.o" + ## Cygwin differs because of its unexec(). + OTHER_OBJ="$OTHER_OBJ lastfile.o" +else + CYGWIN_OBJ= + OTHER_OBJ="lastfile.o $OTHER_OBJ" +fi +