Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
95db5042d5
7 changed files with 44 additions and 25 deletions
|
@ -227,21 +227,19 @@ It should normally be a symbol with position and it defaults to FORM."
|
|||
(defun macroexp-macroexpand (form env)
|
||||
"Like `macroexpand' but checking obsolescence."
|
||||
(let* ((macroexpand-all-environment env)
|
||||
(new-form
|
||||
(macroexpand form env)))
|
||||
(if (and (not (eq form new-form)) ;It was a macro call.
|
||||
(car-safe form)
|
||||
(symbolp (car form))
|
||||
(get (car form) 'byte-obsolete-info))
|
||||
(let* ((fun (car form))
|
||||
(obsolete (get fun 'byte-obsolete-info)))
|
||||
(macroexp-warn-and-return
|
||||
(macroexp--obsolete-warning
|
||||
fun obsolete
|
||||
(if (symbolp (symbol-function fun))
|
||||
"alias" "macro"))
|
||||
new-form (list 'obsolete fun) nil fun))
|
||||
new-form)))
|
||||
new-form)
|
||||
(while (not (eq form (setq new-form (macroexpand-1 form env))))
|
||||
(let ((fun (car-safe form)))
|
||||
(setq form
|
||||
(if (and fun (symbolp fun)
|
||||
(get fun 'byte-obsolete-info))
|
||||
(macroexp-warn-and-return
|
||||
(macroexp--obsolete-warning
|
||||
fun (get fun 'byte-obsolete-info)
|
||||
(if (symbolp (symbol-function fun)) "alias" "macro"))
|
||||
new-form (list 'obsolete fun) nil fun)
|
||||
new-form))))
|
||||
form))
|
||||
|
||||
(defun macroexp--unfold-lambda (form &optional name)
|
||||
(or name (setq name "anonymous lambda"))
|
||||
|
|
|
@ -776,12 +776,12 @@ of the process. A value of nil indicates that there are no active refinements."
|
|||
(while (string-match "[ \t\n]+" hl pos)
|
||||
(setq pos (match-end 0))
|
||||
(put-text-property (match-beginning 0) pos 'display
|
||||
`(space :align-to ,(+ pos base))
|
||||
`(space :align-to (,(+ pos base) . width))
|
||||
hl)))
|
||||
(setq hl (replace-regexp-in-string ;; preserve text properties
|
||||
"\\(%\\)" "\\1\\1"
|
||||
hl)))
|
||||
(list (propertize " " 'display `(space :align-to ,base))
|
||||
(list (propertize " " 'display `(space :align-to (,base . width)))
|
||||
hl)))
|
||||
|
||||
(defun proced-pid-at-point ()
|
||||
|
@ -894,6 +894,8 @@ normal hook `proced-post-display-hook'.
|
|||
(setq-local font-lock-defaults
|
||||
'(proced-font-lock-keywords t nil nil beginning-of-line))
|
||||
(setq-local switch-to-buffer-preserve-window-point nil)
|
||||
;; So that the heading scales together with the body of the table.
|
||||
(setq-local text-scale-remap-header-line t)
|
||||
(if (and (not proced-auto-update-timer) proced-auto-update-interval)
|
||||
(setq proced-auto-update-timer
|
||||
(run-at-time t proced-auto-update-interval
|
||||
|
|
|
@ -554,7 +554,7 @@ print_partial_compiled_pattern (re_char *start, re_char *end)
|
|||
fprintf (stderr, "/charset [%s",
|
||||
(re_opcode_t) *(p - 1) == charset_not ? "^" : "");
|
||||
|
||||
if (p + *p >= pend)
|
||||
if (p + (*p & 0x7f) >= pend)
|
||||
fputs (" !extends past end of pattern! ", stderr);
|
||||
|
||||
for (c = 0; c < 256; c++)
|
||||
|
|
11
src/search.c
11
src/search.c
|
@ -162,7 +162,7 @@ clear_regexp_cache (void)
|
|||
/* It's tempting to compare with the syntax-table we've actually changed,
|
||||
but it's not sufficient because char-table inheritance means that
|
||||
modifying one syntax-table can change others at the same time. */
|
||||
if (!searchbufs[i].busy && !EQ (searchbufs[i].syntax_table, Qt))
|
||||
if (!searchbufs[i].busy && !BASE_EQ (searchbufs[i].syntax_table, Qt))
|
||||
searchbufs[i].regexp = Qnil;
|
||||
}
|
||||
|
||||
|
@ -214,10 +214,11 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp,
|
|||
&& !cp->busy
|
||||
&& STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
|
||||
&& !NILP (Fstring_equal (cp->regexp, pattern))
|
||||
&& EQ (cp->buf.translate, translate)
|
||||
&& BASE_EQ (cp->buf.translate, translate)
|
||||
&& cp->posix == posix
|
||||
&& (EQ (cp->syntax_table, Qt)
|
||||
|| EQ (cp->syntax_table, BVAR (current_buffer, syntax_table)))
|
||||
&& (BASE_EQ (cp->syntax_table, Qt)
|
||||
|| BASE_EQ (cp->syntax_table,
|
||||
BVAR (current_buffer, syntax_table)))
|
||||
&& !NILP (Fequal (cp->f_whitespace_regexp, Vsearch_spaces_regexp))
|
||||
&& cp->buf.charset_unibyte == charset_unibyte)
|
||||
break;
|
||||
|
@ -2892,7 +2893,7 @@ Return value is undefined if the last search failed. */)
|
|||
ptrdiff_t start = search_regs.start[i];
|
||||
if (start >= 0)
|
||||
{
|
||||
if (EQ (last_thing_searched, Qt)
|
||||
if (BASE_EQ (last_thing_searched, Qt)
|
||||
|| ! NILP (integers))
|
||||
{
|
||||
XSETFASTINT (data[2 * i], start);
|
||||
|
|
|
@ -29268,7 +29268,9 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
|
|||
/* 'width': the width of FONT. */
|
||||
if (EQ (prop, Qwidth))
|
||||
return OK_PIXELS (font
|
||||
? FONT_WIDTH (font)
|
||||
? (font->average_width
|
||||
? font->average_width
|
||||
: font->space_width)
|
||||
: FRAME_COLUMN_WIDTH (it->f));
|
||||
#else
|
||||
if (EQ (prop, Qheight) || EQ (prop, Qwidth))
|
||||
|
|
|
@ -124,4 +124,20 @@
|
|||
(dyn dyn dyn dyn)
|
||||
(dyn dyn dyn lex))))))
|
||||
|
||||
(defmacro macroexp--test-macro1 ()
|
||||
(declare (obsolete "new-replacement" nil))
|
||||
1)
|
||||
|
||||
(defmacro macroexp--test-macro2 ()
|
||||
'(macroexp--test-macro1))
|
||||
|
||||
(ert-deftest macroexp--test-obsolete-macro ()
|
||||
(should
|
||||
(let ((res
|
||||
(cl-letf (((symbol-function 'message) #'user-error))
|
||||
(condition-case err
|
||||
(macroexpand-all '(macroexp--test-macro2))
|
||||
(user-error (error-message-string err))))))
|
||||
(should (and (stringp res) (string-match "new-replacement" res))))))
|
||||
|
||||
;;; macroexp-tests.el ends here
|
||||
|
|
|
@ -1530,7 +1530,7 @@ folded."
|
|||
(equal (comp-mvar-typeset mvar)
|
||||
comp-tests-cond-rw-expected-type))))))))
|
||||
|
||||
(ert-deftest comp-tests-result-lambda ()
|
||||
(comp-deftest comp-tests-result-lambda ()
|
||||
(native-compile 'comp-tests-result-lambda)
|
||||
(should (eq (funcall (comp-tests-result-lambda) '(a . b)) 'a)))
|
||||
;;; comp-tests.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue