Skip to content

Commit

Permalink
Unexport find_name
Browse files Browse the repository at this point in the history
as this is part of the "old" interface that should not get called directly anymore
  • Loading branch information
lgoettgens committed Feb 16, 2024
1 parent 3246a27 commit 958b913
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ AbstractAlgebra.@show_name
AbstractAlgebra.get_name
AbstractAlgebra.set_name!
AbstractAlgebra.extra_name
AbstractAlgebra.find_name
AbstractAlgebra.PrettyPrinting.find_name
```

### Indentation and Decapitalization
Expand Down
2 changes: 0 additions & 2 deletions src/AbstractAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ import .PrettyPrinting: Lowercase
import .PrettyPrinting: Indent
import .PrettyPrinting: Dedent

import .PrettyPrinting: find_new_name as find_name # remove once all call-sites use get_name instead

export @enable_all_show_via_expressify

###############################################################################
Expand Down
4 changes: 2 additions & 2 deletions src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ end
set_name!(obj; override::Bool=true)
Sets the name of the object `obj` to the name of a variable in global (`Main` module) namespace
with value bound to the object `obj`, if such a variable exists (see [`AbstractAlgebra.find_name`](@ref)).
with value bound to the object `obj`, if such a variable exists (see [`AbstractAlgebra.PrettyPrinting.find_name`](@ref)).
This name is used for printing using [`AbstractAlgebra.@show_name`](@ref).
If `override` is `false`, the name is only set if there is no name already set.
Expand Down Expand Up @@ -1501,7 +1501,7 @@ end
Returns the name of the object `obj` if it is set, or `nothing` otherwise.
This function tries to find a name in the following order:
1. The name set by [`AbstractAlgebra.set_name!`](@ref).
2. The name of a variable in global (`Main` module) namespace with value bound to the object `obj` (see [`AbstractAlgebra.find_name`](@ref)).
2. The name of a variable in global (`Main` module) namespace with value bound to the object `obj` (see [`AbstractAlgebra.PrettyPrinting.find_name`](@ref)).
3. The name returned by [`AbstractAlgebra.extra_name`](@ref).
"""
function get_name(obj)
Expand Down

0 comments on commit 958b913

Please sign in to comment.