Now on revision 114126. ------------------------------------------------------------ revno: 114126 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-09-03 23:45:44 -0700 message: Makefile improvements. * Makefile.in (lib): Depend on am--refresh, to avoid a race. (src): Remove duplicate dependency on FRC. Invoke just one submake, not two. Avoid the need for 'pwd'. * lwlib/Makefile.in (all): Put this first. Don't use double-colon rules, as they are not portable according to POSIX. Mark as phony. * oldXMenu/Makefile.in (all, tags): Don't use double-colon rules, as they are not portable according to POSIX. Mark as phony. * src/Makefile.in (config.status): Don't use double-colon rules, as they are not portable according to POSIX. Fix shell typo with `; I guess this rule has never been tested? (VCSWITNESS): New macro, to override any environment var. diff: === modified file 'ChangeLog' --- ChangeLog 2013-09-02 07:01:53 +0000 +++ ChangeLog 2013-09-04 06:45:44 +0000 @@ -1,3 +1,10 @@ +2013-09-04 Paul Eggert + + Makefile improvements. + * Makefile.in (lib): Depend on am--refresh, to avoid a race. + (src): Remove duplicate dependency on FRC. + Invoke just one submake, not two. Avoid the need for 'pwd'. + 2013-09-02 Jan Djärv * configure.ac: Add ns_check_file. === modified file 'Makefile.in' --- Makefile.in 2013-08-28 06:01:52 +0000 +++ Makefile.in 2013-09-04 06:45:44 +0000 @@ -352,9 +352,13 @@ -e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \ ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h +# If lib/Makefile would build files in '.', then build them before +# building 'lib', to avoid races with parallel makes. +lib: am--refresh + lib-src src: $(NTDIR) lib -src: lib-src FRC +src: lib-src # We need to build `emacs' in `src' to compile the *.elc files in `lisp' # and `leim'. @@ -376,18 +380,15 @@ # all preloaded elisp files, and only then dump the actual src/emacs, which # is not wrong, but is overkill in 99.99% of the cases. src: Makefile FRC - boot=bootstrap-emacs$(EXEEXT); \ - if [ ! -x "src/$$boot" ]; then \ - cd $@; $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ - LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \ - fi; - if [ -r .bzr/checkout/dirstate ]; then \ - vcswitness="`pwd`/.bzr/checkout/dirstate"; \ - fi; \ - cd $@; $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ - LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \ + dirstate='.bzr/checkout/dirstate'; \ + vcswitness='$$(srcdir)/../'$$dirstate; \ + [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \ + cd $@ || exit; \ + boot=bootstrap-emacs$(EXEEXT); \ + [ ! -x "$$boot" ] || boot=''; \ + $(MAKE) all $(MFLAGS) \ + CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ + LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \ VCSWITNESS="$$vcswitness" blessmail: Makefile src FRC === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2013-06-30 16:14:22 +0000 +++ lwlib/ChangeLog 2013-09-04 06:45:44 +0000 @@ -1,3 +1,9 @@ +2013-09-04 Paul Eggert + + Makefile improvements. + * Makefile.in (all): Put this first. Don't use double-colon + rules, as they are not portable according to POSIX. Mark as phony. + 2013-06-30 Paul Eggert Fix minor problems found by static checking. === modified file 'lwlib/Makefile.in' --- lwlib/Makefile.in 2013-07-23 22:57:17 +0000 +++ lwlib/Makefile.in 2013-09-04 06:45:44 +0000 @@ -59,11 +59,12 @@ -Demacs -I../src \ -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib +all: liblw.a +.PHONY: all + .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -all:: liblw.a - liblw.a: $(OBJS) rm -f $@ $(AR) $(ARFLAGS) $@ $(OBJS) === modified file 'oldXMenu/ChangeLog' --- oldXMenu/ChangeLog 2013-03-11 16:31:55 +0000 +++ oldXMenu/ChangeLog 2013-09-04 06:45:44 +0000 @@ -1,3 +1,9 @@ +2013-09-04 Paul Eggert + + Makefile improvements. + * Makefile.in (all, tags): Don't use double-colon rules, as they + are not portable according to POSIX. Mark as phony. + 2012-12-04 Paul Eggert Include uniformly in oldXMenu sources. === modified file 'oldXMenu/Makefile.in' --- oldXMenu/Makefile.in 2013-07-23 22:55:38 +0000 +++ oldXMenu/Makefile.in 2013-09-04 06:45:44 +0000 @@ -85,7 +85,8 @@ SetSel.o \ XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o -all:: libXMenu11.a +all: libXMenu11.a +.PHONY: all ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ $(C_SWITCH_X_SITE) \ @@ -139,5 +140,6 @@ rm -f Makefile maintainer-clean: distclean -tags:: +tags: $(TAGS) -t *.[ch] +.PHONY: tags === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-04 04:02:56 +0000 +++ src/ChangeLog 2013-09-04 06:45:44 +0000 @@ -1,3 +1,11 @@ +2013-09-04 Paul Eggert + + Makefile improvements. + * Makefile.in (config.status): Don't use double-colon rules, as + they are not portable according to POSIX. Fix shell typo with `; + I guess this rule has never been tested? + (VCSWITNESS): New macro, to override any environment var. + 2013-09-04 Dmitry Antipov * xterm.h (struct x_display_info): Do not track X connection === modified file 'src/Makefile.in' --- src/Makefile.in 2013-08-28 06:01:52 +0000 +++ src/Makefile.in 2013-09-04 06:45:44 +0000 @@ -538,14 +538,9 @@ $(OLDXMENU): $(OLDXMENU_TARGET) -../config.status:: epaths.in - @echo "The file epaths.h needs to be set up from epaths.in." - @echo "Please run the `configure' script again." - exit 1 - -../config.status:: config.in - @echo "The file config.h needs to be set up from config.in." - @echo "Please run the `configure' script again." +../config.status: config.in epaths.in + @echo "The file ${?:.in=.h} needs to be set up from $?." + @echo "Please run the 'configure' script again." exit 1 doc.o: buildobj.h @@ -658,6 +653,9 @@ ## VCSWITNESS points to the file that holds info about the current checkout. ## We use it as a heuristic to decide when to rebuild loaddefs.el. +## If empty it is ignored; the parent makefile can set it to some other value. +VCSWITNESS = + $(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe) ------------------------------------------------------------ revno: 114125 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-09-04 08:02:56 +0400 message: * xterm.h (struct x_display_info): Do not track X connection fd separately because it is always available from Display. * xterm.c (x_term_init, x_delete_terminal, x_delete_display): Adjust users. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 14:40:09 +0000 +++ src/ChangeLog 2013-09-04 04:02:56 +0000 @@ -1,3 +1,10 @@ +2013-09-04 Dmitry Antipov + + * xterm.h (struct x_display_info): Do not track X connection + fd separately because it is always available from Display. + * xterm.c (x_term_init, x_delete_terminal, x_delete_display): + Adjust users. + 2013-09-03 Dmitry Antipov * buffer.c (drop_overlay): === modified file 'src/xterm.c' --- src/xterm.c 2013-09-03 12:02:01 +0000 +++ src/xterm.c 2013-09-04 04:02:56 +0000 @@ -10170,9 +10170,6 @@ dpyinfo->x_dnd_atoms_size = 8; dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms * dpyinfo->x_dnd_atoms_size); - - connection = ConnectionNumber (dpyinfo->display); - dpyinfo->connection = connection; dpyinfo->gray = XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window, gray_bits, gray_width, gray_height, @@ -10184,6 +10181,8 @@ xsettings_initialize (dpyinfo); + connection = ConnectionNumber (dpyinfo->display); + /* This is only needed for distinguishing keyboard and process input. */ if (connection != 0) add_keyboard_wait_descriptor (connection); @@ -10284,8 +10283,6 @@ break; } - delete_keyboard_wait_descriptor (dpyinfo->connection); - /* Discard this display from x_display_name_list and x_display_list. We can't use Fdelq because that can quit. */ if (! NILP (x_display_name_list) @@ -10413,6 +10410,7 @@ x_delete_terminal (struct terminal *terminal) { struct x_display_info *dpyinfo = terminal->display_info.x; + int connection = -1; /* Protect against recursive calls. delete_frame in delete_terminal calls us back when it deletes our last frame. */ @@ -10431,6 +10429,8 @@ and dpyinfo->display was set to 0 to indicate that. */ if (dpyinfo->display) { + connection = ConnectionNumber (dpyinfo->display); + x_destroy_all_bitmaps (dpyinfo); XSetCloseDownMode (dpyinfo->display, DestroyAll); @@ -10471,6 +10471,10 @@ #endif /* ! USE_GTK */ } + /* No more input on this descriptor. */ + if (connection != -1) + delete_keyboard_wait_descriptor (connection); + /* Mark as dead. */ dpyinfo->display = NULL; x_delete_display (dpyinfo); === modified file 'src/xterm.h' --- src/xterm.h 2013-09-03 12:02:01 +0000 +++ src/xterm.h 2013-09-04 04:02:56 +0000 @@ -138,9 +138,6 @@ /* The generic display parameters corresponding to this X display. */ struct terminal *terminal; - /* Connection number (normally a file descriptor number). */ - int connection; - /* This says how to access this display in Xlib. */ Display *display; ------------------------------------------------------------ revno: 114124 [merge] committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-09-04 08:41:58 +0800 message: Merge: Some fixes for vc-ignore. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-08-31 19:49:52 +0000 +++ doc/emacs/ChangeLog 2013-09-04 00:39:34 +0000 @@ -1,3 +1,7 @@ +2013-09-04 Xue Fuqiao + + * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument. + 2013-08-31 Ulrich Müller * xresources.texi (Motif Resources): === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2013-07-30 22:27:47 +0000 +++ doc/emacs/maintaining.texi 2013-09-04 00:31:13 +0000 @@ -1043,12 +1043,14 @@ @kindex C-x v G @findex vc-ignore - Many source trees contain some files that do not need to be versioned, -such as editor backups, object or bytecode files, and built programs. -You can simply not add them, but then they’ll always crop up as -unknown files. You can also tell the version control system to ignore -these files by adding them to the ignore file at the top of the tree. -@kbd{C-x v G} (@code{vc-ignore}) can help you do this. + Many source trees contain some files that do not need to be +versioned, such as editor backups, object or bytecode files, and built +programs. You can simply not add them, but then they’ll always crop +up as unknown files. You can also tell the version control system to +ignore these files by adding them to the ignore file at the top of the +tree. @kbd{C-x v G} (@code{vc-ignore}) can help you do this. When +called with a prefix argument, you can remove a file from the ignored +file list. @node VC Directory Mode @subsection VC Directory Mode === modified file 'etc/NEWS' --- etc/NEWS 2013-08-31 18:26:59 +0000 +++ etc/NEWS 2013-09-04 00:39:34 +0000 @@ -262,8 +262,9 @@ *** In VC directory mode, `L' lists the change log for the current VC controlled tree in a window. -*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a -file under current version control system. +*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file +under current version control system. When called with a prefix +argument, you can remove a file from the ignored file list. ** cl-lib === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 20:14:58 +0000 +++ lisp/ChangeLog 2013-09-04 00:39:34 +0000 @@ -1,3 +1,14 @@ +2013-09-04 Xue Fuqiao + + * vc/vc.el (vc-ignore): Rewrite. + (vc-default-ignore): New function. + (vc-default-ignore-completion-table): Use find-ignore-file. + + * vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table): + * vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table): + * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table): + Remove. Most code moved to vc.el. + 2013-09-03 Stefan Monnier * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2013-08-04 02:55:45 +0000 +++ lisp/vc/vc-bzr.el 2013-09-04 00:31:13 +0000 @@ -651,21 +651,6 @@ (vc-bzr-command "cat" t 0 file "-r" rev) (vc-bzr-command "cat" t 0 file)))) -(defun vc-bzr-ignore (file &optional directory remove) - "Ignore FILE under Bazaar. -If DIRECTORY is non-nil, the repository to use will be deduced by -DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." - (if remove - (if directory - (vc--remove-regexp file (vc-bzr-find-ignore-file directory)) - (vc--remove-regexp file - (vc-bzr-find-ignore-file default-directory))) - (vc-bzr-command "ignore" t 0 file))) - -(defun vc-bzr-ignore-completion-table (file) - "Return the list of ignored files." - (vc--read-lines (vc-bzr-find-ignore-file file))) - (defun vc-bzr-find-ignore-file (file) "Return the root directory of the repository of FILE." (expand-file-name ".bzrignore" === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2013-09-03 18:28:06 +0000 +++ lisp/vc/vc-git.el 2013-09-04 00:39:34 +0000 @@ -687,22 +687,6 @@ nil "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname)))) -(defun vc-git-ignore (file &optional directory remove) - "Ignore FILE under Git. -If DIRECTORY is non-nil, the repository to use will be deduced by -DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." - (let (gitignore) - (if directory - (setq gitignore (vc-git-find-ignore-file directory)) - (setq gitignore (vc-git-find-ignore-file default-directory))) - (if remove - (vc--remove-regexp file gitignore) - (vc--add-line file gitignore)))) - -(defun vc-git-ignore-completion-table (file) - "Return the list of ignored files." - (vc--read-lines (vc-git-find-ignore-file file))) - (defun vc-git-find-ignore-file (file) "Return the root directory of the repository of FILE." (expand-file-name ".gitignore" === modified file 'lisp/vc/vc-hg.el' --- lisp/vc/vc-hg.el 2013-08-04 02:55:45 +0000 +++ lisp/vc/vc-hg.el 2013-09-04 00:31:13 +0000 @@ -459,22 +459,6 @@ (vc-hg-command buffer 0 file "cat" "-r" rev) (vc-hg-command buffer 0 file "cat")))) -(defun vc-hg-ignore (file &optional directory remove) - "Ignore FILE under Mercurial. -If DIRECTORY is non-nil, the repository to use will be deduced by -DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." - (let (hgignore) - (if directory - (setq hgignore (vc-hg-find-ignore-file directory)) - (setq hgignore (vc-hg-find-ignore-file default-directory))) - (if remove - (vc--remove-regexp file hgignore) - (vc--add-line file hgignore)))) - -(defun vc-hg-ignore-completion-table (file) - "Return the list of ignored files." - (vc--read-lines (vc-hg-find-ignore-file file))) - (defun vc-hg-find-ignore-file (file) "Return the root directory of the repository of FILE." (expand-file-name ".hgignore" === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2013-08-04 02:55:45 +0000 +++ lisp/vc/vc-svn.el 2013-09-04 00:31:13 +0000 @@ -354,8 +354,7 @@ (defun vc-svn-ignore (file &optional directory remove) "Ignore FILE under Subversion. -If DIRECTORY is non-nil, the repository to use will be deduced by -DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files." +FILE is a file wildcard, relative to the root directory of DIRECTORY." (vc-svn-command t 0 file "propedit" "svn:ignore")) (defun vc-svn-ignore-completion-table (file) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-08-06 09:38:41 +0000 +++ lisp/vc/vc.el 2013-09-04 00:39:34 +0000 @@ -497,11 +497,14 @@ ;; This function is used in `vc-stay-local-p' which backends can use ;; for their convenience. ;; -;; - ignore (file &optional remove) +;; - ignore (file &optional directory) ;; -;; Ignore FILE under the current VCS. When called interactively and -;; with a prefix argument, remove an ignored file. When called from -;; Lisp code, if REMOVE is non-nil, remove FILE from ignored files." +;; Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). +;; FILE is a file wildcard. +;; When called interactively and with a prefix argument, remove FILE +;; from ignored files. +;; When called from Lisp code, if DIRECTORY is non-nil, the +;; repository to use will be deduced by DIRECTORY. ;; ;; - ignore-completion-table ;; @@ -1342,33 +1345,44 @@ (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) -(defun vc-ignore (file &optional directory remove) +(defun vc-ignore (file &optional directory) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). +FILE is a file wildcard. When called interactively and with a prefix argument, remove FILE from ignored files. When called from Lisp code, if DIRECTORY is non-nil, the +repository to use will be deduced by DIRECTORY." + (interactive + (list (read-file-name "The file to ignore: ") + (completing-read + "The file to remove: " + (vc-call-backend + (vc-backend default-directory) + 'ignore-completion-table default-directory)))) + (let* ((directory (or directory default-directory)) + (backend (vc-backend default-directory)) + (remove current-prefix-arg)) + (vc-call-backend backend 'ignore file directory remove))) + +(defun vc-default-ignore (backend file &optional directory remove) + "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). +FILE is a file wildcard, relative to the root directory of DIRECTORY. +When called from Lisp code, if DIRECTORY is non-nil, the repository to use will be deduced by DIRECTORY; if REMOVE is -non-nil, remove FILE from ignored files." - (interactive - (if (null current-prefix-arg) - (list (read-file-name "The file to ignore: ")) - (list - (completing-read - "The file to remove: " - (vc-call-backend - (vc-backend default-directory) - 'ignore-completion-table default-directory))))) - (let (backend) - (if directory - (progn (setq backend (vc-backend default-directory)) - (vc-call-backend backend 'ignore file directory remove)) - (setq backend (vc-backend directory)) - (vc-call-backend backend 'ignore file default-directory remove)))) +non-nil, remove FILE from ignored files. +Argument BACKEND is the backend you are using." + (let ((ignore + (vc-call-backend backend 'find-ignore-file (or directory default-directory))) + (pattern (file-relative-name + (expand-file-name file) (file-name-directory file)))) + (if remove + (vc--remove-regexp pattern ignore) + (vc--add-line pattern ignore)))) -(defun vc-default-ignore-completion-table (_file) - "Return the list of ignored files." - ;; Unused lexical argument `file' - nil) +(defun vc-default-ignore-completion-table (backend file) + "Return the list of ignored files under BACKEND." + (vc--read-lines + (vc-call-backend backend 'find-ignore-file file))) (defun vc--read-lines (file) "Return a list of lines of FILE." ------------------------------------------------------------ revno: 114123 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 16:14:58 -0400 message: * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): * lisp/net/tramp-smb.el (tramp-smb-get-file-entries): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory) (tramp-compute-multi-hops): Fix misuses of `add-to-list'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 19:49:54 +0000 +++ lisp/ChangeLog 2013-09-03 20:14:58 +0000 @@ -1,5 +1,10 @@ 2013-09-03 Stefan Monnier + * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): + * net/tramp-smb.el (tramp-smb-get-file-entries): + * net/tramp-sh.el (tramp-sh-handle-insert-directory) + (tramp-compute-multi-hops): Fix misuses of `add-to-list'. + * net/eww.el (eww-display-raw): Remove unused argument `charset'. Update call to it. (eww-change-select): Remove unused var `properties'. === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-09-02 13:41:08 +0000 +++ lisp/net/tramp-gvfs.el 2013-09-03 20:14:58 +0000 @@ -1417,47 +1417,36 @@ (port (tramp-file-name-port vec)) (localname (tramp-file-name-localname vec)) (ssl (if (string-match "^davs" method) "true" "false")) - (mount-spec '(:array)) - (mount-pref "/")) - - (setq - mount-spec - (append - mount-spec - (cond - ((string-equal "smb" method) - (string-match "^/?\\([^/]+\\)" localname) - (list (tramp-gvfs-mount-spec-entry "type" "smb-share") - (tramp-gvfs-mount-spec-entry "server" host) - (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) - ((string-equal "obex" method) - (list (tramp-gvfs-mount-spec-entry "type" method) - (tramp-gvfs-mount-spec-entry - "host" (concat "[" (tramp-bluez-address host) "]")))) - ((string-match "^dav" method) - (list (tramp-gvfs-mount-spec-entry "type" "dav") - (tramp-gvfs-mount-spec-entry "host" host) - (tramp-gvfs-mount-spec-entry "ssl" ssl))) - (t - (list (tramp-gvfs-mount-spec-entry "type" method) - (tramp-gvfs-mount-spec-entry "host" host)))))) - - (when user - (add-to-list - 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append)) - - (when domain - (add-to-list - 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append)) - - (when port - (add-to-list - 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port)) - 'append)) - - (when (and (string-match "^dav" method) - (string-match "^/?[^/]+" localname)) - (setq mount-pref (match-string 0 localname))) + (mount-spec + `(:array + ,@(cond + ((string-equal "smb" method) + (string-match "^/?\\([^/]+\\)" localname) + (list (tramp-gvfs-mount-spec-entry "type" "smb-share") + (tramp-gvfs-mount-spec-entry "server" host) + (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) + ((string-equal "obex" method) + (list (tramp-gvfs-mount-spec-entry "type" method) + (tramp-gvfs-mount-spec-entry + "host" (concat "[" (tramp-bluez-address host) "]")))) + ((string-match "\\`dav" method) + (list (tramp-gvfs-mount-spec-entry "type" "dav") + (tramp-gvfs-mount-spec-entry "host" host) + (tramp-gvfs-mount-spec-entry "ssl" ssl))) + (t + (list (tramp-gvfs-mount-spec-entry "type" method) + (tramp-gvfs-mount-spec-entry "host" host)))) + ,@(when user + (list (tramp-gvfs-mount-spec-entry "user" user))) + ,@(when domain + (list (tramp-gvfs-mount-spec-entry "domain" domain))) + ,@(when port + (list (tramp-gvfs-mount-spec-entry "port" (number-to-string port)))))) + (mount-pref + (if (and (string-match "\\`dav" method) + (string-match "^/?[^/]+" localname)) + (match-string 0 localname) + "/"))) ;; Return. `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) @@ -1718,11 +1707,11 @@ (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t :system tramp-hal-service device tramp-hal-interface-device "PropertyExists" "sync.plugin") - (add-to-list - 'tramp-synce-devices + (pushnew (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t :system tramp-hal-service device tramp-hal-interface-device - "GetPropertyString" "pda.pocketpc.name")))) + "GetPropertyString" "pda.pocketpc.name") + tramp-synce-devices :test #'equal))) (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) tramp-synce-devices)) === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-08-26 13:17:22 +0000 +++ lisp/net/tramp-sh.el 2013-09-03 20:14:58 +0000 @@ -2500,8 +2500,8 @@ 'file-name-nondirectory (list localname))) (setq localname (tramp-run-real-handler 'file-name-directory (list localname)))) - (unless full-directory-p - (setq switches (add-to-list 'switches "-d" 'append))) + (unless (or full-directory-p (member "-d" switches)) + (setq switches (append switches '("-d")))) (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) (when wildcard (setq switches (concat switches " " wildcard))) @@ -4252,7 +4252,7 @@ ?h (or (tramp-file-name-host (car target-alist)) "")))) (with-parsed-tramp-file-name proxy l ;; Add the hop. - (add-to-list 'target-alist l) + (pushnew l target-alist :test #'equal) ;; Start next search. (setq choices tramp-default-proxies-alist))))) @@ -4270,11 +4270,11 @@ vec 'file-error "Connection `%s' is not supported for gateway access." hop)) ;; Open the gateway connection. - (add-to-list - 'target-alist + (pushnew (vector (tramp-file-name-method hop) (tramp-file-name-user hop) - (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)) + (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) + target-alist :test #'equal) ;; For the password prompt, we need the correct values. ;; Therefore, we must remember the gateway vector. But we ;; cannot do it as connection property, because it shouldn't === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-08-26 13:17:22 +0000 +++ lisp/net/tramp-smb.el 2013-09-03 20:14:58 +0000 @@ -1364,14 +1364,14 @@ (while (not (eobp)) (setq entry (tramp-smb-read-file-entry share)) (forward-line) - (when entry (add-to-list 'res entry)))) + (when entry (pushnew entry res :test #'equal)))) ;; Cache share entries. (unless share (tramp-set-connection-property v "share-cache" res))) ;; Add directory itself. - (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0))) + (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal) ;; There's a very strange error (debugged with XEmacs 21.4.14) ;; If there's no short delay, it returns nil. No idea about. ------------------------------------------------------------ revno: 114122 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 15:49:54 -0400 message: * lisp/finder.el (finder-compile-keywords): Don't mess with windows. * lisp/net/eww.el (eww-display-raw): Remove unused argument `charset'. Update call to it. (eww-change-select): Remove unused var `properties'. (eww-make-unique-file-name): Remove unused var `base'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 19:44:02 +0000 +++ lisp/ChangeLog 2013-09-03 19:49:54 +0000 @@ -1,5 +1,12 @@ 2013-09-03 Stefan Monnier + * net/eww.el (eww-display-raw): Remove unused argument `charset'. + Update call to it. + (eww-change-select): Remove unused var `properties'. + (eww-make-unique-file-name): Remove unused var `base'. + + * finder.el (finder-compile-keywords): Don't mess with windows. + * calculator.el (calculator-funcall): Fix typo in last change. * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge. === modified file 'lisp/finder.el' --- lisp/finder.el 2013-06-15 15:36:11 +0000 +++ lisp/finder.el 2013-09-03 19:49:54 +0000 @@ -225,8 +225,8 @@ (lambda (a b) (string< (symbol-name (car a)) (symbol-name (car b)))))) - (save-excursion - (find-file generated-finder-keywords-file) + (with-current-buffer + (find-file-noselect generated-finder-keywords-file) (setq buffer-undo-list t) (erase-buffer) (insert (autoload-rubric generated-finder-keywords-file === modified file 'lisp/net/eww.el' --- lisp/net/eww.el 2013-08-29 01:17:10 +0000 +++ lisp/net/eww.el 2013-09-03 19:49:54 +0000 @@ -159,7 +159,7 @@ ((string-match "^image/" (car content-type)) (eww-display-image)) (t - (eww-display-raw charset))) + (eww-display-raw))) (setq eww-history-position 0) (cond (point @@ -296,7 +296,7 @@ (list :background (car new-colors)) t)))))) -(defun eww-display-raw (charset) +(defun eww-display-raw () (let ((data (buffer-substring (point) (point-max)))) (eww-setup-buffer) (let ((inhibit-read-only t)) @@ -756,7 +756,6 @@ "Change the value of the select drop-down menu under point." (interactive) (let* ((input (get-text-property (point) 'eww-form)) - (properties (text-properties-at (point))) (completion-ignore-case t) (options (delq nil @@ -930,8 +929,7 @@ (setq file "!")) ((string-match "\\`[.]" file) (setq file (concat "!" file)))) - (let ((base file) - (count 1)) + (let ((count 1)) (while (file-exists-p (expand-file-name file directory)) (setq file (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) === modified file 'src/lisp.h' --- src/lisp.h 2013-08-29 15:28:45 +0000 +++ src/lisp.h 2013-09-03 19:49:54 +0000 @@ -2630,19 +2630,6 @@ they are bound by a function application or a let form, stores the code to be executed for unwind-protect forms. - If func is non-zero, undoing this binding applies func to old_value; - This implements record_unwind_protect. - - Otherwise, the element is a variable binding. - - If the symbol field is a symbol, it is an ordinary variable binding. - - Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER), - which means having bound a local value while CURRENT-BUFFER was active. - If WHERE is nil this means we saw the default value when binding SYMBOL. - WHERE being a buffer or frame means we saw a buffer-local or frame-local - value. Other values of WHERE mean an internal error. - NOTE: The specbinding union is defined here, because SPECPDL_INDEX is used all over the place, needs to be fast, and needs to know the size of union specbinding. But only eval.c should access it. */ ------------------------------------------------------------ revno: 114121 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 15:44:02 -0400 message: * lisp/calculator.el (calculator-funcall): Fix typo in last change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 18:28:06 +0000 +++ lisp/ChangeLog 2013-09-03 19:44:02 +0000 @@ -1,5 +1,7 @@ 2013-09-03 Stefan Monnier + * calculator.el (calculator-funcall): Fix typo in last change. + * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge. * emacs-lisp/package.el (package-activate-1): Don't let a missing === modified file 'lisp/calculator.el' --- lisp/calculator.el 2013-08-29 19:55:58 +0000 +++ lisp/calculator.el 2013-09-03 19:44:02 +0000 @@ -1287,7 +1287,7 @@ ((symbol-function 'D) (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x)))) (eval f `((X . ,X) - (Y . ,X) + (Y . ,Y) (TX . ,TX) (TY . ,TY) (DX . ,DX) ------------------------------------------------------------ revno: 114120 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 14:28:06 -0400 message: * lisp/vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 18:21:41 +0000 +++ lisp/ChangeLog 2013-09-03 18:28:06 +0000 @@ -1,5 +1,7 @@ 2013-09-03 Stefan Monnier + * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge. + * emacs-lisp/package.el (package-activate-1): Don't let a missing -autoloads.el file stop us. === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2013-08-04 02:55:45 +0000 +++ lisp/vc/vc-git.el 2013-09-03 18:28:06 +0000 @@ -649,11 +649,18 @@ 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)) + (let* ((file1 (or (car files) default-directory)) + (root (vc-git-root file1)) + (default-directory (expand-file-name root)) + (only (or (cdr files) + (not (equal root (abbreviate-file-name file1))))) + (coding-system-for-write vc-git-commits-coding-system)) (cl-flet ((boolean-arg-fn (argument) (lambda (value) (when (equal value "yes") (list argument))))) - (apply 'vc-git-command nil 0 files + ;; When operating on the whole tree, better pass nil than ".", since "." + ;; fails when we're committing a merge. + (apply 'vc-git-command nil 0 (if only files) (nconc (list "commit" "-m") (log-edit-extract-headers `(("Author" . "--author") @@ -661,7 +668,7 @@ ("Amend" . ,(boolean-arg-fn "--amend")) ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) comment) - (list "--only" "--")))))) + (if only (list "--only" "--"))))))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects ------------------------------------------------------------ revno: 114119 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 14:21:41 -0400 message: * lisp/emacs-lisp/package.el (package-activate-1): Don't let a missing -autoloads.el file stop us. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 16:23:10 +0000 +++ lisp/ChangeLog 2013-09-03 18:21:41 +0000 @@ -1,7 +1,10 @@ 2013-09-03 Stefan Monnier + * emacs-lisp/package.el (package-activate-1): Don't let a missing + -autoloads.el file stop us. + * net/tramp.el (with-parsed-tramp-file-name): Silence compiler - warnings, and factor our common code. + warnings, and factor out common code. 2013-09-03 Dmitry Gutov === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-08-28 17:57:12 +0000 +++ lisp/emacs-lisp/package.el 2013-09-03 18:21:41 +0000 @@ -464,7 +464,8 @@ (package-desc-full-name pkg-desc))) ;; Add to load path, add autoloads, and activate the package. (let ((old-lp load-path)) - (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t) + (with-demoted-errors + (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)) (when (and (eq old-lp load-path) (not (or (member pkg-dir load-path) (member pkg-dir-dir load-path)))) ------------------------------------------------------------ revno: 114118 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-03 12:23:10 -0400 message: * lisp/net/tramp.el (with-parsed-tramp-file-name): Silence compiler warnings, and factor our common code. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-03 00:29:10 +0000 +++ lisp/ChangeLog 2013-09-03 16:23:10 +0000 @@ -1,3 +1,8 @@ +2013-09-03 Stefan Monnier + + * net/tramp.el (with-parsed-tramp-file-name): Silence compiler + warnings, and factor our common code. + 2013-09-03 Dmitry Gutov * progmodes/ruby-mode.el (ruby-calculate-indent): Consider @@ -7,8 +12,8 @@ 2013-09-02 Fabián Ezequiel Gallina Format code sent to Python shell for robustness. - * progmodes/python.el (python-shell-buffer-substring): New - function. + * progmodes/python.el (python-shell-buffer-substring): + New function. (python-shell-send-region, python-shell-send-buffer): Use it. 2013-09-02 Michael Albinus === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-09-02 13:41:08 +0000 +++ lisp/net/tramp-compat.el 2013-09-03 16:23:10 +0000 @@ -186,7 +186,7 @@ ;; `with-temp-message' does not exist in XEmacs. (if (fboundp 'with-temp-message) (defalias 'tramp-compat-with-temp-message 'with-temp-message) - (defmacro tramp-compat-with-temp-message (message &rest body) + (defmacro tramp-compat-with-temp-message (_message &rest body) "Display MESSAGE temporarily if non-nil while BODY is evaluated." `(progn ,@body))) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-09-02 13:41:08 +0000 +++ lisp/net/tramp.el 2013-09-03 16:23:10 +0000 @@ -1632,18 +1632,19 @@ If VAR is nil, then we bind `v' to the structure and `method', `user', `host', `localname', `hop' to the components." - `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename)) - (,(if var (intern (concat (symbol-name var) "-method")) 'method) - (tramp-file-name-method ,(or var 'v))) - (,(if var (intern (concat (symbol-name var) "-user")) 'user) - (tramp-file-name-user ,(or var 'v))) - (,(if var (intern (concat (symbol-name var) "-host")) 'host) - (tramp-file-name-host ,(or var 'v))) - (,(if var (intern (concat (symbol-name var) "-localname")) 'localname) - (tramp-file-name-localname ,(or var 'v))) - (,(if var (intern (concat (symbol-name var) "-hop")) 'hop) - (tramp-file-name-hop ,(or var 'v)))) - ,@body)) + (let ((bindings + (mapcar (lambda (elem) + `(,(if var (intern (format "%s-%s" var elem)) elem) + (,(intern (format "tramp-file-name-%s" elem)) + ,(or var 'v)))) + '(method user host localname hop)))) + `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename)) + ,@bindings) + ;; We don't know which of those vars will be used, so we bind them all, + ;; and then add here a dummy use of all those variables, so we don't get + ;; flooded by warnings about those vars `body' didn't use. + (ignore ,@(mapcar #'car bindings)) + ,@body))) (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) ------------------------------------------------------------ revno: 114117 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-03 18:40:09 +0400 message: * buffer.c (drop_overlay): * fileio.c (restore_point_unwind): Prefer unchain_marker to Fset_marker (X, Qnil, ...) (which is the same but a bit slower). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 13:29:38 +0000 +++ src/ChangeLog 2013-09-03 14:40:09 +0000 @@ -1,5 +1,11 @@ 2013-09-03 Dmitry Antipov + * buffer.c (drop_overlay): + * fileio.c (restore_point_unwind): Prefer unchain_marker to + Fset_marker (X, Qnil, ...) (which is the same but a bit slower). + +2013-09-03 Dmitry Antipov + * buffer.c (Fmake_overlay, Fmove_overlay): * intervals.c (set_point_from_marker): * print.c (PRINTPREPARE): Prefer signal_error === modified file 'src/buffer.c' --- src/buffer.c 2013-09-03 13:29:38 +0000 +++ src/buffer.c 2013-09-03 14:40:09 +0000 @@ -888,8 +888,8 @@ eassert (b == XBUFFER (Fmarker_buffer (ov->start))); modify_overlay (b, marker_position (ov->start), marker_position (ov->end)); - Fset_marker (ov->start, Qnil, Qnil); - Fset_marker (ov->end, Qnil, Qnil); + unchain_marker (XMARKER (ov->start)); + unchain_marker (XMARKER (ov->end)); } === modified file 'src/fileio.c' --- src/fileio.c 2013-08-27 18:47:55 +0000 +++ src/fileio.c 2013-09-03 14:40:09 +0000 @@ -233,7 +233,7 @@ restore_point_unwind (Lisp_Object location) { Fgoto_char (location); - Fset_marker (location, Qnil, Qnil); + unchain_marker (XMARKER (location)); } ------------------------------------------------------------ revno: 114116 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-03 17:29:38 +0400 message: * buffer.c (Fmake_overlay, Fmove_overlay): * intervals.c (set_point_from_marker): * print.c (PRINTPREPARE): Prefer signal_error to plain error and report unsuitable marker too. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 12:41:35 +0000 +++ src/ChangeLog 2013-09-03 13:29:38 +0000 @@ -1,5 +1,12 @@ 2013-09-03 Dmitry Antipov + * buffer.c (Fmake_overlay, Fmove_overlay): + * intervals.c (set_point_from_marker): + * print.c (PRINTPREPARE): Prefer signal_error + to plain error and report unsuitable marker too. + +2013-09-03 Dmitry Antipov + * xterm.h (struct scroll_bar): Prefer int to Lisp_Object for 'dragging' member. (struct x_output): Remove set-but-unused leftovers === modified file 'src/buffer.c' --- src/buffer.c 2013-08-28 08:33:12 +0000 +++ src/buffer.c 2013-09-03 13:29:38 +0000 @@ -3834,7 +3834,8 @@ The fifth arg REAR-ADVANCE, if non-nil, makes the marker for the rear of the overlay advance when text is inserted there \(which means the text *is* included in the overlay). */) - (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance) + (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, + Lisp_Object front_advance, Lisp_Object rear_advance) { Lisp_Object overlay; struct buffer *b; @@ -3843,12 +3844,11 @@ XSETBUFFER (buffer, current_buffer); else CHECK_BUFFER (buffer); - if (MARKERP (beg) - && ! EQ (Fmarker_buffer (beg), buffer)) - error ("Marker points into wrong buffer"); - if (MARKERP (end) - && ! EQ (Fmarker_buffer (end), buffer)) - error ("Marker points into wrong buffer"); + + if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer)) + signal_error ("Marker points into wrong buffer", beg); + if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer)) + signal_error ("Marker points into wrong buffer", end); CHECK_NUMBER_COERCE_MARKER (beg); CHECK_NUMBER_COERCE_MARKER (end); @@ -3974,12 +3974,10 @@ if (NILP (Fbuffer_live_p (buffer))) error ("Attempt to move overlay to a dead buffer"); - if (MARKERP (beg) - && ! EQ (Fmarker_buffer (beg), buffer)) - error ("Marker points into wrong buffer"); - if (MARKERP (end) - && ! EQ (Fmarker_buffer (end), buffer)) - error ("Marker points into wrong buffer"); + if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer)) + signal_error ("Marker points into wrong buffer", beg); + if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer)) + signal_error ("Marker points into wrong buffer", end); CHECK_NUMBER_COERCE_MARKER (beg); CHECK_NUMBER_COERCE_MARKER (end); === modified file 'src/intervals.c' --- src/intervals.c 2013-08-29 16:36:54 +0000 +++ src/intervals.c 2013-09-03 13:29:38 +0000 @@ -1827,7 +1827,7 @@ set_point_from_marker (Lisp_Object marker) { if (XMARKER (marker)->buffer != current_buffer) - error ("Marker points into wrong buffer"); + signal_error ("Marker points into wrong buffer", marker); set_point_both (clip_to_bounds (BEGV, marker_position (marker), ZV), clip_to_bounds (BEGV_BYTE, marker_byte_position (marker), ZV_BYTE)); === modified file 'src/print.c' --- src/print.c 2013-07-16 21:35:45 +0000 +++ src/print.c 2013-09-03 13:29:38 +0000 @@ -124,7 +124,8 @@ set_buffer_internal (XMARKER (printcharfun)->buffer); \ marker_pos = marker_position (printcharfun); \ if (marker_pos < BEGV || marker_pos > ZV) \ - error ("Marker is outside the accessible part of the buffer"); \ + signal_error ("Marker is outside the accessible " \ + "part of the buffer", printcharfun); \ old_point = PT; \ old_point_byte = PT_BYTE; \ SET_PT_BOTH (marker_pos, \ @@ -136,10 +137,10 @@ if (NILP (printcharfun)) \ { \ Lisp_Object string; \ - if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \ + if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \ && ! print_escape_multibyte) \ specbind (Qprint_escape_multibyte, Qt); \ - if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \ + if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \ && ! print_escape_nonascii) \ specbind (Qprint_escape_nonascii, Qt); \ if (print_buffer != 0) \ @@ -166,7 +167,7 @@ if (NILP (printcharfun)) \ { \ if (print_buffer_pos != print_buffer_pos_byte \ - && NILP (BVAR (current_buffer, enable_multibyte_characters))) \ + && NILP (BVAR (current_buffer, enable_multibyte_characters)))\ { \ unsigned char *temp = alloca (print_buffer_pos + 1); \ copy_text ((unsigned char *) print_buffer, temp, \ ------------------------------------------------------------ revno: 114115 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-03 16:41:35 +0400 message: * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 12:02:01 +0000 +++ src/ChangeLog 2013-09-03 12:41:35 +0000 @@ -11,6 +11,7 @@ (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (x_scroll_bar_report_motion, x_set_offset): Related users changed. + * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed. 2013-09-03 Jan Djärv === modified file 'src/image.c' --- src/image.c 2013-08-27 18:47:55 +0000 +++ src/image.c 2013-09-03 12:41:35 +0000 @@ -30,13 +30,8 @@ #endif #include - #include -/* This makes the fields of a Display accessible, in Xlib header files. */ - -#define XLIB_ILLEGAL_ACCESS - #include "lisp.h" #include "frame.h" #include "window.h" === modified file 'src/xfns.c' --- src/xfns.c 2013-08-29 07:27:27 +0000 +++ src/xfns.c 2013-09-03 12:41:35 +0000 @@ -22,10 +22,6 @@ #include #include -/* This makes the fields of a Display accessible, in Xlib header files. */ - -#define XLIB_ILLEGAL_ACCESS - #include "lisp.h" #include "xterm.h" #include "frame.h" ------------------------------------------------------------ revno: 114114 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-03 16:02:01 +0400 message: * xterm.h (struct x_output): Remove set-but-unused leftovers 'left_before_move' and 'top_before_move'. * xterm.c (x_set_offset): User changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 09:35:47 +0000 +++ src/ChangeLog 2013-09-03 12:02:01 +0000 @@ -2,13 +2,15 @@ * xterm.h (struct scroll_bar): Prefer int to Lisp_Object for 'dragging' member. + (struct x_output): Remove set-but-unused leftovers + 'left_before_move' and 'top_before_move'. * gtkutil.c (xg_set_toolkit_scroll_bar_thumb): * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback) (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback) (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create) (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) - (x_scroll_bar_report_motion): Related users changed. + (x_scroll_bar_report_motion, x_set_offset): Related users changed. 2013-09-03 Jan Djärv === modified file 'src/xterm.c' --- src/xterm.c 2013-09-03 09:35:47 +0000 +++ src/xterm.c 2013-09-03 12:02:01 +0000 @@ -8116,9 +8116,6 @@ if (change_gravity > 0) { - FRAME_X_OUTPUT (f)->left_before_move = f->left_pos; - FRAME_X_OUTPUT (f)->top_before_move = f->top_pos; - f->top_pos = yoff; f->left_pos = xoff; f->size_hint_flags &= ~ (XNegative | YNegative); === modified file 'src/xterm.h' --- src/xterm.h 2013-09-03 09:35:47 +0000 +++ src/xterm.h 2013-09-03 12:02:01 +0000 @@ -626,11 +626,6 @@ int move_offset_top; int move_offset_left; - /* The frame's left/top offsets before we call XMoveWindow. See - x_check_expected_move. */ - int left_before_move; - int top_before_move; - /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */ unsigned net_wm_state_hidden_seen : 1; }; ------------------------------------------------------------ revno: 114113 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-03 13:35:47 +0400 message: * xterm.h (struct scroll_bar): Prefer int to Lisp_Object for 'dragging' member. * gtkutil.c (xg_set_toolkit_scroll_bar_thumb): * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback) (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback) (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create) (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (x_scroll_bar_report_motion): Related users changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-03 06:56:25 +0000 +++ src/ChangeLog 2013-09-03 09:35:47 +0000 @@ -1,3 +1,15 @@ +2013-09-03 Dmitry Antipov + + * xterm.h (struct scroll_bar): Prefer int to Lisp_Object + for 'dragging' member. + * gtkutil.c (xg_set_toolkit_scroll_bar_thumb): + * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback) + (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback) + (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create) + (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) + (x_scroll_bar_handle_click, x_scroll_bar_note_movement) + (x_scroll_bar_report_motion): Related users changed. + 2013-09-03 Jan Djärv * nsfont.m (INVALID_GLYPH): New define. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-08-29 07:27:27 +0000 +++ src/gtkutil.c 2013-09-03 09:35:47 +0000 @@ -3783,7 +3783,7 @@ struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); - if (wscroll && NILP (bar->dragging)) + if (wscroll && bar->dragging == -1) { GtkAdjustment *adj; gdouble shown; === modified file 'src/xterm.c' --- src/xterm.c 2013-09-02 15:48:59 +0000 +++ src/xterm.c 2013-09-03 09:35:47 +0000 @@ -4141,9 +4141,9 @@ scroll_bar_end_scroll, 0, 0); w = XWINDOW (window_being_scrolled); - if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging)) + if (XSCROLL_BAR (w->vertical_scroll_bar)->dragging != -1) { - XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil; + XSCROLL_BAR (w->vertical_scroll_bar)->dragging = -1; /* The thumb size is incorrect while dragging: fix it. */ set_vertical_scroll_bar (w); } @@ -4281,32 +4281,32 @@ switch (cs->reason) { case XmCR_DECREMENT: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_up_arrow; break; case XmCR_INCREMENT: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_down_arrow; break; case XmCR_PAGE_DECREMENT: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_above_handle; break; case XmCR_PAGE_INCREMENT: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_below_handle; break; case XmCR_TO_TOP: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_to_top; break; case XmCR_TO_BOTTOM: - bar->dragging = Qnil; + bar->dragging = -1; part = scroll_bar_to_bottom; break; @@ -4322,7 +4322,7 @@ whole = XM_SB_MAX - slider_size; portion = min (cs->value, whole); part = scroll_bar_handle; - bar->dragging = make_number (cs->value); + bar->dragging = cs->value; } break; @@ -4370,24 +4370,24 @@ whole = gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj); portion = min ((int)position, whole); - bar->dragging = make_number ((int)portion); + bar->dragging = portion; } break; case GTK_SCROLL_STEP_BACKWARD: part = scroll_bar_up_arrow; - bar->dragging = Qnil; + bar->dragging = -1; break; case GTK_SCROLL_STEP_FORWARD: part = scroll_bar_down_arrow; - bar->dragging = Qnil; + bar->dragging = -1; break; case GTK_SCROLL_PAGE_BACKWARD: part = scroll_bar_above_handle; - bar->dragging = Qnil; + bar->dragging = -1; break; case GTK_SCROLL_PAGE_FORWARD: part = scroll_bar_below_handle; - bar->dragging = Qnil; + bar->dragging = -1; break; } @@ -4401,7 +4401,7 @@ return FALSE; } -/* Callback for button release. Sets dragging to Qnil when dragging is done. */ +/* Callback for button release. Sets dragging to -1 when dragging is done. */ static gboolean xg_end_scroll_callback (GtkWidget *widget, @@ -4409,7 +4409,7 @@ gpointer user_data) { struct scroll_bar *bar = user_data; - bar->dragging = Qnil; + bar->dragging = -1; if (WINDOWP (window_being_scrolled)) { x_send_scroll_bar_event (window_being_scrolled, @@ -4457,7 +4457,7 @@ part = scroll_bar_handle; window_being_scrolled = bar->window; - bar->dragging = make_number (portion); + bar->dragging = portion; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole); } @@ -4496,7 +4496,7 @@ part = scroll_bar_move_ratio; window_being_scrolled = bar->window; - bar->dragging = Qnil; + bar->dragging = -1; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, position, height); } @@ -4772,7 +4772,7 @@ shown = (float) portion / whole; } - if (NILP (bar->dragging)) + if (bar->dragging == -1) { int size, value; @@ -4807,7 +4807,7 @@ NULL); /* Massage the top+shown values. */ - if (NILP (bar->dragging) || last_scroll_bar_part == scroll_bar_down_arrow) + if (bar->dragging == -1 || last_scroll_bar_part == scroll_bar_down_arrow) top = max (0, min (1, top)); else top = old_top; @@ -4819,7 +4819,7 @@ for `NARROWPROTO'. See s/freebsd.h for an example. */ if (top != old_top || shown != old_shown) { - if (NILP (bar->dragging)) + if (bar->dragging == -1) XawScrollbarSetThumb (widget, top, shown); else { @@ -4910,7 +4910,7 @@ bar->height = height; bar->start = 0; bar->end = 0; - bar->dragging = Qnil; + bar->dragging = -1; bar->fringe_extended_p = 0; /* Add bar to its frame's list of scroll bars. */ @@ -4968,7 +4968,7 @@ static void x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild) { - int dragging = ! NILP (bar->dragging); + bool dragging = bar->dragging != -1; Window w = bar->x_window; struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); GC gc = f->output_data.x->normal_gc; @@ -5261,7 +5261,7 @@ #else /* not USE_TOOLKIT_SCROLL_BARS */ /* Set the scroll bar's current state, unless we're currently being dragged. */ - if (NILP (bar->dragging)) + if (bar->dragging == -1) { int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height); @@ -5471,14 +5471,13 @@ #ifndef USE_TOOLKIT_SCROLL_BARS /* If the user has released the handle, set it to its final position. */ - if (event->type == ButtonRelease - && ! NILP (bar->dragging)) + if (event->type == ButtonRelease && bar->dragging != -1) { int new_start = y - XINT (bar->dragging); int new_end = new_start + bar->end - bar->start; x_scroll_bar_set_handle (bar, new_start, new_end, 0); - bar->dragging = Qnil; + bar->dragging = -1; } #endif @@ -5505,10 +5504,10 @@ XSETVECTOR (last_mouse_scroll_bar, bar); /* If we're dragging the bar, display it. */ - if (! NILP (bar->dragging)) + if (bar->dragging != -1) { /* Where should the handle be now? */ - int new_start = event->y - XINT (bar->dragging); + int new_start = event->y - bar->dragging; if (new_start != bar->start) { @@ -5560,8 +5559,8 @@ win_y -= VERTICAL_SCROLL_BAR_TOP_BORDER; - if (! NILP (bar->dragging)) - win_y -= XINT (bar->dragging); + if (bar->dragging != -1) + win_y -= bar->dragging; if (win_y < 0) win_y = 0; @@ -5571,7 +5570,7 @@ *fp = f; *bar_window = bar->window; - if (! NILP (bar->dragging)) + if (bar->dragging != -1) *part = scroll_bar_handle; else if (win_y < bar->start) *part = scroll_bar_above_handle; === modified file 'src/xterm.h' --- src/xterm.h 2013-08-30 12:17:44 +0000 +++ src/xterm.h 2013-09-03 09:35:47 +0000 @@ -806,8 +806,8 @@ /* If the scroll bar handle is currently being dragged by the user, this is the number of pixels from the top of the handle to the place where the user grabbed it. If the handle isn't currently - being dragged, this is Qnil. */ - Lisp_Object dragging; + being dragged, this is -1. */ + int dragging; /* 1 if the background of the fringe that is adjacent to a scroll bar is extended to the gap between the fringe and the bar. */ ------------------------------------------------------------ revno: 114112 fixes bug: http://debbugs.gnu.org/15138 committer: Jan Djärv branch nick: trunk timestamp: Tue 2013-09-03 08:56:25 +0200 message: * nsfont.m (INVALID_GLYPH): New define. (nsfont_encode_char): Use INVALID_GLYPH. (ns_uni_to_glyphs): Ditto, check for NSNullGlyph. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-02 17:23:26 +0000 +++ src/ChangeLog 2013-09-03 06:56:25 +0000 @@ -1,3 +1,9 @@ +2013-09-03 Jan Djärv + + * nsfont.m (INVALID_GLYPH): New define. + (nsfont_encode_char): Use INVALID_GLYPH. + (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138). + 2013-09-02 Dmitry Antipov * xterm.c (x_last_mouse_movement_time): Revert last change. === modified file 'src/nsfont.m' --- src/nsfont.m 2013-08-09 12:25:34 +0000 +++ src/nsfont.m 2013-09-03 06:56:25 +0000 @@ -61,6 +61,7 @@ static void ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block); +#define INVALID_GLYPH 0xFFFF /* ========================================================================== @@ -981,7 +982,7 @@ ns_uni_to_glyphs (font_info, high); g = font_info->glyphs[high][low]; - return g == 0xFFFF ? FONT_INVALID_CODE : g; + return g == INVALID_GLYPH ? FONT_INVALID_CODE : g; } @@ -1354,8 +1355,8 @@ #else g = glyphStorage->cglyphs[i]; /* TODO: is this a good check? maybe need to use coveredChars.. */ - if (g > numGlyphs) - g = 0xFFFF; /* hopefully unused... */ + if (g > numGlyphs || g == NSNullGlyph) + g = INVALID_GLYPH; /* hopefully unused... */ #endif *glyphs = g; } @@ -1483,7 +1484,7 @@ characterIndex: (NSUInteger)charIndex { len = glyphIndex+length; - for (i =glyphIndex; i maxGlyph) maxGlyph = len; ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.