commit 6ef14349fa73922473ba8202e256f20e17661b25 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Fri Feb 27 00:04:39 2015 -0800 Don't require GNU putenv * configure.ac: Use system putenv even if it lacks GNU features, as we don't need them. This works around a bug in FreeBSD 10.1 getenv. Fixes: bug#19874 diff --git a/ChangeLog b/ChangeLog index 47ef578..0bfdfbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-02-27 Paul Eggert + + Don't require GNU putenv + * configure.ac: Use system putenv even if it lacks GNU features, as + we don't need them. This works around a bug in FreeBSD 10.1 getenv. + Fixes: bug#19874 + 2015-02-25 Paul Eggert Merge from gnulib diff --git a/configure.ac b/configure.ac index 0bcc55c..e7408f1 100644 --- a/configure.ac +++ b/configure.ac @@ -780,6 +780,11 @@ AC_DEFUN([gl_CRYPTO_CHECK]) # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, # as we don't use them. AC_DEFUN([gl_FCNTL_O_FLAGS]) +# Use the system putenv even if it lacks GNU features, as we don't need them, +# and the gnulib replacement runs afoul of a FreeBSD 10.1 bug; see Bug#19874. +AC_CHECK_FUNCS_ONCE([putenv]) +AC_DEFUN([gl_FUNC_PUTENV], + [test "$ac_cv_func_putenv" = yes || REPLACE_PUTENV=1]) # Initialize gnulib right after choosing the compiler. dnl Amongst other things, this sets AR and ARFLAGS. commit 619fc5c197ebef5444aed24fe30657989fc2a839 Author: Ivan Shmakov Date: Thu Feb 26 18:09:48 2015 +0000 Fix 'face property handling in facemenu-add-face. * lisp/faces.el (face-list-p): Split from face-at-point. (face-at-point): Use it. * lisp/facemenu.el (facemenu-add-face): Likewise. Fixes: debbugs:19912 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8e307b..e9f6236 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-26 Ivan Shmakov + + * faces.el (face-list-p): Split from face-at-point. + (face-at-point): Use it. + * facemenu.el (facemenu-add-face): Likewise. (Bug#19912) + 2015-02-26 Oscar Fuentes * vc/vc.el (vc-annotate-switches): New defcustom. diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 1a765f9..2c246b4 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -732,7 +732,7 @@ effect. See `facemenu-remove-face-function'." face (facemenu-active-faces (cons face - (if (listp prev) + (if (face-list-p prev) prev (list prev))) ;; Specify the selected frame diff --git a/lisp/faces.el b/lisp/faces.el index ce74c72..54e444b 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -273,6 +273,17 @@ If FRAME is omitted or nil, use the selected frame." (not (internal-lisp-face-empty-p face frame))) +(defun face-list-p (face-or-list) + "True if FACE-OR-LIST is a list of faces. +Return nil if FACE-OR-LIST is a non-nil atom, or a cons cell whose car +is either 'foreground-color, 'background-color, or a keyword." + ;; The logic of merge_face_ref (xfaces.c) is recreated here. + (and (listp face-or-list) + (not (memq (car face-or-list) + '(foreground-color background-color))) + (not (keywordp (car face-or-list))))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Setting face attributes from X resources. @@ -1922,11 +1933,7 @@ Return nil if there is no face." (get-char-property (point) 'face)))) (cond ((facep faceprop) (push faceprop faces)) - ((and (listp faceprop) - ;; Don't treat an attribute spec as a list of faces. - (not (keywordp (car faceprop))) - (not (memq (car faceprop) - '(foreground-color background-color)))) + ((face-list-p faceprop) (dolist (face faceprop) (if (facep face) (push face faces)))))) commit 5917b7907ad0cdc38f14967d16aa8472be572e3f Author: Jan Djärv Date: Thu Feb 26 16:42:03 2015 +0100 Don't use OUTER_TO_INNER macros for plain X and lucid. * xmenu.c (create_and_show_popup_menu): Call XTranslateCoordinates, dont use OUTER_TO_INNER macros. (x_menu_show): Call x_real_pos_and_offsets, don't use OUTER_TO_INNER macros. diff --git a/src/ChangeLog b/src/ChangeLog index f0ec092..bf40436 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-02-26 Jan Djärv + + * xmenu.c (create_and_show_popup_menu): Call XTranslateCoordinates, + dont use OUTER_TO_INNER macros. + (x_menu_show): Call x_real_pos_and_offsets, don't use + OUTER_TO_INNER macros. + 2015-02-26 Eli Zaretskii * dispextern.h (FACE_FOR_CHAR): Fix the commentary. diff --git a/src/xmenu.c b/src/xmenu.c index c9f150f..5794f12 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1313,6 +1313,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, XButtonPressedEvent *event = &(dummy.xbutton); LWLIB_ID menu_id; Widget menu; + Window dummy_window; eassert (FRAME_X_P (f)); @@ -1338,8 +1339,20 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv, event->y = y; /* Adjust coordinates to be root-window-relative. */ - x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f); - y += f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f); + block_input (); + x += FRAME_LEFT_SCROLL_BAR_AREA_WIDTH (f); + XTranslateCoordinates (FRAME_X_DISPLAY (f), + + /* From-window, to-window. */ + FRAME_X_WINDOW (f), + FRAME_DISPLAY_INFO (f)->root_window, + + /* From-position, to-position. */ + x, y, &x, &y, + + /* Child of win. */ + &dummy_window); + unblock_input (); event->x_root = x; event->y_root = y; @@ -2059,12 +2072,18 @@ x_menu_show (struct frame *f, int x, int y, int menuflags, inhibit_garbage_collection (); #ifdef HAVE_X_WINDOWS - /* Adjust coordinates to relative to the outer (window manager) window. */ - x += FRAME_OUTER_TO_INNER_DIFF_X (f); - y += FRAME_OUTER_TO_INNER_DIFF_Y (f); + { + /* Adjust coordinates to relative to the outer (window manager) window. */ + int left_off, top_off; + + x_real_pos_and_offsets (f, &left_off, NULL, &top_off, NULL, + NULL, NULL, NULL, NULL); + + x += left_off; + y += top_off; + } #endif /* HAVE_X_WINDOWS */ - /* Adjust coordinates to be root-window-relative. */ x += f->left_pos; y += f->top_pos; commit 0ed52489b93648ea278bfb1ba12f351c48ab60dd Author: Oscar Fuentes Date: Thu Feb 26 15:58:30 2015 +0100 Fixed previous ChangeLog entry diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 749bd34..c8e307b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,17 +2,17 @@ * vc/vc.el (vc-annotate-switches): New defcustom. * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. - (vc-bzr-annotate-command): Use it. + (vc-bzr-annotate-command): Use vc-switches. * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. - (vc-cvs-annotate-command): Use it. + (vc-cvs-annotate-command): Use vc-switches. * vc/vc-git.el (vc-git-annotate-switches): New defcustom. - (vc-git-annotate-command): Use it. + (vc-git-annotate-command): Use vc-switches. * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. - (vc-hg-annotate-command): Use it. + (vc-hg-annotate-command): Use vc-switches. * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. - (vc-mtn-annotate-command): Use it. + (vc-mtn-annotate-command): Use vc-switches. * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. - (vc-svn-annotate-command): Use it. + (vc-svn-annotate-command): Use vc-switches. 2015-02-26 Alan Mackenzie commit b5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb Author: Oscar Fuentes Date: Thu Feb 26 15:46:12 2015 +0100 Use vc-switches on vc-*-annotate-command This also removes switch "-C -C" from vc-git-annotate-command. Fixes: debbugs:17945 * vc/vc.el (vc-annotate-switches): New defcustom. * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. (vc-bzr-annotate-command): Use it. * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. (vc-cvs-annotate-command): Use it. * vc/vc-git.el (vc-git-annotate-switches): New defcustom. (vc-git-annotate-command): Use it. * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. (vc-hg-annotate-command): Use it. * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. (vc-mtn-annotate-command): Use it. * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. (vc-svn-annotate-command): Use it. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ccc2c3..749bd34 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2015-02-26 Oscar Fuentes + + * vc/vc.el (vc-annotate-switches): New defcustom. + * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. + (vc-bzr-annotate-command): Use it. + * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. + (vc-cvs-annotate-command): Use it. + * vc/vc-git.el (vc-git-annotate-switches): New defcustom. + (vc-git-annotate-command): Use it. + * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. + (vc-hg-annotate-command): Use it. + * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. + (vc-mtn-annotate-command): Use it. + * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. + (vc-svn-annotate-command): Use it. + 2015-02-26 Alan Mackenzie Handle "#" operator properly inside macro. Fix coding bug. diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 96d6d1d..811f9e8 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -73,6 +73,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :group 'vc-bzr) +(defcustom vc-bzr-annotate-switches nil + "String or list of strings specifying switches for bzr annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-bzr) + (defcustom vc-bzr-log-switches nil "String or list of strings specifying switches for bzr log under VC." :type '(choice (const :tag "None" nil) @@ -826,7 +836,8 @@ If LIMIT is non-nil, show no more than this many entries." Each line is tagged with the revision number, which has a `help-echo' property containing author and date information." (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all" - (if revision (list "-r" revision))) + (append (vc-switches 'bzr 'annotate) + (if revision (list "-r" revision)))) (let ((table (make-hash-table :test 'equal))) (set-process-filter (get-buffer-process buffer) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 707090a..232dcc2 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -96,6 +96,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "21.1" :group 'vc-cvs) +(defcustom vc-cvs-annotate-switches nil + "String or list of strings specifying switches for cvs annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-cvs) + (defcustom vc-cvs-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -623,11 +634,12 @@ Remaining arguments are ignored." (defun vc-cvs-annotate-command (file buffer &optional revision) "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." - (vc-cvs-command buffer - (if (vc-cvs-stay-local-p file) - 'async 0) - file "annotate" - (if revision (concat "-r" revision))) + (apply #'vc-cvs-command buffer + (if (vc-cvs-stay-local-p file) + 'async 0) + file "annotate" + (append (vc-switches 'cvs 'annotate) + (if revision (list (concat "-r" revision))))) ;; Strip the leading few lines. (let ((proc (get-buffer-process buffer))) (if proc diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index a31c121..48e22c8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -120,6 +120,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-git) +(defcustom vc-git-annotate-switches nil + "String or list of strings specifying switches for Git blame under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-git) + (defcustom vc-git-program "git" "Name of the Git executable (excluding any arguments)." :version "24.1" @@ -1013,7 +1023,9 @@ or BRANCH^ (where \"^\" can be repeated)." (defun vc-git-annotate-command (file buf &optional rev) (let ((name (file-relative-name file))) - (vc-git-command buf 'async nil "blame" "--date=iso" "-C" "-C" rev "--" name))) + (apply #'vc-git-command buf 'async nil "blame" "--date=iso" + (append (vc-switches 'git 'annotate) + (list rev "--" name))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 8b4067f..c841dfc 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -131,6 +131,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-hg) +(defcustom vc-hg-annotate-switches nil + "String or list of strings specifying switches for hg annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-hg) + (defcustom vc-hg-program "hg" "Name of the Mercurial executable (excluding any arguments)." :type 'string @@ -358,8 +369,9 @@ If LIMIT is non-nil, show no more than this many entries." (defun vc-hg-annotate-command (file buffer &optional revision) "Execute \"hg annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." - (vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow" - (when revision (concat "-r" revision)))) + (apply #'vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow" + (append (vc-switches 'hg 'annotate) + (if revision (list (concat "-r" revision)))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index d783572..cd84ebe 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -49,6 +49,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-mtn) +(defcustom vc-mtn-annotate-switches nil + "String or list of strings specifying switches for mtn annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-mtn) + (define-obsolete-variable-alias 'vc-mtn-command 'vc-mtn-program "23.1") (defcustom vc-mtn-program "mtn" "Name of the monotone executable." @@ -246,8 +257,9 @@ If LIMIT is non-nil, show no more than this many entries." (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) (defun vc-mtn-annotate-command (file buf &optional rev) - (apply 'vc-mtn-command buf 'async file "annotate" - (if rev (list "-r" rev)))) + (apply #'vc-mtn-command buf 'async file "annotate" + (append (vc-switches 'mtn 'annotate) + (if rev (list "-r" rev))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index d74daf9..5ce9afa 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -95,6 +95,17 @@ If you want to force an empty list of arguments, use t." :version "22.1" :group 'vc-svn) +(defcustom vc-svn-annotate-switches nil + "String or list of strings specifying switches for svn annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-svn) + (defcustom vc-svn-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -736,7 +747,9 @@ Set file properties accordingly. If FILENAME is non-nil, return its status." ;; Support for `svn annotate' (defun vc-svn-annotate-command (file buf &optional rev) - (vc-svn-command buf 'async file "annotate" (if rev (concat "-r" rev)))) + (apply #'vc-svn-command buf 'async file "annotate" + (append (vc-switches 'svn 'annotate) + (if rev (list (concat "-r" rev)))))) (defun vc-svn-annotate-time-of-rev (rev) ;; Arbitrarily assume 10 commits per day. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 54b2214..e8e8202 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -780,6 +780,26 @@ not specific to any particular backend." :group 'vc :version "21.1") +(defcustom vc-annotate-switches nil + "A string or list of strings specifying switches for annotate under VC. +When running annotate under a given BACKEND, VC uses the first +non-nil value of `vc-BACKEND-annotate-switches', `vc-annotate-switches', +and `annotate-switches', in that order. Since nil means to check the +next variable in the sequence, either of the first two may use +the value t to mean no switches at all. `vc-annotate-switches' +should contain switches that are specific to version control, but +not specific to any particular backend. + +As very few switches (if any) are used across different VC tools, +please consider using the specific `vc-BACKEND-annotate-switches' +for the backend you use." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :group 'vc + :version "25.1") + (defcustom vc-log-show-limit 2000 "Limit the number of items shown by the VC log commands. Zero means unlimited.