emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 33bb679 1/7: Merge from origin/emacs-25


From: John Wiegley
Subject: [Emacs-diffs] master 33bb679 1/7: Merge from origin/emacs-25
Date: Mon, 15 Feb 2016 22:42:34 +0000

branch: master
commit 33bb679af9e323408c8089f0b5675a54776d60d5
Merge: ab7583a 10b8ed2
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>

    Merge from origin/emacs-25
    
    10b8ed2 Document EXIF image rotation
    0f60049 Support integer image rotation and respect EXIF rotations
    7dd45b6 Quote table names for postgres listings (sql-mode)
    6bac035 * lisp/replace.el (replace-match-maybe-edit): Make arg
            `backward' optional.
    ee909aa * lisp/simple.el (next-line-or-history-element): Reset
            temporary-goal-column.
    0a289d3 Suppress ACL ops if configured with --disable-acl
    1a9dbf5 Mention web bugs
    fa55da2 Make mm-html-blocked-images default to "" again
---
 doc/misc/emacs-mime.texi |    7 ++++++-
 lisp/gnus/mm-decode.el   |    2 +-
 lisp/replace.el          |   10 ++++++----
 lisp/simple.el           |   18 +++++++++++++++++-
 src/fileio.c             |   20 ++++++++++++--------
 5 files changed, 42 insertions(+), 15 deletions(-)

diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index b7c58d7..c9c4b7c 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -436,7 +436,12 @@ It is effective when @code{mm-text-html-renderer} 
(@pxref{Display
 Customization}) is @code{shr}.  In Gnus, this is overridden by the value
 of @code{gnus-blocked-images} or the return value of the function that
 @code{gnus-blocked-images} is set to (@pxref{HTML, ,HTML, gnus, Gnus
-manual}).  The default is @code{nil}.
+manual}).
+
+Some @acronym{HTML} mails might have the trick of spammers using
address@hidden<img>} tags.  It is likely to be intended to verify whether you
+have read the mail.  You can prevent your personal information from
+leaking by setting this option to @code{""} (which is the default).
 
 @item mm-w3m-safe-url-regexp
 @vindex mm-w3m-safe-url-regexp
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 89dc608c..f45337d 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -149,7 +149,7 @@ nil    : use external viewer (default web browser)."
   :type 'boolean
   :group 'mime-display)
 
-(defcustom mm-html-blocked-images nil
+(defcustom mm-html-blocked-images ""
   "Regexp matching image URLs to be blocked, or nil meaning not to block.
 Note that cid images that are embedded in a message won't be blocked."
   :version "25.1"
diff --git a/lisp/replace.el b/lisp/replace.el
index dfe8cd7..488eff7 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1980,13 +1980,15 @@ but coerced to the correct value of INTEGERS."
                  new)))
       (match-data integers reuse t)))
 
-(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data 
backward)
+(defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data
+                                 &optional backward)
   "Make a replacement with `replace-match', editing `\\?'.
 FIXEDCASE, LITERAL are passed to `replace-match' (which see).
 After possibly editing it (if `\\?' is present), NEWTEXT is also
 passed to `replace-match'.  If NOEDIT is true, no check for `\\?'
 is made (to save time).  MATCH-DATA is used for the replacement.
-In case editing is done, it is changed to use markers.
+In case editing is done, it is changed to use markers.  BACKWARD is
+used to reverse the replacement direction.
 
 The return value is non-nil if there has been no `\\?' or NOEDIT was
 passed in.  If LITERAL is set, no checking is done, anyway."
@@ -2027,7 +2029,7 @@ It is called with three arguments, as if it were
 `re-search-forward'.")
 
 (defun replace-search (search-string limit regexp-flag delimited-flag
-                                    case-fold-search backward)
+                      case-fold-search &optional backward)
   "Search for the next occurrence of SEARCH-STRING to replace."
   ;; Let-bind global isearch-* variables to values used
   ;; to search the next replacement.  These let-bindings
@@ -2061,7 +2063,7 @@ It is called with three arguments, as if it were
 
 (defun replace-highlight (match-beg match-end range-beg range-end
                          search-string regexp-flag delimited-flag
-                         case-fold-search backward)
+                         case-fold-search &optional backward)
   (if query-replace-highlight
       (if replace-overlay
          (move-overlay replace-overlay match-beg match-end (current-buffer))
diff --git a/lisp/simple.el b/lisp/simple.el
index 72e87a4..cce62c2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2041,6 +2041,10 @@ next element of the minibuffer history in the 
minibuffer."
        ;; the end of the line when it fails to go to the next line.
        (goto-char old-point)
        (next-history-element arg)
+       ;; Reset `temporary-goal-column' because a correct value is not
+       ;; calculated when `next-line' above fails by bumping against
+       ;; the bottom of the minibuffer (bug#22544).
+       (setq temporary-goal-column 0)
        ;; Restore the original goal column on the last line
        ;; of possibly multi-line input.
        (goto-char (point-max))
@@ -2071,6 +2075,10 @@ previous element of the minibuffer history in the 
minibuffer."
        ;; the beginning of the line when it fails to go to the previous line.
        (goto-char old-point)
        (previous-history-element arg)
+       ;; Reset `temporary-goal-column' because a correct value is not
+       ;; calculated when `previous-line' above fails by bumping against
+       ;; the top of the minibuffer (bug#22544).
+       (setq temporary-goal-column 0)
        ;; Restore the original goal column on the first line
        ;; of possibly multi-line input.
        (goto-char (minibuffer-prompt-end))
@@ -2078,7 +2086,15 @@ previous element of the minibuffer history in the 
minibuffer."
           (if (= (line-number-at-pos) 1)
               (move-to-column (+ old-column (1- (minibuffer-prompt-end))))
             (move-to-column old-column))
-        (goto-char (line-end-position)))))))
+        ;; Put the cursor at the end of the visual line instead of the
+        ;; logical line, so the next `previous-line-or-history-element'
+        ;; would move to the previous history element, not to a possible upper
+        ;; visual line from the end of logical line in `line-move-visual' mode.
+        (end-of-visual-line)
+        ;; Since `end-of-visual-line' puts the cursor at the beginning
+        ;; of the next visual line, move it one char back to the end
+        ;; of the first visual line (bug#22544).
+        (unless (eolp) (backward-char 1)))))))
 
 (defun next-complete-history-element (n)
   "Get next history element which completes the minibuffer before the point.
diff --git a/src/fileio.c b/src/fileio.c
index f185f38..0372f46 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -36,7 +36,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include <selinux/context.h>
 #endif
 
-#ifdef HAVE_ACL_SET_FILE
+#if USE_ACL && defined HAVE_ACL_SET_FILE
 #include <sys/acl.h>
 #endif
 
@@ -2937,16 +2937,17 @@ Return nil if file does not exist or is not accessible, 
or if Emacs
 was unable to determine the ACL entries.  */)
   (Lisp_Object filename)
 {
+#if USE_ACL
   Lisp_Object absname;
   Lisp_Object handler;
-#ifdef HAVE_ACL_SET_FILE
+# ifdef HAVE_ACL_SET_FILE
   acl_t acl;
   Lisp_Object acl_string;
   char *str;
-# ifndef HAVE_ACL_TYPE_EXTENDED
+#  ifndef HAVE_ACL_TYPE_EXTENDED
   acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS;
+#  endif
 # endif
-#endif
 
   absname = expand_and_dir_to_file (filename,
                                    BVAR (current_buffer, directory));
@@ -2957,7 +2958,7 @@ was unable to determine the ACL entries.  */)
   if (!NILP (handler))
     return call2 (handler, Qfile_acl, absname);
 
-#ifdef HAVE_ACL_SET_FILE
+# ifdef HAVE_ACL_SET_FILE
   absname = ENCODE_FILE (absname);
 
   acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED);
@@ -2976,6 +2977,7 @@ was unable to determine the ACL entries.  */)
   acl_free (acl);
 
   return acl_string;
+# endif
 #endif
 
   return Qnil;
@@ -2993,13 +2995,14 @@ Setting ACL for local files requires Emacs to be built 
with ACL
 support.  */)
   (Lisp_Object filename, Lisp_Object acl_string)
 {
+#if USE_ACL
   Lisp_Object absname;
   Lisp_Object handler;
-#ifdef HAVE_ACL_SET_FILE
+# ifdef HAVE_ACL_SET_FILE
   Lisp_Object encoded_absname;
   acl_t acl;
   bool fail;
-#endif
+# endif
 
   absname = Fexpand_file_name (filename, BVAR (current_buffer, directory));
 
@@ -3009,7 +3012,7 @@ support.  */)
   if (!NILP (handler))
     return call3 (handler, Qset_file_acl, absname, acl_string);
 
-#ifdef HAVE_ACL_SET_FILE
+# ifdef HAVE_ACL_SET_FILE
   if (STRINGP (acl_string))
     {
       acl = acl_from_text (SSDATA (acl_string));
@@ -3030,6 +3033,7 @@ support.  */)
       acl_free (acl);
       return fail ? Qnil : Qt;
     }
+# endif
 #endif
 
   return Qnil;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]