aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJohn Wiegley2016-02-03 23:56:08 -0800
committerJohn Wiegley2016-02-03 23:56:08 -0800
commit0608bf1c3d91196bcf06a6da96243f0fac119089 (patch)
treed79a6c43cd10c681445b75f859545c9f88e41899 /lisp
parent91ab66201cedbcd2e4e8533a7152f6736ad08731 (diff)
parentee7399792f865905d393df05c3d4e5ec309aa06c (diff)
downloademacs-0608bf1c3d91196bcf06a6da96243f0fac119089.tar.gz
emacs-0608bf1c3d91196bcf06a6da96243f0fac119089.zip
Merge from origin/emacs-25
ee73997 Make erc work better when encountering unknown prefix chars b99141d Make erc completion case-insensitive again 66c4620 Make complection in erc use consistent casing 8c562b2 Make /QUIT in erc more robust d93d2c5 Make tracking faces in Emacs work more reliably af6ab7e Make shr not bug out on images on non-graphical displays 3311f40 Fix bookmark display widths d90ab1e Fix typo in eww-make-unique-file-name 7f81825 Make it possible to TAB to input fields a43a1dc Insert complete alt texts when images are disabled 56ed4e1 Allow eww text fields to grow 66b315c Make erc work when subword-mode is switched on 255b68f Fix IMAP doc example 91557f5 Quoting fixes in doc strings and diagnostics 2c0dc9f Fix warning message in hack-local-variables 504696d Etags: yet another improvement in Ruby tags 8784ebf Fix x-popup-menu on TTYs without a mouse 8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro 6191003 Use pop-to-buffer-same-window in eww fe321fd * autogen.sh: Revert all recent changes. 74ebd4a * make-dist: Updates related to nt/. 737193a * make-dist: Add modules/. 3696bf2 * make-dist: Update for super-special file that can't live in etc/. a4278e2 Fix failure to compile ns-win.el in parallel builds 860da4d Fix names of tags generated for Ruby accessors f6213ce Fix file-name recognition in 'etags' e42e662 Change Ruby file names and extensions recognized by 'etags' 58bfb6a More improvements for Ruby support in 'etags' c04e911 Add --git-config option to autogen.sh 5713466 Fix editing undo changes in eww fields 51362d6 Allow the user more control of popping up the eww window ee0fbd8 Make eww-browse-url with new-window parameter work again 9c3142d Clean up eww code slightly cb035f3 Don't insert nil faces in shr 4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. 93f2153 Improve the custom type of some user options. 9f60d7e Mark some risky calendar variables. 1d07dcd Highlight two additional SCSS keywords ee8b466 Recommend enabling integrity-checking in git e639e10 Some corrections in Elisp manual d766ca8 Chatter when autogen.sh changes Git configuration 3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) 43cb9f8 Omit unnecessary history from Lisp intro 2fbd1da * etc/HISTORY: Add some more history, plus git tags. c90e1b4 Improve elisp “Security Considerations” doc cedd7ca autogen.sh now arranges for git to check hashes 86ce76b ; Fix ChangeLog.2 commit ID. 7b1d2b1 Fix (c & 040) typo in emergency escapes a8273da Fix display of overlay strings with 'display' and 'box' property fc48106 Fix imap-starttls-open cdecbed Fix return value of imap-starttls-open 20c7e34 ; * etc/NEWS: Fix renamed command name 98bdbdb Correct reference to DARWIN_OS preprocessor symbol b250d29 Spelling fix b920a0e Spelling fixes 93b144b Pacify GCC on C library without glibc API
Diffstat (limited to 'lisp')
-rw-r--r--lisp/autoinsert.el12
-rw-r--r--lisp/calendar/cal-china.el6
-rw-r--r--lisp/calendar/calendar.el4
-rw-r--r--lisp/calendar/diary-lib.el2
-rw-r--r--lisp/calendar/solar.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el8
-rw-r--r--lisp/emacs-lisp/map.el17
-rw-r--r--lisp/emacs-lisp/pcase.el6
-rw-r--r--lisp/erc/erc-backend.el28
-rw-r--r--lisp/erc/erc-button.el16
-rw-r--r--lisp/erc/erc-pcomplete.el8
-rw-r--r--lisp/erc/erc-track.el3
-rw-r--r--lisp/erc/erc.el21
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-gravatar.el2
-rw-r--r--lisp/gnus/gnus-picon.el2
-rw-r--r--lisp/gnus/mml-smime.el4
-rw-r--r--lisp/net/eww.el70
-rw-r--r--lisp/net/imap.el18
-rw-r--r--lisp/net/shr.el29
-rw-r--r--lisp/org/org-compat.el4
-rw-r--r--lisp/progmodes/prolog.el79
-rw-r--r--lisp/replace.el2
-rw-r--r--lisp/ses.el6
-rw-r--r--lisp/textmodes/css-mode.el12
-rw-r--r--lisp/xwidget.el8
27 files changed, 226 insertions, 151 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index e5dd62ff4d8..43fa31288e6 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -305,7 +305,17 @@ ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute
305file-name or one relative to `auto-insert-directory' or a function to call. 305file-name or one relative to `auto-insert-directory' or a function to call.
306ACTION may also be a vector containing several successive single actions as 306ACTION may also be a vector containing several successive single actions as
307described above, e.g. [\"header.insert\" date-and-author-update]." 307described above, e.g. [\"header.insert\" date-and-author-update]."
308 :type 'sexp 308 :type '(alist :key-type
309 (choice (regexp :tag "Regexp matching file name")
310 (symbol :tag "Major mode")
311 (cons :tag "Condition and description"
312 (choice :tag "Condition"
313 (regexp :tag "Regexp matching file name")
314 (symbol :tag "Major mode"))
315 (string :tag "Description")))
316 ;; There's no custom equivalent of "repeat" for vectors.
317 :value-type (choice file function
318 (sexp :tag "Skeleton or vector")))
309 :version "25.1" 319 :version "25.1"
310 :group 'auto-insert) 320 :group 'auto-insert)
311 321
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el
index cfddd6b6953..661a8185bf4 100644
--- a/lisp/calendar/cal-china.el
+++ b/lisp/calendar/cal-china.el
@@ -71,9 +71,6 @@ Default is for Beijing. This is an expression in `year' since it changed at
71;; It gets eval'd. 71;; It gets eval'd.
72;;;###autoload 72;;;###autoload
73(put 'calendar-chinese-time-zone 'risky-local-variable t) 73(put 'calendar-chinese-time-zone 'risky-local-variable t)
74;;;###autoload
75(put 'chinese-calendar-time-zone 'risky-local-variable t)
76
77 74
78;; FIXME unused. 75;; FIXME unused.
79(defcustom calendar-chinese-location-name "Beijing" 76(defcustom calendar-chinese-location-name "Beijing"
@@ -98,6 +95,7 @@ Default is for no daylight saving time."
98This is an expression depending on `year' because it changed 95This is an expression depending on `year' because it changed
99at 1928-01-01 00:00:00 from `PMT' to `CST'." 96at 1928-01-01 00:00:00 from `PMT' to `CST'."
100 :type 'sexp 97 :type 'sexp
98 :risky t
101 :group 'calendar-chinese) 99 :group 'calendar-chinese)
102 100
103(defcustom calendar-chinese-daylight-time-zone-name "CDT" 101(defcustom calendar-chinese-daylight-time-zone-name "CDT"
@@ -115,6 +113,7 @@ at 1928-01-01 00:00:00 from `PMT' to `CST'."
115Default is for no daylight saving time. See documentation of 113Default is for no daylight saving time. See documentation of
116`calendar-daylight-savings-starts'." 114`calendar-daylight-savings-starts'."
117 :type 'sexp 115 :type 'sexp
116 :risky t
118 :group 'calendar-chinese) 117 :group 'calendar-chinese)
119 118
120(defcustom calendar-chinese-daylight-saving-end nil 119(defcustom calendar-chinese-daylight-saving-end nil
@@ -125,6 +124,7 @@ Default is for no daylight saving time. See documentation of
125Default is for no daylight saving time. See documentation of 124Default is for no daylight saving time. See documentation of
126`calendar-daylight-savings-ends'." 125`calendar-daylight-savings-ends'."
127 :type 'sexp 126 :type 'sexp
127 :risky t
128 :group 'calendar-chinese) 128 :group 'calendar-chinese)
129 129
130(defcustom calendar-chinese-daylight-saving-start-time 0 130(defcustom calendar-chinese-daylight-saving-start-time 0
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 5dec3eca52d..ccdae484fa6 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -850,6 +850,7 @@ For examples of three common styles, see `diary-american-date-forms',
850Normally you should not customize this, but `calendar-date-display-form' 850Normally you should not customize this, but `calendar-date-display-form'
851\(which see)." 851\(which see)."
852 :type 'sexp 852 :type 'sexp
853 :risky t
853 :version "23.1" 854 :version "23.1"
854 :group 'calendar) 855 :group 'calendar)
855 856
@@ -859,6 +860,7 @@ Normally you should not customize this, but `calendar-date-display-form'
859Normally you should not customize this, but `calendar-date-display-form' 860Normally you should not customize this, but `calendar-date-display-form'
860\(which see)." 861\(which see)."
861 :type 'sexp 862 :type 'sexp
863 :risky t
862 :group 'calendar) 864 :group 'calendar)
863 865
864(defcustom calendar-american-date-display-form 866(defcustom calendar-american-date-display-form
@@ -867,6 +869,7 @@ Normally you should not customize this, but `calendar-date-display-form'
867Normally you should not customize this, but `calendar-date-display-form' 869Normally you should not customize this, but `calendar-date-display-form'
868\(which see)." 870\(which see)."
869 :type 'sexp 871 :type 'sexp
872 :risky t
870 :group 'calendar) 873 :group 'calendar)
871 874
872(defcustom calendar-date-display-form 875(defcustom calendar-date-display-form
@@ -892,6 +895,7 @@ would give the usual American style in fixed-length fields. The variables
892`calendar-american-date-display-form' provide some defaults for three common 895`calendar-american-date-display-form' provide some defaults for three common
893styles." 896styles."
894 :type 'sexp 897 :type 'sexp
898 :risky t
895 :set-after '(calendar-date-style calendar-iso-date-display-form 899 :set-after '(calendar-date-style calendar-iso-date-display-form
896 calendar-european-date-display-form 900 calendar-european-date-display-form
897 calendar-american-date-display-form) 901 calendar-american-date-display-form)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 0523d8355b3..9ba4e358e38 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -296,6 +296,7 @@ Used by the function `diary-remind', a pseudo-pattern is a list of
296expressions that can involve the keywords `days' (a number), `date' 296expressions that can involve the keywords `days' (a number), `date'
297\(a list of month, day, year), and `diary-entry' (a string)." 297\(a list of month, day, year), and `diary-entry' (a string)."
298 :type 'sexp 298 :type 'sexp
299 :risky t
299 :group 'diary) 300 :group 'diary)
300 301
301(defcustom diary-abbreviated-year-flag t 302(defcustom diary-abbreviated-year-flag t
@@ -412,6 +413,7 @@ The format of the header is specified by `diary-header-line-format'."
412Only used if `diary-header-line-flag' is non-nil." 413Only used if `diary-header-line-flag' is non-nil."
413 :group 'diary 414 :group 'diary
414 :type 'sexp 415 :type 'sexp
416 :risky t
415 :initialize 'custom-initialize-default 417 :initialize 'custom-initialize-default
416 :set 'diary-set-header 418 :set 'diary-set-header
417 :version "23.3") ; frame-width -> window-width 419 :version "23.3") ; frame-width -> window-width
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 2ce76d5da2f..bf8bedd599e 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -70,6 +70,7 @@ For example, the form
70 70
71would give military-style times like \"21:07 (UTC)\"." 71would give military-style times like \"21:07 (UTC)\"."
72 :type 'sexp 72 :type 'sexp
73 :risky t
73 :group 'calendar) 74 :group 'calendar)
74 75
75(defcustom calendar-latitude nil 76(defcustom calendar-latitude nil
@@ -131,6 +132,7 @@ variable `calendar-latitude' paired with the variable `calendar-longitude'.
131 132
132This variable should be set in `site-start'.el." 133This variable should be set in `site-start'.el."
133 :type 'sexp 134 :type 'sexp
135 :risky t
134 :group 'calendar) 136 :group 'calendar)
135 137
136(defcustom solar-error 0.5 138(defcustom solar-error 0.5
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 9fe6e036fbd..11eb44cea31 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1169,7 +1169,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
1169 (display-warning 'bytecomp string level byte-compile-log-buffer))) 1169 (display-warning 'bytecomp string level byte-compile-log-buffer)))
1170 1170
1171(defun byte-compile-warn (format &rest args) 1171(defun byte-compile-warn (format &rest args)
1172 "Issue a byte compiler warning; use (format FORMAT ARGS...) for message." 1172 "Issue a byte compiler warning; use (format-message FORMAT ARGS...) for message."
1173 (setq format (apply #'format-message format args)) 1173 (setq format (apply #'format-message format args))
1174 (if byte-compile-error-on-warn 1174 (if byte-compile-error-on-warn
1175 (error "%s" format) ; byte-compile-file catches and logs it 1175 (error "%s" format) ; byte-compile-file catches and logs it
@@ -3748,7 +3748,8 @@ discarding."
3748 (if (= (logand len 1) 1) 3748 (if (= (logand len 1) 1)
3749 (progn 3749 (progn
3750 (byte-compile-log-warning 3750 (byte-compile-log-warning
3751 (format "missing value for `%S' at end of setq" (car (last args))) 3751 (format-message
3752 "missing value for `%S' at end of setq" (car (last args)))
3752 nil :error) 3753 nil :error)
3753 (byte-compile-form 3754 (byte-compile-form
3754 `(signal 'wrong-number-of-arguments '(setq ,len)) 3755 `(signal 'wrong-number-of-arguments '(setq ,len))
@@ -4019,7 +4020,8 @@ that suppresses all warnings during execution of BODY."
4019 (progn 4020 (progn
4020 (mapc 'byte-compile-form (cdr form)) 4021 (mapc 'byte-compile-form (cdr form))
4021 (byte-compile-out 'byte-call (length (cdr (cdr form))))) 4022 (byte-compile-out 'byte-call (length (cdr (cdr form)))))
4022 (byte-compile-log-warning "`funcall' called with no arguments" nil :error) 4023 (byte-compile-log-warning
4024 (format-message "`funcall' called with no arguments") nil :error)
4023 (byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0)) 4025 (byte-compile-form '(signal 'wrong-number-of-arguments '(funcall 0))
4024 byte-compile--for-effect))) 4026 byte-compile--for-effect)))
4025 4027
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index ebef27185ae..ec8d3d79d9f 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -47,17 +47,18 @@
47(pcase-defmacro map (&rest args) 47(pcase-defmacro map (&rest args)
48 "Build a `pcase' pattern matching map elements. 48 "Build a `pcase' pattern matching map elements.
49 49
50The `pcase' pattern will match each element of PATTERN against 50ARGS is a list of elements to be matched in the map.
51the corresponding elements of the map.
52 51
53Extra elements of the map are ignored if fewer ARGS are 52Each element of ARGS can be of the form (KEY PAT), in which case KEY is
54given, and the match does not fail. 53evaluated and searched for in the map. The match fails if for any KEY
54found in the map, the corresponding PAT doesn't match the value
55associated to the KEY.
55 56
56ARGS can be a list of the form (KEY PAT), in which case KEY in an 57Each element can also be a SYMBOL, which is an abbreviation of a (KEY
57unquoted form. 58PAT) tuple of the form (\\='SYMBOL SYMBOL).
58 59
59ARGS can also be a list of symbols, which stands for ('SYMBOL 60Keys in ARGS not found in the map are ignored, and the match doesn't
60SYMBOL)." 61fail."
61 `(and (pred mapp) 62 `(and (pred mapp)
62 ,@(map--make-pcase-bindings args))) 63 ,@(map--make-pcase-bindings args)))
63 64
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 7be997e6469..7e164c0fe5c 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -111,7 +111,7 @@
111CASES is a list of elements of the form (PATTERN CODE...). 111CASES is a list of elements of the form (PATTERN CODE...).
112 112
113A structural PATTERN describes a template that identifies a class 113A structural PATTERN describes a template that identifies a class
114of values. For example, the pattern `(,foo ,bar) matches any 114of values. For example, the pattern \\=`(,foo ,bar) matches any
115two element list, binding its elements to symbols named `foo' and 115two element list, binding its elements to symbols named `foo' and
116`bar' -- in much the same way that `cl-destructuring-bind' would. 116`bar' -- in much the same way that `cl-destructuring-bind' would.
117 117
@@ -119,12 +119,12 @@ A significant difference from `cl-destructuring-bind' is that, if
119a pattern match fails, the next case is tried until either a 119a pattern match fails, the next case is tried until either a
120successful match is found or there are no more cases. 120successful match is found or there are no more cases.
121 121
122Another difference is that pattern elements may be backquoted, 122Another difference is that pattern elements may be quoted,
123meaning they must match exactly: The pattern \\='(foo bar) 123meaning they must match exactly: The pattern \\='(foo bar)
124matches only against two element lists containing the symbols 124matches only against two element lists containing the symbols
125`foo' and `bar' in that order. (As a short-hand, atoms always 125`foo' and `bar' in that order. (As a short-hand, atoms always
126match themselves, such as numbers or strings, and need not be 126match themselves, such as numbers or strings, and need not be
127quoted). 127quoted.)
128 128
129Lastly, a pattern can be logical, such as (pred numberp), that 129Lastly, a pattern can be logical, such as (pred numberp), that
130matches any number-like element; or the symbol `_', that matches 130matches any number-like element; or the symbol `_', that matches
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 4a2a12dd403..b413ee5a547 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -474,13 +474,39 @@ Currently this is called by `erc-send-input'."
474 nil t)) 474 nil t))
475 (split-string (buffer-string) "\n")))) 475 (split-string (buffer-string) "\n"))))
476 476
477(defun erc-forward-word ()
478 "Moves forward one word, ignoring any subword settings. If no
479subword-mode is active, then this is (forward-word)."
480 (skip-syntax-forward "^w")
481 (> (skip-syntax-forward "w") 0))
482
483(defun erc-word-at-arg-p (pos)
484 "Reports whether the char after a given POS has word syntax.
485If POS is out of range, the value is nil."
486 (let ((c (char-after pos)))
487 (if c
488 (eq ?w (char-syntax c))
489 nil)))
490
491(defun erc-bounds-of-word-at-point ()
492 "Returns the bounds of a word at point, or nil if we're not at
493a word. If no subword-mode is active, then this
494is (bounds-of-thing-at-point 'word)."
495 (if (or (erc-word-at-arg-p (point))
496 (erc-word-at-arg-p (1- (point))))
497 (save-excursion
498 (let* ((start (progn (skip-syntax-backward "w") (point)))
499 (end (progn (skip-syntax-forward "w") (point))))
500 (cons start end)))
501 nil))
502
477;; Used by CTCP functions 503;; Used by CTCP functions
478(defun erc-upcase-first-word (str) 504(defun erc-upcase-first-word (str)
479 "Upcase the first word in STR." 505 "Upcase the first word in STR."
480 (with-temp-buffer 506 (with-temp-buffer
481 (insert str) 507 (insert str)
482 (goto-char (point-min)) 508 (goto-char (point-min))
483 (upcase-word 1) 509 (upcase-region (point) (progn (erc-forward-word) (point)))
484 (buffer-string))) 510 (buffer-string)))
485 511
486(defun erc-server-setup-periodical-ping (buffer) 512(defun erc-server-setup-periodical-ping (buffer)
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index e1ccea90dd1..7d509196330 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -300,14 +300,14 @@ specified by `erc-button-alist'."
300 (when (or (eq t form) 300 (when (or (eq t form)
301 (eval form)) 301 (eval form))
302 (goto-char (point-min)) 302 (goto-char (point-min))
303 (while (forward-word 1) 303 (while (erc-forward-word)
304 (setq bounds (bounds-of-thing-at-point 'word)) 304 (when (setq bounds (erc-bounds-of-word-at-point))
305 (setq word (buffer-substring-no-properties 305 (setq word (buffer-substring-no-properties
306 (car bounds) (cdr bounds))) 306 (car bounds) (cdr bounds)))
307 (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) 307 (when (or (and (erc-server-buffer-p) (erc-get-server-user word))
308 (and erc-channel-users (erc-get-channel-user word))) 308 (and erc-channel-users (erc-get-channel-user word)))
309 (erc-button-add-button (car bounds) (cdr bounds) 309 (erc-button-add-button (car bounds) (cdr bounds)
310 fun t (list word))))))) 310 fun t (list word))))))))
311 311
312(defun erc-button-add-buttons-1 (regexp entry) 312(defun erc-button-add-buttons-1 (regexp entry)
313 "Search through the buffer for matches to ENTRY and add buttons." 313 "Search through the buffer for matches to ENTRY and add buttons."
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el
index cf3f51ba3f6..9f572396de8 100644
--- a/lisp/erc/erc-pcomplete.el
+++ b/lisp/erc/erc-pcomplete.el
@@ -238,10 +238,12 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick."
238 "Returns a list of all nicks on the current server." 238 "Returns a list of all nicks on the current server."
239 (let (nicks) 239 (let (nicks)
240 (erc-with-server-buffer 240 (erc-with-server-buffer
241 (maphash (lambda (nick _user) 241 (maphash (lambda (_nick user)
242 (setq nicks (cons (concat nick postfix) nicks))) 242 (setq nicks (cons
243 (concat (erc-server-user-nickname user) postfix)
244 nicks)))
243 erc-server-users)) 245 erc-server-users))
244 nicks)) 246 nicks))
245 247
246(defun pcomplete-erc-channels () 248(defun pcomplete-erc-channels ()
247 "Returns a list of channels associated with the current server." 249 "Returns a list of channels associated with the current server."
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 1750cb77845..4d8feb52759 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -971,7 +971,8 @@ is in `erc-mode'."
971 "Return a list of all faces used in STR." 971 "Return a list of all faces used in STR."
972 (let ((i 0) 972 (let ((i 0)
973 (m (length str)) 973 (m (length str))
974 (faces (erc-list (get-text-property 0 'face str))) 974 (faces (let ((face1 (get-text-property 0 'face str)))
975 (when face1 (list face1))))
975 cur) 976 cur)
976 (while (and (setq i (next-single-property-change i 'face str m)) 977 (while (and (setq i (next-single-property-change i 'face str m))
977 (not (= i m))) 978 (not (= i m)))
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index b7f40a878a9..98ea594e164 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1141,7 +1141,7 @@ which the local user typed."
1141 (define-key map "\C-c\C-u" 'erc-kill-input) 1141 (define-key map "\C-c\C-u" 'erc-kill-input)
1142 (define-key map "\C-c\C-x" 'erc-quit-server) 1142 (define-key map "\C-c\C-x" 'erc-quit-server)
1143 (define-key map "\M-\t" 'ispell-complete-word) 1143 (define-key map "\M-\t" 'ispell-complete-word)
1144 (define-key map "\t" 'completion-at-point) 1144 (define-key map "\t" 'erc-completion-at-point)
1145 1145
1146 ;; Suppress `font-lock-fontify-block' key binding since it 1146 ;; Suppress `font-lock-fontify-block' key binding since it
1147 ;; destroys face properties. 1147 ;; destroys face properties.
@@ -3996,6 +3996,13 @@ Prompt for one if called interactively."
3996 (format "MODE %s +k %s" tgt key) 3996 (format "MODE %s +k %s" tgt key)
3997 (format "MODE %s -k" tgt))))) 3997 (format "MODE %s -k" tgt)))))
3998 3998
3999(defun erc-completion-at-point ()
4000 "Perform complection on the text around point case-insentitively.
4001See `completion-at-point'."
4002 (interactive)
4003 (let ((completion-ignore-case t))
4004 (completion-at-point)))
4005
3999(defun erc-quit-server (reason) 4006(defun erc-quit-server (reason)
4000 "Disconnect from current server after prompting for REASON. 4007 "Disconnect from current server after prompting for REASON.
4001`erc-quit-reason' works with this just like with `erc-cmd-QUIT'." 4008`erc-quit-reason' works with this just like with `erc-cmd-QUIT'."
@@ -6088,13 +6095,15 @@ If it doesn't exist, create it."
6088 (or (file-accessible-directory-p dir) (error "Cannot access %s" dir))) 6095 (or (file-accessible-directory-p dir) (error "Cannot access %s" dir)))
6089 6096
6090(defun erc-kill-query-buffers (process) 6097(defun erc-kill-query-buffers (process)
6091 "Kill all buffers of PROCESS." 6098 "Kill all buffers of PROCESS.
6099Does nothing if PROCESS is not a process object."
6092 ;; here, we only want to match the channel buffers, to avoid 6100 ;; here, we only want to match the channel buffers, to avoid
6093 ;; "selecting killed buffers" b0rkage. 6101 ;; "selecting killed buffers" b0rkage.
6094 (erc-with-all-buffers-of-server process 6102 (when (processp process)
6095 (lambda () 6103 (erc-with-all-buffers-of-server process
6096 (not (erc-server-buffer-p))) 6104 (lambda ()
6097 (kill-buffer (current-buffer)))) 6105 (not (erc-server-buffer-p)))
6106 (kill-buffer (current-buffer)))))
6098 6107
6099(defun erc-nick-at-point () 6108(defun erc-nick-at-point ()
6100 "Give information about the nickname at `point'. 6109 "Give information about the nickname at `point'.
diff --git a/lisp/files.el b/lisp/files.el
index 92ae4344e1c..aca7b3593d9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3426,7 +3426,11 @@ local variables, but directory-local variables may still be applied."
3426 (format-message 3426 (format-message
3427 "%s: `lexical-binding' at end of file unreliable" 3427 "%s: `lexical-binding' at end of file unreliable"
3428 (file-name-nondirectory 3428 (file-name-nondirectory
3429 (or buffer-file-name "")))))) 3429 ;; We are called from
3430 ;; 'with-temp-buffer', so we need
3431 ;; to use 'thisbuf's name in the
3432 ;; warning message.
3433 (or (buffer-file-name thisbuf) ""))))))
3430 (t 3434 (t
3431 (ignore-errors 3435 (ignore-errors
3432 (push (cons (if (eq var 'eval) 3436 (push (cons (if (eq var 'eval)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 54bbfd857f1..366d14aca1d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -260,7 +260,7 @@ This can also be a list of the above values."
260 ;; needed there. And XEmacs doesn't handle `intangible' anyway. 260 ;; needed there. And XEmacs doesn't handle `intangible' anyway.
261 '(invisible t) 261 '(invisible t)
262 "Property list to use for hiding text." 262 "Property list to use for hiding text."
263 :type 'sexp 263 :type 'plist
264 :group 'gnus-article-hiding) 264 :group 'gnus-article-hiding)
265 265
266;; Fixme: This isn't the right thing for mixed graphical and non-graphical 266;; Fixme: This isn't the right thing for mixed graphical and non-graphical
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el
index deb6e4bc4c9..de7203d9d10 100644
--- a/lisp/gnus/gnus-gravatar.el
+++ b/lisp/gnus/gnus-gravatar.el
@@ -41,7 +41,7 @@ If nil, default to `gravatar-size'."
41 41
42(defcustom gnus-gravatar-properties '(:ascent center :relief 1) 42(defcustom gnus-gravatar-properties '(:ascent center :relief 1)
43 "List of image properties applied to Gravatar images." 43 "List of image properties applied to Gravatar images."
44 :type 'sexp 44 :type 'plist
45 :version "24.1" 45 :version "24.1"
46 :group 'gnus-gravatar) 46 :group 'gnus-gravatar)
47 47
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el
index 6365e8e2ff7..bbbe0eded4e 100644
--- a/lisp/gnus/gnus-picon.el
+++ b/lisp/gnus/gnus-picon.el
@@ -73,7 +73,7 @@ Some people may want to add \"unknown\" to this list."
73 73
74(defcustom gnus-picon-properties '(:color-symbols (("None" . "white"))) 74(defcustom gnus-picon-properties '(:color-symbols (("None" . "white")))
75 "List of image properties applied to picons." 75 "List of image properties applied to picons."
76 :type 'sexp 76 :type 'plist
77 :version "24.3" 77 :version "24.3"
78 :group 'gnus-picon) 78 :group 'gnus-picon)
79 79
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 2d8f25c5003..248e63682c8 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -216,7 +216,7 @@ Whether the passphrase is cached at all is controlled by
216 ""))))) 216 "")))))
217 (if (setq cert (smime-cert-by-dns who)) 217 (if (setq cert (smime-cert-by-dns who))
218 (setq result (list 'certfile (buffer-name cert))) 218 (setq result (list 'certfile (buffer-name cert)))
219 (setq bad (format "`%s' not found. " who)))) 219 (setq bad (gnus-format-message "`%s' not found. " who))))
220 (quit)) 220 (quit))
221 result)) 221 result))
222 222
@@ -235,7 +235,7 @@ Whether the passphrase is cached at all is controlled by
235 ""))))) 235 "")))))
236 (if (setq cert (smime-cert-by-ldap who)) 236 (if (setq cert (smime-cert-by-ldap who))
237 (setq result (list 'certfile (buffer-name cert))) 237 (setq result (list 'certfile (buffer-name cert)))
238 (setq bad (format "`%s' not found. " who)))) 238 (setq bad (gnus-format-message "`%s' not found. " who))))
239 (quit)) 239 (quit))
240 result)) 240 result))
241 241
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index bc74a0d31d2..e8b8c63addb 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -275,6 +275,10 @@ word(s) will be searched for via `eww-search-prefix'."
275 (setq url (concat url "/")))) 275 (setq url (concat url "/"))))
276 (setq url (concat eww-search-prefix 276 (setq url (concat eww-search-prefix
277 (replace-regexp-in-string " " "+" url)))))) 277 (replace-regexp-in-string " " "+" url))))))
278 (pop-to-buffer-same-window
279 (if (eq major-mode 'eww-mode)
280 (current-buffer)
281 (get-buffer-create "*eww*")))
278 (eww-setup-buffer) 282 (eww-setup-buffer)
279 ;; Check whether the domain only uses "Highly Restricted" Unicode 283 ;; Check whether the domain only uses "Highly Restricted" Unicode
280 ;; IDNA characters. If not, transform to punycode to indicate that 284 ;; IDNA characters. If not, transform to punycode to indicate that
@@ -557,7 +561,7 @@ Currently this means either text/html or application/xhtml+xml."
557(declare-function mailcap-view-mime "mailcap" (type)) 561(declare-function mailcap-view-mime "mailcap" (type))
558(defun eww-display-pdf () 562(defun eww-display-pdf ()
559 (let ((data (buffer-substring (point) (point-max)))) 563 (let ((data (buffer-substring (point) (point-max))))
560 (switch-to-buffer (get-buffer-create "*eww pdf*")) 564 (pop-to-buffer-same-window (get-buffer-create "*eww pdf*"))
561 (let ((coding-system-for-write 'raw-text) 565 (let ((coding-system-for-write 'raw-text)
562 (inhibit-read-only t)) 566 (inhibit-read-only t))
563 (erase-buffer) 567 (erase-buffer)
@@ -566,7 +570,6 @@ Currently this means either text/html or application/xhtml+xml."
566 (goto-char (point-min))) 570 (goto-char (point-min)))
567 571
568(defun eww-setup-buffer () 572(defun eww-setup-buffer ()
569 (switch-to-buffer (get-buffer-create "*eww*"))
570 (when (or (plist-get eww-data :url) 573 (when (or (plist-get eww-data :url)
571 (plist-get eww-data :dom)) 574 (plist-get eww-data :dom))
572 (eww-save-history)) 575 (eww-save-history))
@@ -759,9 +762,9 @@ the like."
759 762
760;;;###autoload 763;;;###autoload
761(defun eww-browse-url (url &optional new-window) 764(defun eww-browse-url (url &optional new-window)
762 (cond (new-window 765 (when new-window
763 (switch-to-buffer (generate-new-buffer "*eww*")) 766 (pop-to-buffer-same-window (generate-new-buffer "*eww*"))
764 (eww-mode))) 767 (eww-mode))
765 (eww url)) 768 (eww url))
766 769
767(defun eww-back-url () 770(defun eww-back-url ()
@@ -933,6 +936,7 @@ network, but just re-display the HTML already fetched."
933 (let ((eww-form (list (cons :method (dom-attr dom 'method)) 936 (let ((eww-form (list (cons :method (dom-attr dom 'method))
934 (cons :action (dom-attr dom 'action)))) 937 (cons :action (dom-attr dom 'action))))
935 (start (point))) 938 (start (point)))
939 (insert "\n")
936 (shr-ensure-paragraph) 940 (shr-ensure-paragraph)
937 (shr-generic dom) 941 (shr-generic dom)
938 (unless (bolp) 942 (unless (bolp)
@@ -1042,6 +1046,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
1042 (1- end))))) 1046 (1- end)))))
1043 (let* ((form (get-text-property pos 'eww-form)) 1047 (let* ((form (get-text-property pos 'eww-form))
1044 (properties (text-properties-at pos)) 1048 (properties (text-properties-at pos))
1049 (buffer-undo-list t)
1045 (inhibit-read-only t) 1050 (inhibit-read-only t)
1046 (length (- end beg replace-length)) 1051 (length (- end beg replace-length))
1047 (type (plist-get form :type))) 1052 (type (plist-get form :type)))
@@ -1056,19 +1061,19 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
1056 (1- (line-end-position)) 1061 (1- (line-end-position))
1057 (eww-end-of-field))) 1062 (eww-end-of-field)))
1058 (while (and (> length 0) 1063 (while (and (> length 0)
1059 (eql (following-char) ? )) 1064 (eql (char-after (1- (point))) ? ))
1060 (delete-region (1- (point)) (point)) 1065 (delete-region (1- (point)) (point))
1061 (cl-decf length)))) 1066 (cl-decf length))))
1062 ((< length 0) 1067 ((< length 0)
1063 ;; Add padding. 1068 ;; Add padding.
1064 (save-excursion 1069 (save-excursion
1065 (goto-char (1- end)) 1070 (goto-char end)
1066 (goto-char 1071 (goto-char
1067 (if (equal type "textarea") 1072 (if (equal type "textarea")
1068 (1- (line-end-position)) 1073 (1- (line-end-position))
1069 (1+ (eww-end-of-field)))) 1074 (1+ (eww-end-of-field))))
1070 (let ((start (point))) 1075 (let ((start (point)))
1071 (insert (make-string (abs length) ? )) 1076 (insert (make-string (abs length) ? ))
1072 (set-text-properties start (point) properties)) 1077 (set-text-properties start (point) properties))
1073 (goto-char (1- end))))) 1078 (goto-char (1- end)))))
1074 (set-text-properties (plist-get form :start) (plist-get form :end) 1079 (set-text-properties (plist-get form :start) (plist-get form :end)
@@ -1082,8 +1087,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
1082 (when (equal type "password") 1087 (when (equal type "password")
1083 ;; Display passwords as asterisks. 1088 ;; Display passwords as asterisks.
1084 (let ((start (eww-beginning-of-field))) 1089 (let ((start (eww-beginning-of-field)))
1085 (put-text-property start (+ start (length value)) 1090 (put-text-property
1086 'display (make-string (length value) ?*))))))))) 1091 start (+ start (length value))
1092 'display (make-string (length value) ?*)))))))))
1087 1093
1088(defun eww-tag-textarea (dom) 1094(defun eww-tag-textarea (dom)
1089 (let ((start (point)) 1095 (let ((start (point))
@@ -1145,7 +1151,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
1145 (t 1151 (t
1146 (eww-form-text dom))) 1152 (eww-form-text dom)))
1147 (unless (= start (point)) 1153 (unless (= start (point))
1148 (put-text-property start (1+ start) 'help-echo "Input field")))) 1154 (put-text-property start (1+ start) 'help-echo "Input field")
1155 ;; Mark this as an element we can TAB to.
1156 (put-text-property start (1+ start) 'shr-url dom))))
1149 1157
1150(defun eww-tag-select (dom) 1158(defun eww-tag-select (dom)
1151 (shr-ensure-paragraph) 1159 (shr-ensure-paragraph)
@@ -1476,21 +1484,21 @@ Differences in #targets are ignored."
1476 string))) 1484 string)))
1477 1485
1478(defun eww-make-unique-file-name (file directory) 1486(defun eww-make-unique-file-name (file directory)
1479 (cond 1487 (cond
1480 ((zerop (length file)) 1488 ((zerop (length file))
1481 (setq file "!")) 1489 (setq file "!"))
1482 ((string-match "\\`[.]" file) 1490 ((string-match "\\`[.]" file)
1483 (setq file (concat "!" file)))) 1491 (setq file (concat "!" file))))
1484 (let ((count 1) 1492 (let ((count 1)
1485 (stem file) 1493 (stem file)
1486 (suffix "")) 1494 (suffix ""))
1487 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) 1495 (when (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
1488 (setq stem (match-string 1) 1496 (setq stem (match-string 1 file)
1489 suffix (match-string 2))) 1497 suffix (match-string 2)))
1490 (while (file-exists-p (expand-file-name file directory)) 1498 (while (file-exists-p (expand-file-name file directory))
1491 (setq file (format "%s(%d)%s" stem count suffix)) 1499 (setq file (format "%s(%d)%s" stem count suffix))
1492 (setq count (1+ count))) 1500 (setq count (1+ count)))
1493 (expand-file-name file directory))) 1501 (expand-file-name file directory)))
1494 1502
1495(defun eww-set-character-encoding (charset) 1503(defun eww-set-character-encoding (charset)
1496 "Set character encoding to CHARSET. 1504 "Set character encoding to CHARSET.
@@ -1576,8 +1584,8 @@ If CHARSET is nil then use UTF-8."
1576(defun eww-list-bookmarks () 1584(defun eww-list-bookmarks ()
1577 "Display the bookmarks." 1585 "Display the bookmarks."
1578 (interactive) 1586 (interactive)
1579 (eww-bookmark-prepare) 1587 (pop-to-buffer "*eww bookmarks*")
1580 (pop-to-buffer "*eww bookmarks*")) 1588 (eww-bookmark-prepare))
1581 1589
1582(defun eww-bookmark-prepare () 1590(defun eww-bookmark-prepare ()
1583 (eww-read-bookmarks) 1591 (eww-read-bookmarks)
@@ -1764,7 +1772,7 @@ If CHARSET is nil then use UTF-8."
1764 (let ((buffer eww-current-buffer)) 1772 (let ((buffer eww-current-buffer))
1765 (quit-window) 1773 (quit-window)
1766 (when buffer 1774 (when buffer
1767 (switch-to-buffer buffer))) 1775 (pop-to-buffer-same-window buffer)))
1768 (eww-restore-history history))) 1776 (eww-restore-history history)))
1769 1777
1770(defvar eww-history-mode-map 1778(defvar eww-history-mode-map
@@ -1845,7 +1853,7 @@ If CHARSET is nil then use UTF-8."
1845 (unless buffer 1853 (unless buffer
1846 (error "No buffer on current line")) 1854 (error "No buffer on current line"))
1847 (quit-window) 1855 (quit-window)
1848 (switch-to-buffer buffer))) 1856 (pop-to-buffer-same-window buffer)))
1849 1857
1850(defun eww-buffer-show () 1858(defun eww-buffer-show ()
1851 "Display buffer under point in eww buffer list." 1859 "Display buffer under point in eww buffer list."
@@ -1854,7 +1862,7 @@ If CHARSET is nil then use UTF-8."
1854 (unless buffer 1862 (unless buffer
1855 (error "No buffer on current line")) 1863 (error "No buffer on current line"))
1856 (other-window -1) 1864 (other-window -1)
1857 (switch-to-buffer buffer) 1865 (pop-to-buffer-same-window buffer)
1858 (other-window 1))) 1866 (other-window 1)))
1859 1867
1860(defun eww-buffer-show-next () 1868(defun eww-buffer-show-next ()
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 5c5ed868172..e5a14d75dee 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -747,13 +747,19 @@ sure of changing the value of `foo'."
747 :capability-command "1 CAPABILITY\r\n" 747 :capability-command "1 CAPABILITY\r\n"
748 :always-query-capabilities t 748 :always-query-capabilities t
749 :end-of-command "\r\n" 749 :end-of-command "\r\n"
750 :success " OK " 750 :success "^1 OK "
751 :starttls-function 751 :starttls-function
752 (lambda (capabilities) 752 #'(lambda (capabilities)
753 (when (string-match-p "STARTTLS" capabilities) 753 (when (string-match-p "STARTTLS" capabilities)
754 "1 STARTTLS\r\n")))) 754 "1 STARTTLS\r\n"))))
755 (done (and process 755 done)
756 (memq (process-status process) '(open run))))) 756 (when process
757 (imap-log buffer)
758 (when (memq (process-status process) '(open run))
759 (setq done process)
760 (with-current-buffer buffer
761 (goto-char (point-min))
762 (imap-parse-greeting))))
757 (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed")) 763 (message "imap: Connecting with STARTTLS...%s" (if done "done" "failed"))
758 done)) 764 done))
759 765
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index c5de34a4ac5..a8ba2845aa2 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -981,7 +981,7 @@ element is the data blob and the second element is the content-type."
981 (image-animated-p image)))) 981 (image-animated-p image))))
982 (image-animate image nil 60))) 982 (image-animate image nil 60)))
983 image) 983 image)
984 (insert alt))) 984 (insert (or alt ""))))
985 985
986(defun shr-rescale-image (data &optional content-type) 986(defun shr-rescale-image (data &optional content-type)
987 "Rescale DATA, if too big, to fit the current buffer." 987 "Rescale DATA, if too big, to fit the current buffer."
@@ -1426,9 +1426,7 @@ The preference is a float determined from `shr-prefer-media-type'."
1426 (and shr-blocked-images 1426 (and shr-blocked-images
1427 (string-match shr-blocked-images url))) 1427 (string-match shr-blocked-images url)))
1428 (setq shr-start (point)) 1428 (setq shr-start (point))
1429 (if (> (string-width alt) 8) 1429 (shr-insert alt))
1430 (shr-insert (truncate-string-to-width alt 8))
1431 (shr-insert alt)))
1432 ((and (not shr-ignore-cache) 1430 ((and (not shr-ignore-cache)
1433 (url-is-cached (shr-encode-url url))) 1431 (url-is-cached (shr-encode-url url)))
1434 (funcall shr-put-image-function (shr-get-image-data url) alt)) 1432 (funcall shr-put-image-function (shr-get-image-data url) alt))
@@ -1771,17 +1769,18 @@ The preference is a float determined from `shr-prefer-media-type'."
1771 align))) 1769 align)))
1772 (dolist (line lines) 1770 (dolist (line lines)
1773 (end-of-line) 1771 (end-of-line)
1774 (let ((start (point))) 1772 (let ((start (point))
1775 (insert 1773 (background (and (> (length line) 0)
1776 line 1774 (shr-face-background
1777 (propertize " " 1775 (get-text-property
1778 'display `(space :align-to (,pixel-align)) 1776 (1- (length line)) 'face line))))
1779 'face (and (> (length line) 0) 1777 (space (propertize
1780 (shr-face-background 1778 " "
1781 (get-text-property 1779 'display `(space :align-to (,pixel-align))
1782 (1- (length line)) 'face line))) 1780 'shr-table-indent shr-table-id)))
1783 'shr-table-indent shr-table-id) 1781 (when background
1784 shr-table-vertical-line) 1782 (setq space (propertize space 'face background)))
1783 (insert line space shr-table-vertical-line)
1785 (shr-colorize-region 1784 (shr-colorize-region
1786 start (1- (point)) (nth 5 column) (nth 6 column))) 1785 start (1- (point)) (nth 5 column) (nth 6 column)))
1787 (forward-line 1)) 1786 (forward-line 1))
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index 6403d4df04d..cf6aafc9854 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -479,9 +479,9 @@ LIMIT."
479 (not (null pos))))) 479 (not (null pos)))))
480 480
481(defalias 'org-font-lock-ensure 481(defalias 'org-font-lock-ensure
482 (if (fboundp 'org-font-lock-ensure) 482 (if (fboundp 'font-lock-ensure)
483 #'font-lock-ensure 483 #'font-lock-ensure
484 (lambda (_beg _end) (font-lock-fontify-buffer)))) 484 (lambda (&optional _beg _end) (font-lock-fontify-buffer))))
485 485
486(defun org-floor* (x &optional y) 486(defun org-floor* (x &optional y)
487 "Return a list of the floor of X and the fractional part of X. 487 "Return a list of the floor of X and the fractional part of X.
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 3767dbaa1e8..9ee405b31e1 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -53,34 +53,16 @@
53;; all the bells and whistles one would expect, including syntax 53;; all the bells and whistles one would expect, including syntax
54;; highlighting and auto indentation. It can also send regions to an 54;; highlighting and auto indentation. It can also send regions to an
55;; inferior Prolog process. 55;; inferior Prolog process.
56;;
57;; The code requires the comint, easymenu, info, imenu, and font-lock
58;; libraries. These are normally distributed with GNU Emacs and
59;; XEmacs.
60 56
61;;; Installation: 57;; Some settings you may wish to use:
62;; 58
63;; Insert the following lines in your init file:
64;;
65;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path))
66;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
67;; (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
68;; (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t)
69;; (setq prolog-system 'swi) ; optional, the system you are using; 59;; (setq prolog-system 'swi) ; optional, the system you are using;
70;; ; see `prolog-system' below for possible values 60;; ; see `prolog-system' below for possible values
71;; (setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) 61;; (setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode)
72;; ("\\.m$" . mercury-mode)) 62;; ("\\.m\\'" . mercury-mode))
73;; auto-mode-alist)) 63;; auto-mode-alist))
74;; 64;;
75;; where the path in the first line is the file system path to this file. 65;; The last expression above makes sure that files ending with .pl
76;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp".
77;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in
78;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp'
79;; (default when compiling from sources) are automatically added to
80;; `load-path', so the first line is not necessary provided that you
81;; put this file in the appropriate place.
82;;
83;; The last s-expression above makes sure that files ending with .pl
84;; are assumed to be Prolog files and not Perl, which is the default 66;; are assumed to be Prolog files and not Perl, which is the default
85;; Emacs setting. If this is not wanted, remove this line. It is then 67;; Emacs setting. If this is not wanted, remove this line. It is then
86;; necessary to either 68;; necessary to either
@@ -98,8 +80,8 @@
98;; If the command to start the prolog process ('sicstus', 'pl' or 80;; If the command to start the prolog process ('sicstus', 'pl' or
99;; 'swipl' for SWI prolog, etc.) is not available in the default path, 81;; 'swipl' for SWI prolog, etc.) is not available in the default path,
100;; then it is necessary to set the value of the environment variable 82;; then it is necessary to set the value of the environment variable
101;; EPROLOG to a shell command to invoke the prolog process. In XEmacs 83;; EPROLOG to a shell command to invoke the prolog process.
102;; and Emacs 20+ you can also customize the variable 84;; You can also customize the variable
103;; `prolog-program-name' (in the group `prolog-inferior') and provide 85;; `prolog-program-name' (in the group `prolog-inferior') and provide
104;; a full path for your Prolog system (swi, scitus, etc.). 86;; a full path for your Prolog system (swi, scitus, etc.).
105;; 87;;
@@ -109,6 +91,7 @@
109;; to keep the GNU Emacs compatibility. So if you work under Emacs 91;; to keep the GNU Emacs compatibility. So if you work under Emacs
110;; and see something that does not work do drop me a line, as I have 92;; and see something that does not work do drop me a line, as I have
111;; a smaller chance to notice this kind of bugs otherwise. 93;; a smaller chance to notice this kind of bugs otherwise.
94; [The above comment dates from 2011.]
112 95
113;; Changelog: 96;; Changelog:
114 97
@@ -272,9 +255,6 @@
272;; Version 0.1.35: 255;; Version 0.1.35:
273;; o Minor font-lock bug fixes. 256;; o Minor font-lock bug fixes.
274 257
275;;; TODO:
276
277;; Replace ":type 'sexp" with more precise Custom types.
278 258
279;;; Code: 259;;; Code:
280 260
@@ -441,7 +421,12 @@ Legal values:
441 "Alist of Prolog keywords which is used for font locking of directives." 421 "Alist of Prolog keywords which is used for font locking of directives."
442 :version "24.1" 422 :version "24.1"
443 :group 'prolog-font-lock 423 :group 'prolog-font-lock
444 :type 'sexp 424 ;; Note that "(repeat string)" also allows "nil" (repeat-count 0).
425 ;; This gets processed by prolog-find-value-by-system, which
426 ;; allows both the car and the cdr to be a list to eval.
427 ;; Though the latter must have the form '(eval ...)'.
428 ;; Of course, none of this is documented...
429 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
445 :risky t) 430 :risky t)
446 431
447(defcustom prolog-types 432(defcustom prolog-types
@@ -451,7 +436,7 @@ Legal values:
451 "Alist of Prolog types used by font locking." 436 "Alist of Prolog types used by font locking."
452 :version "24.1" 437 :version "24.1"
453 :group 'prolog-font-lock 438 :group 'prolog-font-lock
454 :type 'sexp 439 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
455 :risky t) 440 :risky t)
456 441
457(defcustom prolog-mode-specificators 442(defcustom prolog-mode-specificators
@@ -461,7 +446,7 @@ Legal values:
461 "Alist of Prolog mode specificators used by font locking." 446 "Alist of Prolog mode specificators used by font locking."
462 :version "24.1" 447 :version "24.1"
463 :group 'prolog-font-lock 448 :group 'prolog-font-lock
464 :type 'sexp 449 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
465 :risky t) 450 :risky t)
466 451
467(defcustom prolog-determinism-specificators 452(defcustom prolog-determinism-specificators
@@ -472,7 +457,7 @@ Legal values:
472 "Alist of Prolog determinism specificators used by font locking." 457 "Alist of Prolog determinism specificators used by font locking."
473 :version "24.1" 458 :version "24.1"
474 :group 'prolog-font-lock 459 :group 'prolog-font-lock
475 :type 'sexp 460 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
476 :risky t) 461 :risky t)
477 462
478(defcustom prolog-directives 463(defcustom prolog-directives
@@ -482,7 +467,7 @@ Legal values:
482 "Alist of Prolog source code directives used by font locking." 467 "Alist of Prolog source code directives used by font locking."
483 :version "24.1" 468 :version "24.1"
484 :group 'prolog-font-lock 469 :group 'prolog-font-lock
485 :type 'sexp 470 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
486 :risky t) 471 :risky t)
487 472
488 473
@@ -569,7 +554,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
569 (or (car names) "prolog")))) 554 (or (car names) "prolog"))))
570 "Alist of program names for invoking an inferior Prolog with `run-prolog'." 555 "Alist of program names for invoking an inferior Prolog with `run-prolog'."
571 :group 'prolog-inferior 556 :group 'prolog-inferior
572 :type 'sexp 557 :type '(alist :key-type (choice symbol sexp)
558 :value-type (group (choice string (const nil) sexp)))
573 :risky t) 559 :risky t)
574(defun prolog-program-name () 560(defun prolog-program-name ()
575 (prolog-find-value-by-system prolog-program-name)) 561 (prolog-find-value-by-system prolog-program-name))
@@ -580,7 +566,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
580 "Alist of switches given to inferior Prolog run with `run-prolog'." 566 "Alist of switches given to inferior Prolog run with `run-prolog'."
581 :version "24.1" 567 :version "24.1"
582 :group 'prolog-inferior 568 :group 'prolog-inferior
583 :type 'sexp 569 :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp)))
584 :risky t) 570 :risky t)
585(defun prolog-program-switches () 571(defun prolog-program-switches ()
586 (prolog-find-value-by-system prolog-program-switches)) 572 (prolog-find-value-by-system prolog-program-switches))
@@ -604,7 +590,8 @@ Some parts of the string are replaced:
604 region of a buffer, in which case it is the number of lines before 590 region of a buffer, in which case it is the number of lines before
605 the region." 591 the region."
606 :group 'prolog-inferior 592 :group 'prolog-inferior
607 :type 'sexp 593 :type '(alist :key-type (choice symbol sexp)
594 :value-type (group (choice string (const nil) sexp)))
608 :risky t) 595 :risky t)
609 596
610(defun prolog-consult-string () 597(defun prolog-consult-string ()
@@ -631,17 +618,21 @@ Some parts of the string are replaced:
631If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. 618If `prolog-program-name' is non-nil, it is a string sent to a Prolog process.
632If `prolog-program-name' is nil, it is an argument to the `compile' function." 619If `prolog-program-name' is nil, it is an argument to the `compile' function."
633 :group 'prolog-inferior 620 :group 'prolog-inferior
634 :type 'sexp 621 :type '(alist :key-type (choice symbol sexp)
622 :value-type (group (choice string (const nil) sexp)))
635 :risky t) 623 :risky t)
636 624
637(defun prolog-compile-string () 625(defun prolog-compile-string ()
638 (prolog-find-value-by-system prolog-compile-string)) 626 (prolog-find-value-by-system prolog-compile-string))
639 627
640(defcustom prolog-eof-string "end_of_file.\n" 628(defcustom prolog-eof-string "end_of_file.\n"
641 "Alist of strings that represent end of file for prolog. 629 "String or alist of strings that represent end of file for prolog.
642nil means send actual operating system end of file." 630If nil, send actual operating system end of file."
643 :group 'prolog-inferior 631 :group 'prolog-inferior
644 :type 'sexp 632 :type '(choice string
633 (const nil)
634 (alist :key-type (choice symbol sexp)
635 :value-type (group (choice string (const nil) sexp))))
645 :risky t) 636 :risky t)
646 637
647(defcustom prolog-prompt-regexp 638(defcustom prolog-prompt-regexp
@@ -653,7 +644,8 @@ nil means send actual operating system end of file."
653 "Alist of prompts of the prolog system command line." 644 "Alist of prompts of the prolog system command line."
654 :version "24.1" 645 :version "24.1"
655 :group 'prolog-inferior 646 :group 'prolog-inferior
656 :type 'sexp 647 :type '(alist :key-type (choice symbol sexp)
648 :value-type (group (choice string (const nil) sexp)))
657 :risky t) 649 :risky t)
658 650
659(defun prolog-prompt-regexp () 651(defun prolog-prompt-regexp ()
@@ -664,7 +656,8 @@ nil means send actual operating system end of file."
664;; (t "^|: +")) 656;; (t "^|: +"))
665;; "Alist of regexps matching the prompt when consulting `user'." 657;; "Alist of regexps matching the prompt when consulting `user'."
666;; :group 'prolog-inferior 658;; :group 'prolog-inferior
667;; :type 'sexp 659;; :type '(alist :key-type (choice symbol sexp)
660;; :value-type (group (choice string (const nil) sexp)))
668;; :risky t) 661;; :risky t)
669 662
670(defcustom prolog-debug-on-string "debug.\n" 663(defcustom prolog-debug-on-string "debug.\n"
@@ -1036,7 +1029,7 @@ VERSION is of the format (Major . Minor)"
1036 1029
1037(define-abbrev-table 'prolog-mode-abbrev-table ()) 1030(define-abbrev-table 'prolog-mode-abbrev-table ())
1038 1031
1039;; Becauses this can `eval' its arguments, any variable that gets 1032;; Because this can `eval' its arguments, any variable that gets
1040;; processed by it should be marked as :risky. 1033;; processed by it should be marked as :risky.
1041(defun prolog-find-value-by-system (alist) 1034(defun prolog-find-value-by-system (alist)
1042 "Get value from ALIST according to `prolog-system'." 1035 "Get value from ALIST according to `prolog-system'."
diff --git a/lisp/replace.el b/lisp/replace.el
index f5c8d33b5f5..dfe8cd739a2 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -85,7 +85,7 @@ from Isearch by using a key sequence like `C-s C-s M-%'." "24.3")
85 ;; while preparing to dump, also stops customize-rogue listing this. 85 ;; while preparing to dump, also stops customize-rogue listing this.
86 :initialize 'custom-initialize-delay 86 :initialize 'custom-initialize-delay
87 :group 'matching 87 :group 'matching
88 :type 'sexp 88 :type '(choice string (sexp :tag "Display specification"))
89 :version "25.1") 89 :version "25.1")
90 90
91(defcustom query-replace-from-history-variable 'query-replace-history 91(defcustom query-replace-from-history-variable 'query-replace-history
diff --git a/lisp/ses.el b/lisp/ses.el
index 7647a5519ad..a87386e1730 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -446,10 +446,8 @@ is nil if SYM is not a symbol that names a cell."
446 (ses-get-cell (car rowcol) (cdr rowcol))))))) 446 (ses-get-cell (car rowcol) (cdr rowcol)))))))
447 447
448(defun ses-plist-delq (plist prop) 448(defun ses-plist-delq (plist prop)
449 "Return PLIST after deletion of proprerty/value pair. 449 "Return PLIST after deleting the first pair (if any) with symbol PROP.
450 450This can alter PLIST."
451PROP is the symbol identifying the property/value pair. PLIST may
452be modified by border effect."
453 (cond 451 (cond
454 ((null plist) nil) 452 ((null plist) nil)
455 ((eq (car plist) prop) (cddr plist)) 453 ((eq (car plist) prop) (cddr plist))
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 96a82baa56c..b3a41d3822c 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -54,6 +54,14 @@
54 '("charset" "font-face" "import" "media" "namespace" "page") 54 '("charset" "font-face" "import" "media" "namespace" "page")
55 "Identifiers that appear in the form @foo.") 55 "Identifiers that appear in the form @foo.")
56 56
57(defconst css-bang-ids
58 '("important")
59 "Identifiers that appear in the form !foo.")
60
61(defconst scss-bang-ids
62 '("default" "global" "optional")
63 "Additional identifiers that appear in the form !foo in SCSS.")
64
57(defconst css-descriptor-ids 65(defconst css-descriptor-ids
58 '("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src" 66 '("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src"
59 "descent" "font-family" "font-size" "font-stretch" "font-style" 67 "descent" "font-family" "font-size" "font-stretch" "font-style"
@@ -236,8 +244,8 @@
236 244
237(defun css--font-lock-keywords (&optional sassy) 245(defun css--font-lock-keywords (&optional sassy)
238 `((,(concat "!\\s-*" 246 `((,(concat "!\\s-*"
239 (regexp-opt (append (if sassy '("global")) 247 (regexp-opt (append (if sassy scss-bang-ids)
240 '("important")))) 248 css-bang-ids)))
241 (0 font-lock-builtin-face)) 249 (0 font-lock-builtin-face))
242 ;; Atrules keywords. IDs not in css-at-ids are valid (ignored). 250 ;; Atrules keywords. IDs not in css-at-ids are valid (ignored).
243 ;; In fact the regexp should probably be 251 ;; In fact the regexp should probably be
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 8c8e679c8da..cd8ec0ec29d 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -144,7 +144,7 @@ Interactively, URL defaults to the string looking like a url around point."
144(defun xwidget-webkit-scroll-up () 144(defun xwidget-webkit-scroll-up ()
145 "Scroll webkit up. 145 "Scroll webkit up.
146Depending on the value of `xwidget-webkit-scroll-behavior', 146Depending on the value of `xwidget-webkit-scroll-behavior',
147this scrolls in 'native' fashion, or like `image-mode' would." 147this scrolls in `native' fashion, or like `image-mode' would."
148 (interactive) 148 (interactive)
149 (if (eq xwidget-webkit-scroll-behavior 'native) 149 (if (eq xwidget-webkit-scroll-behavior 'native)
150 (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50) 150 (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t 50)
@@ -153,7 +153,7 @@ this scrolls in 'native' fashion, or like `image-mode' would."
153(defun xwidget-webkit-scroll-down () 153(defun xwidget-webkit-scroll-down ()
154 "Scroll webkit down. 154 "Scroll webkit down.
155Depending on the value of `xwidget-webkit-scroll-behavior', 155Depending on the value of `xwidget-webkit-scroll-behavior',
156this scrolls in 'native' fashion, or like `image-mode' would." 156this scrolls in `native' fashion, or like `image-mode' would."
157 (interactive) 157 (interactive)
158 (if (eq xwidget-webkit-scroll-behavior 'native) 158 (if (eq xwidget-webkit-scroll-behavior 'native)
159 (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50) 159 (xwidget-set-adjustment (xwidget-webkit-last-session) 'vertical t -50)
@@ -162,7 +162,7 @@ this scrolls in 'native' fashion, or like `image-mode' would."
162(defun xwidget-webkit-scroll-forward () 162(defun xwidget-webkit-scroll-forward ()
163 "Scroll webkit forwards. 163 "Scroll webkit forwards.
164Depending on the value of `xwidget-webkit-scroll-behavior', 164Depending on the value of `xwidget-webkit-scroll-behavior',
165this scrolls in 'native' fashion, or like `image-mode' would." 165this scrolls in `native' fashion, or like `image-mode' would."
166 (interactive) 166 (interactive)
167 (if (eq xwidget-webkit-scroll-behavior 'native) 167 (if (eq xwidget-webkit-scroll-behavior 'native)
168 (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50) 168 (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t 50)
@@ -171,7 +171,7 @@ this scrolls in 'native' fashion, or like `image-mode' would."
171(defun xwidget-webkit-scroll-backward () 171(defun xwidget-webkit-scroll-backward ()
172 "Scroll webkit backwards. 172 "Scroll webkit backwards.
173Depending on the value of `xwidget-webkit-scroll-behavior', 173Depending on the value of `xwidget-webkit-scroll-behavior',
174this scrolls in 'native' fashion, or like `image-mode' would." 174this scrolls in `native' fashion, or like `image-mode' would."
175 (interactive) 175 (interactive)
176 (if (eq xwidget-webkit-scroll-behavior 'native) 176 (if (eq xwidget-webkit-scroll-behavior 'native)
177 (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50) 177 (xwidget-set-adjustment (xwidget-webkit-last-session) 'horizontal t -50)