Always define 'define-fringe-bitmap'
* lisp/cus-start.el: Test 'fringe-bitmaps' to see if fringe.c was compiled. * lisp/fringe.el: Use lexical-binding. (define-fringe-bitmap): Provide a fallback implementation. * lisp/progmodes/flymake.el (flymake-double-exclamation-mark): Define unconditionally. * lisp/progmodes/gdb-mi.el (define-fringe-bitmap): Don't declare any more. (breakpoint, hollow-right-triangle): Define unconditionally.
This commit is contained in:
parent
17252062b0
commit
08192e4009
5 changed files with 47 additions and 31 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -876,6 +876,9 @@ documentation of the new mode and its commands.
|
||||||
|
|
||||||
* Incompatible Lisp Changes in Emacs 27.1
|
* Incompatible Lisp Changes in Emacs 27.1
|
||||||
|
|
||||||
|
** define-fringe-bitmap is always defined, even when Emacs is built
|
||||||
|
without any GUI support.
|
||||||
|
|
||||||
---
|
---
|
||||||
** Just loading a theme's file no longer activates the theme's settings.
|
** Just loading a theme's file no longer activates the theme's settings.
|
||||||
Loading a theme with 'M-x load-theme' still activates the theme, as it
|
Loading a theme with 'M-x load-theme' still activates the theme, as it
|
||||||
|
|
|
@ -685,7 +685,7 @@ since it could result in memory overflow and make Emacs crash."
|
||||||
((string-match "selection" (symbol-name symbol))
|
((string-match "selection" (symbol-name symbol))
|
||||||
(fboundp 'x-selection-exists-p))
|
(fboundp 'x-selection-exists-p))
|
||||||
((string-match "fringe" (symbol-name symbol))
|
((string-match "fringe" (symbol-name symbol))
|
||||||
(fboundp 'define-fringe-bitmap))
|
(boundp 'fringe-bitmaps))
|
||||||
((string-match "\\`imagemagick" (symbol-name symbol))
|
((string-match "\\`imagemagick" (symbol-name symbol))
|
||||||
(fboundp 'imagemagick-types))
|
(fboundp 'imagemagick-types))
|
||||||
((equal "font-use-system-font" (symbol-name symbol))
|
((equal "font-use-system-font" (symbol-name symbol))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;;; fringe.el --- fringe setup and control
|
;;; fringe.el --- fringe setup and control -*- lexical-binding:t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
;; Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
@ -291,6 +291,24 @@ SIDE must be the symbol `left' or `right'."
|
||||||
0)
|
0)
|
||||||
(float (frame-char-width))))
|
(float (frame-char-width))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(unless (fboundp 'define-fringe-bitmap)
|
||||||
|
(defun define-fringe-bitmap (_bitmap _bits &optional _height _width _align)
|
||||||
|
"Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH.
|
||||||
|
BITMAP is a symbol identifying the new fringe bitmap.
|
||||||
|
BITS is either a string or a vector of integers.
|
||||||
|
HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS.
|
||||||
|
WIDTH must be an integer between 1 and 16, or nil which defaults to 8.
|
||||||
|
Optional fifth arg ALIGN may be one of ‘top’, ‘center’, or ‘bottom’,
|
||||||
|
indicating the positioning of the bitmap relative to the rows where it
|
||||||
|
is used; the default is to center the bitmap. Fifth arg may also be a
|
||||||
|
list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap
|
||||||
|
should be repeated.
|
||||||
|
If BITMAP already exists, the existing definition is replaced."
|
||||||
|
;; This is a fallback for non-GUI builds.
|
||||||
|
;; The real implementation is in src/fringe.c.
|
||||||
|
))
|
||||||
|
|
||||||
(provide 'fringe)
|
(provide 'fringe)
|
||||||
|
|
||||||
;;; fringe.el ends here
|
;;; fringe.el ends here
|
||||||
|
|
|
@ -219,25 +219,24 @@ Specifically, start it when the saved buffer is actually displayed."
|
||||||
:version "26.1"
|
:version "26.1"
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(when (fboundp 'define-fringe-bitmap)
|
(define-fringe-bitmap 'flymake-double-exclamation-mark
|
||||||
(define-fringe-bitmap 'flymake-double-exclamation-mark
|
(vector #b00000000
|
||||||
(vector #b00000000
|
#b00000000
|
||||||
#b00000000
|
#b00000000
|
||||||
#b00000000
|
#b00000000
|
||||||
#b00000000
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b01100110
|
||||||
#b01100110
|
#b00000000
|
||||||
#b00000000
|
#b01100110
|
||||||
#b01100110
|
#b00000000
|
||||||
#b00000000
|
#b00000000
|
||||||
#b00000000
|
#b00000000))
|
||||||
#b00000000)))
|
|
||||||
|
|
||||||
(defvar-local flymake-timer nil
|
(defvar-local flymake-timer nil
|
||||||
"Timer for starting syntax check.")
|
"Timer for starting syntax check.")
|
||||||
|
|
|
@ -1741,16 +1741,12 @@ static char *magick[] = {
|
||||||
(defvar breakpoint-disabled-icon nil
|
(defvar breakpoint-disabled-icon nil
|
||||||
"Icon for disabled breakpoint in display margin.")
|
"Icon for disabled breakpoint in display margin.")
|
||||||
|
|
||||||
(declare-function define-fringe-bitmap "fringe.c"
|
;; Bitmap for breakpoint in fringe
|
||||||
(bitmap bits &optional height width align))
|
(define-fringe-bitmap 'breakpoint
|
||||||
|
"\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
|
||||||
(and (display-images-p)
|
;; Bitmap for gud-overlay-arrow in fringe
|
||||||
;; Bitmap for breakpoint in fringe
|
(define-fringe-bitmap 'hollow-right-triangle
|
||||||
(define-fringe-bitmap 'breakpoint
|
"\xe0\x90\x88\x84\x84\x88\x90\xe0")
|
||||||
"\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
|
|
||||||
;; Bitmap for gud-overlay-arrow in fringe
|
|
||||||
(define-fringe-bitmap 'hollow-right-triangle
|
|
||||||
"\xe0\x90\x88\x84\x84\x88\x90\xe0"))
|
|
||||||
|
|
||||||
(defface breakpoint-enabled
|
(defface breakpoint-enabled
|
||||||
'((t
|
'((t
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue