Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
9c5b8381
Unverified
Commit
9c5b8381
authored
Jun 22, 2020
by
Ted Zlatanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auth-source-reveal-mode: fixes from code review
parent
4a7c98d2
Pipeline
#5917
failed with stage
in 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
lisp/progmodes/prog-mode.el
lisp/progmodes/prog-mode.el
+16
-7
No files found.
lisp/progmodes/prog-mode.el
View file @
9c5b8381
...
...
@@ -101,15 +101,20 @@ For example: \"->\" to the Unicode RIGHT ARROW →
Elements can also look like (IDENTIFIER REGEXP CHARACTER) which
will behave like the simpler (SYMBOL-STRING . CHARACTER) form
except it will match regular expressions. The IDENTIFIER can be
any symbol and should be unique to every package that augments
`prettify-symbols-alist' (in order to remove prettifications
easily with `prettify-symbols-remove-prettifications').
except it will match regular expressions. The REGEXP can have
capturing groups, in which case the first such group will be
prettified. If there are no capturing groups, the whole REGEXP is
prettified.
The IDENTIFIER can be any symbol and should be unique to every
package that augments `prettify-symbols-alist' (in order to
remove prettifications easily with
`prettify-symbols-remove-prettifications').
For example: \"abc[123]\" matching \"abc1\", \"abc2\", or
\"abc3\" could be mapped to the Unicode WORLD MAP. Note again the
IDENTIFIER is an arbitrary Lisp symbol.
(my-worldmap \"abc[123]\"
128506
)
(my-worldmap \"abc[123]\"
?\U0001f5fa
)
CHARACTER can be a character, or it can be a list or vector, in
which case it will be used to compose the new symbol as per the
...
...
@@ -156,8 +161,12 @@ START and END are passed back and may be modified (narrowed)."
;; ...We need to always do a string-match for the bounds.
(
string-match
(
nth
1
ps
)
match
))
;; Now return the actual prettification start and end.
return
(
list
(
+
start
(
match-beginning
1
))
(
+
start
(
match-end
1
))
return
(
list
(
+
start
(
or
(
match-beginning
1
)
(
match-beginning
0
)))
(
+
start
(
or
(
match-end
1
)
(
match-end
0
)))
(
nth
2
ps
))))))
(
defvar-local
prettify-symbols-compose-replacer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment